X-Git-Url: https://git.cyclocoop.org/%242?a=blobdiff_plain;f=includes%2Fskins%2FSkin.php;h=9c4ac507291c0bdf29a7912fe9aba27750b1f2f6;hb=a01d8be82c6eb6a39b9715b40b71f78817161a2a;hp=f3276e87ec6e98cf1429c3537e590751fc5f5050;hpb=6c3b72e3e90df4eed1487958f4178cd7c0c7bfad;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/skins/Skin.php b/includes/skins/Skin.php index f3276e87ec..9c4ac50729 100644 --- a/includes/skins/Skin.php +++ b/includes/skins/Skin.php @@ -166,7 +166,8 @@ abstract class Skin extends ContextSource { * It is recommended that skins wishing to override call parent::getDefaultModules() * and substitute out any modules they wish to change by using a key to look them up * - * For style modules, use setupSkinUserCss() instead. + * Any modules defined with the 'styles' key will be added as render blocking CSS via + * Output::addModuleStyles. Similarly, each key should refer to a list of modules * * @return array Array of modules with helper keys for easy overriding */ @@ -175,6 +176,10 @@ abstract class Skin extends ContextSource { $config = $this->getConfig(); $user = $out->getUser(); $modules = [ + // Styles key sets render blocking styles + // Unlike other keys in this definition it is an associative array + // where each key is the group name and points to a list of modules + 'styles' => [], // modules not specific to any specific skin or page 'core' => [ // Enforce various default modules for all pages and all skins