From 4f98bf32cf04dc36fd329c6117a40f458794b699 Mon Sep 17 00:00:00 2001 From: Joe McGill Date: Mon, 6 May 2024 20:23:14 +0000 Subject: [PATCH] Docs: Update docblock for `wp_get_attachment_image()` attributes. This updates the docblock attributes for `wp_get_attachment_image()` to account for attribute values that are being determined by `wp_get_loading_optimization_attributes()`. Updates docs for `$attr['loading']` and adds docs for `$attr['fetchpriority']`. Props joemcgill, dmsnell. Fixes #59550. Built from https://develop.svn.wordpress.org/trunk@58110 git-svn-id: http://core.svn.wordpress.org/trunk@57575 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/media.php | 28 +++++++++++++++------------- wp-includes/version.php | 2 +- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/wp-includes/media.php b/wp-includes/media.php index 76fb2b63c7..c960e44c46 100644 --- a/wp-includes/media.php +++ b/wp-includes/media.php @@ -1039,19 +1039,21 @@ function wp_get_attachment_image_src( $attachment_id, $size = 'thumbnail', $icon * @param string|array $attr { * Optional. Attributes for the image markup. * - * @type string $src Image attachment URL. - * @type string $class CSS class name or space-separated list of classes. - * Default `attachment-$size_class size-$size_class`, - * where `$size_class` is the image size being requested. - * @type string $alt Image description for the alt attribute. - * @type string $srcset The 'srcset' attribute value. - * @type string $sizes The 'sizes' attribute value. - * @type string|false $loading The 'loading' attribute value. Passing a value of false - * will result in the attribute being omitted for the image. - * Defaults to 'lazy', depending on wp_lazy_loading_enabled(). - * @type string $decoding The 'decoding' attribute value. Possible values are - * 'async' (default), 'sync', or 'auto'. Passing false or an empty - * string will result in the attribute being omitted. + * @type string $src Image attachment URL. + * @type string $class CSS class name or space-separated list of classes. + * Default `attachment-$size_class size-$size_class`, + * where `$size_class` is the image size being requested. + * @type string $alt Image description for the alt attribute. + * @type string $srcset The 'srcset' attribute value. + * @type string $sizes The 'sizes' attribute value. + * @type string|false $loading The 'loading' attribute value. Passing a value of false + * will result in the attribute being omitted for the image. + * Default determined by {@see wp_get_loading_optimization_attributes()}. + * @type string $decoding The 'decoding' attribute value. Possible values are + * 'async' (default), 'sync', or 'auto'. Passing false or an empty + * string will result in the attribute being omitted. + * @type string $fetchpriority The 'fetchpriority' attribute value, whether `high`, `low`, or `auto`. + * Default determined by {@see wp_get_loading_optimization_attributes()}. * } * @return string HTML img element or empty string on failure. */ diff --git a/wp-includes/version.php b/wp-includes/version.php index f5c433c596..f630cbb4fd 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.6-alpha-58109'; +$wp_version = '6.6-alpha-58110'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.