diff --git src/wp-includes/media.php src/wp-includes/media.php
index 4f43e59..50d59a1 100644
|
|
|
function wp_get_attachment_image_srcset( $attachment_id, $size = 'medium' ) {
|
| 1043 | 1043 | * @return string|bool A valid source size value for use in a 'sizes' attribute or false. |
| 1044 | 1044 | */ |
| 1045 | 1045 | function wp_get_attachment_image_sizes( $attachment_id, $size = 'medium', $width = null ) { |
| 1046 | | // Try to get the image width from $args parameter. |
| | 1046 | // Try to get the image width from the $width parameter. |
| 1047 | 1047 | if ( is_numeric( $width ) ) { |
| 1048 | 1048 | $img_width = (int) $width; |
| 1049 | | // Next, use see if a width value was passed in the $size parameter. |
| | 1049 | // Next, see if a width value was passed in the $size parameter. |
| 1050 | 1050 | } elseif ( is_array( $size ) ) { |
| 1051 | 1051 | $img_width = $size[0]; |
| 1052 | 1052 | // Finally, use the $size name to return the width of the image. |
| … |
… |
function wp_get_attachment_image_sizes( $attachment_id, $size = 'medium', $width
|
| 1055 | 1055 | $img_width = $image ? $image['width'] : false; |
| 1056 | 1056 | } |
| 1057 | 1057 | |
| 1058 | | // Bail early if $image_width isn't set. |
| | 1058 | // Bail early if $img_width isn't set. |
| 1059 | 1059 | if ( ! $img_width ) { |
| 1060 | 1060 | return false; |
| 1061 | 1061 | } |