A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Hooks/CanonicalNamespaces below:

Manual:Hooks/CanonicalNamespaces - MediaWiki

CanonicalNamespaces Available from version 1.17.0 (r71576, CodeReview archive)
For extensions adding their own namespaces or altering the defaults.
Define function:
public static function onCanonicalNamespaces( array &$namespaces ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"CanonicalNamespaces": "MediaWiki\\Extension\\MyExtension\\Hooks::onCanonicalNamespaces"
	}
}
Called from: File(s): MWNamespace.php Interface: CanonicalNamespacesHook.php

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


To define new namespaces, extensions should prefer extension registration over this hook (more information ).

Details[edit]

This hook has replaced $wgExtraNamespaces.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4