function menu_position_get_link in Menu Position 7
Same name and namespace in other branches
- 7.2 menu_position.module \menu_position_get_link()
Returns the dynamically set menu item for a specified rule.
Parameters
string $path: The path of the requested rule, e.g. menu-position/10.
Return value
string 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 546 - Provides dynamic menu links 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;
}