Do not store post_excerpt in a temporary variable when we can just return it directly. props niallkennedy. fixes #21041
git-svn-id: http://core.svn.wordpress.org/trunk@21159 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e0012c7e67
commit
c4205b38a4
|
@ -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 );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue