system_region_list

Definition

system_region_list($theme_key)
modules/system/system.module, line 969

Description

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

<?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];
}
?>
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.