MediaWiki master
MediaWiki\Hook\InitializeArticleMaybeRedirectHook Interface Reference

This is a hook handler interface, see docs/Hooks.md. More...

Inherited by MediaWiki\HookContainer\HookRunner.

Public Member Functions

 onInitializeArticleMaybeRedirect ( $title, $request, &$ignoreRedirect, &$target, &$article)
 Use this hook to override whether a title is a redirect.
 

Detailed Description

This is a hook handler interface, see docs/Hooks.md.

Use the hook name "InitializeArticleMaybeRedirect" to register handlers implementing this interface.

Stability: stable
to implement

Definition at line 16 of file InitializeArticleMaybeRedirectHook.php.

Member Function Documentation

◆ onInitializeArticleMaybeRedirect()

MediaWiki\Hook\InitializeArticleMaybeRedirectHook::onInitializeArticleMaybeRedirect ( $title,
$request,
& $ignoreRedirect,
& $target,
& $article )

Use this hook to override whether a title is a redirect.

Since
1.35
Parameters
Title$titleTitle object for the current page
WebRequest$request
bool&$ignoreRedirectWhen set to true, the title will not redirect.
Title | string&$targetSet to an URL to do a HTTP redirect, or a Title to use that title instead of the original, without doing a HTTP redirect.
Article&$articleThe Article object that belongs to $title. Passed as a reference for legacy reasons, but should not be changed.
Returns
bool|void True or no return value to continue or false to abort

Implemented in MediaWiki\HookContainer\HookRunner.


The documentation for this interface was generated from the following file: