Expect a possible array of post types in get_archive_template(). props SergeyBiryukov. fixes #20867.

git-svn-id: http://core.svn.wordpress.org/trunk@21861 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2012-09-15 20:07:15 +00:00
parent 7ae797b119
commit 4c64b3a4b9

View File

@ -59,11 +59,11 @@ function get_404_template() {
* @return string
*/
function get_archive_template() {
$post_type = get_query_var( 'post_type' );
$post_types = get_query_var( 'post_type' );
$templates = array();
if ( $post_type )
foreach ( (array) $post_types as $post_type )
$templates[] = "archive-{$post_type}.php";
$templates[] = 'archive.php';