/[drupal]/contributions/modules/conditional_styles/conditional_styles.module
ViewVC logotype

Contents of /contributions/modules/conditional_styles/conditional_styles.module

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


Revision 1.3 - (show annotations) (download) (as text)
Mon May 25 09:53:55 2009 UTC (6 months ago) by johnalbin
Branch: MAIN
CVS Tags: DRUPAL-6--1-1, HEAD
Changes since 1.2: +9 -1 lines
File MIME type: text/x-php
Added support for maintenance theme page (pending #454462)
1 <?php
2 // $Id: conditional_styles.module,v 1.2 2008/09/14 10:11:18 johnalbin Exp $
3
4 /**
5 * Implements HOOK_theme().
6 */
7 function conditional_styles_theme($existing, $type, $theme, $path) {
8 include_once './' . drupal_get_path('module', 'conditional_styles') . '/conditional_styles.theme.inc';
9 return _conditional_styles_theme($existing, $type, $theme, $path);
10 }
11
12 /**
13 * Implements MODULE_preprocess_page().
14 */
15 function conditional_styles_preprocess_page(&$vars, $hook) {
16 // Append them to $styles and add a $conditional_styles variable.
17 $vars['styles'] .= $vars['conditional_styles'] = variable_get('conditional_styles_' . $GLOBALS['theme'], '');
18 }
19
20 /**
21 * Implements MODULE_preprocess_maintenance_page().
22 */
23 function conditional_styles_preprocess_maintenance_page(&$vars, $hook) {
24 // Append them to $styles and add a $conditional_styles variable.
25 $vars['styles'] .= $vars['conditional_styles'] = variable_get('conditional_styles_' . $GLOBALS['theme'], '');
26 }
27
28 /**
29 * Implements HOOK_enable().
30 */
31 function conditional_styles_enable() {
32 drupal_rebuild_theme_registry();
33 }

  ViewVC Help
Powered by ViewVC 1.1.2