function alpha_alpha_page_structure_alter

cis7 template.php alpha_alpha_page_structure_alter(&$vars)
cle7 template.php alpha_alpha_page_structure_alter(&$vars)
elmsmedia7 template.php alpha_alpha_page_structure_alter(&$vars)
icor7 template.php alpha_alpha_page_structure_alter(&$vars)
meedjum_blog7 template.php alpha_alpha_page_structure_alter(&$vars)
mooc7 template.php alpha_alpha_page_structure_alter(&$vars)

Implements hook_alpha_page_alter().

File

sites/all/themes/ulmus/omega/alpha/template.php, line 203

Code

function alpha_alpha_page_structure_alter(&$vars) {
  $theme = alpha_get_theme();
  $temporary = array();

  foreach ($theme->regions as $region => $item) {
    if ($item['enabled'] && $theme->zones[$item['zone']]['enabled'] && ($item['force'] || !empty($vars[$region]))) {
      $temporary[$item['section']][$item['zone']][$region] = !empty($vars[$region]) ? $vars[$region] : array();
      $temporary[$item['section']][$item['zone']][$region]['#weight'] = (int) $item['weight'];
      $temporary[$item['section']][$item['zone']][$region]['#position'] = $item['position'];
      $temporary[$item['section']][$item['zone']][$region]['#data'] = $item;
      $temporary[$item['section']][$item['zone']][$region]['#grid'] = array(
        'prefix' => $item['prefix'],
        'suffix' => $item['suffix'],
        'push' => $item['push'],
        'pull' => $item['pull'],
        'columns' => $item['columns'],
      );

      $theme->regions[$region]['grid'] = &$temporary[$item['section']][$item['zone']][$region]['#grid'];

      if (empty($vars[$region])) {
        $temporary[$item['section']][$item['zone']][$region]['#region'] = $region;
        $temporary[$item['section']][$item['zone']][$region]['#theme_wrappers'] = array('region');
      }
    }
    else if (!empty($vars[$region])) {
      $vars['#excluded'][$region] = !empty($vars[$region]) ? $vars[$region] : array();
      $vars['#excluded'][$region]['#weight'] = (int) $item['weight'];
      $vars['#excluded'][$region]['#data'] = $item;
      $vars['#excluded'][$region]['#grid'] = array(
        'prefix' => $item['prefix'],
        'suffix' => $item['suffix'],
        'push' => $item['push'],
        'pull' => $item['pull'],
        'columns' => $item['columns'],
      );
    }

    unset($vars[$region]);
  }

  foreach ($theme->zones as $zone => $item) {
    if ($item['enabled'] && ($item['force'] || !empty($temporary[$item['section']][$zone]))) {
      if (isset($item['primary']) && isset($temporary[$item['section']][$zone][$item['primary']])) {
        alpha_calculate_primary($temporary[$item['section']][$zone], $item['primary'], $item['columns']);
      }

      if ($item['order']) {
        alpha_calculate_position($temporary[$item['section']][$zone]);
      }

      $temporary[$item['section']][$zone]['#theme_wrappers'] = array('zone');
      $temporary[$item['section']][$zone]['#zone'] = $zone;
      $temporary[$item['section']][$zone]['#weight'] = (int) $item['weight'];
      $temporary[$item['section']][$zone]['#data'] = $item;
      $temporary[$item['section']][$zone]['#grid_container'] = $item['columns'];
    }
  }

  foreach ($theme->sections as $section => $item) {
    if (isset($temporary[$section])) {
      $temporary[$section]['#theme_wrappers'] = array('section');
      $temporary[$section]['#section'] = $section;
    }
  }

  $vars = array_merge($vars, $temporary);
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.