You are here

function _custom_breadcrumbs_menu_stack in Custom Breadcrumbs 6.2

Same name and namespace in other branches
  1. 7.2 custom_breadcrumbs.module \_custom_breadcrumbs_menu_stack()

Stores the recursion levels.

Parameters

$link: If a menu item link is passed, it will be appended to the stack. If none is given, the stack will be returned and popped by one.

Return value

The stack, if no parameter is given.

2 calls to _custom_breadcrumbs_menu_stack()
custom_breadcrumbs_theme_menu_item in ./custom_breadcrumbs.module
custom_breadcrumbs_theme_menu_item_link in ./custom_breadcrumbs.module
Preprocessor for menu_item_link.

File

./custom_breadcrumbs.module, line 1099
Provide custom breadcrumbs for node-type pages and base functionality for submodules to add custom breadcrumbs for other types of pages.

Code

function _custom_breadcrumbs_menu_stack($link = FALSE) {
  static $stack = array();
  if ($link) {
    array_push($stack, $link);
  }
  else {
    return array_pop($stack);
  }
}