You are here

function system_region_list in Drupal 6

Same name and namespace in other branches
  1. 8 core/modules/system/system.module \system_region_list()
  2. 4 modules/system.module \system_region_list()
  3. 5 modules/system/system.module \system_region_list()
  4. 7 modules/system/system.module \system_region_list()
  5. 9 core/modules/system/system.module \system_region_list()

Get a list of available regions from a specified theme.

Parameters

$theme_key: The name of a theme.

Return value

An array of regions in the form $region['name'] = 'description'.

7 calls to system_region_list()
block_admin_display_form in modules/block/block.admin.inc
Generate main blocks administration form.
system_default_region in modules/system/system.module
Get the name of the default region for a given theme.
system_initialize_theme_blocks in modules/system/system.module
Assign an initial, default set of blocks for a theme.
template_preprocess_block_admin_display_form in modules/block/block.admin.inc
Process variables for block-admin-display.tpl.php.
template_preprocess_page in includes/theme.inc
Process variables for page.tpl.php

... See full list

File

modules/system/system.module, line 1045
Configuration system that lets administrators modify the workings of the site.

Code

function system_region_list($theme_key) {
  static $list = array();
  if (!array_key_exists($theme_key, $list)) {
    $info = unserialize(db_result(db_query("SELECT info FROM {system} WHERE type = 'theme' AND name = '%s'", $theme_key)));
    $list[$theme_key] = array_map('t', $info['regions']);
  }
  return $list[$theme_key];
}