From 8e48096fcfb504ad833a8a28e8e8e4d9ff13ec89 Mon Sep 17 00:00:00 2001 From: Mark Jaquith Date: Thu, 28 Jun 2012 19:26:06 +0000 Subject: [PATCH] Do not store post_excerpt in a temporary variable when we can just return it directly. props niallkennedy. fixes #21041 git-svn-id: https://develop.svn.wordpress.org/trunk@21159 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/post-template.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/wp-includes/post-template.php b/wp-includes/post-template.php index b5b8847e90..6c3e4c51e1 100644 --- a/wp-includes/post-template.php +++ b/wp-includes/post-template.php @@ -260,13 +260,11 @@ function get_the_excerpt( $deprecated = '' ) { _deprecated_argument( __FUNCTION__, '2.3' ); global $post; - $output = $post->post_excerpt; if ( post_password_required($post) ) { - $output = __('There is no excerpt because this is a protected post.'); - return $output; + return __( 'There is no excerpt because this is a protected post.' ); } - return apply_filters('get_the_excerpt', $output); + return apply_filters( 'get_the_excerpt', $post->post_excerpt ); } /**