Manual:Hooks/TitleGetRestrictionTypes

From MediaWiki.org
Jump to: navigation, search
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:
$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.

Details[edit]

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