system_region_list
modules/system/system.module, строка 960
- Версии
- 5 – 6
system_region_list($theme_key)
Get a list of available regions from a specified theme.
Параметры
$theme_key
The name of a theme.
Возвращаемое значение
An array of regions in the form $region['name']
= 'description'
.
Код
<?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];
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии