WordPress.org

Make WordPress Core

Ticket #10908: 10908.diff

File 10908.diff, 767 bytes (added by scribu, 4 years ago)
  • wp-includes/query.php

     
    19181918                        $q['cat'] = $reqcat; 
    19191919 
    19201920                        $join = " INNER JOIN $wpdb->term_relationships ON ($wpdb->posts.ID = $wpdb->term_relationships.object_id) INNER JOIN $wpdb->term_taxonomy ON ($wpdb->term_relationships.term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id) "; 
    1921                         $whichcat = " AND $wpdb->term_taxonomy.taxonomy = 'category' "; 
     1921                        $whichcat .= " AND $wpdb->term_taxonomy.taxonomy = 'category' "; 
    19221922                        $in_cats = array($q['cat']); 
    19231923                        $in_cats = array_merge($in_cats, get_term_children($q['cat'], 'category')); 
    19241924                        $in_cats = "'" . implode("', '", $in_cats) . "'";