Ticket #20590: query-is-tax-fix.diff
File query-is-tax-fix.diff, 886 bytes (added by , 12 years ago) |
---|
-
wp-includes/query.php
3185 3185 $tax_array = array_intersect( array_keys( $wp_taxonomies ), (array) $taxonomy ); 3186 3186 $term_array = (array) $term; 3187 3187 3188 $is_tax = isset( $queried_object->taxonomy ) && count( $tax_array ) && in_array( $queried_object->taxonomy, $tax_array ); 3189 3188 3190 if ( empty( $term ) ) // Only a Taxonomy provided 3189 return isset( $queried_object->taxonomy ) && count( $tax_array ) && in_array( $queried_object->taxonomy, $tax_array );3191 return $is_tax; 3190 3192 3191 return isset( $queried_object->term_id ) &&3193 return $is_tax && isset( $queried_object->term_id ) && 3192 3194 count( array_intersect( 3193 3195 array( $queried_object->term_id, $queried_object->name, $queried_object->slug ), 3194 3196 $term_array