function theme_admin_block in Drupal 6
Same name and namespace in other branches
- 5 modules/system/system.module \theme_admin_block()
- 7 modules/system/system.admin.inc \theme_admin_block()
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
2 theme calls to theme_admin_block()
- theme_admin_page in modules/
system/ system.admin.inc - This function formats an administrative page for viewing.
- theme_system_admin_by_module in modules/
system/ system.admin.inc - Theme output of the dashboard page.
File
- modules/
system/ system.admin.inc, line 1854 - Admin page callbacks for the system module.
Code
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>
{<span class="php-variable">$block</span>[<span class="php-string">'title'</span>]}
</h3>
<div class="body">
<p class="description">
{<span class="php-variable">$block</span>[<span class="php-string">'description'</span>]}
</p>
{<span class="php-variable">$block</span>[<span class="php-string">'content'</span>]}
</div>
</div>
EOT;
return $output;
}