Manual:Hooks/SpecialSearchResults
From MediaWiki.org
| SpecialSearchResults | |
|---|---|
| Available from version 1.13.0 called before search result display when there are matches |
|
*Define function: |
function fnMyHook( $term, &$titleMatches, &$textMatches ) { ... }
|
*Attach hook: |
$wgHooks['SpecialSearchResults'][] = 'MyExtensionHooks::someExample'; |
| Called from: | SpecialSearch.php |
*For more information about attaching hooks, see Manual:Hooks.
*For examples of extensions using this hook, see Category:SpecialSearchResults extensions.
[edit] Details
- $term: string of search term
- &$titleMatches: empty or SearchResultSet object
- &$textMatches: empty or SearchResultSet object
[edit] Old behaviour
Referenced SearchResultSet can be easily wrapped for any purpose(caching results, etc). Please keep in mind that old behaviour used no reference for SearchResultSet objects.
