< Manual:Hooks
| This feature was removed from MediaWiki core in version 1.29.0 (after being deprecated in 1.21.0). Please see MultiContentSave for an alternative way to use this feature. |
| ArticleSave | |
|---|---|
| Available from version 1.4.0 Removed in version 1.29.0 Occurs whenever the software receives a request to save an article. Can be used to cancel or modify that request. | |
| Define function: | public static function onArticleSave( &$article, &$user, &$text, &$summary, $minor, $watchthis, $sectionanchor, &$flags, &$status ) { ... }
|
| Attach hook: | In extension.json:
{
"Hooks": {
"ArticleSave": "MyExtensionHooks::onArticleSave"
}
}
|
| Called from: | File(s): WikiPage.php |
| Interface: | ArticleSaveHook.php |
For more information about attaching hooks, see Manual:Hooks.
For examples of extensions using this hook, see Category:ArticleSave extensions.
Details
$article: the article (Article object) being saved$user: the user (User object) saving the article$text: the new article text$summary: the edit summary$minor: minor edit flag$watchthis: watch the page iftrue, unwatch the page iffalse, do nothing ifnull(since 1.17.0)$sectionanchor: not used$flags: bitfield, see documentation for details 1.7+$status: Status object, see documentation for details 1.14+
See also
This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.