$title: The title in question.
&$types: The types of protection available.
+'TitleIsCssOrJsPage': Called when determining if a page is a CSS or JS page
+$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()
+
'TitleMoveComplete': after moving an article (title)
$old: old title
$nt: new title
* @return Bool
*/
public function isCssOrJsPage() {
- return $this->mNamespace == NS_MEDIAWIKI
+ $retval = $this->mNamespace == NS_MEDIAWIKI
&& preg_match( '!\.(?:css|js)$!u', $this->mTextform ) > 0;
+ wfRunHooks( 'TitleIsCssOrJsPage', array( $this, &$retval ) );
+ return $retval;
}
/**