Extension:WikiSearch/Hooks/WikiSearchApplyResultTranslations

From mediawiki.org
WikiSearchApplyResultTranslations
Available from version 4.0.0
called right before returning the final results to the API. It can be used to alter the $results array. This can be useful to filter any pages the user is not allowed to see or add additional data to the query result.
Define function:
public static function onWikiSearchApplyResultTranslations( array &$results ) { ... }
Attach hook:
$wgHooks['WikiSearchApplyResultTranslations'][] = 'MyExtensionHooks::onWikiSearchApplyResultTranslations';
Called from:File(s): WikiSearch / src/SearchEngine.php
Function(s): applyResultTranslations

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

Details[edit]

  • array &$results: The results.