Make WordPress Core

Ticket #8446: post-template.php.patch

File post-template.php.patch, 869 bytes (added by westonruter, 14 years ago)

Adding missing curly braces to multi-statement if blocks

  • post-template.php

     
    430430                if ( $wpdb->get_var( $wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE post_parent = %d AND post_type = 'page' LIMIT 1", $pageID) ) )
    431431                        $classes[] = 'page-parent';
    432432
    433                 if ( $wp_query->post->post_parent )
     433                if ( $wp_query->post->post_parent ) {
    434434                        $classes[] = 'page-child';
    435435                        $classes[] = 'parent-pageid-' . $wp_query->post->post_parent;
    436 
    437                 if ( is_page_template() )
     436                }
     437                if ( is_page_template() ) {
    438438                        $classes[] = 'page-template';
    439439                        $classes[] = 'page-template-' . str_replace( '.php', '-php', get_post_meta( $pageID, '_wp_page_template', true ) );
     440                }
    440441        } elseif ( is_search() ) {
    441442                if ( !empty($wp_query->posts) )
    442443                        $classes[] = 'search-results';