< Manual:Hooks 
  
        
      | LanguageGetNamespaces | |
|---|---|
| Available from version 1.19.0 (r95775, codereview) Provide custom ordering for namespaces or remove namespaces.  | |
| Define function: | public static function onLanguageGetNamespaces( &$namespaces ) { ... }
 | 
| Attach hook: | In extension.json:
{
	"Hooks": {
		"LanguageGetNamespaces": "MyExtensionHooks::onLanguageGetNamespaces"
	}
}
 | 
| Called from: | File(s): ../languages/Language.php | 
| Interface: | LanguageGetNamespacesHook.php | 
For more information about attaching hooks, see Manual:Hooks.
For examples of extensions using this hook, see Category:LanguageGetNamespaces extensions.
 Warning:  Do not use this hook to add namespaces. Use CanonicalNamespaces for that.
Details
- &$namespaces: Array of namespaces indexed by their numbers
 
    This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.