Ticket #28159: 28159.diff
File 28159.diff, 701 bytes (added by , 11 years ago) |
---|
-
src/wp-includes/post-template.php
585 585 586 586 $classes[] = 'page-id-' . $page_id; 587 587 588 if ( $wpdb->get_var( $wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE post_parent = %d AND post_type = 'page' AND post_status = 'publish' LIMIT 1", $page_id) ) )588 if ( get_posts( array( 'fields' => 'ids', 'post_parent' => $page_id, 'post_type' => 'page', 'posts_per_page' => 1, 'suppress_filters' => false ) ) ) { 589 589 $classes[] = 'page-parent'; 590 } 590 591 591 592 if ( $post->post_parent ) { 592 593 $classes[] = 'page-child';