function drupal_theme_initialize

cis7 drupal_theme_initialize()
cle7 drupal_theme_initialize()
elmsmedia7 drupal_theme_initialize()
icor7 drupal_theme_initialize()
meedjum_blog7 drupal_theme_initialize()
mooc7 drupal_theme_initialize()

Initializes the theme system by loading the theme.

23 calls to drupal_theme_initialize()
advagg_admin_info_form in sites/all/modules/ulmus/advagg/
Form builder; Show info about advagg and advagg settings.
batch_process in includes/
Processes the batch.
block_admin_display in modules/block/
Menu callback for admin/structure/block.
block_page_build in modules/block/block.module
Implements hook_page_build().
context_reaction_block::execute in sites/all/modules/ulmus/context/plugins/

... See full list


includes/, line 70
The theme system, which controls the output of Drupal.


function drupal_theme_initialize() {
  global $theme, $user, $theme_key;

  // If $theme is already set, assume the others are set, too, and do nothing
  if (isset($theme)) {

  $themes = list_themes();

  // Only select the user selected theme if it is available in the
  // list of themes that can be accessed.
  $theme = !empty($user->theme) && drupal_theme_access($user->theme) ? $user->theme : variable_get('theme_default', 'bartik');

  // Allow modules to override the theme. Validation has already been performed
  // inside menu_get_custom_theme(), so we do not need to check it again here.
  $custom_theme = menu_get_custom_theme();
  $theme = !empty($custom_theme) ? $custom_theme : $theme;

  // Store the identifier for retrieving theme settings with.
  $theme_key = $theme;

  // Find all our ancestor themes and put them in an array.
  $base_theme = array();
  $ancestor = $theme;
  while ($ancestor && isset($themes[$ancestor]->base_theme)) {
    $ancestor = $themes[$ancestor]->base_theme;
    $base_theme[] = $themes[$ancestor];
  _drupal_theme_initialize($themes[$theme], array_reverse($base_theme));

  // Themes can have alter functions, so reset the drupal_alter() cache.

  // Provide the page with information about the theme that's used, so that a
  // later Ajax request can be rendered using the same theme.
  // @see ajax_base_page_theme()
  $setting['ajaxPageState'] = array(
    'theme' => $theme_key,
    'theme_token' => drupal_get_token($theme_key),
  drupal_add_js($setting, 'setting');



Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/ in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/
The website encountered an unexpected error. Please try again later.