function power_menu_taxonomy_terms_post_render in Power Menu 7.2
Implements the power_menu_taxonomy_terms:#post_render from PowerMenuTaxonomyHandler::menuFormAlter().
Disable the select option for used terms in other menu links.
1 string reference to 'power_menu_taxonomy_terms_post_render'
- PowerMenuTaxonomyHandler::menuFormAlter in plugins/
menu_handlers/ PowerMenuTaxonomyHandler.class.php
File
- plugins/
menu_handlers/ taxonomy.inc, line 22
Code
function power_menu_taxonomy_terms_post_render($content, $element) {
$terms = variable_get('power_menu_taxonomy_terms', array());
$mlid = arg(4);
foreach ($terms as $key => $value) {
// Is the mlid not used for the termid, disable it
if ($mlid != $value) {
$content = preg_replace('/( value="' . $key . '")/', '$1 disabled="disabled"', $content, 1);
}
}
return $content;
}