Manual:Hooks/PrefixSearchBackend
From MediaWiki.org
| PrefixSearchBackend | |
|---|---|
| Available from version 1.12.0 Override the title prefix search used for OpenSearch and AJAX search suggestions. |
|
*Define function: |
function fnMyHook( $ns, $search, $limit, &$results ) { ... }
|
*Attach hook: |
$wgHooks['PrefixSearchBackend'][] = 'MyExtensionHooks::someExample'; |
| Called from: | PrefixSearch.php |
*For more information about attaching hooks, see Manual:Hooks.
*For examples of extensions using this hook, see Category:PrefixSearchBackend extensions.
[edit] Details
- $ns : int namespace key to search in
- $search : search term (not guaranteed to be conveniently normalized)
- $limit : maximum number of results to return
- &$results : out param: array of page names (strings)
