Manual:Hooks/SpecialSearchResultsAppend

From Linux Web Expert

The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
SpecialSearchResultsAppend
<translate> Available from <tvar name=1><translate> version <tvar </tvar></translate>
Called after all search results HTML has been output. Note that in some cases, this hook will not be called (no results, too many results, SpecialSearchResultsPrepend returned false, etc).
<translate> Define function:</translate>
public static function onSpecialSearchResultsAppend( $specialSearch, $output, $term ) { ... }
<translate> Attach hook:</translate> <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
	"Hooks": {
		"SpecialSearchResultsAppend": "MediaWiki\\Extension\\MyExtension\\Hooks::onSpecialSearchResultsAppend"
	}
}
<translate> Called from:</translate> <translate> File(s):</translate> specials/SpecialSearch.php
<translate> Interface:</translate> SpecialSearchResultsAppendHook.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:SpecialSearchResultsAppend extensions</tvar>.</translate>


Details

  • $specialSearch: SpecialSearch object ($this)
  • $output: OutputPage
  • $term: Search term specified by the user

See also