Changeset 47249 for trunk/src/wp-includes/media.php
- Timestamp:
- 02/10/2020 10:01:49 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/media.php
r47219 r47249 364 364 * 365 365 * @param int $id Attachment ID. 366 * @param string $alt Image Description for the alt attribute.367 * @param string $title Image Description for the title attribute.366 * @param string $alt Image description for the alt attribute. 367 * @param string $title Image description for the title attribute. 368 368 * @param string $align Part of the class name for aligning the image. 369 369 * @param string|array $size Optional. Registered image size to retrieve a tag for. Accepts any … … 403 403 * @param string $html HTML content for the image. 404 404 * @param int $id Attachment ID. 405 * @param string $alt Alternate text.406 * @param string $title Attachment title.405 * @param string $alt Image description for the alt attribute. 406 * @param string $title Image description for the title attribute. 407 407 * @param string $align Part of the class name for aligning the image. 408 408 * @param string|array $size Size of image. Image size or array of width and height values (in that order). … … 1000 1000 * and height values in pixels (in that order). Default 'thumbnail'. 1001 1001 * @param bool $icon Optional. Whether the image should be treated as an icon. Default false. 1002 * @param string|array $attr Optional. Attributes for the image markup. Default empty. 1002 * @param string|array $attr { 1003 * Optional. Attributes for the image markup. 1004 * 1005 * @type string $src Image attachment URL. 1006 * @type string $class CSS class name or space-separated list of classes. 1007 * Default `attachment-$size_class size-$size_class`, 1008 * where `$size_class` is the image size being requested. 1009 * @type string $alt Image description for the alt attribute. 1010 * @type string $srcset The 'srcset' attribute value. 1011 * @type string $sizes The 'sizes' attribute value. 1012 * } 1003 1013 * @return string HTML img element or empty string on failure. 1004 1014 */ … … 1007 1017 $image = wp_get_attachment_image_src( $attachment_id, $size, $icon ); 1008 1018 if ( $image ) { 1009 list( $src, $width, $height) = $image;1010 $hwstring = image_hwstring( $width, $height );1011 $size_class = $size;1019 list( $src, $width, $height ) = $image; 1020 $hwstring = image_hwstring( $width, $height ); 1021 $size_class = $size; 1012 1022 if ( is_array( $size_class ) ) { 1013 1023 $size_class = join( 'x', $size_class ); … … 1047 1057 * 1048 1058 * @param string[] $attr Array of attribute values for the image markup, keyed by attribute name. 1059 * See wp_get_attachment_image(). 1049 1060 * @param WP_Post $attachment Image attachment post. 1050 1061 * @param string|array $size Requested size. Image size or array of width and height values
Note: See TracChangeset
for help on using the changeset viewer.