I have added a vocabulary as Sites with machine name as sites. I have added two custom fields in this vocabulary as :
1) URL 2) Status 0 or 1
I need to make a dropdown of all terms with status 1 something like.
get term.name from term join vocabulary on vid where vocabulary.machine_name = sites and term.status = 1
$v = taxonomy_vocabulary_machine_name_load('sites');
$t = taxonomy_get_tree($v->vid);
How do I get an array of enabled terms in the 'sites' vocabulary?