Because the hook is called from within an if statement that checks whether
or not a canonical redirect should be performned. A "test" is also another
name for an "if" statement.
Additionally hook names cannot be changed and this hook is super old.
--
Brian
On Tuesday, December 15, 2020, Jeffrey Walton <noloader(a)gmail.com> wrote:
On Tue, Dec 15, 2020 at 7:57 PM Jeffrey Walton
<noloader(a)gmail.com> wrote:
On Tue, Dec 15, 2020 at 7:27 PM John <phoenixoverride(a)gmail.com> wrote:
>
> there should be a file located at /includes/Hook/
TestCanonicalRedirectHook.php
TestCanonicalRedirectHook.php
Perfect, thank you very much.
John, I have to ask...
Why was it not called RegisterCanonicalRedirect? Where did Test come from?
/**
* This is a hook handler interface, see docs/Hooks.md.
* Use the hook name "TestCanonicalRedirect" to register handlers
implementing this interface.
*
* @stable to implement
* @ingroup Hooks
*/
Based on the comment, it seems like a better name and it avoids
masquerading as a Test component.
Jeff
_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l