Manual:Hooks/MediaWikiPerformAction
From MediaWiki.org
| MediaWikiPerformAction | |
|---|---|
| Available from version 1.12.0 Override MediaWiki::performAction(). |
|
Define function: |
public static function onMediaWikiPerformAction( $output, $article, $title, $user, $request, $wiki ) { ... }
|
Attach hook: |
$wgHooks['MediaWikiPerformAction'][] = 'MyExtensionHooks::onMediaWikiPerformAction'; |
| Called from: | Wiki.php |
For more information about attaching hooks, see Manual:Hooks.
For examples of extensions using this hook, see Category:MediaWikiPerformAction extensions.
Details [edit]
Use this to do something completely different, after the basic globals have been set up, but before ordinary actions take place.
- $output: $wgOut
- $article: $wgArticle
- $title: $wgTitle
- $user: $wgUser
- $request: $wgRequest
- $wiki: MediaWiki object, added in 1.13
Note: To prevent the standard performAction class from doing anything, return false from this hook.
See Also [edit]
- UnknownAction hook - used for handling non-default actions specifically (after defaults have been checked)