Ticket #15835: 15835.patch
File 15835.patch, 1.1 KB (added by , 13 years ago) |
---|
-
wp-includes/taxonomy.php
1892 1892 $select_this = 't.term_id'; 1893 1893 else if ( 'names' == $fields ) 1894 1894 $select_this = 't.name'; 1895 else if ( 'slugs' == $fields ) 1896 $select_this = 't.slug'; 1895 1897 else if ( 'all_with_object_id' == $fields ) 1896 1898 $select_this = 't.*, tt.*, tr.object_id'; 1897 1899 … … 1900 1902 if ( 'all' == $fields || 'all_with_object_id' == $fields ) { 1901 1903 $terms = array_merge($terms, $wpdb->get_results($query)); 1902 1904 update_term_cache($terms); 1903 } else if ( 'ids' == $fields || 'names' == $fields ) {1905 } else if ( 'ids' == $fields || 'names' == $fields || 'slugs' == $fields ) { 1904 1906 $terms = array_merge($terms, $wpdb->get_col($query)); 1905 1907 } else if ( 'tt_ids' == $fields ) { 1906 1908 $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");