function power_menu_get_term_by_name_vocab in Power Menu 7
Same name and namespace in other branches
- 6 power_menu.module \power_menu_get_term_by_name_vocab()
This is a rewrite of taxonomy_get_term_by_name but it also uses the vocab id (vid)
Parameters
string $name:
int $vid:
1 call to power_menu_get_term_by_name_vocab()
- _power_menu_form_menu_edit_item_submit in ./
power_menu.forms.inc - Callback function when menu_edit_item form is being submitted
File
- ./
power_menu.module, line 560 - This module provides some additional menu features. The features are not actually new, but are part of other modules. it's though very cumbersome to creating a new menu item, because one has to go to all the different places to configure these…
Code
function power_menu_get_term_by_name_vocab($name, $vid) {
$taxonomies = taxonomy_term_load_multiple(array(), array(
'vid' => $vid,
'name' => trim($name),
));
$result = array();
foreach ($taxonomies as $term) {
$result[] = (array) $term;
}
return $result;
}