Manual:Hooks/SkinTemplateSetupPageCss
From Linux Web Expert
File:OOjs UI icon alert-destructive.svg | <translate> This feature was removed from MediaWiki core in version <tvar name=ver>1.19.0</tvar>.</translate> <translate> Please see <tvar name=page>BeforePageDisplay</tvar> for an alternative way to use this feature.</translate> |
SkinTemplateSetupPageCss | |
---|---|
<translate> Available from <tvar name=1><translate> version <tvar </tvar></translate> <translate> Removed in <tvar name=1><translate> version <tvar </tvar></translate> Sets up the CSS for a skin | |
<translate> Define function:</translate> | public static function onSkinTemplateSetupPageCss( &$out ) { ... }
|
<translate> Attach hook:</translate> | <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
"Hooks": {
"SkinTemplateSetupPageCss": "MediaWiki\\Extension\\MyExtension\\Hooks::onSkinTemplateSetupPageCss"
}
}
|
<translate> Called from:</translate> | <translate> File(s):</translate> SkinTemplate.php |
<translate> Interface:</translate> | SkinTemplateSetupPageCssHook.php |
<translate> For more information about attaching hooks, see <tvar name=1>Manual:Hooks </tvar>.</translate>
<translate> For examples of extensions using this hook, see <tvar name=cat>Category:SkinTemplateSetupPageCss extensions</tvar>.</translate>
Usage
Hook functions add to the skin's CSS by generating CSS and appending it to $out
. They should always return true to avoid interfering with other functions attached to this hook.