Projet

Général

Profil

Paste
Télécharger (1,88 ko) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / themes / pixture_reloaded / template.php @ 4b706e38

1
<?php
2
// Pixture Reloaded by Adaptivethemes.com
3

    
4
/**
5
 * Override or insert variables into the html template.
6
 */
7
function pixture_reloaded_preprocess_html(&$vars) {
8
  global $theme_key;
9

    
10
  $theme_name = 'pixture_reloaded';
11
  $path_to_theme = drupal_get_path('theme', $theme_name);
12

    
13
  // Add a class for the active color scheme
14
  if (module_exists('color')) {
15
    $class = check_plain(get_color_scheme_name($theme_key));
16
    $vars['classes_array'][] = 'color-scheme-' . drupal_html_class($class);
17
  }
18

    
19
  // Add class for the active theme
20
  $vars['classes_array'][] = drupal_html_class($theme_key);
21

    
22
  // Add theme settings classes
23
  $settings_array = array(
24
    'box_shadows',
25
    'body_background',
26
    'menu_bullets',
27
    'menu_bar_position',
28
    'corner_radius',
29
  );
30
  foreach ($settings_array as $setting) {
31
    $vars['classes_array'][] = theme_get_setting($setting);
32
  }
33

    
34
  // Special case for PIE htc rounded corners, not all themes include this
35
  if (theme_get_setting('ie_corners') == 1) {
36
    drupal_add_css($path_to_theme . '/css/ie-htc.css', array(
37
      'group' => CSS_THEME,
38
      'browsers' => array(
39
        'IE' => 'lte IE 8',
40
        '!IE' => FALSE,
41
        ),
42
      'preprocess' => FALSE,
43
      )
44
    );
45
  }
46
}
47

    
48
/**
49
 * Override or insert variables into the html template.
50
 */
51
function pixture_reloaded_process_html(&$vars) {
52
  // Hook into color.module
53
  if (module_exists('color')) {
54
    _color_html_alter($vars);
55
  }
56
}
57

    
58
/**
59
 * Override or insert variables into the page template.
60
 */
61
function pixture_reloaded_process_page(&$vars) {
62
  // Hook into color.module
63
  if (module_exists('color')) {
64
    _color_page_alter($vars);
65
  }
66
}
67

    
68
/**
69
 * Override or insert variables into the block template.
70
 */
71
function pixture_reloaded_preprocess_block(&$vars) {
72
  if($vars['block']->module == 'superfish' || $vars['block']->module == 'nice_menu') {
73
    $vars['content_attributes_array']['class'][] = 'clearfix';
74
  }
75
}