Jump to content

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: In extension.json:
{
	"Hooks": {
		"MediaWikiPerformAction": "MediaWiki\\Extension\\MyExtension\\Hooks::onMediaWikiPerformAction"
	}
}
Called from: File(s): MediaWiki.php
Interface: MediaWikiPerformActionHook.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.

Note: To prevent the standard performAction class from doing anything, return false from this hook.