function system_custom_theme

Implements hook_custom_theme().

File

drupal/core/modules/system/system.module, line 2392
Configuration system that lets administrators modify the workings of the site.

Code

function system_custom_theme() {
  if (drupal_container()
    ->isScopeActive('request')) {
    $request = drupal_container()
      ->get('request');
    $path = $request->attributes
      ->get('system_path');
    if (user_access('view the administration theme') && path_is_admin($path)) {
      return variable_get('admin_theme');
    }
  }
}