mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-03 20:24:26 +00:00
Move checks for post_type being an array inline. See [25291], [25292], #18614.
git-svn-id: https://develop.svn.wordpress.org/trunk@25312 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -80,7 +80,11 @@ function get_archive_template() {
|
||||
* @return string
|
||||
*/
|
||||
function get_post_type_archive_template() {
|
||||
$obj = get_post_type_object( get_query_var( 'post_type' ) );
|
||||
$post_type = get_query_var( 'post_type' );
|
||||
if ( is_array( $post_type ) )
|
||||
$post_type = reset( $post_type );
|
||||
|
||||
$obj = get_post_type_object( $post_type );
|
||||
if ( ! $obj->has_archive )
|
||||
return '';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user