diff --git a/wp-admin/index.php b/wp-admin/index.php index 8c3577fdfd..57c5cc4b33 100644 --- a/wp-admin/index.php +++ b/wp-admin/index.php @@ -49,7 +49,7 @@ if ( $comments || $numcomments ) : <?php if ( $comments ) { foreach ($comments as $comment) { - echo '<li>' . sprintf(__('%1$s on %2$s'), get_comment_author_link(), '<a href="'. get_permalink($comment->comment_post_ID) . '#comment-' . $comment->comment_ID . '">' . apply_filters('the_title', get_the_title($comment->comment_post_ID)) . '</a>'); + echo '<li>' . sprintf(__('%1$s on %2$s'), get_comment_author_link(), '<a href="'. get_permalink($comment->comment_post_ID) . '#comment-' . $comment->comment_ID . '">' . get_the_title($comment->comment_post_ID) . '</a>'); edit_comment_link(__("Edit"), ' <small>(', ')</small>'); echo '</li>'; } diff --git a/wp-includes/comment-template.php b/wp-includes/comment-template.php index 91417b1b12..9baea1ae5c 100644 --- a/wp-includes/comment-template.php +++ b/wp-includes/comment-template.php @@ -364,7 +364,7 @@ function comments_popup_link($zero='No Comments', $one='1 Comment', $more='% Com if (!empty($CSSclass)) { echo ' class="'.$CSSclass.'"'; } - $title = attribute_escape(apply_filters('the_title', get_the_title())); + $title = attribute_escape(get_the_title()); echo ' title="' . sprintf( __('Comment on %s'), $title ) .'">'; comments_number($zero, $one, $more, $number); echo '</a>'; diff --git a/wp-includes/feed-atom-comments.php b/wp-includes/feed-atom-comments.php index 0cde6e7747..a05f17dfce 100644 --- a/wp-includes/feed-atom-comments.php +++ b/wp-includes/feed-atom-comments.php @@ -33,7 +33,6 @@ if ( have_comments() ) : while ( have_comments() ) : the_comment(); <title><?php if ( !is_singular() ) { $title = get_the_title($comment_post->ID); - $title = apply_filters('the_title', $title); $title = apply_filters('the_title_rss', $title); printf(__('Comment on %1$s by %2$s'), $title, get_comment_author_rss()); } else { diff --git a/wp-includes/feed-rss2-comments.php b/wp-includes/feed-rss2-comments.php index 4865dfbe0c..33e44c1d53 100644 --- a/wp-includes/feed-rss2-comments.php +++ b/wp-includes/feed-rss2-comments.php @@ -29,7 +29,6 @@ if ( have_comments() ) : while ( have_comments() ) : the_comment(); <title><?php if ( !is_singular() ) { $title = get_the_title($comment_post->ID); - $title = apply_filters('the_title', $title); $title = apply_filters('the_title_rss', $title); printf(__('Comment on %1$s by %2$s'), $title, get_comment_author_rss()); } else { diff --git a/wp-includes/feed.php b/wp-includes/feed.php index 5da62eef1e..3f635e67b6 100644 --- a/wp-includes/feed.php +++ b/wp-includes/feed.php @@ -22,7 +22,6 @@ function wp_title_rss($sep = '»') { function get_the_title_rss() { $title = get_the_title(); - $title = apply_filters('the_title', $title); $title = apply_filters('the_title_rss', $title); return $title; } diff --git a/wp-includes/post-template.php b/wp-includes/post-template.php index 2e1d1efd4d..6c8d37b94b 100644 --- a/wp-includes/post-template.php +++ b/wp-includes/post-template.php @@ -18,17 +18,20 @@ function get_the_ID() { function the_title($before = '', $after = '', $echo = true) { $title = get_the_title(); - if ( strlen($title) > 0 ) { - $title = apply_filters('the_title', $before . $title . $after, $before, $after); - if ( $echo ) - echo $title; - else - return $title; - } + + if ( strlen($title) <= 0 ) + return; + + $title = $before . $title . $after; + + if ( $echo ) + echo $title; + else + return $title; } -function get_the_title($id = 0) { +function get_the_title( $id = 0 ) { $post = &get_post($id); $title = $post->post_title; @@ -37,7 +40,7 @@ function get_the_title($id = 0) { else if ( 'private' == $post->post_status ) $title = sprintf(__('Private: %s'), $title); - return $title; + return apply_filters( 'the_title', $title ); } function the_guid( $id = 0 ) {