function menu_position_get_link in Menu Position 7.2
Same name and namespace in other branches
- 7 menu_position.module \menu_position_get_link()
Returns the dynamically set menu item for a specified rule.
Parameters
$path: The path of the requested rule, e.g. menu-position/10.
Return value
The title that should be used for the rule's menu item.
2 calls to menu_position_get_link()
- menu_position_set_link in ./
menu_position.module - Dynamically sets the menu item for a specified rule.
- menu_position_translated_menu_link_alter in ./
menu_position.module - Implements hook_translated_menu_link_alter().
File
- ./
menu_position.module, line 384 - Provides menu links for dynamic positioning of nodes based on configurable rules.
Code
function menu_position_get_link($path, $link = NULL) {
$links =& drupal_static(__FUNCTION__, array());
// If a link is given, save it for later retrieval.
if ($link) {
$links[$path] = $link;
}
return isset($links[$path]) ? $links[$path] : NULL;
}