Available from version 3.5.4
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 onWSSearchApplyResultTranslations( array &$results ) { ... }
Attach hook:
$wgHooks['WSSearchApplyResultTranslations'][] = 'MyExtensionHooks::onWSSearchApplyResultTranslations';
Called from:File(s): WSSearch / 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:WSSearchApplyResultTranslations extensions.


  • array &$results: The results.