WordPress.org

Make WordPress Core

Ticket #17235: 17235-taxonomy.diff

File 17235-taxonomy.diff, 508 bytes (added by batmoo, 3 years ago)
  • wp-includes/taxonomy.php

     
    608608                        'operator' => 'IN', 
    609609                ); 
    610610 
     611                // Single tax queries shouldn't need to pass an array of arrays 
     612                if( isset( $tax_query['taxonomy'] ) && isset( $tax_query['terms'] ) ) 
     613                        $tax_query = array( $tax_query ); 
     614 
    611615                foreach ( $tax_query as $query ) { 
    612616                        if ( ! is_array( $query ) ) 
    613617                                continue;