Available since: 3.0
searchwp_th_do_shortcode
View Parameters »When highlighting is enabled AND searchwp_th_strip_shortcodes
returns false
, SearchWP will automatically expand Shortcodes prior to seeking content to highlight. You can prevent that behavior with this hook:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Prevent SearchWP from expanding Shortcodes when highlighting. | |
add_filter( 'searchwp_th_do_shortcode', '__return_false' ); |
Parameters
Parameter | Type | Description |
---|---|---|
$enabled |
Boolean |
Whether to expand Shortcodes prior to highlighting |