Last active
March 3, 2016 17:41
-
-
Save bob-moore/cb7d8cd6bdb98de87c21 to your computer and use it in GitHub Desktop.
Filter for removing widget titles that start with !
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
<?php | |
if( !function_exists( 'mpress_remove_widget_titles' ) ) { | |
function mpress_remove_widget_titles( $widget_title ) { | |
if( substr( $widget_title, 0, 1 ) === '!' ) { | |
return; | |
} | |
return $widget_title; | |
} | |
add_filter( 'widget_title', 'mpress_remove_widget_titles' ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment