Make WordPress Core


Ignore:
Timestamp:
04/11/2014 04:37:21 AM (11 years ago)
Author:
nacin
Message:

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

Merges [28073] from the 3.8 branch to the 3.7 branch.

props dd32.
see #27734.

Location:
branches/3.7
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/3.7

  • branches/3.7/src/wp-admin/includes/post.php

    r27992 r28074  
    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.