Manual:Hooks/ArticleUpdateBeforeRedirect

From MediaWiki.org
Jump to: navigation, search
ArticleUpdateBeforeRedirect
Available from version 1.11.0
After a page is updated (usually on save), before the user is redirected back to the page
Define function:
public static function onArticleUpdateBeforeRedirect( $article, &$sectionanchor, &$extraq ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"ArticleUpdateBeforeRedirect": "MyExtensionHooks::onArticleUpdateBeforeRedirect"
	}
}

For MediaWiki ≤1.25:

$wgHooks['ArticleUpdateBeforeRedirect'][] = 'MyExtensionHooks::onArticleUpdateBeforeRedirect';
Called from: File(s): EditPage.php

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

Details[edit]

  • $article: the article
  • &$sectionanchor: The section anchor link (e.g. "#overview" )
  • &$extraq: Extra query parameters which can be added via hooked functions