WordPress.org

Make WordPress Core

Changeset 10608


Ignore:
Timestamp:
02/20/09 20:40:05 (7 years ago)
Author:
ryan
Message:

Make sure cache is clean when converting cats to tags. fixes #9186

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/import/wp-cat2tag.php

    r10606 r10608  
    326326        if ( ! empty($clean_term_cache) ) { 
    327327            $clean_term_cache = array_unique(array_values($clean_term_cache)); 
    328             foreach ( $clean_term_cache as $id ) 
    329                 wp_cache_delete($id, 'post_tag'); 
     328            clean_term_cache($clean_term_cache, 'post_tag'); 
    330329        } 
    331330 
    332331        if ( ! empty($clean_cat_cache) ) { 
    333332            $clean_cat_cache = array_unique(array_values($clean_cat_cache)); 
    334             foreach ( $clean_cat_cache as $id ) 
    335                 wp_cache_delete($id, 'category'); 
     333            clean_term_cache($clean_cat_cache, 'category'); 
    336334        } 
    337335 
     
    415413        if ( ! empty($clean_term_cache) ) { 
    416414            $clean_term_cache = array_unique(array_values($clean_term_cache)); 
    417             foreach ( $clean_term_cache as $id ) 
    418                 wp_cache_delete($id, 'post_tag'); 
     415            clean_term_cache($clean_term_cache, 'post_tag'); 
    419416        } 
    420417 
    421418        if ( ! empty($clean_cat_cache) ) { 
    422419            $clean_cat_cache = array_unique(array_values($clean_cat_cache)); 
    423             foreach ( $clean_cat_cache as $id ) 
    424                 wp_cache_delete($id, 'category'); 
     420            clean_term_cache($clean_term_cache, 'category'); 
    425421        } 
    426422 
Note: See TracChangeset for help on using the changeset viewer.