You are here

function admin_suppress in Admin 6.2

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

Implementation of 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_footer in ./admin.module
Implementation of hook_footer().
admin_preprocess_page in ./admin.module
Implementation of hook_preprocess_page().

File

./admin.module, line 486

Code

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