Add missing brackets. Props westonruter. fixes #8446 for trunk

git-svn-id: http://svn.automattic.com/wordpress/trunk@11567 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2009-06-15 00:28:52 +00:00
parent 4e6f054b47
commit 8ffd022581
1 changed files with 4 additions and 3 deletions

View File

@ -430,13 +430,14 @@ function get_body_class( $class = '' ) {
if ( $wpdb->get_var( $wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE post_parent = %d AND post_type = 'page' LIMIT 1", $pageID) ) )
$classes[] = 'page-parent';
if ( $wp_query->post->post_parent )
if ( $wp_query->post->post_parent ) {
$classes[] = 'page-child';
$classes[] = 'parent-pageid-' . $wp_query->post->post_parent;
if ( is_page_template() )
}
if ( is_page_template() ) {
$classes[] = 'page-template';
$classes[] = 'page-template-' . str_replace( '.php', '-php', get_post_meta( $pageID, '_wp_page_template', true ) );
}
} elseif ( is_search() ) {
if ( !empty($wp_query->posts) )
$classes[] = 'search-results';