< Manual:Hooks
TitleExists
Available from version 1.24.0 (Gerrit change 160546)
Called when determining whether a page exists at a given title.
Define function:
public static function onTitleExists( Title $title, bool &$exists ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"TitleExists": "MyExtensionHooks::onTitleExists"
	}
}
Called from: File(s): Title.php
Function(s): exists
Interface: TitleExistsHook.php

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

Details

  • $title: The title being tested.
  • &$exists: A boolean; whether the title exists.
This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.