Make WordPress Core

Changeset 21159


Ignore:
Timestamp:
06/28/2012 07:26:06 PM (13 years ago)
Author:
markjaquith
Message:

Do not store post_excerpt in a temporary variable when we can just return it directly. props niallkennedy. fixes #21041

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/post-template.php

    r21124 r21159  
    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;
    267     }
    268 
    269     return apply_filters('get_the_excerpt', $output);
     264        return __( 'There is no excerpt because this is a protected post.' );
     265    }
     266
     267    return apply_filters( 'get_the_excerpt', $post->post_excerpt );
    270268}
    271269
Note: See TracChangeset for help on using the changeset viewer.