Ticket #28159: 28159.2.diff
File 28159.2.diff, 622 bytes (added by , 11 years ago) |
---|
-
src/wp-includes/post-template.php
594 594 595 595 $classes[] = 'page-id-' . $page_id; 596 596 597 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) ) )597 if ( get_pages( array( 'parent' => $page_id, 'number' => 1 ) ) ) { 598 598 $classes[] = 'page-parent'; 599 } 599 600 600 601 if ( $post->post_parent ) { 601 602 $classes[] = 'page-child';