function _menu_firstchild_find_non_firstchild_parent in Menu Firstchild 7
1 call to _menu_firstchild_find_non_firstchild_parent()
- menu_firstchild_tokens_alter in ./
menu_firstchild.module - Implementation of hook_tokens_alter().
File
- ./
menu_firstchild.module, line 117 - menu_firstchild.module Main file for the menu_firstchild module.
Code
function _menu_firstchild_find_non_firstchild_parent(array $menu_link) {
if ($menu_link['link_path'] !== '<firstchild>') {
return $menu_link;
}
$parent = menu_link_load($menu_link['plid']);
if (FALSE === $parent) {
return $menu_link;
}
if ($parent['link_path'] === '<firstchild>') {
$parent = _menu_firstchild_find_non_firstchild_parent($parent);
}
return $parent;
}