Manual:Hooks/TitleGetEditNotices

From mediawiki.org
Jump to navigation Jump to search
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"
	}
}
Called from: File(s): Title.php
Function(s): getEditNotices
Interface: TitleGetEditNoticesHook.php

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


Details[edit]

  • $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