This is part of http://docs.moodle.org/en/Development:Theme_engines_for_Moodle%3F
$THEME is now initialised at the same time as $OUTPUT. Old functions like
theme_setup are deprecated in favour of methods on $PAGE. There is a new
theme_config class in outputlib.php that deals with loading the theme config.php file.
CSS used to be served by themes styles.php files calling a function in weblib.php.
Now it works by each theme's styles.php file doing
$themename = basename(dirname(__FILE__));
require_once(dirname(__FILE__) . '/../../theme/styles.php');
which is less code to be copied into each theme. (Old-style styles.php files still
work thanks to some code in deprecatedlib.php.)
Admin UI for choosing a theme cleaned up.
A couple of theme-specific hard-coded hacks like $THEME->cssconstants and
$THEME->CSSEdit have been replaced by a more generic $THEME->customcssoutputfunction
hook. See examples at the end of outputlib.php
Also:
* Fix setting the theme in the URL, which seems to have been broken since 1.9.
* Fix up errors on a few pages caused by the new initialisation order.
* MDL-19097 moodle_page::set_course should not set $COURSE unless it is $PAGE.
* httpsrequired() from moodlelib.php moved to $PAGE->https_required().
* Move has_started() method to the renderer base class.
* Further fixes to display of early errors.
* Remove print_header/footer_old from weblib. I did not mean to commit them before.
$THEME->standardsheets
that a theme can use to control how much of the
standard theme is included before the actual current
theme sheets.
When true, use all subsheets from "standard"
When not existent, use all subsheets from "standard" (this is to help old
themes work better out of the box)
When false, don't use standard at all
When an array of filenames, only use those (in that order).
This is the new standard theme, based on the excellent work by
Urs Hunkler (and I believe David Scotson had an influence)
who has started rationalising the old mess.
I've made this a very neutral, almost white theme.
[ Come to think of it maybe I've been looking at iPods and Mac Minis
a bit too much recently. ;-) ]
The idea is that the standard styles will be included by all
other themes (including custom themes) before local overriding
styles are applied.
This means that upgrades will cause less problems for custom themes.
It's a bit like the language packs, where "en" is always referenced
when a local language string isn't found.
PROGRAMMERS: All new styles MUST go into this "standard" theme,
and the default colours should match the plain white look.
Once this theme settles down a bit we need to upgrade all the other
packaged themes accordingly.
* Configurable defaults for the calendar upcoming events lookahead and
maximum upcoming events displayed (bug #1623)
* Configurable setting for which days of the week are treated as weekend
(bug #1919)
* Configurable setting for which day starts the week (the admin can now set
this as the default for new users and guests without messing with language
packs) (no butracker issue)
Includes preliminary support for DST!
Includes "admin sees all events or only own?" setting (bug 1972)
WARNING: Modified moodlelib.php to explicitly specify NOT-DST when
calling mktime() and gmmktime(). This is essential since we don't want
PHP to second-guess us for the DST matters, but... it may affect existing
code?