Created
October 26, 2013 01:32
-
-
Save FriendlyWP/7164284 to your computer and use it in GitHub Desktop.
Remove widget title if it begins with an exclamation point (!)
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
// REMOVE WIDGET TITLE IF IT BEGINS WITH EXCLAMATION POINT | |
// To use, add a widget and in the Title field put !The title here | |
// The title will show in the control panel, but not on the site itself | |
add_filter( 'widget_title', 'remove_widget_title' ); | |
function remove_widget_title( $widget_title ) { | |
if ( substr ( $widget_title, 0, 1 ) == '!' ) | |
return; | |
else | |
return ( $widget_title ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment