Available from version 1.18.0 (r97175)
The equivalent of SpecialSearchProfileForm for the advanced form, a.k.a. power search box
Define function:
public static function onSpecialSearchPowerBox( &$showSections, $term, $opts ) { ... }
Attach hook:

In extension.json:

	"Hooks": {
		"SpecialSearchPowerBox": "MyExtensionHooks::onSpecialSearchPowerBox"
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:SpecialSearchPowerBox extensions.


The equivalent of SpecialSearchProfileFormTemplate:Enlink/list1 for the advanced form, a.k.a. power search box.

  • The first parameter, $showSections, is an array of the following keys containing input forms:
    • 'namespaceTables'
    • 'redirects' (if supported by the search engine)
  • $term is the search term
  • $opts is an array of hidden options with keys 'redirs' and 'profile', of which only 'profile' is added as hidden input. Starting from MediaWiki 1.32, $opts passed by reference. This mean allowing extensions to modify or even unset it.

See alsoEdit