From 7e3b303f195fcae127f17fa01be63d19696fa32a Mon Sep 17 00:00:00 2001 From: Ryan Boren 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: https://develop.svn.wordpress.org/trunk@11111 602fd350-edb4-49c9-b593-d223f7449a82 --- 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 ); }