Ticket #40490: 40490.diff
| File 40490.diff, 812 bytes (added by , 9 years ago) |
|---|
-
src/wp-includes/media.php
1335 1335 1336 1336 if ( count( $attachment_ids ) > 1 ) { 1337 1337 /* 1338 * Warm object cache for use with 'get_post_meta()'. 1339 * 1340 * To avoid making a database call for each image, a single query 1341 * warms the object cache with the meta information for all images. 1342 */ 1343 update_meta_cache( 'post', array_keys( $attachment_ids ) ); 1338 * Warm the object cache with post and meta information for all 1339 * attachments to avoid making a database call for each image. 1340 */ 1341 _prime_post_caches( array_keys( $attachment_ids ), false, true ); 1344 1342 } 1345 1343 1346 1344 foreach ( $selected_images as $image => $attachment_id ) {