Ticket #18812: wp-18812.diff
File wp-18812.diff, 1.1 KB (added by , 14 years ago) |
---|
-
wp-includes/class-wp-xmlrpc-server.php
2396 2396 2397 2397 // We've got all the data -- post it: 2398 2398 $postdata = compact('post_author', 'post_date', 'post_date_gmt', 'post_content', 'post_title', 'post_category', 'post_status', 'post_excerpt', 'comment_status', 'ping_status', 'to_ping', 'post_type', 'post_name', 'post_password', 'post_parent', 'menu_order', 'tags_input', 'page_template'); 2399 if ( $post_status == 'publish' ) { 2400 $postdata['post_status'] = 'auto-draft'; 2401 } 2399 2402 2400 2403 $post_ID = wp_insert_post($postdata, true); 2401 2404 if ( is_wp_error( $post_ID ) ) … … 2425 2428 // in this function 2426 2429 if ( isset( $content_struct['wp_post_format'] ) ) 2427 2430 wp_set_post_terms( $post_ID, array( 'post-format-' . $content_struct['wp_post_format'] ), 'post_format' ); 2431 2432 $postdata['post_status'] = $post_status; 2433 wp_update_post( $postdata, true ); 2428 2434 2429 2435 logIO('O', "Posted ! ID: $post_ID"); 2430 2436