Manual:Hooks/TitleIsMovable
Appearance
| TitleIsMovable | |
|---|---|
| Available from version 1.19.0 (r95753, CodeReview archive) Called when determining if it is possible to move a page. | |
| Define function: | public static function onTitleIsMovable( Title $title, &$result ) { ... }
|
| Attach hook: | In extension.json:
{
"Hooks": {
"TitleIsMovable": "MediaWiki\\Extension\\MyExtension\\Hooks::onTitleIsMovable"
}
}
|
| Called from: | File(s): Title/Title.php Function(s): Title::isMovable() |
| Interface: | TitleIsMovableHook.php |
For more information about attaching hooks, see Manual:Hooks.
For examples of extensions using this hook, see Category:TitleIsMovable extensions.
Details
[edit]Note that this hook is not called for interwiki pages or pages in immovable namespaces: for these, isMovable() always returns false.
- $title: Title object that is being checked
- &$result: Boolean; whether MediaWiki currently thinks this page is movable. Hooks may change this value to override the return value of
Title::isMovable()
See also
[edit]- Manual:Hooks/TitleIsAlwaysKnown — Called when determining if a page exists.