Filters the the text before titles of private and password-protected posts.
<?php
function ccd_title_trim($title) {
$title = attribute_escape($title);
$findthese = array(
'#Protected:#',
'#Private:#'
);
$replacewith = array(
'', // Text to replace "Protected:"
'' // Text to replace "Private:"
);
$title = preg_replace($findthese, $replacewith, $title);
return $title;
}
add_filter( 'the_title', 'ccd_title_trim' );
?>
WordPress Snippet