Manual:Hooks/SpecialPageBeforeExecute

Category:MediaWiki hooks#SpecialPageBeforeExecute Category:Hooks added in MediaWiki 1.20.0#SpecialPageBeforeExecute
SpecialPageBeforeExecute
Available from version 1.20.0
Called before SpecialPage::execute().
Define function:
public static function onSpecialPageBeforeExecute( SpecialPage $special, $subPage ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"SpecialPageBeforeExecute": "MediaWiki\\Extension\\MyExtension\\Hooks::onSpecialPageBeforeExecute"
	}
}
Called from: File(s): specials/SpecialPage.phpCategory:MediaWiki hooks included in SpecialPage.php#SpecialPageBeforeExecute
Interface: SpecialPageBeforeExecuteHook.php

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

Details

  • $special: the SpecialPage object
  • $subPage: the subpage string or null if no subpage was specified
Category:Hooks added in MediaWiki 1.20.0 Category:MediaWiki hooks Category:MediaWiki hooks included in SpecialPage.php