diff --git a/wp-includes/post.php b/wp-includes/post.php index ddd73bc737..e088c2b449 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -1058,6 +1058,9 @@ function get_post_type( $post = null ) { function get_post_type_object( $post_type ) { global $wp_post_types; + if ( is_array( $post_type ) ) + $post_type = reset( $post_type ); + if ( empty($wp_post_types[$post_type]) ) return null; diff --git a/wp-includes/template-loader.php b/wp-includes/template-loader.php index 81de95618f..9cacb87a01 100644 --- a/wp-includes/template-loader.php +++ b/wp-includes/template-loader.php @@ -26,10 +26,10 @@ if ( defined('WP_USE_THEMES') && WP_USE_THEMES ) : $template = false; if ( is_404() && $template = get_404_template() ) : elseif ( is_search() && $template = get_search_template() ) : - elseif ( is_post_type_archive() && $template = get_post_type_archive_template() ) : - elseif ( is_tax() && $template = get_taxonomy_template() ) : elseif ( is_front_page() && $template = get_front_page_template() ) : elseif ( is_home() && $template = get_home_template() ) : + elseif ( is_post_type_archive() && $template = get_post_type_archive_template() ) : + elseif ( is_tax() && $template = get_taxonomy_template() ) : elseif ( is_attachment() && $template = get_attachment_template() ) : remove_filter('the_content', 'prepend_attachment'); elseif ( is_single() && $template = get_single_template() ) :