Manual:Hooks/SpecialPageBeforeExecute

From Linux Web Expert

SpecialPageBeforeExecute
<translate> Available from <tvar name=1><translate> version <tvar </tvar></translate>
Called before SpecialPage::execute().
<translate> Define function:</translate>
public static function onSpecialPageBeforeExecute( SpecialPage $special, $subPage ) { ... }
<translate> Attach hook:</translate> <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
	"Hooks": {
		"SpecialPageBeforeExecute": "MediaWiki\\Extension\\MyExtension\\Hooks::onSpecialPageBeforeExecute"
	}
}
<translate> Called from:</translate> <translate> File(s):</translate> specials/SpecialPage.php
<translate> Interface:</translate> SpecialPageBeforeExecuteHook.php

<translate> For more information about attaching hooks, see <tvar name=1>Manual:Hooks </tvar>.</translate>
<translate> For examples of extensions using this hook, see <tvar name=cat>Category:SpecialPageBeforeExecute extensions</tvar>.</translate>


Details

  • $special: the SpecialPage object
  • $subPage: the subpage string or null if no subpage was specified