relevanssi_show_matches

apply_filters( 'relevanssi_show_matches', string $result )

This filter hook lets you modify the search hits breakdown before Relevanssi adds it to the excerpts.

Parameters

$result
(string) The search hits breakdown text.

More information

If you enable the “Show breakdown of search hits in excerpts” option in Relevanssi settings, Relevanssi adds more information about the search hit in the excerpt. The easiest way to modify that information is to change the template in Relevanssi settings. You can also use this filter hook to modify the output after Relevanssi has replaced all the template variables but before Relevanssi adds the breakdown to the excerpt.

Currently, this filter hook does not get the post as a parameter, which is an oversight that I will fix in a future version.