diff --git src/wp-includes/media.php src/wp-includes/media.php
index 9f35f79..e5ccdb0 100644
|
|
function wp_calculate_image_srcset( $size_array, $image_src, $image_meta, $attac |
1142 | 1142 | * @param array $size_array Array of width and height values in pixels (in that order). |
1143 | 1143 | * @param string $image_src The 'src' of the image. |
1144 | 1144 | * @param array $image_meta The image meta data as returned by 'wp_get_attachment_metadata()'. |
1145 | | * @param int $attachment_id Image attachment ID or 0. |
| 1145 | * @param int $attachment_id Image attachment ID or 0. |
1146 | 1146 | */ |
1147 | 1147 | $sources = apply_filters( 'wp_calculate_image_srcset', $sources, $size_array, $image_src, $image_meta, $attachment_id ); |
1148 | 1148 | |
… |
… |
function wp_calculate_image_srcset( $size_array, $image_src, $image_meta, $attac |
1154 | 1154 | $srcset = ''; |
1155 | 1155 | |
1156 | 1156 | foreach ( $sources as $source ) { |
1157 | | $srcset .= $source['url'] . ' ' . $source['value'] . $source['descriptor'] . ', '; |
| 1157 | $srcset .= esc_url( $source['url'] ) . ' ' . $source['value'] . $source['descriptor'] . ', '; |
1158 | 1158 | } |
1159 | 1159 | |
1160 | 1160 | return rtrim( $srcset, ', ' ); |