Ticket #23026: parent_dropdown_fix.patch
File parent_dropdown_fix.patch, 597 bytes (added by , 12 years ago) |
---|
-
wp-admin/includes/template.php
677 677 $post = get_post(); 678 678 $items = $wpdb->get_results( $wpdb->prepare("SELECT ID, post_parent, post_title FROM $wpdb->posts WHERE post_parent = %d AND post_type = 'page' ORDER BY menu_order", $parent) ); 679 679 680 if ( $ items ) {680 if ( $post && $items ) { 681 681 foreach ( $items as $item ) { 682 682 // A page cannot be its own parent. 683 683 if ( $post->ID && $item->ID == $post->ID )