Open main menu


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": "MyExtensionHooks::onSpecialSearchNoResults"

For MediaWiki ≤1.25:

$wgHooks['SpecialSearchNoResults'][] = 'MyExtensionHooks::onSpecialSearchNoResults';
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:SpecialSearchNoResults extensions.


  • $term: string of search term