Manual:Hooks/ShowRawCssJs

From mediawiki.org
ShowRawCssJs
Available from version 1.11.0
Removed in version 1.29.0
Customize the output of raw CSS and JavaScript in page views
Define function:
public static function onShowRawCssJs( $text, Title $title, OutputPage $output ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"ShowRawCssJs": "MediaWiki\\Extension\\MyExtension\\Hooks::onShowRawCssJs"
	}
}
Called from: File(s): Article.php
Interface: ShowRawCssJsHook.php

For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:ShowRawCssJs extensions.


Details[edit]

  • $text: Text being shown
  • $title: Title of the custom script/stylesheet page
  • $output: Current OutputPage object