Skip to content

Instantly share code, notes, and snippets.

@bob-moore
Last active March 3, 2016 17:41
Show Gist options
  • Save bob-moore/cb7d8cd6bdb98de87c21 to your computer and use it in GitHub Desktop.
Save bob-moore/cb7d8cd6bdb98de87c21 to your computer and use it in GitHub Desktop.
Filter for removing widget titles that start with !
<?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