dsafaf

function c7sky_highlight_search_keywords($text){
if ( is_search() ) {
$s = get_search_query();
$keys = explode(‘ ‘, $s);
$text = preg_replace(‘/(‘ . implode(‘|’, $keys) . ‘)/iu’, ‘$1‘, $text);
}
return $text;
}
add_filter( ‘the_title’, ‘c7sky_highlight_search_keywords’ );
add_filter( ‘the_excerpt’, ‘c7sky_highlight_search_keywords’ );

function c7sky_highlight_search_keywords($text){
if ( is_search() ) {
$s = get_search_query();
$keys = explode(‘ ‘, $s);
$text = preg_replace(‘/(‘ . implode(‘|’, $keys) . ‘)/iu’, ‘$1‘, $text);
}
return $text;
}
add_filter( ‘the_title’, ‘c7sky_highlight_search_keywords’ );
add_filter( ‘the_excerpt’, ‘c7sky_highlight_search_keywords’ );