/[drupal]/contributions/modules/conditional_styles/conditional_styles.theme.inc
ViewVC logotype

Diff of /contributions/modules/conditional_styles/conditional_styles.theme.inc

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

revision 1.4, Sun Sep 14 23:26:47 2008 UTC revision 1.5, Mon May 25 14:33:03 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: conditional_styles.theme.inc,v 1.3 2008/09/14 10:06:03 johnalbin Exp $  // $Id: conditional_styles.theme.inc,v 1.4 2008/09/14 23:26:47 johnalbin Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 39  function _conditional_styles_theme($exis Line 39  function _conditional_styles_theme($exis
39    // implementation: foreach ($array AS $key => &$value) {}    // implementation: foreach ($array AS $key => &$value) {}
40    
41    // Process the conditional stylesheets for every active theme.    // Process the conditional stylesheets for every active theme.
42      global $language;
43    $themes = list_themes();    $themes = list_themes();
44    foreach (array_keys($themes) AS $theme) {    foreach (array_keys($themes) AS $theme) {
45      // We only need to process active themes.      // We only need to process active themes.
# Line 74  function _conditional_styles_theme($exis Line 75  function _conditional_styles_theme($exis
75                // Don't allow non-existent stylesheets to clutter the logs with 404.                // Don't allow non-existent stylesheets to clutter the logs with 404.
76                if (file_exists("./$path/$file")) {                if (file_exists("./$path/$file")) {
77                  $output .= "<link type=\"text/css\" rel=\"stylesheet\" media=\"$media\" href=\"$base_path$path/$file$query_string\" />\n";                  $output .= "<link type=\"text/css\" rel=\"stylesheet\" media=\"$media\" href=\"$base_path$path/$file$query_string\" />\n";
78                    if ($language->direction == LANGUAGE_RTL){
79                      $file_rtl = str_replace('.css', '-rtl.css', $file);
80                      if (file_exists("./$path/$file_rtl")) {
81                        $output .= "<link type=\"text/css\" rel=\"stylesheet\" media=\"$media\" href=\"$base_path$path/$file_rtl$query_string\" />\n";
82                      }
83                    }
84                }                }
85              }              }
86            }            }

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

  ViewVC Help
Powered by ViewVC 1.1.2