Changeset 6337
- Timestamp:
- 11/16/2007 05:39:15 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/post.php
r6321 r6337 505 505 $parent_where = array( 'post_parent' => $postid ); 506 506 507 if ( 'page' == $post->post_type ) 507 if ( 'page' == $post->post_type) { 508 // if the page is defined in option page_on_front or post_for_posts, 509 // adjust the corresponding options 510 if ( get_option('page_on_front') == $postid ) { 511 update_option('show_on_front', 'posts'); 512 delete_option('page_on_front'); 513 } 514 if ( get_option('page_for_posts') == $postid ) { 515 delete_option('page_for_posts'); 516 } 517 518 // Point children of this page to its parent 508 519 $wpdb->update( $wpdb->posts, $parent_data, $parent_where + array( 'post_type' => 'page' ) ); 509 520 } 521 522 // Point all attachments to this post up one level 510 523 $wpdb->update( $wpdb->posts, $parent_data, $parent_where + array( 'post_type' => 'attachment' ) ); 511 524
Note: See TracChangeset
for help on using the changeset viewer.