You are here

function custom_breadcrumbs_select_breadcrumb in Custom Breadcrumbs 6.2

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

Selects a breadcrumb from an array of breadcrumbs.

Parameters

$breadcrumbs: The array of breadcrumb objects that the breadcrumb will be selected from.

$objs: An array of optional object (node, view, ...) to aid in the selection process.

Return value

$breadcrumb The selected breadcrumb object.

8 calls to custom_breadcrumbs_select_breadcrumb()
custom_breadcrumbsapi_breadcrumb_alter in custom_breadcrumbsapi/custom_breadcrumbsapi.module
Implements hook_breadcrumb_alter().
custom_breadcrumbsapi_preprocess in custom_breadcrumbsapi/custom_breadcrumbsapi.module
Implements hook_preprocess().
custom_breadcrumbs_nodeapi in ./custom_breadcrumbs.module
Implements hook_nodeapi().
custom_breadcrumbs_panels_ctools_render_alter in custom_breadcrumbs_panels/custom_breadcrumbs_panels.module
Implements hook_ctools_render_alter().
custom_breadcrumbs_views_views_pre_render in custom_breadcrumbs_views/custom_breadcrumbs_views.module
Implements hook_views_pre_render().

... See full list

File

./custom_breadcrumbs.module, line 287
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_select_breadcrumb($breadcrumbs, $objs = array()) {
  while ($breadcrumb = array_pop($breadcrumbs)) {
    if (custom_breadcrumbs_is_visible($breadcrumb, $objs)) {
      return $breadcrumb;
    }
  }
}