Changeset 48065 for trunk/src/wp-includes/meta.php
- Timestamp:
- 06/16/2020 07:07:04 PM (6 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/meta.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/meta.php
r48055 r48065 927 927 } 928 928 929 $cache_key = $meta_type . '_meta'; 930 $ids = array(); 931 $cache = array(); 932 $cache_values = wp_cache_get_multiple( $object_ids, $cache_key ); 929 $cache_key = $meta_type . '_meta'; 930 $non_cached_ids = array(); 931 $cache = array(); 932 $cache_values = wp_cache_get_multiple( $object_ids, $cache_key ); 933 933 934 foreach ( $cache_values as $id => $cached_object ) { 934 935 if ( false === $cached_object ) { 935 $ ids[] = $id;936 $non_cached_ids[] = $id; 936 937 } else { 937 938 $cache[ $id ] = $cached_object; … … 939 940 } 940 941 941 if ( empty( $ ids ) ) {942 if ( empty( $non_cached_ids ) ) { 942 943 return $cache; 943 944 } 944 945 945 946 // Get meta info. 946 $id_list = join( ',', $ ids );947 $id_list = join( ',', $non_cached_ids ); 947 948 $id_column = ( 'user' === $meta_type ) ? 'umeta_id' : 'meta_id'; 948 949 … … 968 969 } 969 970 970 foreach ( $ ids as $id ) {971 foreach ( $non_cached_ids as $id ) { 971 972 if ( ! isset( $cache[ $id ] ) ) { 972 973 $cache[ $id ] = array();
Note: See TracChangeset
for help on using the changeset viewer.