Accessing taxonomy custom field values (Drupal 7)?
If you load the taxonomy term with taxonomy_term_load(), you will get any custom field you added to the vocabulary.

I created a vocabulary to which I add a boolean field (field_test_boolean); I added a taxonomy term to that vocabulary, and then executed the following code. (22 is the taxonomy term ID for the taxonomy term I created.)

$taxonomy_term = taxonomy_term_load(22);
dsm($taxonomy_term);


The output shown by dsm() is the following one.



If you want to get the field value for the language currently set for the field, you should use the following code.

$values = field_get_items('taxonomy_term', $taxonomy_term, 'field_test_boolean');


If you need to find the taxonomy terms for which the custom field contains specific values, you should use the EntityFieldQuery class.

  $query = new EntityFieldQuery();
  $entities = $query-&gt;entityCondition('entity_type', 'taxonomy_term')
    -&gt;entityCondition('bundle', 'fields_test')
    -&gt;fieldCondition('field_test_boolean', 'value', 1, '=')
    -&gt;execute();

  if (!empty($entities['taxonomy_term'])) {
    $taxonomy_terms = taxonomy_term_load_multiple(array_keys($entities['taxonomy_term']));
  }


Note

As noticed in a comment, there is a bug that doesn't allow to use the EntityFieldQuery class for taxonomy terms. The code seems fixed in the Drupal 7 development snapshot, but Drupal 7.14 is affected by the bug.