You are here

function hook_admin_theme_check in Administration theme 7

Check if an option is "on" for the current page.

This hook allows modules to check for each option defined in hook_admin_theme_info if the option is "on".

Parameters

string $option: The option to check.

Return value

bool TRUE or FALSE indicating if the administration theme should be used.

1 function implements hook_admin_theme_check()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

admin_theme_admin_theme_check in ./admin_theme.module
Implements hook_admin_theme_check().
1 invocation of hook_admin_theme_check()
admin_theme_custom_theme in ./admin_theme.module
Implements hook_custom_theme().

File

./admin_theme.api.php, line 68
Hooks provided by the Administration theme module.

Code

function hook_admin_theme_check($option = NULL) {
  switch ($option) {
    case 'coder':
      return arg(0) == 'coder';
    case 'batch':
      return arg(0) == 'batch';
    case 'service_attachments':
      return arg(0) == 'node' && arg(2) == 'service_attachments';
    case 'webform_results':
      return arg(0) == 'node' && arg(2) == 'webform-results';
    case 'statistics':
      return (arg(0) == 'node' || arg(0) == 'user') && arg(2) == 'track';
  }
}