This small update adds three new filters to make Term Highlight more adaptive:
searchwp_th_query — Term Highlight attempts to automagically retrieve the search query to use, but this filter lets you specify what to use
The other issue tackled with this release is how to handle Shortcodes when generating ‘global’ excerpts. Term Highlight is also in part an excerpt generation engine which will generate content from your Custom Fields when your native excerpt doesn’t contain search matches. Trouble arose when these fields contained Shortcodes which were in turn echoed (undesirable) or cut off (arguably worse). Term Highlight now takes that into account.
By default Term Highlight will strip your Shortcodes prior to finding a global excerpt. You can disable that using the following hook:
add_filter( 'searchwp_th_strip_shortcodes', '__return_false' );
If you choose to utilize that hook, Term Highlight will fall back to doing Shortcodes. If you don’t want that to happen either (thus ending up in the same boat as prior to 1.8.3) you can also prevent that from happening using this hook:
add_filter( 'searchwp_th_do_shortcode', '__return_false' );
As always, Extension downloads are available on their respective documentation pages: https://searchwp.com/docs/extensions/term-highlight/