protected_title_format and private_title_format. Props anderswc. fixes #8918
git-svn-id: https://develop.svn.wordpress.org/trunk@11111 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
3b7130bbae
commit
7e3b303f19
@ -109,10 +109,13 @@ function get_the_title( $id = 0 ) {
|
||||
$title = $post->post_title;
|
||||
|
||||
if ( !is_admin() ) {
|
||||
if ( !empty($post->post_password) )
|
||||
$title = sprintf(__('Protected: %s'), $title);
|
||||
else if ( isset($post->post_status) && 'private' == $post->post_status )
|
||||
$title = sprintf(__('Private: %s'), $title);
|
||||
if ( !empty($post->post_password) ) {
|
||||
$protected_title_format = apply_filters('protected_title_format', __('Protected: %s'));
|
||||
$title = sprintf($protected_title_format, $title);
|
||||
} else if ( isset($post->post_status) && 'private' == $post->post_status ) {
|
||||
$private_title_format = apply_filters('private_title_format', __('Private: %s'));
|
||||
$title = sprintf($private_title_format, $title);
|
||||
}
|
||||
}
|
||||
return apply_filters( 'the_title', $title );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user