Open main menu


Available from version 1.18.0 (r86714)
allows passing custom data to search engine
Define function:
public static function onSpecialSearchSetupEngine( $search, $profile, $engine ) { ... }
Attach hook:

In extension.json:

	"Hooks": {
		"SpecialSearchSetupEngine": "MyExtensionHooks::onSpecialSearchSetupEngine"

For MediaWiki ≤1.25:

$wgHooks['SpecialSearchSetupEngine'][] = 'MyExtensionHooks::onSpecialSearchSetupEngine';
Called from:File(s): SpecialSearch.php

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


  • $search: special page object
  • $profile: String: current search profile
  • $engine: the search engine

See alsoEdit