Make WordPress Core

Ticket #4991: post_type.diff

File post_type.diff, 1.3 KB (added by ryan, 17 years ago)
  • wp-admin/includes/post.php

     
    144144                $post_excerpt = '';
    145145
    146146        $post->post_status = 'draft';
     147        $post->post_type = 'post';
    147148        $post->comment_status = get_option( 'default_comment_status' );
    148149        $post->ping_status = get_option( 'default_ping_status' );
    149150        $post->post_pingback = get_option( 'default_pingback_flag' );
  • wp-admin/edit-form-advanced.php

     
    5454<input type="hidden" id="hiddenaction" name="action" value="<?php echo $form_action ?>" />
    5555<input type="hidden" id="originalaction" name="originalaction" value="<?php echo $form_action ?>" />
    5656<input type="hidden" name="post_author" value="<?php echo attribute_escape( $post->post_author ); ?>" />
    57 <input type="hidden" id="post_type" name="post_type" value="post" />
     57<input type="hidden" id="post_type" name="post_type" value="<?php echo $post->post_type ?>" />
    5858
    5959<?php echo $form_extra ?>
    6060<?php if ((isset($post->post_title) && '' == $post->post_title) || (isset($_GET['message']) && 2 > $_GET['message'])) : ?>