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:
Andrew Nacin 2012-09-22 15:21:30 +00:00
parent d4abbb5264
commit d80d004b10
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);