Ticket #11530: 11530.diff
File 11530.diff, 1.4 KB (added by , 15 years ago) |
---|
-
wp-includes/taxonomy.php
1860 1860 $taxonomies = array(); 1861 1861 // If no taxonomy, assume tt_ids. 1862 1862 if ( empty($taxonomy) ) { 1863 $tt_ids = implode(', ', $ids); 1863 $tt_ids = array_map('intval', $ids); 1864 $tt_ids = implode(', ', $tt_ids); 1864 1865 $terms = $wpdb->get_results("SELECT term_id, taxonomy FROM $wpdb->term_taxonomy WHERE term_taxonomy_id IN ($tt_ids)"); 1866 $ids = array(); 1865 1867 foreach ( (array) $terms as $term ) { 1866 1868 $taxonomies[] = $term->taxonomy; 1869 $ids[] = $term->term_id; 1867 1870 wp_cache_delete($term->term_id, $term->taxonomy); 1868 1871 } 1869 1872 $taxonomies = array_unique($taxonomies); 1870 1873 } else { 1871 foreach ( $ids as $id ) { 1872 wp_cache_delete($id, $taxonomy); 1874 $taxonomies = array($taxonomy); 1875 foreach ( $taxonomies as $taxonomy ) { 1876 foreach ( $ids as $id ) { 1877 wp_cache_delete($id, $taxonomy); 1878 } 1873 1879 } 1874 $taxonomies = array($taxonomy);1875 1880 } 1876 1881 1877 1882 foreach ( $taxonomies as $taxonomy ) { … … 1881 1886 wp_cache_delete('all_ids', $taxonomy); 1882 1887 wp_cache_delete('get', $taxonomy); 1883 1888 delete_option("{$taxonomy}_children"); 1889 do_action('clean_term_cache', $ids, $taxonomy); 1884 1890 } 1885 1891 1886 1892 wp_cache_set('last_changed', time(), 'terms'); 1887 1888 do_action('clean_term_cache', $ids, $taxonomy);1889 1893 } 1890 1894 1891 1895