Manual:Hooks/OpenSearchUrls

OpenSearchUrls
Available from version 1.13.0
Called when constructing the OpenSearch description XML. Hooks can alter or append to the array of URLs for search & suggestion formats.
Define function:
public static function onOpenSearchUrls( &$urls ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"OpenSearchUrls": "MediaWiki\\Extension\\MyExtension\\Hooks::onOpenSearchUrls"
	}
}
Called from: File(s): ../opensearch_desc.php
Interface: OpenSearchUrlsHook.php

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

Details

edit
  • &$urls: array of associative arrays with Url element attributes