diff options
author | Brion Vibber <brion@pobox.com> | 2010-09-02 14:11:52 -0700 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-09-02 14:11:52 -0700 |
commit | c24458a9f047ba68f0ef8ff4307562df6c4f3611 (patch) | |
tree | 0ff8f476702b701c237c54630c5114468d17ed16 /lib/action.php | |
parent | 11f7fce3bb59af46dd76c1e219f8df04de9e03af (diff) |
Ticket #2638: allow themes to specify a base theme to load with 'include' setting in a theme.ini file
Diffstat (limited to 'lib/action.php')
-rw-r--r-- | lib/action.php | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/action.php b/lib/action.php index 2b3b707c5..3614c04e9 100644 --- a/lib/action.php +++ b/lib/action.php @@ -200,7 +200,7 @@ class Action extends HTMLOutputter // lawsuit if (Event::handle('StartShowStatusNetStyles', array($this)) && Event::handle('StartShowLaconicaStyles', array($this))) { - $this->cssLink('css/display.css',null, 'screen, projection, tv, print'); + $this->primaryCssLink(null, 'screen, projection, tv, print'); Event::handle('EndShowStatusNetStyles', array($this)); Event::handle('EndShowLaconicaStyles', array($this)); } @@ -248,6 +248,18 @@ class Action extends HTMLOutputter // lawsuit } } + function primaryCssLink($mainTheme=null, $media=null) + { + // If the currently-selected theme has dependencies on other themes, + // we'll need to load their display.css files as well in order. + $theme = new Theme($mainTheme); + $baseThemes = $theme->getDeps(); + foreach ($baseThemes as $baseTheme) { + $this->cssLink('css/display.css', $baseTheme, $media); + } + $this->cssLink('css/display.css', $mainTheme, $media); + } + /** * Show javascript headers * |