WordPress/wp-includes/customize
Weston Ruter e7747ce23e Script Loader: Use `wp_get_script_tag()` and `wp_get_inline_script_tag()`/`wp_print_inline_script_tag()` helper functions to output scripts on the frontend and login screen.
Using script tag helper functions allows plugins to employ the `wp_script_attributes` and `wp_inline_script_attributes` filters to inject the `nonce` attribute to apply Content Security Policy (e.g. Strict CSP). Use of helper functions also simplifies logic in `WP_Scripts`.

* Update `wp_get_inline_script_tag()` to wrap inline script in CDATA blocks for XHTML-compatibility when not using HTML5.
* Ensure the `type` attribute is printed first in `wp_get_inline_script_tag()` for back-compat.
* Wrap existing `<script>` tags in output buffering to retain IDE supports.
* In `wp_get_inline_script_tag()`, append the newline to `$javascript` before it is passed into the `wp_inline_script_attributes` filter so that the CSP hash can be computed properly.
* In `the_block_template_skip_link()`, opt to enqueue the inline script rather than print it.
* Add `ext-php` to `composer.json` under `suggest` as previously it was an undeclared dependency for running PHPUnit tests.
* Update tests to rely on `DOMDocument` to compare script markup, normalizing unsemantic differences.

Props westonruter, spacedmonkey, flixos90, 10upsimon, dmsnell, mukesh27, joemcgill, swissspidy, azaozz.
Fixes #58664.
See #39941.

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


git-svn-id: http://core.svn.wordpress.org/trunk@56199 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-09-25 21:05:21 +00:00
..
class-wp-customize-background-image-control.php Docs: Add missing documentation for some Customize class properties: 2022-05-18 15:24:14 +00:00
class-wp-customize-background-image-setting.php Docs: Add missing documentation for some Customize class properties: 2022-05-18 15:24:14 +00:00
class-wp-customize-background-position-control.php I18N: Mark screen reader strings as such with translator comments. 2023-02-07 17:10:21 +00:00
class-wp-customize-code-editor-control.php
class-wp-customize-color-control.php
class-wp-customize-cropped-image-control.php Coding Standards: Remove superfluous blank lines at the end of various classes. 2023-09-08 09:32:23 +00:00
class-wp-customize-custom-css-setting.php
class-wp-customize-date-time-control.php I18N: Mark screen reader strings as such with translator comments. 2023-02-07 17:10:21 +00:00
class-wp-customize-filter-setting.php
class-wp-customize-header-image-control.php Coding Standards: Remove superfluous blank lines at the end of various functions. 2023-09-08 10:03:21 +00:00
class-wp-customize-header-image-setting.php Docs: Replace multiple single line comments with multi-line comments. 2023-07-10 23:00:22 +00:00
class-wp-customize-image-control.php
class-wp-customize-media-control.php Docs: Replace multiple single line comments with multi-line comments. 2023-07-10 23:00:22 +00:00
class-wp-customize-nav-menu-auto-add-control.php
class-wp-customize-nav-menu-control.php I18N: Mark screen reader strings as such with translator comments. 2023-02-07 17:10:21 +00:00
class-wp-customize-nav-menu-item-control.php Administration: Replace "Current theme" with "Active theme" in user facing strings. 2022-01-15 08:44:03 +00:00
class-wp-customize-nav-menu-item-setting.php Coding Standards: Remove superfluous blank lines at the end of various functions. 2023-09-08 10:03:21 +00:00
class-wp-customize-nav-menu-location-control.php
class-wp-customize-nav-menu-locations-control.php Help/About: Avoid extra redirections on HelpHub Links. 2023-02-23 11:06:19 +00:00
class-wp-customize-nav-menu-name-control.php
class-wp-customize-nav-menu-section.php
class-wp-customize-nav-menu-setting.php Docs: Fix typos in some DocBlocks. 2022-01-18 20:29:06 +00:00
class-wp-customize-nav-menus-panel.php I18N: Mark screen reader strings as such with translator comments. 2023-02-07 17:10:21 +00:00
class-wp-customize-new-menu-control.php
class-wp-customize-new-menu-section.php
class-wp-customize-partial.php Code Modernization: Add `AllowDynamicProperties` attribute to all (parent) classes. 2022-09-12 15:47:14 +00:00
class-wp-customize-selective-refresh.php Script Loader: Use `wp_get_script_tag()` and `wp_get_inline_script_tag()`/`wp_print_inline_script_tag()` helper functions to output scripts on the frontend and login screen. 2023-09-25 21:05:21 +00:00
class-wp-customize-sidebar-section.php
class-wp-customize-site-icon-control.php Customize: Escape blogname option in underscores templates. 2022-10-17 11:26:11 +00:00
class-wp-customize-theme-control.php Administration: Use `wp_admin_notice()` in `/wp-includes/`. 2023-09-14 01:25:16 +00:00
class-wp-customize-themes-panel.php I18N: Mark screen reader strings as such with translator comments. 2023-02-07 17:10:21 +00:00
class-wp-customize-themes-section.php Docs: Use third-person singular verbs in various function descriptions, as per docblocks standards. 2023-08-24 09:08:15 +00:00
class-wp-customize-upload-control.php
class-wp-sidebar-block-editor-control.php
class-wp-widget-area-customize-control.php I18N: Mark screen reader strings as such with translator comments. 2023-02-07 17:10:21 +00:00
class-wp-widget-form-customize-control.php