Make WordPress Core

Changeset 47335


Ignore:
Timestamp:
02/20/2020 10:10:11 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Posts, Post Types: Ensure edit_post() promotes an auto-draft to draft.

This fixes a regression in 3.7 branch introduced in [44076].

Follow-up to [28073].

Merges [47334] to the 3.7 branch.
See #49485.

File:
1 edited

Legend:

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

    r44076 r47335  
    252252    if ( is_wp_error($post_data) )
    253253        wp_die( $post_data->get_error_message() );
    254     $translated = _wp_get_allowed_postdata( $post_data );
    255254
    256255    if ( ( empty( $post_data['action'] ) || 'autosave' != $post_data['action'] ) && 'auto-draft' == $post_data['post_status'] ) {
    257256        $post_data['post_status'] = 'draft';
    258257    }
     258
     259    $translated = _wp_get_allowed_postdata( $post_data );
    259260
    260261    // Post Formats
Note: See TracChangeset for help on using the changeset viewer.