system_default_region($theme)
Gets the name of the default region for a given theme.
Parameters
$theme: The name of a theme.
Return value
A string that is the region name.
File
- core/modules/system/system.module, line 1172
- Configuration system that lets administrators modify the workings of the site.
Code
function system_default_region($theme) {
$regions = array_keys(system_region_list($theme, REGIONS_VISIBLE));
return isset($regions[0]) ? $regions[0] : '';
}
Please login to continue.