Open main menu

Manual:Hooks/TitleGetEditNotices

TitleGetEditNotices
Available from version 1.22.0 (Gerrit change 75615)
Called when the edit notices for a page are being retrieved.
Define function:
public static function onTitleGetEditNotices( Title $title, int $oldid, array &$notices ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"TitleGetEditNotices": "MyExtensionHooks::onTitleGetEditNotices"
	}
}

For MediaWiki ≤1.25:

$wgHooks['TitleGetEditNotices'][] = 'MyExtensionHooks::onTitleGetEditNotices';
Called from:File(s): Title.php
Function(s): getEditNotices

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

DetailsEdit

  • $title: the title object of the page fetching its edit notices
  • $oldid: the version of the page being edited
  • $notices: an array containing the wikicode for the notices to be displayed in the page edit form