Changeset 5660 for trunk/wp-includes/query.php
- Timestamp:
- 06/06/2007 04:13:12 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/query.php
r5609 r5660 916 916 $join = " LEFT JOIN $wpdb->term_relationships ON ($wpdb->posts.ID = $wpdb->term_relationships.object_id) LEFT JOIN $wpdb->term_taxonomy ON ($wpdb->term_relationships.term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id) "; 917 917 $whichcat = " AND $wpdb->term_taxonomy.taxonomy = 'category' "; 918 $ whichcat .= "AND $wpdb->term_taxonomy.term_id IN ({$q['cat']}, ";919 $ whichcat .= get_category_children($q['cat'], '', ', ');920 $ whichcat = substr($whichcat, 0, -2);921 $whichcat .= " )";918 $in_cats = array($q['cat']); 919 $in_cats = array_merge($in_cats, get_term_children($q['cat'], 'category')); 920 $in_cats = "'" . implode("', '", $in_cats) . "'"; 921 $whichcat .= "AND $wpdb->term_taxonomy.term_id IN ($in_cats)"; 922 922 $groupby = "{$wpdb->posts}.ID"; 923 923 } 924 925 926 924 927 925 // Author/user stuff
Note: See TracChangeset
for help on using the changeset viewer.