Created
October 13, 2013 20:20
-
-
Save anneallen/6966997 to your computer and use it in GitHub Desktop.
Allow line breaks and spans in widget title
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
/**Allow line breaks and spans in widget title*/ | |
add_filter('widget_title','my_widget_title',10,3); | |
function my_widget_title($title) | |
{ | |
$title = str_replace("[br]", "<br/>", $title); | |
$title = str_replace("[sp]", "<span>", $title); | |
$title = str_replace("[/sp]", "</span>", $title); | |
return $title; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment