X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/b137f4ce021b4022c56f452c2eafa7abfcef0a7c..refs/tags/wordpress-3.2:/wp-includes/post-template.php diff --git a/wp-includes/post-template.php b/wp-includes/post-template.php index 98b6fede..a2f5d1a5 100644 --- a/wp-includes/post-template.php +++ b/wp-includes/post-template.php @@ -529,10 +529,13 @@ function get_body_class( $class = '' ) { $classes[] = 'post-type-paged-' . $page; } - if ( !empty( $class ) ) { + if ( ! empty( $class ) ) { if ( !is_array( $class ) ) $class = preg_split( '#\s+#', $class ); $classes = array_merge( $classes, $class ); + } else { + // Ensure that we always coerce class to being an array. + $class = array(); } $classes = array_map( 'esc_attr', $classes ); @@ -1242,7 +1245,7 @@ function is_page_template($template = '') { // We have no argument passed so just see if a page_template has been specified if ( empty( $template ) ) { - if (!empty( $page_template ) ) { + if ( !empty( $page_template ) and ( 'default' != $page_template ) ) { return true; } } elseif ( $template == $page_template) { @@ -1348,7 +1351,7 @@ function wp_list_post_revisions( $post_id = 0, $args = null ) { if ( $parent ) array_unshift( $revisions, $post ); - $rows = ''; + $rows = $right_checked = ''; $class = false; $can_edit_post = current_user_can( 'edit_post', $post->ID ); foreach ( $revisions as $revision ) {