Manual:Hooks/TitleGetRestrictionTypes

Category:MediaWiki hooks#TitleGetRestrictionTypes Category:Hooks added in MediaWiki 1.16.0#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.phpCategory:MediaWiki hooks included in Title.php#TitleGetRestrictionTypes
Interface: TitleGetRestrictionTypesHook.php

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

Details

  • $title: The title in question.
  • &$types: The types of protection available.
Category:Hooks added in MediaWiki 1.16.0 Category:MediaWiki hooks Category:MediaWiki hooks included in Title.php