Manual:Hooks/ArticleRevisionVisibilitySet
From Linux Web Expert
ArticleRevisionVisibilitySet | |
---|---|
<translate> Available from <tvar name=1><translate> version <tvar </tvar></translate> Called when changing visibility of one or more revisions of an article | |
<translate> Define function:</translate> | public static function onArticleRevisionVisibilitySet( &$title, $ids, $visibilityChangeMap ) { ... }
|
<translate> Attach hook:</translate> | <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
"Hooks": {
"ArticleRevisionVisibilitySet": "MediaWiki\\Extension\\MyExtension\\Hooks::onArticleRevisionVisibilitySet"
}
}
|
<translate> Called from:</translate> | <translate> File(s):</translate> revisiondelete/RevDelRevisionList.php |
<translate> Interface:</translate> | ArticleRevisionVisibilitySetHook.php |
<translate> For more information about attaching hooks, see <tvar name=1>Manual:Hooks </tvar>.</translate>
<translate> For examples of extensions using this hook, see <tvar name=cat>Category:ArticleRevisionVisibilitySet extensions</tvar>.</translate>
Details
- &$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], ... ]