wordpress-develop/tests/phpunit/tests/theme
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
..
base.php Editor: Ensure global styles are rendered for third-party blocks. 2022-10-27 15:39:20 +00:00
customHeader.php Coding Standards: Include one space after function keyword for closures. 2023-09-12 15:21:02 +00:00
getThemeStarterContent.php Coding Standards: Add visibility to methods in tests/phpunit/tests/. 2021-11-04 15:22:47 +00:00
support.php Themes: Correct the logic for displaying a _doing_it_wrong() notice for add_theme_support( 'html5' ). 2022-03-07 14:42:49 +00:00
themeDir.php Editor: Fix post editor layout when Post Content has no attributes. 2023-09-20 01:24:32 +00:00
wpAddGlobalStylesForBlocks.php Script Loader: Replace hardcoded output of style tags with calls to wp_add_inline_style. 2023-09-25 17:04:41 +00:00
wpEnqueueStoredStyles.php Tests: Add test class for wp_enqueue_stored_styles(). 2023-03-20 18:20:05 +00:00
wpGetBlockCssSelector.php Coding Standards: Remove superfluous blank lines at the end of various files. 2023-09-07 14:57:30 +00:00
wpGetGlobalStylesheet.php General: Introduce WP_DEVELOPMENT_MODE constant to signify context-specific development mode. 2023-06-26 19:55:28 +00:00
wpTheme.php Themes: Account for a numeric theme directory in WP_Theme::__construct(). 2023-02-27 15:32:22 +00:00
wpThemeGetAllowedFilters.php Tests: Use more appropriate assertions in various tests. 2021-07-07 10:32:56 +00:00
wpThemeHasThemeJson.php Themes: Introduce wp_theme_has_theme_json() for public consumption. 2023-01-18 11:38:16 +00:00
wpThemeJson.php Editor: fix pattern alignment in editor view. 2023-09-19 01:43:07 +00:00
wpThemeJsonResolver.php Coding Standards: Include one space after function keyword for closures. 2023-09-12 15:21:02 +00:00
wpThemeJsonSchema.php Coding Standards: Add visibility to methods in tests/phpunit/tests/. 2022-11-29 12:32:37 +00:00