Changeset 5660
- Timestamp:
- 06/06/2007 04:13:12 PM (17 years ago)
- Location:
- trunk/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/category-template.php
r5616 r5660 173 173 if ( !$category ) 174 174 $category = $cat; 175 $category = & get_category($category); 176 return apply_filters('category_description', $category->description, $category->term_id);175 176 return get_term_field('description', $category, 'category'); 177 177 } 178 178 -
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.