wordpress-develop/tests/phpunit/tests/oembed
Jonny Harris 54c4de13ed Script Loader: Replace hardcoded output of style tags with calls to wp_add_inline_style.
In this commit, enhancements have been made by replacing manually constructed style tags with calls to `wp_add_inline_style`. Previously, numerous style tags were generated and output directly in the header, resulting in redundant code and bypassing the core's style enqueueing system. This approach made it challenging for third-party developers to manage and control the output of these style tags.

To ensure backward compatibility, the following functions have been deprecated and replaced:

- print_embed_styles
- print_emoji_styles
- wp_admin_bar_header
- _admin_bar_bump_cb

Backward compatibility shims have also been added, ensuring that if these functions were previously unhooked from there actions, they will continue to not output a style tag.

However, for the following functions, conversion to use inline styles was not feasible due to the potential disruption it might cause by changing the style tag IDs, potentially breaking JavaScript functionality for a number of plugins in the repository:

- custom-background
- wp-custom

These changes improve code maintainability and enhance the flexibility and control available to developers when managing style outputs within WordPress core.

Props spacedmonkey, hlunter, westonruter, flixos90.
Fixes #58775.

git-svn-id: https://develop.svn.wordpress.org/trunk@56682 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-25 17:04:41 +00:00
..
controller.php Coding Standards: Use pre-increment/decrement for stand-alone statements. 2023-09-09 09:26:01 +00:00
discovery.php Coding Standards: Add visibility to methods in tests/phpunit/tests/. 2021-11-04 15:22:47 +00:00
filterResult.php Tests: Use the data_ prefix for various data provider methods. 2023-03-19 12:03:30 +00:00
filterTitleAttributes.php Tests: Update third-party video URLs in unit tests with more permanent videos. 2020-10-10 01:37:18 +00:00
getResponseData.php Embeds: Conditionally enqueue wp-embed only if needed and send ready message in case script loads after post embed windows. 2021-11-11 02:47:10 +00:00
headers.php Tests: Correctly use the factory method. 2022-09-06 22:03:10 +00:00
postEmbedUrl.php Coding Standards: Add visibility to methods in tests/phpunit/tests/. 2021-11-04 15:22:47 +00:00
template.php Script Loader: Replace hardcoded output of style tags with calls to wp_add_inline_style. 2023-09-25 17:04:41 +00:00
WpEmbed.php Tests: Correctly use the factory method. 2022-09-06 22:03:10 +00:00
wpOembed.php Build/Test Tools: Implement use of the void solution. 2021-08-07 10:29:41 +00:00