From b848f1121620206ae68e361beb8956967f9bce86 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Fri, 20 Feb 2009 20:40:05 +0000 Subject: [PATCH] Make sure cache is clean when converting cats to tags. fixes #9186 git-svn-id: https://develop.svn.wordpress.org/trunk@10608 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/import/wp-cat2tag.php | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/wp-admin/import/wp-cat2tag.php b/wp-admin/import/wp-cat2tag.php index 5723bb45db..0a86027909 100644 --- a/wp-admin/import/wp-cat2tag.php +++ b/wp-admin/import/wp-cat2tag.php @@ -325,14 +325,12 @@ function check_all_tagrows() { if ( ! empty($clean_term_cache) ) { $clean_term_cache = array_unique(array_values($clean_term_cache)); - foreach ( $clean_term_cache as $id ) - wp_cache_delete($id, 'post_tag'); + clean_term_cache($clean_term_cache, 'post_tag'); } if ( ! empty($clean_cat_cache) ) { $clean_cat_cache = array_unique(array_values($clean_cat_cache)); - foreach ( $clean_cat_cache as $id ) - wp_cache_delete($id, 'category'); + clean_term_cache($clean_cat_cache, 'category'); } if ( $clear_parents ) delete_option('category_children'); @@ -414,14 +412,12 @@ function check_all_tagrows() { if ( ! empty($clean_term_cache) ) { $clean_term_cache = array_unique(array_values($clean_term_cache)); - foreach ( $clean_term_cache as $id ) - wp_cache_delete($id, 'post_tag'); + clean_term_cache($clean_term_cache, 'post_tag'); } if ( ! empty($clean_cat_cache) ) { $clean_cat_cache = array_unique(array_values($clean_cat_cache)); - foreach ( $clean_cat_cache as $id ) - wp_cache_delete($id, 'category'); + clean_term_cache($clean_term_cache, 'category'); } if ( $clear_parents ) delete_option('category_children');