system_region_list
- Versions
- 4.7 – 6
system_region_list($theme_key)- 7
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'.
Code
modules/system/system.module, line 1009
<?php
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 