Manual:Hooks/TitleGetRestrictionTypes

TitleGetRestrictionTypes
Available from version 1.16.0
Allows to modify the types of protection that can be applied.
Define function:
public static function onTitleGetRestrictionTypes( $title, &$types ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"TitleGetRestrictionTypes": "MediaWiki\\Extension\\MyExtension\\Hooks::onTitleGetRestrictionTypes"
	}
}
Called from: File(s): Title.php
Interface: TitleGetRestrictionTypesHook.php

For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:TitleGetRestrictionTypes extensions.


Details

edit
  • $title: The title in question.
  • &$types: The types of protection available.