diff --git src/wp-includes/media.php src/wp-includes/media.php
index ae108e5..ac105e7 100644
|
|
function _wp_get_image_size_from_meta( $size_name, $image_meta ) { |
935 | 935 | * @param int $attachment_id Image attachment ID. |
936 | 936 | * @param array|string $size Optional. Image size. Accepts any valid image size, or an array of |
937 | 937 | * width and height values in pixels (in that order). Default 'medium'. |
938 | | * @param array $image_meta Optional. The image meta data as returned by 'wp_get_attachment_metadata()'. |
| 938 | * @param array $image_meta Optional. The image meta data as returned by 'wp_get_attachment_metadata()'. Default null. |
939 | 939 | * @return string|bool A 'srcset' value string or false. |
940 | 940 | */ |
941 | 941 | function wp_get_attachment_image_srcset( $attachment_id, $size = 'medium', $image_meta = null ) { |
… |
… |
function wp_get_attachment_image_srcset( $attachment_id, $size = 'medium', $imag |
964 | 964 | * @param array $size_array Array of width and height values in pixels (in that order). |
965 | 965 | * @param string $image_src The 'src' of the image. |
966 | 966 | * @param array $image_meta The image meta data as returned by 'wp_get_attachment_metadata()'. |
967 | | * @param int $attachment_id Optional. The image attachment ID to pass to the filter. |
| 967 | * @param int $attachment_id Optional. The image attachment ID to pass to the filter. Default 0. |
968 | 968 | * @return string|bool The 'srcset' attribute value. False on error or when only one source exists. |
969 | 969 | */ |
970 | 970 | function wp_calculate_image_srcset( $size_array, $image_src, $image_meta, $attachment_id = 0 ) { |
… |
… |
function wp_calculate_image_srcset( $size_array, $image_src, $image_meta, $attac |
1088 | 1088 | * @param array $size_array Array of width and height values in pixels (in that order). |
1089 | 1089 | * @param string $image_src The 'src' of the image. |
1090 | 1090 | * @param array $image_meta The image meta data as returned by 'wp_get_attachment_metadata()'. |
1091 | | * @param int $attachment_id Image attachment ID. |
| 1091 | * @param int $attachment_id Image attachment ID or 0. |
1092 | 1092 | */ |
1093 | 1093 | $sources = apply_filters( 'wp_calculate_image_srcset', $sources, $size_array, $image_src, $image_meta, $attachment_id ); |
1094 | 1094 | |
… |
… |
function wp_calculate_image_srcset( $size_array, $image_src, $image_meta, $attac |
1114 | 1114 | * @param int $attachment_id Image attachment ID. |
1115 | 1115 | * @param array|string $size Optional. Image size. Accepts any valid image size, or an array of width |
1116 | 1116 | * and height values in pixels (in that order). Default 'medium'. |
1117 | | * @param array $image_meta Optional. The image meta data as returned by 'wp_get_attachment_metadata()'. |
1118 | | * @return string|bool A 'srcset' value string or false. |
| 1117 | * @param array $image_meta Optional. The image meta data as returned by 'wp_get_attachment_metadata()'. Default null. |
| 1118 | * @return string|bool A valid source size value for use in a 'sizes' attribute or false. |
1119 | 1119 | */ |
1120 | 1120 | function wp_get_attachment_image_sizes( $attachment_id, $size = 'medium', $image_meta = null ) { |
1121 | 1121 | if ( ! $image = wp_get_attachment_image_src( $attachment_id, $size ) ) { |