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

git-svn-id: https://develop.svn.wordpress.org/trunk@21861 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2012-09-15 20:07:15 +00:00
parent 9da4708e6d
commit 383487466b
1 changed files with 2 additions and 2 deletions

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';