Manual:Hooks/SpecialSearchResultsAppend

From MediaWiki.org
Jump to navigation Jump to search
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"
	}
}
Called from:File(s): specials/SpecialSearch.php
Interface:SpecialSearchResultsAppendHook.php

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

Details[edit]

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

See also[edit]