Recent

bsearch_highlight_use_boundaries filter

bsearch_highlight_use_boundaries

Highlights search terms in HTML content without affecting tags or attributes.

Type: filter
Since: 3.3.0
Source: includes/util/class-helpers.php line 501

Parameters

TypeNameDescription
string$contentThe HTML content to process.
string|array$termsSingle term, phrase, or array of terms/phrases to highlight.

Usage

add_filter( 'bsearch_highlight_use_boundaries', function($content, $terms) {
    // ...
    return $content;
} );