Make WordPress Core

Ticket #32266: #32266.patch

File #32266.patch, 862 bytes (added by arjunskumar, 10 years ago)
  • src/wp-admin/includes/export.php

     
    418418                         *
    419419                         * @param string $post_excerpt Excerpt for the current post.
    420420                         */
    421                         echo wxr_cdata( apply_filters( 'the_excerpt_export', $post->post_excerpt ) );
     421            if( !empty( $post->post_excerpt ) ) {
     422                echo wxr_cdata( apply_filters( 'the_excerpt_export', $post->post_excerpt ) );
     423            }
     424            else {
     425                echo wxr_cdata( apply_filters( 'the_excerpt_export', wp_trim_words( $post->post_content ), 55, '...' ) );
     426            }
    422427                ?></excerpt:encoded>
    423428                <wp:post_id><?php echo $post->ID; ?></wp:post_id>
    424429                <wp:post_date><?php echo $post->post_date; ?></wp:post_date>