mirror of
https://github.com/WordPress/WordPress.git
synced 2025-04-08 13:05:51 +02:00
Don't repeatedly call get_object_taxonomies() in clean_object_term_cache(). see #11399.
git-svn-id: http://core.svn.wordpress.org/trunk@21951 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d4abbb5264
commit
d80d004b10
@ -2559,8 +2559,10 @@ function clean_object_term_cache($object_ids, $object_type) {
|
||||
if ( !is_array($object_ids) )
|
||||
$object_ids = array($object_ids);
|
||||
|
||||
$taxonomies = get_object_taxonomies( $object_type );
|
||||
|
||||
foreach ( $object_ids as $id )
|
||||
foreach ( get_object_taxonomies($object_type) as $taxonomy )
|
||||
foreach ( $taxonomies as $taxonomy )
|
||||
wp_cache_delete($id, "{$taxonomy}_relationships");
|
||||
|
||||
do_action('clean_object_term_cache', $object_ids, $object_type);
|
||||
|
Loading…
Reference in New Issue
Block a user