mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user