You are here

function adminimal_admin_menu_disable in Adminimal Administration Menu 7.2

Same name and namespace in other branches
  1. 7 adminimal_admin_menu.install \adminimal_admin_menu_disable()

Implements hook_disable().

File

./adminimal_admin_menu.install, line 45
Performs installation functions.

Code

function adminimal_admin_menu_disable() {

  // Check if core "Toolbar" module was disabled by adminimal menu.
  if (variable_get('adminimal_admin_menu_core-toolbar-disabled', FALSE)) {

    // If true, re-enable the "Administration menu Toolbar style" module.
    module_enable(array(
      'toolbar',
    ), FALSE);

    // Display message to the administrator that the module is disabled.
    drupal_set_message(t('<strong>Administration menu Adminimal Theme</strong> module successfully disabled!<br />The core "Toolbar" module  was automatically re-enabled.'), 'status');
  }

  // Check if "Administration menu Toolbar style" was disabled by this module.
  if (variable_get('adminimal_admin_menu_toolbar-disabled', FALSE)) {

    // If true, re-enable the "Administration menu Toolbar style" module.
    module_enable(array(
      'admin_menu_toolbar',
    ), FALSE);

    // Display message to the administrator that the module is disabled.
    drupal_set_message(t('<strong>Administration menu Adminimal Theme</strong> module successfully disabled!<br />The old Toolbar theme was automatically re-enabled.'), 'status');
  }
}