Created
October 26, 2013 00:52
-
-
Save FriendlyWP/7164007 to your computer and use it in GitHub Desktop.
Bold words in widget titles using underscore + asterisk (_* word *_).
This file contains hidden or 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
// 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; | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment