Available from version 1.13.0
Removed in version 1.24.0
called before search result display when there are no matches
Define function:
public static function onSpecialSearchNoResults( $term ) { ... }
Attach hook: In extension.json:
	"Hooks": {
		"SpecialSearchNoResults": "MediaWiki\\Extension\\MyExtension\\Hooks::onSpecialSearchNoResults"
Called from: File(s): specials/SpecialSearch.php
Interface: SpecialSearchNoResultsHook.php

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

Details edit

  • $term: string of search term