Skip to content

Instantly share code, notes, and snippets.

@ikorgik
Last active December 30, 2015 11:29
Show Gist options
  • Save ikorgik/7822451 to your computer and use it in GitHub Desktop.
Save ikorgik/7822451 to your computer and use it in GitHub Desktop.
<?php
$query = new EntityFieldQuery();
$terms = $query->entityCondition('entity_type', 'taxonomy_term')
->entityCondition('bundle', $voc_name)
->fieldCondition('field_tags_show_as_filter', 'value', 1)
->execute();
$result = array();
if (!empty($terms)) {
foreach($terms['taxonomy_term'] as $term) {
$result[$term->tid] = $term->tid;
}
}
?>
<?php
if (isset($cancel_link)) {
$form['actions']['cancel'] = array(
'#markup' => $cancel_link,
'#weight' => 21,
);
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment