Manual:Hooks/ArticleRevisionVisibilitySet
(Redirected from Manual:Hooks/ArticleRevisionVisiblitySet)
ArticleRevisionVisibilitySet | |
---|---|
Available from version 1.13.0 Called when changing visibility of one or more revisions of an article | |
Define function: | public static function onArticleRevisionVisibilitySet( &$title, $ids, $visibilityChangeMap ) { ... }
|
Attach hook: | In extension.json:
{
"Hooks": {
"ArticleRevisionVisibilitySet": "MediaWiki\\Extension\\MyExtension\\Hooks::onArticleRevisionVisibilitySet"
}
}
|
Called from: | File(s): revisiondelete/RevDelRevisionList.php |
Interface: | ArticleRevisionVisibilitySetHook.php |
For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:ArticleRevisionVisibilitySet extensions.
Details
edit- &$title: title object of the article
- $ids: Ids to set the visibility for
- $visibilityChangeMap: Map of revision id to oldBits and newBits. This array can be examined to determine exactly what visibility bits have changed for each revision. This array is of the form
[id => ['oldBits' => $oldBits, 'newBits' => $newBits], ... ]
Note, for archived (normal deleted) revisions, this hook will trigger if the revision was selected via type=revision with ar_rev_id, but will not trigger if selected via type=archive with ar_timestamp. The former is used in the web interface, but the api can use either method.