Get all Taxonomy Terms 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-&gt;vid);


How do I get an array of enabled terms in the 'sites' vocabulary?
Yes, entity_load can be used, but you have to retrieve entity ids yourself: 

$terms = array();

$v = taxonomy_vocabulary_machine_name_load('sites');
$query = new EntityFieldQuery();
$result = $query
  -&gt;entityCondition('entity_type', 'taxonomy_term')
  -&gt;propertyCondition('vid', $v-&gt;vid)
  -&gt;fieldCondition('field_status', 'value', 1) // If your field name is 'field_status'
  -&gt;execute();

if (!empty($result['taxonomy_term'])) {
  $terms = entity_load('taxonomy_term', array_keys($result['taxonomy_term']));
}

// dpm($terms);