Well Recently I came across the situation that the View exposed taxonomy field should show like "Content Taxonomy Tree" or "Taxonomy Term Reference Tree Widget" . It took quite sometime to figure out what to do. When i Figured it out i decide to write a little bit about it. Following steps will help you to achieve this.
2) You should have the view with taxonomy field field as exposed.
3) Copy and paste the following code on your custom module.
4) You should change the
YOUR_MODULE_NAME to your custom module name
your-toxonomy-field to your exposed taxonomy field
'#vocabulary' => taxonomy_vocabulary_load(3), Instead '3' you should keep your vocabulary ID.