Manual:Hooks/SearchUpdate

From MediaWiki.org
Jump to navigation Jump to search
SearchUpdate
Available from version 1.10.0
Removed in version 1.22.0
Prior to search update completion
Define function:
public static function onSearchUpdate( $id, $namespace, $title, $text ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"SearchUpdate": "MyExtensionHooks::onSearchUpdate"
	}
}

For MediaWiki ≤1.25:

$wgHooks['SearchUpdate'][] = 'MyExtensionHooks::onSearchUpdate';
Called from:File(s): SearchUpdate.php

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

Details[edit]

  • $id : Page id
  • $namespace : Page namespace
  • $title : Page title
  • $text : Current text being indexed