Ticket #22902: 22902.patch
File 22902.patch, 761 bytes (added by , 10 years ago) |
---|
-
wp-admin/includes/ajax-actions.php
1349 1349 if ( empty($data['ping_status']) ) 1350 1350 $data['ping_status'] = 'closed'; 1351 1351 1352 // Hack: wp_unique_post_slug() doesn't work for 1353 // drafts, so we will fake, that our post is published 1354 if ( ! empty( $data['post_name'] ) && in_array( $post['post_status'], array( 'draft', 'pending' ) ) ) { 1355 $post['post_status'] = 'publish'; 1356 $data['post_name'] = wp_unique_post_slug( $data['post_name'], $post['ID'], $post['post_status'], $post['post_type'], $post['post_parent'] ); 1357 } 1358 1352 1359 // update the post 1353 1360 edit_post(); 1354 1361