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:
Andrew Nacin 2012-09-22 15:21:30 +00:00
parent aa36dd57fe
commit 6c3655ce31
1 changed files with 3 additions and 1 deletions

View File

@ -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);