WordPress.org

Make WordPress Core

Ticket #16673: 16673.diff

File 16673.diff, 1.1 KB (added by scribu, 3 years ago)
  • wp-admin/includes/post.php

     
    2525 
    2626        if ( $update ) 
    2727                $post_data['ID'] = (int) $post_data['post_ID']; 
    28         $post_data['post_content'] = isset($post_data['content']) ? $post_data['content'] : ''; 
    29         $post_data['post_excerpt'] = isset($post_data['excerpt']) ? $post_data['excerpt'] : ''; 
    30         $post_data['post_parent'] = isset($post_data['parent_id'])? $post_data['parent_id'] : ''; 
     28 
     29        if ( isset( $post_data['content'] ) ) 
     30                $post_data['post_content'] = $post_data['content']; 
     31 
     32        if ( isset( $post_data['excerpt'] ) ) 
     33                $post_data['post_excerpt'] = $post_data['excerpt']; 
     34 
     35        if ( isset( $post_data['parent_id'] ) ) 
     36                $post_data['post_parent'] = $post_data['parent_id']; 
     37 
    3138        if ( isset($post_data['trackback_url']) ) 
    3239                $post_data['to_ping'] = $post_data['trackback_url']; 
    3340 
     
    17001707        <div id="preloaded-dialogs" style="display:none;"> 
    17011708<?php   do_action('tiny_mce_preload_dialogs'); ?> 
    17021709        </div> 
    1703 <?php } 
    1704  No newline at end of file 
     1710<?php }