mirror of
git://develop.git.wordpress.org/
synced 2025-02-27 18:13:00 +01:00
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
This commit is contained in:
parent
604f79dac0
commit
8e48096fcf
@ -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…
x
Reference in New Issue
Block a user