Media: Allow to omit decoding="async" on tags from wp_get_attachment_image().

When adding `decoding="async"` to images was introduced in [53480], it did not provide the ability to customize that behavior specifically for image tags returned from `wp_get_attachment_image()`.

With this changeset it is now possible to explicitly provide a `decoding` value of e.g. boolean `false` in the `$attr` parameter of the function, to ensure the attribute is omitted.

Props maximej, adamsilverstein, flixos90, costdev, peterwilsoncc, mukesh27.
Fixes #57086.

Built from https://develop.svn.wordpress.org/trunk@55171


git-svn-id: http://core.svn.wordpress.org/trunk@54704 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Felix Arntz
2023-01-31 19:41:14 +00:00
parent e6cc65d39e
commit d8246e8f7a
2 changed files with 8 additions and 2 deletions

View File

@@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.2-alpha-55170';
$wp_version = '6.2-alpha-55171';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.