Manual:Hooks/SpecialSearchNoResults

From MediaWiki.org
Jump to navigation Jump to search
SpecialSearchNoResults
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): SpecialSearch.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