function system_region_list

7.x system.module system_region_list($theme_key, $show = REGIONS_ALL)
6.x system.module system_region_list($theme_key)

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 drupal-6.x/modules/block/block.admin.inc
Generate main blocks administration form.
system_default_region in drupal-6.x/modules/system/system.module
Get the name of the default region for a given theme.
system_initialize_theme_blocks in drupal-6.x/modules/system/system.module
Assign an initial, default set of blocks for a theme.
template_preprocess_block_admin_display_form in drupal-6.x/modules/block/block.admin.inc
Process variables for block-admin-display.tpl.php.
template_preprocess_page in drupal-6.x/includes/theme.inc
Process variables for page.tpl.php

... See full list

File

drupal-6.x/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];
}