Ticket #24171: 24171.1.diff
| File 24171.1.diff, 769 bytes (added by , 13 years ago) |
|---|
-
wp-includes/post.php
2331 2331 $post['post_status'] = 'trash'; 2332 2332 wp_insert_post($post); 2333 2333 2334 if ( 'page' == $post['post_type'] ) { 2335 // if the page is defined in option page_on_front or post_for_posts, 2336 // adjust the corresponding options 2337 if ( get_option('page_on_front') == $post_id ) { 2338 update_option('show_on_front', 'posts'); 2339 delete_option('page_on_front'); 2340 } 2341 if ( get_option('page_for_posts') == $post_id ) { 2342 delete_option('page_for_posts'); 2343 } 2344 } else { 2345 unstick_post( $post_id ); 2346 } 2347 2334 2348 wp_trash_post_comments($post_id); 2335 2349 2336 2350 do_action('trashed_post', $post_id);