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

Find the depth limit for items in the parent select.

1 call to _book_parent_depth_limit()
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);
}