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
This commit is contained in:
Joe McGill 2024-05-06 20:23:14 +00:00
parent e04a32b62f
commit 4f98bf32cf
2 changed files with 16 additions and 14 deletions

View File

@ -1048,10 +1048,12 @@ function wp_get_attachment_image_src( $attachment_id, $size = 'thumbnail', $icon
* @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().
* 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.
*/

View File

@ -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.