Manual:Hooks/SpecialPageExecuteBeforePage
From Linux Web Expert
File:OOjs UI icon alert-destructive.svg | <translate> This feature was removed from MediaWiki core in version <tvar name=ver>1.14.0</tvar>.</translate> <translate> Please see <tvar name=page>SpecialPageBeforeExecute</tvar> for an alternative way to use this feature.</translate> |
SpecialPageExecuteBeforePage | |
---|---|
<translate> Available from <tvar name=1><translate> version <tvar </tvar></translate> <translate> Removed in <tvar name=1><translate> version <tvar </tvar></translate> Called before setting the page text of the special page | |
<translate> Define function:</translate> | public static function onSpecialPageExecuteBeforePage( $specialpage, $parameters, $function ) { ... }
|
<translate> Attach hook:</translate> | <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
"Hooks": {
"SpecialPageExecuteBeforePage": "MediaWiki\\Extension\\MyExtension\\Hooks::onSpecialPageExecuteBeforePage"
}
}
|
<translate> Called from:</translate> | <translate> File(s):</translate> SpecialPage.php |
<translate> Interface:</translate> | SpecialPageExecuteBeforePageHook.php |
<translate> For more information about attaching hooks, see <tvar name=1>Manual:Hooks </tvar>.</translate>
Details
- $specialpage: The SpecialPage being executed
- $parameters: Any parameter passed to the page (i.e. /wiki/index.php/SpecialAllpages/Foo. Foo is the parameter)
- $function: The function called to execute the special page (??)