theme_block($block)
drupal/includes/theme.inc, line 721
Return a themed block.
You can style your blocks by defining .block (all blocks), .block-<i>module</i> (all blocks of module <i>module</i>), and \#block-<i>module</i>-<i>delta</i> (specific block of module <i>module</i> with delta <i>delta</i>) in your theme's CSS.
$block An object populated with fields from the "blocks" database table ($block->module, $block->delta, $block->region, ...) and fields returned by <i>module</i>_block('view') ($block->subject, $block->content, ...).
A string containing the block output.
| Name | Description |
|---|---|
| Themeable functions | Functions that display HTML, and which can be customized by themes. |
function theme_block($block) {
$output = "<div class=\"block block-$block->module\" id=\"block-$block->module-$block->delta\">\n";
$output .= " <h2 class=\"title\">$block->subject</h2>\n";
$output .= " <div class=\"content\">$block->content</div>\n";
$output .= "</div>\n";
return $output;
}