Make WordPress Core


Ignore:
Timestamp:
03/05/2014 06:25:31 AM (11 years ago)
Author:
nacin
Message:

Always convert auto-drafts to drafts in edit_draft() and _wp_translate_postdata().

This regressed due to refactoring in [26995]. This commit fixes Quick Draft.

see #25272.

File:
1 edited

Legend:

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

    r27373 r27405  
    8484
    8585        // No longer an auto-draft
    86         if ( 'auto-draft' == $post_data['post_status'] )
     86        if ( 'auto-draft' === $post_data['post_status'] ) {
    8787            $post_data['post_status'] = 'draft';
     88        }
    8889    }
    8990
     
    114115            $post_data['post_status'] = 'pending';
    115116
    116     if ( ! isset($post_data['post_status']) )
    117         $post_data['post_status'] = $previous_status;
     117    if ( ! isset( $post_data['post_status'] ) ) {
     118        $post_data['post_status'] = 'auto-draft' === $previous_status ? 'draft' : $previous_status;
     119    }
    118120
    119121    if (!isset( $post_data['comment_status'] ))
Note: See TracChangeset for help on using the changeset viewer.