You are here

function _adminimal_admin_menu_access in Adminimal Administration Menu 7.2

Same name and namespace in other branches
  1. 7 adminimal_admin_menu.module \_adminimal_admin_menu_access()

Check if the user has access to use the admin menu.

Return value

bool Result of access checks.

2 calls to _adminimal_admin_menu_access()
adminimal_admin_menu_page_build in ./adminimal_admin_menu.module
Implements hook_page_build().
adminimal_admin_menu_preprocess_html in ./adminimal_admin_menu.module
Implements hook_preprocess_html().

File

./adminimal_admin_menu.module, line 298
Themes Administration menu like Adminimal theme.

Code

function _adminimal_admin_menu_access() {
  if (!user_access('access administration menu') || admin_menu_suppress(FALSE)) {
    return FALSE;
  }

  // Performance: Skip this entirely for AJAX requests.
  if (strpos($_GET['q'], 'js/') === 0) {
    return FALSE;
  }
  return TRUE;
}