Manual:Hooks/ArticleSave
From MediaWiki.org
| ArticleSave | |
|---|---|
| Available from version 1.4.0 Occurs whenever the software receives a request to save an article |
|
*Define function: |
function fnMyHook( &$article, &$user, &$text, &$summary, |
*Attach hook: |
$wgHooks['ArticleSave'][] = 'fnMyHook'; |
| Called from: | Article.php |
*For more information about attaching hooks, see Manual:Hooks.
*For examples of extensions using this hook, see Category:ArticleSave extensions.
[edit] 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
- $watch: not used
- $sectionanchor: not used
- $flags: bitfield, see source code for details
[edit] Notes
- $flags was introduced in 1.7
- $minor was passed by reference before 1.7
- $watch and $sectionanchor were in use before 1.7 and were passed by reference
- This hook was called from EditPage and Image before 1.6.