Skip to content
Browse files

Better hm_is_queried_object

  • Loading branch information...
1 parent b5bc20b commit e10d7c869a5b0fa82929249abedadf463ca7c33d @joehoyle joehoyle committed Mar 29, 2012
Showing with 6 additions and 2 deletions.
  1. +6 −2 hm-core.functions.php
View
8 hm-core.functions.php
@@ -1738,8 +1738,12 @@ function hm_is_queried_object( $term_or_taxonomy ) {
// tax
if ( is_string( $term_or_taxonomy ) ) {
- // @todo search tax_query too
- return ! empty( $wp_query->query_vars[$term_or_taxonomy] );
+ foreach ( $wp_query->tax_query->queries as $query ) {
+
+ if ( $query['taxonomy'] == $term_or_taxonomy )
+ return true;
+
+ }
} else if ( is_object( $term_or_taxonomy ) ) {

0 comments on commit e10d7c8

Please sign in to comment.
Something went wrong with that request. Please try again.