Manual:Hooks/SpecialSearchResultsPrepend
Appearance
SpecialSearchResultsPrepend | |
---|---|
Available from version 1.21.0 'SpecialSearchResultsPrepend': Called immediately before returning HTML on the search results page. Useful for including an external search provider. To disable the output of MediaWiki search output, return false. | |
Define function: | public static function onSpecialSearchResultsPrepend( $specialSearch, $output, $term ) { ... }
|
Attach hook: | In extension.json:
{
"Hooks": {
"SpecialSearchResultsPrepend": "MediaWiki\\Extension\\MyExtension\\Hooks::onSpecialSearchResultsPrepend"
}
}
|
Called from: | File(s): specials/SpecialSearch.php |
Interface: | SpecialSearchResultsPrependHook.php |
For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:SpecialSearchResultsPrepend extensions.
Details
[edit]- $specialSearch: SpecialSearch object ($this)
- $output: OutputPage object
- $term: Search term specified by the user