You are here

function theme_admin_block_content in Drupal 7

Same name and namespace in other branches
  1. 5 modules/system/system.module \theme_admin_block_content()
  2. 6 modules/system/system.admin.inc \theme_admin_block_content()

Returns HTML for the content of an administrative block.

Parameters

$variables: An associative array containing:

  • content: An array containing information about the block. Each element of the array represents an administrative menu item, and must at least contain the keys 'title', 'href', and 'localized_options', which are passed to l(). A 'description' key may also be provided.

Related topics

4 theme calls to theme_admin_block_content()
system_admin_config_page in modules/system/system.admin.inc
Menu callback; Provide the administration overview page.
system_admin_menu_block_page in modules/system/system.admin.inc
Provide a single block from the administration menu as a page.
system_settings_overview in modules/system/system.admin.inc
Displays the configuration overview page.
theme_system_admin_index in modules/system/system.admin.inc
Returns HTML for the output of the dashboard page.

File

modules/system/system.admin.inc, line 2450
Admin page callbacks for the system module.

Code

function theme_admin_block_content($variables) {
  $content = $variables['content'];
  $output = '';
  if (!empty($content)) {
    $class = 'admin-list';
    if ($compact = system_admin_compact_mode()) {
      $class .= ' compact';
    }
    $output .= '<dl class="' . $class . '">';
    foreach ($content as $item) {
      $output .= '<dt>' . l($item['title'], $item['href'], $item['localized_options']) . '</dt>';
      if (!$compact && isset($item['description'])) {
        $output .= '<dd>' . filter_xss_admin($item['description']) . '</dd>';
      }
    }
    $output .= '</dl>';
  }
  return $output;
}