dashboard_show_disabled

Versions
7
dashboard_show_disabled()

AJAX callback to show disabled blocks in the dashboard customization mode.

Code

modules/dashboard/dashboard.module, line 271

<?php
function dashboard_show_disabled() {
  global $theme_key;

  // Blocks are not necessarily initialized at this point.
  $blocks = _block_rehash();

  // Limit the list to disabled blocks for the current theme.
  foreach ($blocks as $key => $block) {
    if ($block['theme'] != $theme_key || (!empty($block['status']) && !empty($block['region']))) {
      unset($blocks[$key]);
    }
  }

  // Theme the output and end the page request.
  print theme('dashboard_disabled_blocks', array('blocks' => $blocks));
  drupal_exit();
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.