wordpress-develop/tests/phpunit/tests/media
Felix Arntz d33027c5ea Media: Rely on wp_get_loading_optimization_attributes() to add decoding="async" to images.
The `wp_get_loading_optimization_attributes()` function was introduced in 6.3, as a single centralized place to control loading optimization attributes for various tags, most importantly images.

This changeset consolidates the `decoding="async"` optimization, which was added in 6.1, to occur solely as part of `wp_get_loading_optimization_attributes()`, removing duplicate code and allowing centralized filtering based on [56651].

As part of the change, the `wp_img_tag_add_decoding_attr()` function has been deprecated. The filter of the same name continues to be maintained for backward compatibility, as before covering only images that are part of a content blob such as post content (`the_content`).

Props pereirinha, mukesh27, joemcgill, flixos90.
Fixes #58892.
See #53232.


git-svn-id: https://develop.svn.wordpress.org/trunk@56690 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-25 22:37:00 +00:00
..
getAdjacentImageLink.php Media: Add decoding="async" to image attributes. 2022-06-09 05:29:57 +00:00
getAttachmentTaxonomies.php Build/Test Tools: Replace assertInternalType() usage in unit tests. 2021-07-05 17:21:53 +00:00
getNextImageLink.php Media: Add decoding="async" to image attributes. 2022-06-09 05:29:57 +00:00
getPostGalleries.php Coding Standards: Replace PHP alias join() with implode(). 2023-09-19 12:23:16 +00:00
getPreviousImageLink.php Media: Add decoding="async" to image attributes. 2022-06-09 05:29:57 +00:00
nextImageLink.php Media: Add decoding="async" to image attributes. 2022-06-09 05:29:57 +00:00
previousImageLink.php Media: Add decoding="async" to image attributes. 2022-06-09 05:29:57 +00:00
testcase-adjacent-image-link.php Media: Add new functions to return the previous/next attachment links. 2021-06-08 23:12:22 +00:00
wpGenerateAttachmentMetadata.php Coding Standards: Include one space after function keyword for closures. 2023-09-12 15:21:02 +00:00
wpImageTagAddDecodingAttr.php Media: Rely on wp_get_loading_optimization_attributes() to add decoding="async" to images. 2023-09-25 22:37:00 +00:00