theme_admin_block

Versions
5 – 6
theme_admin_block($block)
7
theme_admin_block($variables)

This function formats an administrative block for display.

Parameters

$block An array containing information about the block. It should include a 'title', a 'description' and a formatted 'content'.

Related topics

Code

modules/system/system.admin.inc, line 1827

<?php
function theme_admin_block($block) {
  // Don't display the block if it has no content to display.
  if (empty($block['content'])) {
    return '';
  }

  $output = <<< EOT
  <div class="admin-panel">
    <h3>
      $block[title]
    </h3>
    <div class="body">
      <p class="description">
        $block[description]
      </p>
      $block[content]
    </div>
  </div>
EOT;
  return $output;
}
?>
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.