Add a new region to theme programmatically in Drupal

/** * Implements hook_system_info_alter() * Adds a new “tray” region to the current theme */ function MODULE_system_info_alter(&$info, $file){ global $custom_theme; // If non-default theme configuration has been selected, set the custom theme. $custom_theme = isset ($theme) ? $theme : variable_get(‘theme_default’, ‘bartik’); if ($file->name == $custom_theme){ $info[‘regions’] = array_merge($info[‘regions’], array(‘tray’ => t(‘Tray’))); } }