WordPress.org

Make WordPress Core

Changeset 22368


Ignore:
Timestamp:
11/05/12 14:44:25 (2 years ago)
Author:
ryan
Message:

In wp_xmlrpc_server::_insert_post(), preservea valid post status instead of overwriting it with 'draft'. This preserves the 'inherit' status of attachments. Props markoheijnen. fixes #22335

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/class-wp-xmlrpc-server.php

    r22277 r22368  
    10351035                break; 
    10361036            default: 
    1037                 $post_data['post_status'] = 'draft'; 
     1037                if ( ! get_post_status_object( $post_data['post_status'] ) ) 
     1038                    $post_data['post_status'] = 'draft'; 
    10381039            break; 
    10391040        } 
Note: See TracChangeset for help on using the changeset viewer.