mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-13 06:07:23 +01:00
e7747ce23e
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 |
||
---|---|---|
.. | ||
class-wp-customize-background-image-control.php | ||
class-wp-customize-background-image-setting.php | ||
class-wp-customize-background-position-control.php | ||
class-wp-customize-code-editor-control.php | ||
class-wp-customize-color-control.php | ||
class-wp-customize-cropped-image-control.php | ||
class-wp-customize-custom-css-setting.php | ||
class-wp-customize-date-time-control.php | ||
class-wp-customize-filter-setting.php | ||
class-wp-customize-header-image-control.php | ||
class-wp-customize-header-image-setting.php | ||
class-wp-customize-image-control.php | ||
class-wp-customize-media-control.php | ||
class-wp-customize-nav-menu-auto-add-control.php | ||
class-wp-customize-nav-menu-control.php | ||
class-wp-customize-nav-menu-item-control.php | ||
class-wp-customize-nav-menu-item-setting.php | ||
class-wp-customize-nav-menu-location-control.php | ||
class-wp-customize-nav-menu-locations-control.php | ||
class-wp-customize-nav-menu-name-control.php | ||
class-wp-customize-nav-menu-section.php | ||
class-wp-customize-nav-menu-setting.php | ||
class-wp-customize-nav-menus-panel.php | ||
class-wp-customize-new-menu-control.php | ||
class-wp-customize-new-menu-section.php | ||
class-wp-customize-partial.php | ||
class-wp-customize-selective-refresh.php | ||
class-wp-customize-sidebar-section.php | ||
class-wp-customize-site-icon-control.php | ||
class-wp-customize-theme-control.php | ||
class-wp-customize-themes-panel.php | ||
class-wp-customize-themes-section.php | ||
class-wp-customize-upload-control.php | ||
class-wp-sidebar-block-editor-control.php | ||
class-wp-widget-area-customize-control.php | ||
class-wp-widget-form-customize-control.php |