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'.

▾ 7 функции вызывают 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
Обрабатывает переменные для page.tpl.php
_block_compare in modules/block/block.admin.inc
Helper function for sorting blocks on admin/build/block.
_block_rehash in modules/block/block.module
Update the 'blocks' DB table with the blocks currently exported by modules.

Код

<?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];
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии

Вход в систему