Manual:Hooks/ShowRawCssJs

From MediaWiki.org
Jump to navigation Jump to search
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": "MyExtensionHooks::onShowRawCssJs"
	}
}

For MediaWiki ≤1.25:

$wgHooks['ShowRawCssJs'][] = 'MyExtensionHooks::onShowRawCssJs';
Called from:File(s): Article.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