Manual:Hooks/TitleIsAlwaysKnown
From Linux Web Expert
TitleIsAlwaysKnown | |
---|---|
<translate> Available from <tvar name=1><translate> version <tvar </tvar></translate> Allows overriding default behaviour for determining if a page exists. If $isKnown is kept as null, regular checks happen. If it's a boolean, this value is returned by the isKnown method. | |
<translate> Define function:</translate> | public static function onTitleIsAlwaysKnown( $title, &$isKnown ) { ... }
|
<translate> Attach hook:</translate> | <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
"Hooks": {
"TitleIsAlwaysKnown": "MediaWiki\\Extension\\MyExtension\\Hooks::onTitleIsAlwaysKnown"
}
}
|
<translate> Called from:</translate> | <translate> File(s):</translate> Title.php |
<translate> Interface:</translate> | TitleIsAlwaysKnownHook.php |
<translate> For more information about attaching hooks, see <tvar name=1>Manual:Hooks </tvar>.</translate>
<translate> For examples of extensions using this hook, see <tvar name=cat>Category:TitleIsAlwaysKnown extensions</tvar>.</translate>
Details
- $title: Title object that is being checked
- $isKnown: Boolean|null; whether MediaWiki currently thinks this page is known