Hi, is there a function that quickly tells you the current theme in use in Moodle?
All these information is present in the $CFG object. You can print it like $CFG->theme and it will return current theme you are using.
maybe $CFG->theme can be overridden in some places.
I'd rather use:
$theme = $OUTPUT->theme;
With that you get the currently loaded theme.
Thanks for sharing this information. If this is the case, I will also use "$OUTPUT->theme" next time. 🤗
Oh sorry, there was a mistake.
It must be:
$theme = $PAGE->theme;
Sorry for the confusion.
I think you can use $CFG->theme
Just one more question, not important if it cant be done, but is there a quick way to find out if a theme is a child of Boost?
$parents = $PAGE->theme->parents;