function theme_admin_block
theme_admin_block($variables)
Returns HTML for an administrative block for display.
Parameters
$variables: An associative array containing:
-
block: An array containing information about the block:
- show: A Boolean whether to output the block. Defaults to FALSE.
- title: The block's title.
- content: (optional) Formatted content for the block.
- description: (optional) Description of the block. Only output if 'content' is not set.
Related topics
File
- modules/system/system.admin.inc, line 2413
- Admin page callbacks for the system module.
Code
function theme_admin_block($variables) { $block = $variables['block']; $output = ''; // Don't display the block if it has no content to display. if (empty($block['show'])) { return $output; } $output .= '<div class="admin-panel">'; if (!empty($block['title'])) { $output .= '<h3>' . $block['title'] . '</h3>'; } if (!empty($block['content'])) { $output .= '<div class="body">' . $block['content'] . '</div>'; } else { $output .= '<div class="description">' . $block['description'] . '</div>'; } $output .= '</div>'; return $output; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!system!system.admin.inc/function/theme_admin_block/7.x