diff --git a/wp-includes/post-template.php b/wp-includes/post-template.php index 60d09c7660..1f96b448e9 100644 --- a/wp-includes/post-template.php +++ b/wp-includes/post-template.php @@ -594,8 +594,9 @@ function get_body_class( $class = '' ) { $classes[] = 'page-id-' . $page_id; - 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) ) ) + if ( get_pages( array( 'parent' => $page_id, 'number' => 1 ) ) ) { $classes[] = 'page-parent'; + } if ( $post->post_parent ) { $classes[] = 'page-child'; diff --git a/wp-includes/version.php b/wp-includes/version.php index d960fe8be3..8086955b8b 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.0-alpha-20140606'; +$wp_version = '4.0-alpha-20140607'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.