Open main menu

Manual:Hooks/SpecialSearchResultsAppend

SpecialSearchResultsAppend
Available from version 1.21.0
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).
Define function:
public static function onSpecialSearchResultsAppend( $specialSearch, $output, $term ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"SpecialSearchResultsAppend": "MyExtensionHooks::onSpecialSearchResultsAppend"
	}
}

For MediaWiki ≤1.25:

$wgHooks['SpecialSearchResultsAppend'][] = 'MyExtensionHooks::onSpecialSearchResultsAppend';
Called from:File(s): specials/SpecialSearch.php

For more information about attaching hooks, see Manual:Hooks.
For examples of extensions using this hook, see Category:SpecialSearchResultsAppend extensions.

DetailsEdit

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

See alsoEdit