Manual:Hooks/SearchGetNearMatch
From Linux Web Expert
SearchGetNearMatch | |
---|---|
<translate> Available from <tvar name=1><translate> version <tvar </tvar></translate> An extra chance for exact-title-matches in "go" searches | |
<translate> Define function:</translate> | public static function onSearchGetNearMatch( $term, &$title ) { ... }
|
<translate> Attach hook:</translate> | <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
"Hooks": {
"SearchGetNearMatch": "MediaWiki\\Extension\\MyExtension\\Hooks::onSearchGetNearMatch"
}
}
|
<translate> Called from:</translate> | <translate> File(s):</translate> SearchEngine.php |
<translate> Interface:</translate> | SearchGetNearMatchHook.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:SearchGetNearMatch extensions</tvar>.</translate>
Details
- $term : Search term string
- &$title : Outparam; set to $title object and return false for a match