]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/post-template.php
Wordpress 2.8.4-scripts
[autoinstalls/wordpress.git] / wp-includes / post-template.php
index 30856c58465027aef2fdbf9e4d7549a06a6b686f..35a7caa9fbdd650f6408ff79c2c4d1bfd5100832 100644 (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';
@@ -805,7 +806,7 @@ function wp_list_pages($args = '') {
  * @param array|string $args
  */
 function wp_page_menu( $args = array() ) {
-       $defaults = array('sort_column' => 'post_title', 'menu_class' => 'menu', 'echo' => true, 'link_before' => '', 'link_after' => '');
+       $defaults = array('sort_column' => 'menu_order, post_title', 'menu_class' => 'menu', 'echo' => true, 'link_before' => '', 'link_after' => '');
        $args = wp_parse_args( $args, $defaults );
        $args = apply_filters( 'wp_page_menu_args', $args );