Changeset 23271
- Timestamp:
- 01/04/2013 08:05:31 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.5/wp-includes/template.php
r22634 r23271 60 60 */ 61 61 function get_archive_template() { 62 $post_types = get_query_var( 'post_type' ); 63 64 $templates = array(); 65 66 foreach ( (array) $post_types as $post_type ) 62 $post_types = array_filter( (array) get_query_var( 'post_type' ) ); 63 64 $templates = array(); 65 66 if ( count( $post_types ) == 1 ) { 67 $post_type = reset( $post_types ); 67 68 $templates[] = "archive-{$post_type}.php"; 69 } 68 70 $templates[] = 'archive.php'; 69 71
Note: See TracChangeset
for help on using the changeset viewer.