function easy_breadcrumb_init in Easy Breadcrumb 7.2
Same name and namespace in other branches
- 6 easy_breadcrumb.module \easy_breadcrumb_init()
- 7 easy_breadcrumb.module \easy_breadcrumb_init()
Implements hook_init().
File
- ./
easy_breadcrumb.module, line 30 - The Easy Breadcrumb module provides a block to be embedded in any page.
Code
function easy_breadcrumb_init() {
global $theme;
$site_theme = variable_get('theme_default', 'bartik');
$admin_theme = variable_get('admin_theme', 'seven');
// Disable Admin theme breadcrumb, but only if different to site theme.
if ($theme === $admin_theme && $site_theme !== $admin_theme) {
$disable_admin_breadcrumb = variable_get(EasyBreadcrumbConstants::DB_VAR_DISABLE_ADMIN_BREADCRUMB, FALSE);
if ($disable_admin_breadcrumb) {
// Set the Drupal's default breadcrumb as an empty array to disable it.
drupal_set_breadcrumb(array());
}
}
else {
$disable_drupal_default_breadcrumb = variable_get(EasyBreadcrumbConstants::DB_VAR_DISABLE_DEFAULT_DRUPAL_BREADCRUMB, TRUE);
if ($disable_drupal_default_breadcrumb) {
// Set the Drupal's default breadcrumb as an empty array to disable it.
drupal_set_breadcrumb(array());
}
}
}