FriendlyWP
10/26/2013 - 12:52 AM

Bold words in widget titles using underscore + asterisk (_* word *_).

Bold words in widget titles using underscore + asterisk (* word *).

// REPLACE _* *_ WITH <STRONG> HTML IN WIDGET TITLES
// usage: _*This*_ word is bold
add_filter( 'widget_title', function($title) {
    $title = str_replace('_*', '<strong>', $title);
    $title = str_replace('*_', '</strong>', $title);
    return $title;
} );