You are here

function _book_parent_depth_limit in Drupal 6

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

Find the depth limit for items in the parent select.

2 calls to _book_parent_depth_limit()
book_nodeapi in modules/book/book.module
Implementation of hook_nodeapi().
book_outline_form in modules/book/book.pages.inc
Build the form to handle all book outline operations via the outline tab.

File

modules/book/book.module, line 749
Allows users to structure the pages of a site in a hierarchy or outline.

Code

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