From e7f2b40dd72ae4f8eb79cc5d08e3249201358caf Mon Sep 17 00:00:00 2001 From: ryan Date: Tue, 28 Apr 2009 17:36:10 +0000 Subject: [PATCH] protected_title_format and private_title_format. Props anderswc. fixes #8918 git-svn-id: http://svn.automattic.com/wordpress/trunk@11111 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/post-template.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/wp-includes/post-template.php b/wp-includes/post-template.php index f15bfbdb74..dccc6ca43b 100644 --- a/wp-includes/post-template.php +++ b/wp-includes/post-template.php @@ -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 ); }