< Manual:Hooks 
 
      | PrefixSearchExtractNamespace | |
|---|---|
| Available from version 1.25.0 (Gerrit change 168167) Called if core was not able to extract a namespace from the search string so that extensions can attempt it. | |
| Define function: | public static function onPrefixSearchExtractNamespace( &$namespaces, &$search ) { ... }
 | 
| Attach hook: | In extension.json: {
	"Hooks": {
		"PrefixSearchExtractNamespace": "MyExtensionHooks::onPrefixSearchExtractNamespace"
	}
}
 | 
| Called from: | File(s): search/PrefixSearch.php, search/SearchEngine.php | 
| Interface: | PrefixSearchExtractNamespaceHook.php | 
For more information about attaching hooks, see Manual:Hooks.
For examples of extensions using this hook, see Category:PrefixSearchExtractNamespace extensions.
Details
- &$namespaces: array of int namespace keys to search in (change this if you can extract namespaces)
- &$search: search term (replace this with term without the namespace if you can extract one)
    This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.