Ticket #14485: garyc40-14485.patch
File garyc40-14485.patch, 1.4 KB (added by , 14 years ago) |
---|
-
wp-includes/taxonomy.php
2001 2001 2002 2002 $term_id = apply_filters('term_id_filter', $term_id, $tt_id); 2003 2003 2004 clean_term_cache($term_id, $taxonomy); 2004 $force_clean_taxonomy = ( $parent ) ? true : false; 2005 clean_term_cache($term_id, $taxonomy, true, $force_clean_taxonomy); 2005 2006 2006 2007 do_action("created_term", $term_id, $tt_id, $taxonomy); 2007 2008 do_action("created_$taxonomy", $term_id, $tt_id); … … 2441 2442 * @param string $taxonomy Can be empty and will assume tt_ids, else will use for context. 2442 2443 * @param bool $clean_taxonomy Whether to clean taxonomy wide caches (true), or just individual term object caches (false). Default is true. 2443 2444 */ 2444 function clean_term_cache($ids, $taxonomy = '', $clean_taxonomy = true ) {2445 function clean_term_cache($ids, $taxonomy = '', $clean_taxonomy = true, $force_clean_taxonomy = false) { 2445 2446 global $wpdb; 2446 2447 static $cleaned = array(); 2447 2448 … … 2471 2472 } 2472 2473 2473 2474 foreach ( $taxonomies as $taxonomy ) { 2474 if ( isset($cleaned[$taxonomy]) )2475 if ( isset($cleaned[$taxonomy]) && ! $force_clean_taxonomy ) 2475 2476 continue; 2476 2477 $cleaned[$taxonomy] = true; 2477 2478 … … 2486 2487 do_action('clean_term_cache', $ids, $taxonomy); 2487 2488 } 2488 2489 2489 wp_cache_set('last_changed', time(), 'terms');2490 wp_cache_set('last_changed', implode( ',', $ids ) . ':' . time(), 'terms'); 2490 2491 }