Manual:Hooks/SpecialSearchNogomatch
From Linux Web Expert
SpecialSearchNogomatch | |
---|---|
<translate> Available from <tvar name=1><translate> version <tvar </tvar></translate> Called when the 'Go' feature is triggered (generally from autocomplete search other than the main bar on Special:Search) and the target doesn't exist. Full text search results are generated after this hook is called. | |
<translate> Define function:</translate> | public static function onSpecialSearchNogomatch( &$title ) { ... }
|
<translate> Attach hook:</translate> | <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
"Hooks": {
"SpecialSearchNogomatch": "MediaWiki\\Extension\\MyExtension\\Hooks::onSpecialSearchNogomatch"
}
}
|
<translate> Called from:</translate> | <translate> File(s):</translate> specials/SpecialSearch.php |
<translate> Interface:</translate> | SpecialSearchNogomatchHook.php |
<translate> For more information about attaching hooks, see <tvar name=1>Manual:Hooks </tvar>.</translate>
<translate> For examples of extensions using this hook, see <tvar name=cat>Category:SpecialSearchNogomatch extensions</tvar>.</translate>
Details
- $title will be the Title object of the page searched for if it doesn't exist. This hook only runs if the page being searched for doesn't exist.