Jump to content

Manual:Hooks/TitleIsCssOrJsPage

From mediawiki.org
TitleIsCssOrJsPage
Available from version 1.19.0 (r93759, codereview)
Removed in version 1.29.0
Called when determining if a page is a CSS or JS page.
Define function:
public static function onTitleIsCssOrJsPage( $title, &$result ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"TitleIsCssOrJsPage": "MediaWiki\\Extension\\MyExtension\\Hooks::onTitleIsCssOrJsPage"
	}
}
Called from: File(s): Title.php
Function(s): Title::isCssOrJsPage()
Interface: TitleIsCssOrJsPageHook.php

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


Details

[edit]
  • $title: Title object that is being checked
  • &$result: Boolean; whether MediaWiki currently thinks this is a CSS/JS page. Hooks may change this value to override the return value of Title::isCssOrJsPage()