WordPress.org

Make WordPress Core


Ignore:
Timestamp:
04/11/2014 04:33:06 AM (6 years ago)
Author:
nacin
Message:

Ensure edit_post() promotes an auto-draft to draft. Fixes Quick Draft.

For the 3.8 branch. Regression from [27976] that does not affect trunk.

props dd32.
see #27734.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.8/src/wp-admin/includes/post.php

    r27991 r28073  
    204204    }
    205205
    206     if ( ( empty( $post_data['action'] ) || 'autosave' != $post_data['action'] ) && 'auto-draft' == $post_data['post_status'] ) {
    207         $post_data['post_status'] = 'draft';
    208     }
    209 
    210206    if ( isset($post_data['visibility']) ) {
    211207        switch ( $post_data['visibility'] ) {
     
    227223    if ( is_wp_error($post_data) )
    228224        wp_die( $post_data->get_error_message() );
     225
     226    if ( ( empty( $post_data['action'] ) || 'autosave' != $post_data['action'] ) && 'auto-draft' == $post_data['post_status'] ) {
     227        $post_data['post_status'] = 'draft';
     228    }
    229229
    230230    // Post Formats
Note: See TracChangeset for help on using the changeset viewer.