Changeset 38296 for trunk/src/wp-includes/media.php
- Timestamp:
- 08/21/2016 06:14:37 AM (9 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/media.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/media.php
r38292 r38296 862 862 // Generate 'srcset' and 'sizes' if not already present. 863 863 if ( empty( $attr['srcset'] ) ) { 864 $image_meta = get_post_meta( $attachment_id, '_wp_attachment_metadata', true);864 $image_meta = wp_get_attachment_metadata( $attachment_id ); 865 865 866 866 if ( is_array( $image_meta ) ) { … … 991 991 992 992 if ( ! is_array( $image_meta ) ) { 993 $image_meta = get_post_meta( $attachment_id, '_wp_attachment_metadata', true);993 $image_meta = wp_get_attachment_metadata( $attachment_id ); 994 994 } 995 995 … … 1207 1207 1208 1208 if ( ! is_array( $image_meta ) ) { 1209 $image_meta = get_post_meta( $attachment_id, '_wp_attachment_metadata', true);1209 $image_meta = wp_get_attachment_metadata( $attachment_id ); 1210 1210 } 1211 1211 … … 1240 1240 } elseif ( is_string( $size ) ) { 1241 1241 if ( ! $image_meta && $attachment_id ) { 1242 $image_meta = get_post_meta( $attachment_id, '_wp_attachment_metadata', true);1242 $image_meta = wp_get_attachment_metadata( $attachment_id ); 1243 1243 } 1244 1244 … … 1315 1315 1316 1316 foreach ( $selected_images as $image => $attachment_id ) { 1317 $image_meta = get_post_meta( $attachment_id, '_wp_attachment_metadata', true);1317 $image_meta = wp_get_attachment_metadata( $attachment_id ); 1318 1318 $content = str_replace( $image, wp_image_add_srcset_and_sizes( $image, $image_meta, $attachment_id ), $content ); 1319 1319 }
Note: See TracChangeset
for help on using the changeset viewer.