Docs: After [34453], correct inline comments in `wp_get_attachment_image_sizes()`.
Props jaspermdegroot. Fixes #34453. Built from https://develop.svn.wordpress.org/trunk@35401 git-svn-id: http://core.svn.wordpress.org/trunk@35365 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a46bf27781
commit
64a79eeffa
|
@ -1043,10 +1043,10 @@ function wp_get_attachment_image_srcset( $attachment_id, $size = 'medium' ) {
|
|||
* @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', $width = null ) {
|
||||
// Try to get the image width from $args parameter.
|
||||
// Try to get the image width from the $width parameter.
|
||||
if ( is_numeric( $width ) ) {
|
||||
$img_width = (int) $width;
|
||||
// Next, use see if a width value was passed in the $size parameter.
|
||||
// Next, see if a width value was passed in the $size parameter.
|
||||
} elseif ( is_array( $size ) ) {
|
||||
$img_width = $size[0];
|
||||
// Finally, use the $size name to return the width of the image.
|
||||
|
@ -1055,7 +1055,7 @@ function wp_get_attachment_image_sizes( $attachment_id, $size = 'medium', $width
|
|||
$img_width = $image ? $image['width'] : false;
|
||||
}
|
||||
|
||||
// Bail early if $image_width isn't set.
|
||||
// Bail early if $img_width isn't set.
|
||||
if ( ! $img_width ) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.4-beta1-35400';
|
||||
$wp_version = '4.4-beta1-35401';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue