Don't repeatedly call get_object_taxonomies() in clean_object_term_cache(). see #11399.
git-svn-id: https://develop.svn.wordpress.org/trunk@21951 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
aa36dd57fe
commit
6c3655ce31
|
@ -2559,8 +2559,10 @@ function clean_object_term_cache($object_ids, $object_type) {
|
||||||
if ( !is_array($object_ids) )
|
if ( !is_array($object_ids) )
|
||||||
$object_ids = array($object_ids);
|
$object_ids = array($object_ids);
|
||||||
|
|
||||||
|
$taxonomies = get_object_taxonomies( $object_type );
|
||||||
|
|
||||||
foreach ( $object_ids as $id )
|
foreach ( $object_ids as $id )
|
||||||
foreach ( get_object_taxonomies($object_type) as $taxonomy )
|
foreach ( $taxonomies as $taxonomy )
|
||||||
wp_cache_delete($id, "{$taxonomy}_relationships");
|
wp_cache_delete($id, "{$taxonomy}_relationships");
|
||||||
|
|
||||||
do_action('clean_object_term_cache', $object_ids, $object_type);
|
do_action('clean_object_term_cache', $object_ids, $object_type);
|
||||||
|
|
Loading…
Reference in New Issue