/[drupal]/contributions/themes/omega/template.php
ViewVC logotype

Diff of /contributions/themes/omega/template.php

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.7.2.3 by himerus, Sat Oct 24 14:59:26 2009 UTC revision 1.7.2.4 by himerus, Sat Oct 31 23:54:05 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  //$Id: template.php,v 1.7.2.2 2009/10/12 02:10:01 himerus Exp $  //$Id: template.php,v 1.7.2.3 2009/10/24 14:59:26 himerus Exp $
3  // Report all PHP errors (see changelog)  // Report all PHP errors (see changelog)
4  //ini_set('error_reporting', E_ALL);  //ini_set('error_reporting', E_ALL);
5  /**  /**
# Line 18  Line 18 
18   * @return Array   * @return Array
19   */   */
20  function omega_preprocess(&$vars, $hook) {  function omega_preprocess(&$vars, $hook) {
21    if(is_file(drupal_get_path('theme', 'omega') . '/preprocess/preprocess-' . str_replace('_', '-', $hook) . '.inc')) {    // Collect all information for the active theme.
22      include_once('preprocess/preprocess-' . str_replace('_', '-', $hook) . '.inc');    $themes_active = array();
23      global $theme_info;
24    
25      // If there is a base theme, collect the names of all themes that may have
26      // preprocess files to load.
27      if($theme_info->base_theme) {
28        global $base_theme_info;
29        foreach($base_theme_info as $base){
30          $themes_active[] = $base->name;
31        }
32      }
33    
34      // Add the active theme to the list of themes that may have preprocess files.
35      $themes_active[] = $theme_info->name;
36    
37      // Check all active themes for preprocess files that will need to be loaded.
38      foreach($themes_active as $name) {
39        if(is_file(drupal_get_path('theme', $name) . '/preprocess/preprocess-' . str_replace('_', '-', $hook) . '.inc')) {
40          include(drupal_get_path('theme', $name) . '/preprocess/preprocess-' . str_replace('_', '-', $hook) . '.inc');
41        }
42    }    }
43  }  }
44  /**  /**

Legend:
Removed from v.1.7.2.3  
changed lines
  Added in v.1.7.2.4

  ViewVC Help
Powered by ViewVC 1.1.3