Fix is_tax(). Props scribu. fixes #10721
git-svn-id: http://svn.automattic.com/wordpress/trunk@12316 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
2371043644
commit
60c6ba72c1
|
@ -254,14 +254,7 @@ function is_tax( $slug = '' ) {
|
||||||
if ( empty($slug) )
|
if ( empty($slug) )
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
$term = $wp_query->get_queried_object();
|
return in_array( get_query_var('taxonomy'), (array) $slug );
|
||||||
|
|
||||||
$slug = (array) $slug;
|
|
||||||
|
|
||||||
if ( in_array( $term->slug, $slug ) )
|
|
||||||
return true;
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue