Make WordPress Core

Ticket #21041: post-template.diff

File post-template.diff, 667 bytes (added by niallkennedy, 14 years ago)

return string without first storing it in a variable

  • wp-includes/post-template.php

     
    260260                _deprecated_argument( __FUNCTION__, '2.3' );
    261261
    262262        global $post;
    263         $output = $post->post_excerpt;
    264263        if ( post_password_required($post) ) {
    265                 $output = __('There is no excerpt because this is a protected post.');
    266                 return $output;
     264                return __( 'There is no excerpt because this is a protected post.' );
    267265        }
    268266
    269         return apply_filters('get_the_excerpt', $output);
     267        return apply_filters( 'get_the_excerpt', $post->post_excerpt );
    270268}
    271269
    272270/**