system_region_list

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

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()

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];
}
Login or register to post comments