You are here

function admin_suppress in Admin 7.2

Same name and namespace in other branches
  1. 6.2 admin.module \admin_suppress()

Implements hook_suppress().

Suppress display of administration toolbar.

This function should be called from within another module's page callback preferably using module_invoke_all('suppress') when the menu should not be displayed. This is useful for modules that implement popup pages or other special pages where the menu would be distracting or break the layout.

Parameters

$set: Defaults to TRUE. If called before hook_footer(), the menu will not be displayed. If FALSE is passed, the suppression state is returned.

2 calls to admin_suppress()
admin_page_build in ./admin.module
Preprocessor that runs *before* template_preprocess_page().
admin_preprocess_html in ./admin.module
Implements hook_preprocess_html().

File

./admin.module, line 416

Code

function admin_suppress($set = TRUE) {
  static $suppress = FALSE;
  if (!empty($set) && $suppress === FALSE) {
    $suppress = TRUE;
  }
  return $suppress;
}