_menu_parent_depth_limit

Versions
6 – 7
_menu_parent_depth_limit($item)

Find the depth limit for items in the parent select.

▾ 2 functions call _menu_parent_depth_limit()

menu_nodeapi in modules/menu/menu.module
Implementation of hook_nodeapi().
menu_parent_options in modules/menu/menu.module
Return a list of menu items that are valid possible parents for the given menu item.

Code

modules/menu/menu.module, line 352

<?php
function _menu_parent_depth_limit($item) {
  return MENU_MAX_DEPTH - 1 - (($item['mlid'] && $item['has_children']) ? menu_link_children_relative_depth($item) : 0);
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.