You are here

function _menu_parent_depth_limit in Drupal 6

Same name and namespace in other branches
  1. 7 modules/menu/menu.module \_menu_parent_depth_limit()

Find the depth limit for items in the parent select.

2 calls to _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.

File

modules/menu/menu.module, line 351
Allows administrators to customize the site navigation menu.

Code

function _menu_parent_depth_limit($item) {
  return MENU_MAX_DEPTH - 1 - ($item['mlid'] && $item['has_children'] ? menu_link_children_relative_depth($item) : 0);
}