Available since: 3.0
searchwp_term_highlight_break_on_first_match
View Parameters »When highlighting is enabled SearchWP will stop finding terms to highlight once the first match is found. This is because search terms can be modified by other code potentially leading to unwanted highlights appearing. You can control this behavior with the following 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 | |
// Stop SearchWP from breaking highlight on first match. | |
add_filter( 'searchwp_term_highlight_break_on_first_match', '__return_false' ); |
Parameters
Parameter | Type | Description |
---|---|---|
$break_on_first_match |
Boolean |
Whether to stop highlighting on the first match |