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": "MyExtensionHooks::onTitleGetRestrictionTypes"

For MediaWiki ≤1.25:

$wgHooks['TitleGetRestrictionTypes'][] = 'MyExtensionHooks::onTitleGetRestrictionTypes';
Called from:File(s): Title.php

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


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