Código que remove o texto “Privado” que aparece antes do título do post no WordPress, em posts privados.
/**
* remove private prefix
* via https://code.difluir.com/
*/
if ( ! function_exists('difluir_remove_private_prefix') ) :
function difluir_remove_private_prefix( $title ) {
$findthese = array(
'#Protected:#',
'#Private:#',
'#Privado:#'
);
$replacewith = array(
'', // What to replace "Protected:" with
'', // What to replace "Private:" with
'' // What to replace "Privado:" with
);
$title = preg_replace( $findthese, $replacewith, $title );
return $title;
}
endif;
add_filter( 'the_title', 'difluir_remove_private_prefix' );