You are here

function admin_is_enabled in Admin 6

Wrapper to check whether various admin features are accessible to the current user and compatible with the current theme.

2 calls to admin_is_enabled()
admin_get_links in ./admin.module
Retrieve the admin links for a given object.
admin_preprocess_page in ./admin.module
Implementation of hook_preprocess_page().

File

./admin.module, line 273

Code

function admin_is_enabled($op = 'admin menu') {
  if (user_access($op)) {
    global $theme_info;

    // If the theme does not specify some flag for this feature, assume
    // it is compatible.
    if (!isset($theme_info->info['admin'][$op]) || isset($theme_info->info['admin'][$op]) && !empty($theme_info->info['admin'][$op])) {
      return TRUE;
    }
  }
  return FALSE;
}