Changeset 5592 for trunk/wp-includes/query.php
- Timestamp:
- 05/29/2007 04:52:31 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/query.php
r5585 r5592 850 850 $in = (strpos($cat, '-') !== false) ? false : true; 851 851 $cat = trim($cat, '-'); 852 // TODO make an array, not a string, for out_cats. use get_term_children() 852 853 if ( $in ) 853 854 $in_cats .= "$cat, " . get_category_children($cat, '', ', '); … … 861 862 if ( strlen($out_cats) > 0 ) { 862 863 // TODO use get_objects_in_term 863 $ids = $wpdb->get_col("SELECT post_id FROM $wpdb->post2cat WHERE $wpdb->post2cat.category_id IN ($out_cats)");864 $ids = get_objects_in_terms($out_cats, 'category'); 864 865 if ( is_array($ids) && count($ids > 0) ) { 865 866 foreach ( $ids as $id )
Note: See TracChangeset
for help on using the changeset viewer.