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
This commit is contained in:
Ryan Boren 2009-02-20 20:40:05 +00:00
parent ca06d9c58a
commit b848f11216
1 changed files with 4 additions and 8 deletions

View File

@ -325,14 +325,12 @@ function check_all_tagrows() {
if ( ! empty($clean_term_cache) ) { if ( ! empty($clean_term_cache) ) {
$clean_term_cache = array_unique(array_values($clean_term_cache)); $clean_term_cache = array_unique(array_values($clean_term_cache));
foreach ( $clean_term_cache as $id ) clean_term_cache($clean_term_cache, 'post_tag');
wp_cache_delete($id, 'post_tag');
} }
if ( ! empty($clean_cat_cache) ) { if ( ! empty($clean_cat_cache) ) {
$clean_cat_cache = array_unique(array_values($clean_cat_cache)); $clean_cat_cache = array_unique(array_values($clean_cat_cache));
foreach ( $clean_cat_cache as $id ) clean_term_cache($clean_cat_cache, 'category');
wp_cache_delete($id, 'category');
} }
if ( $clear_parents ) delete_option('category_children'); if ( $clear_parents ) delete_option('category_children');
@ -414,14 +412,12 @@ function check_all_tagrows() {
if ( ! empty($clean_term_cache) ) { if ( ! empty($clean_term_cache) ) {
$clean_term_cache = array_unique(array_values($clean_term_cache)); $clean_term_cache = array_unique(array_values($clean_term_cache));
foreach ( $clean_term_cache as $id ) clean_term_cache($clean_term_cache, 'post_tag');
wp_cache_delete($id, 'post_tag');
} }
if ( ! empty($clean_cat_cache) ) { if ( ! empty($clean_cat_cache) ) {
$clean_cat_cache = array_unique(array_values($clean_cat_cache)); $clean_cat_cache = array_unique(array_values($clean_cat_cache));
foreach ( $clean_cat_cache as $id ) clean_term_cache($clean_term_cache, 'category');
wp_cache_delete($id, 'category');
} }
if ( $clear_parents ) delete_option('category_children'); if ( $clear_parents ) delete_option('category_children');