function hook_menu_position_rule_alter in Menu Position 7.2
Same name and namespace in other branches
- 8 menu_position.api.php \hook_menu_position_rule_alter()
- 7 menu_position.api.php \hook_menu_position_rule_alter()
Allow a rule to be altered after it is evaluated but before action is taken.
Parameters
$rule: The rule that was just evaulated.
$context: A small context variable used by the menu_position module.
$rule_matches: Whether we have a matching rule or not.
$set_breadcrumb: Whether the breadcrumb still needs to be set or not.
1 invocation of hook_menu_position_rule_alter()
- menu_position_evaluate_rules in ./
menu_position.module - Evaluates all rules based on a given context.
File
- ./
menu_position.api.php, line 24 - Hooks provided by the Menu Position module.
Code
function hook_menu_position_rule_alter(&$rule, &$context, &$rule_matches, &$set_breadcrumb) {
// Disable the rule if we're looking at a node with a certain id.
if ($context['node']->nid == 119) {
$rule_matches = FALSE;
}
}