You are here

function path_breadcrumbs_page_alter in Path Breadcrumbs 7.3

Same name and namespace in other branches
  1. 7 path_breadcrumbs.module \path_breadcrumbs_page_alter()
  2. 7.2 path_breadcrumbs.module \path_breadcrumbs_page_alter()

Implements hook_page_alter().

File

./path_breadcrumbs.module, line 25

Code

function path_breadcrumbs_page_alter() {

  // Do not show breadcrumbs on error pages.
  if (!variable_get('path_breadcrumbs_enable_on_error_pages', FALSE)) {
    $bad_statuses = array(
      '404 Not Found',
      '403 Forbidden',
    );
    $http_headers = drupal_get_http_header();
    $status = isset($http_headers['status']) ? $http_headers['status'] : '200 OK';
    if (in_array($status, $bad_statuses)) {
      return;
    }
  }
  path_breadcrumbs_set_breadcrumb();
}