Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. system.module

function system_default_region

Gets the name of the default region for a given theme.

Parameters

$theme: The name of a theme.

Return value

string A string that is the region name.

Related topics

Authorized operations
Functions to run operations with elevated privileges via authorize.php.
1 call to system_default_region()
block_theme_initialize in core/modules/block/block.module
Assigns an initial, default set of blocks for a theme.

File

core/modules/system/system.module, line 433

Code

function system_default_region($theme) {
    $regions = array_keys(system_region_list($theme, REGIONS_VISIBLE));
    return $regions[0] ?? '';
}
RSS feed
Powered by Drupal