Docs: Clarify some parameter and return descriptions in the DocBlocks for `wp_get_attachment_image_srcset()` and `wp_calculate_image_srcset()`, `wp_get_attachment_image_sizes()`, and the `wp_calculate_image_srcset` filter.
Props joemcgill. See #34733. Built from https://develop.svn.wordpress.org/trunk@35696 git-svn-id: http://core.svn.wordpress.org/trunk@35660 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d1805c9da8
commit
b10a946c2c
|
@ -936,6 +936,7 @@ function _wp_get_image_size_from_meta( $size_name, $image_meta ) {
|
|||
* @param array|string $size Optional. Image size. Accepts any valid image size, or an array of
|
||||
* width and height values in pixels (in that order). Default 'medium'.
|
||||
* @param array $image_meta Optional. The image meta data as returned by 'wp_get_attachment_metadata()'.
|
||||
* Default null.
|
||||
* @return string|bool A 'srcset' value string or false.
|
||||
*/
|
||||
function wp_get_attachment_image_srcset( $attachment_id, $size = 'medium', $image_meta = null ) {
|
||||
|
@ -964,7 +965,7 @@ function wp_get_attachment_image_srcset( $attachment_id, $size = 'medium', $imag
|
|||
* @param array $size_array Array of width and height values in pixels (in that order).
|
||||
* @param string $image_src The 'src' of the image.
|
||||
* @param array $image_meta The image meta data as returned by 'wp_get_attachment_metadata()'.
|
||||
* @param int $attachment_id Optional. The image attachment ID to pass to the filter.
|
||||
* @param int $attachment_id Optional. The image attachment ID to pass to the filter. Default 0.
|
||||
* @return string|bool The 'srcset' attribute value. False on error or when only one source exists.
|
||||
*/
|
||||
function wp_calculate_image_srcset( $size_array, $image_src, $image_meta, $attachment_id = 0 ) {
|
||||
|
@ -1088,7 +1089,7 @@ function wp_calculate_image_srcset( $size_array, $image_src, $image_meta, $attac
|
|||
* @param array $size_array Array of width and height values in pixels (in that order).
|
||||
* @param string $image_src The 'src' of the image.
|
||||
* @param array $image_meta The image meta data as returned by 'wp_get_attachment_metadata()'.
|
||||
* @param int $attachment_id Image attachment ID.
|
||||
* @param int $attachment_id Image attachment ID or 0.
|
||||
*/
|
||||
$sources = apply_filters( 'wp_calculate_image_srcset', $sources, $size_array, $image_src, $image_meta, $attachment_id );
|
||||
|
||||
|
@ -1115,7 +1116,8 @@ function wp_calculate_image_srcset( $size_array, $image_src, $image_meta, $attac
|
|||
* @param array|string $size Optional. Image size. Accepts any valid image size, or an array of width
|
||||
* and height values in pixels (in that order). Default 'medium'.
|
||||
* @param array $image_meta Optional. The image meta data as returned by 'wp_get_attachment_metadata()'.
|
||||
* @return string|bool A 'srcset' value string or false.
|
||||
* Default null.
|
||||
* @return string|bool A valid source size value for use in a 'sizes' attribute or false.
|
||||
*/
|
||||
function wp_get_attachment_image_sizes( $attachment_id, $size = 'medium', $image_meta = null ) {
|
||||
if ( ! $image = wp_get_attachment_image_src( $attachment_id, $size ) ) {
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.4-beta4-35695';
|
||||
$wp_version = '4.4-beta4-35696';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue