Make WordPress Core

Ticket #35487: 35487.patch

File 35487.patch, 745 bytes (added by sebastian.pisula, 9 years ago)
  • wp-includes/post-template.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    393393 *
    394394 * @since 2.3.0
    395395 *
    396  * @param int|WP_Post $id Optional. Post ID or post object.
     396 * @param int|WP_Post|null $post Optional. Post ID or post object.
    397397 * @return bool
    398398 */
    399 function has_excerpt( $id = 0 ) {
    400         $post = get_post( $id );
    401         return ( !empty( $post->post_excerpt ) );
     399function has_excerpt( $post = null ) {
     400        return (bool) get_the_excerpt( $post );
    402401}
    403402
    404403/**