Changeset 6552 for trunk/wp-admin/includes/template.php
- Timestamp:
- 01/04/2008 07:55:17 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/template.php
r6551 r6552 284 284 285 285 foreach ( $pages as $page ) { 286 287 // catch and repair bad pages 288 if ( $page->post_parent == $page->ID ) { 289 $page->post_parent = 0; 290 $wpdb->query( $wpdb->prepare("UPDATE $wpdb->posts SET post_parent = '0' WHERE ID = %d", $page->ID) ); 291 clean_page_cache( $page->ID ); 292 } 293 286 294 if ( 0 == $page->post_parent ) 287 295 $top_level_pages[] = $page;
Note: See TracChangeset
for help on using the changeset viewer.