WordPress.org

Make WordPress Core

Ticket #15250: 15250.patch

File 15250.patch, 584 bytes (added by sc0ttkclark, 3 years ago)

Initial Patch including the new filter

  • wp-includes/query.php

     
    18981898                                $post_status_join = true; 
    18991899                        } 
    19001900 
    1901                         $where .= $this->get_tax_sql( $q['tax_query'], "$wpdb->posts.ID" ); 
     1901                        $tax_sql = $this->get_tax_sql( $q['tax_query'], "$wpdb->posts.ID" ); 
     1902                        $where .= apply_filters_ref_array('posts_tax_sql', array( $tax_sql, &$this ) ); 
    19021903 
    19031904                        // Back-compat 
    19041905                        $cat_query = wp_list_filter( $q['tax_query'], array( 'taxonomy' => 'category' ) );