Manual:Hooks/ArticleRevisionVisibilitySet

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], ... ]