Ticket #15835: taxonomy.php.diff
File taxonomy.php.diff, 1.1 KB (added by , 14 years ago) |
---|
-
wp-includes/taxonomy.php
1830 1830 $select_this = 't.term_id'; 1831 1831 else if ( 'names' == $fields ) 1832 1832 $select_this = 't.name'; 1833 else if ( 'slugs' == $fields ) 1834 $select_this = 't.slug'; 1833 1835 else if ( 'all_with_object_id' == $fields ) 1834 1836 $select_this = 't.*, tt.*, tr.object_id'; 1835 1837 … … 1838 1840 if ( 'all' == $fields || 'all_with_object_id' == $fields ) { 1839 1841 $terms = array_merge($terms, $wpdb->get_results($query)); 1840 1842 update_term_cache($terms); 1841 } else if ( 'ids' == $fields || 'names' == $fields ) {1843 } else if ( 'ids' == $fields || 'names' == $fields || 'slugs' == $fields ) { 1842 1844 $terms = array_merge($terms, $wpdb->get_col($query)); 1843 1845 } else if ( 'tt_ids' == $fields ) { 1844 1846 $terms = $wpdb->get_col("SELECT tr.term_taxonomy_id FROM $wpdb->term_relationships AS tr INNER JOIN $wpdb->term_taxonomy AS tt ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tr.object_id IN ($object_ids) AND tt.taxonomy IN ($taxonomies) $orderby $order");