function _current_theme_is_admin in Responsive and off-canvas menu 8.3
Same name and namespace in other branches
- 8.2 responsive_menu.module \_current_theme_is_admin()
- 4.4.x responsive_menu.module \_current_theme_is_admin()
- 4.0.x responsive_menu.module \_current_theme_is_admin()
- 4.1.x responsive_menu.module \_current_theme_is_admin()
- 4.3.x responsive_menu.module \_current_theme_is_admin()
Checks whether the current theme is the admin theme.
Return value
bool TRUE if the current theme is the admin theme.
3 calls to _current_theme_is_admin()
- responsive_menu_page_bottom in ./
responsive_menu.module - Implements hook_page_bottom().
- responsive_menu_preprocess_html in ./
responsive_menu.module - Implements hook_preprocess_html().
- responsive_menu_preprocess_toolbar in ./
responsive_menu.module - Implements hook_preprocess_toolbar().
File
- ./
responsive_menu.module, line 494 - Contains procedural code.
Code
function _current_theme_is_admin() {
$theme_info =& drupal_static(__FUNCTION__);
if (!isset($theme_info)) {
$theme_info['system_theme'] = \Drupal::config('system.theme');
$theme_info['admin_theme'] = $theme_info['system_theme']
->get('admin');
$theme_info['current_theme'] = \Drupal::service('theme.manager')
->getActiveTheme()
->getName();
}
return $theme_info['current_theme'] == $theme_info['admin_theme'] ? TRUE : FALSE;
}