automatically included into the HEAD section of the current theme.
Supports parent and standard files too.
I added this to support the inclusion of some IE specific CSS :-( which needs
to be done from HTML and not CSS, (MDL-7782) but it could be used to include other things
as well, or even to run some PHP code, set various vriables etc without messing
up the theme header.html (and regardless of the theme being used).
}
$meta = $stylesheetshtml.$meta;
+
+/// Add the meta page from the themes if any were requested
+
+ $metapage = '';
+
+ if (!isset($THEME->standardmetainclude) || $THEME->standardmetainclude) {
+ ob_start();
+ include_once($CFG->dirroot.'/theme/standard/meta.php');
+ $metapage .= ob_get_contents();
+ ob_end_clean();
+ }
+
+ if ($THEME->parent && (!isset($THEME->parentmetainclude) || $THEME->parentmetainclude)) {
+ ob_start();
+ include_once($CFG->dirroot.'/theme/'.$THEME->parent.'/meta.php');
+ $metapage .= ob_get_contents();
+ ob_end_clean();
+ }
+
+ if (!isset($THEME->metainclude) || $THEME->metainclude) {
+ ob_start();
+ include_once($CFG->dirroot.'/theme/'.current_theme().'/meta.php');
+ $metapage .= ob_get_contents();
+ ob_end_clean();
+ }
+
+ $meta = $meta."\n".$metapage;
+
+
if ($navigation == 'home') {
$home = true;
/// their own default styles.
+$THEME->metainclude = false;
+
+/// When this is enabled (or not set!) then Moodle will try
+/// to include a file meta.php from this theme into the
+/// <head></head> part of the page.
+
+
+$THEME->standardmetainclude = true;
+
+
+/// When this is enabled (or not set!) then Moodle will try
+/// to include a file meta.php from the standard theme into the
+/// <head></head> part of the page.
+
+
+$THEME->parentmetainclude = false;
+
+/// When this is enabled (or not set!) then Moodle will try
+/// to include a file meta.php from the parent theme into the
+/// <head></head> part of the page.
+
+
$THEME->navmenuwidth = 50;
/// You can use this to control the cutoff point for strings
--- /dev/null
+
+<!--[if IE 7]>
+ <link rel="stylesheet" type="text/css" href="<?php echo $CFG->wwwroot ?>/theme/standard/ie7.css" />
+<![endif]-->
+<!--[if IE 6]>
+ <link rel="stylesheet" type="text/css" href="<?php echo $CFG->wwwroot ?>/theme/standard/ie6.css" />
+<![endif]-->
+