45170 Commits

Author SHA1 Message Date
Peter Wilson
94d0172959 Media: Add object-fit to the allowed list of CSS properties.
This resolves a bug in Featured Image blocks where `object-fit` was being removed during the `render_callback`.

Props raduiason, pbiron, kebbet, SergeyBiryukov, bernhard-reiter, ironprogrammer, xknown, audrasjb, ckanderson22, ivanjeronimo, seriouslysenpai, davidbaumwald.
Merges [54675] to the 5.9 branch.
Fixes #56855.



git-svn-id: https://develop.svn.wordpress.org/branches/5.9@54764 602fd350-edb4-49c9-b593-d223f7449a82
2022-11-08 04:35:26 +00:00
Aaron Jorbin
007118d6ad Revert accidental 5.9 branch commits [54655] and [54656]
Unprops audrasjb.
See #56867, #56792, #56862, #56792.



git-svn-id: https://develop.svn.wordpress.org/branches/5.9@54657 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-20 18:18:19 +00:00
Jb Audras
20012ba453 Docs: Add missing default parameter value in trackback_response() docblock.
Props rakibwordpress, audrasjb, SergeyBiryukov.
Fixes #56867.
See #56792.


git-svn-id: https://develop.svn.wordpress.org/branches/5.9@54656 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-20 16:40:07 +00:00
Jb Audras
652f89001b Docs: Add missing default parameter value in themes_api() docblock.
Props rezakhan995, costdev.
Fixes #56862.
See #56792.


git-svn-id: https://develop.svn.wordpress.org/branches/5.9@54655 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-20 16:36:19 +00:00
Jb Audras
6a86cc34d9 WordPress 5.9.5.
git-svn-id: https://develop.svn.wordpress.org/branches/5.9@54580 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-17 19:43:02 +00:00
Jonathan Desrosiers
67cf588d27 Editor: Bump @wordpress packages for 5.9.5.
Package updates for bug fixes:

* @wordpress/block-directory: 3.0.30
* @wordpress/block-library: 6.0.29
* @wordpress/customize-widgets: 2.0.30
* @wordpress/edit-post: 5.0.30
* @wordpress/edit-site: 3.0.30
* @wordpress/edit-widgets: 3.1.25
* @wordpress/widgets: 2.0.25

git-svn-id: https://develop.svn.wordpress.org/branches/5.9@54564 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-17 18:08:24 +00:00
Jonathan Desrosiers
5a1c18ba97 Partial revert of [54545].
Removes unrelated `package.json` changes.

git-svn-id: https://develop.svn.wordpress.org/branches/5.9@54549 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-17 17:46:39 +00:00
Jb Audras
6d9162d4ca Grouped backports to the 5.9 branch.
- Editor: Bump @wordpress packages for the 5.9 branch,
- Media: Refactor search by filename within the admin,
- REST API: Lockdown post parameter of the terms endpoint,
- Customize: Escape blogname option in underscores templates,
- Query: Validate relation in `WP_Date_Query`,
- Users: Revert use of shared objects for current user,
- Posts, Post types: Apply KSES to post-by-email content,
- General: Validate host on "Are you sure?" screen,
- Posts, Post types: Remove emails from post-by-email logs,
- Pings/trackbacks: Apply KSES to all trackbacks,
- Mail: Reset PHPMailer properties between use,
- Comments: Apply kses when editing comments,
- Widgets: Escape RSS error messages for display.

Merges [54521-54530] to the 5.9 branch.
Props audrasjb, costdev, cu121, dd32, davidbaumwald, ehtis, johnbillion, johnjamesjacoby, martinkrcho, matveb, oztaser, paulkevan, peterwilsoncc, ravipatel, SergeyBiryukov, talldanwp, timothyblynjacobs, tykoted, voldemortensen, vortfu, xknown.


git-svn-id: https://develop.svn.wordpress.org/branches/5.9@54545 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-17 17:39:34 +00:00
Peter Wilson
7c29fcf107 Tests: Replace the timezone used in date/time tests.
The `Europe/Kiev` timezone has been deprecated in PHP 8.2 and replaced with `Europe/Kyiv`.

The tests updated in this commit are testing the WordPress date/time functionality. They are **not** testing whether WP or PHP can handle deprecated timezone names correctly.

To ensure the tests follow the original purpose, the use of `Europe/Kiev` within these tests is now replaced with the `Europe/Helsinki` timezone, which is within the same timezone as `Europe/Kyiv`. This should ensure that these tests run without issue and test what they are supposed to be testing on every supported PHP version (unless at some point in the future `Europe/Helsinki` would be renamed, but that's a bridge to cross if and when).

Note: Separate tests should/will be added to ensure that relevant date/time related functions handle a deprecated timezone correctly, but that is not something ''these'' tests are supposed to be testing.

Follow-up to [45853], [45856], [45876], [45882], [45887], [45908], [45914], [46577], [46154], [46580], [46864], [46974], [54207].

Props jrf, costdev, SergeyBiryukov.
Merges [54217] to the 5.9 branch.
See #56468.



git-svn-id: https://develop.svn.wordpress.org/branches/5.9@54513 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-14 06:49:30 +00:00
Peter Wilson
560efbf407 Security: Introduce strings to indicate support status.
Add strings for use in future maintenance/security releases to indicate the security support status of the version of WordPress.

Two strings are introduced:

* indicating the version of WordPress is not receiving security updates, and,
* indicating the version of WordPress will shortly stop receiving security updates.

This change does not make use of the strings, the purpose is to make them available to translators prior to dropping support of selected versions of WordPress.

Props costdev, chesio, robinwpdeveloper, desrosj, rudlinkon, mukesh27, sumitbagthariya16.
Merges [54322] to the 5.9 branch.
See #56532.



git-svn-id: https://develop.svn.wordpress.org/branches/5.9@54431 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-10 04:45:54 +00:00
Jonathan Desrosiers
63d0b8eb87 WordPress 5.9.4.
git-svn-id: https://develop.svn.wordpress.org/branches/5.9@53988 602fd350-edb4-49c9-b593-d223f7449a82
2022-08-30 17:23:22 +00:00
Sergey Biryukov
969da707a3 Grouped backports to the 5.9 branch.
- Posts, Post Types: Escape output within `the_meta()`.
- General: Ensure bookmark query limits are numeric.
- Plugins: Escape output in error messages.


git-svn-id: https://develop.svn.wordpress.org/branches/5.9@53964 602fd350-edb4-49c9-b593-d223f7449a82
2022-08-30 15:22:21 +00:00
Sergey Biryukov
6bcc6441a3 Block Patterns: Update the value used for keywords.
Patterns on the [https://wordpress.org/patterns/ Pattern Directory] can have keywords for better discoverability while searching. The way these are stored [69548ff1f0 was changed from a taxonomy to meta value], but the `/wp/v2/pattern-directory/patterns` endpoint was still pulling from that old value.

The correct property to use for this field is `meta.wpop_keywords`, which returns a single string with comma-separated keywords.

Follow-up to [51021].

Props ryelle, TimothyBlynJacobs.
Merges [53665] to the 5.9 branch.
See #56126.

git-svn-id: https://develop.svn.wordpress.org/branches/5.9@53674 602fd350-edb4-49c9-b593-d223f7449a82
2022-07-06 16:18:24 +00:00
Jonathan Desrosiers
3345113336 Build/Test Tools: Update 3rd party GitHub Actions.
This updates the following GitHub Actions to the latest versions:

- `actions/checkout`
- `actions/cache`
- `actions/github-script`
- `actions/setup-node`
- `codecov/codecov-action`
- `ramsey/composer-install`
- `shivammathur/setup-php`
- `slackapi/slack-github-action`

Various inline documentation updates are also included.

Merges [53112], [53581], [53582], and [53592] to the 5.9 branch.
See #55652.

git-svn-id: https://develop.svn.wordpress.org/branches/5.9@53596 602fd350-edb4-49c9-b593-d223f7449a82
2022-06-30 16:25:47 +00:00
Sergey Biryukov
e1b417f5dc Build/Test Tools: Pass GitHub Actions environment variables to the Docker container.
This ensures that `WP_UnitTestCase::skipOnAutomatedBranches()` has access to the `GITHUB_REF` and `GITHUB_EVENT_NAME` variables, so that some tests can be skipped when appropriate.

Additionally, account for renaming the `master` branch to `trunk` in November 2021.

Follow-up to [40241], [46999], [49264], [49267], [51868].

Merges [53349] to the 5.9 branch.
Fixes #55668.

git-svn-id: https://develop.svn.wordpress.org/branches/5.9@53351 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-04 11:43:28 +00:00
Sergey Biryukov
ea2e02a11c Security: Add 5.9 to the list of versions receiving security updates.
Merges a part of [52448] to the 5.9 branch.

git-svn-id: https://develop.svn.wordpress.org/branches/5.9@53348 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-03 21:41:40 +00:00
Sergey Biryukov
0ea7a38664 Post WordPress 5.9.3 version bump.
git-svn-id: https://develop.svn.wordpress.org/branches/5.9@53081 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-05 20:02:14 +00:00
Jb Audras
8008f01e3f WordPress 5.9.3.
git-svn-id: https://develop.svn.wordpress.org/branches/5.9@53079 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-05 19:06:33 +00:00
Jb Audras
7812f57f37 Help/About: Update the About page with the correct number of bugfixes for WP 5.9.3.
See #55473.


git-svn-id: https://develop.svn.wordpress.org/branches/5.9@53078 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-05 14:43:01 +00:00
Jb Audras
5c3ae7edfd Help/About: Update the About page for WordPress 5.9.3.
Props audrasjb, SergeyBiryukov.
Fixes #55473.


git-svn-id: https://develop.svn.wordpress.org/branches/5.9@53073 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-05 10:32:20 +00:00
Jb Audras
e0b75a46c4 Post WordPress 5.9.3 RC1 version bump.
git-svn-id: https://develop.svn.wordpress.org/branches/5.9@53032 602fd350-edb4-49c9-b593-d223f7449a82
2022-03-30 21:41:31 +00:00
Jb Audras
8b3d9f31dc WordPress 5.9.3 RC1.
git-svn-id: https://develop.svn.wordpress.org/branches/5.9@53031 602fd350-edb4-49c9-b593-d223f7449a82
2022-03-30 21:20:55 +00:00
Jb Audras
beb96fe351 Update WordPress packages for 5.9.3.
Updated packages:

- @wordpress/block-directory@3.0.29
- @wordpress/block-library@6.0.28
- @wordpress/customize-widgets@2.0.29
- @wordpress/edit-post@5.0.29
- @wordpress/edit-site@3.0.29
- @wordpress/edit-widgets@3.1.24

Props mamaduka, jorgefilipecosta.
Fixes #55474.


git-svn-id: https://develop.svn.wordpress.org/branches/5.9@53030 602fd350-edb4-49c9-b593-d223f7449a82
2022-03-30 11:28:30 +00:00
Jb Audras
1a569f3e87 Customizer: When a block theme is active, add an information about Site Editor in the Customizer.
This change adds an information notice to the customizer when a block theme is active and the customizer is also available (for example when a plugin activates it), to encourage people to use the Site Editor for the best full site customization experience.

Props ironprogrammer, antonvlasenko, Clorith, audrasjb, psmits1567, tobifjellner, costdev, webcommsat, joedolson, pbiron.
Merges [53024] and [53025] to the 5.9 branch.
Fixes #54939.


git-svn-id: https://develop.svn.wordpress.org/branches/5.9@53026 602fd350-edb4-49c9-b593-d223f7449a82
2022-03-29 20:16:36 +00:00
Jb Audras
7a6a2ec3bb Filesystem API: Include the ssh-ed25519 public key signature algorithm as an alternative to ssh-rsa.
The `ssh-rsa` signature algorithm is disabled by default as of OpenSSH 8.8, which breaks SSH2 uploads in WordPress on modern systems. `ssh-ed25519` is one of the suggested alternatives, supported since OpenSSH 6.5.

References:

- OpenSSH 8.2 release notes
- OpenSSH 8.7 release notes
- OpenSSH 8.8 release notes

Follow-up to [8865].

Props richybkreckel, dd32, SergeyBiryukov.
Merges [52807] to the 5.9 branch.
Fixes #52409.


git-svn-id: https://develop.svn.wordpress.org/branches/5.9@53022 602fd350-edb4-49c9-b593-d223f7449a82
2022-03-29 16:28:45 +00:00
Jb Audras
aae08058cf Administration: Do not specify menu order for the Widgets menu when the active theme is a block theme.
When using a block theme that declares Widgets support, it's better to not specify a menu order for the Widgets menu to avoid conflicts between menu items order.

Props Rufus87, ironprogrammer, audrasjb, hellofromTonya, davidbaumwald.
Merges [53020] to the 5.9 branch.
Fixes #54916.


git-svn-id: https://develop.svn.wordpress.org/branches/5.9@53021 602fd350-edb4-49c9-b593-d223f7449a82
2022-03-29 16:22:29 +00:00
Jb Audras
8cbd8c0c7b Editor: Fix broken asset URLs when using WP outside of the regular directory
Both CSS and JS URLs were totally broken for some of the newer blocks (e.g. the navigation block in the 2022 theme) when WP core is outside of the current directory using a different prefix.

Props gziolo, SergeyBiryukov, pgpagely, Mamaduka.
Merges [52939] to the 5.9 branch.
Fixes #55311.


git-svn-id: https://develop.svn.wordpress.org/branches/5.9@53019 602fd350-edb4-49c9-b593-d223f7449a82
2022-03-29 15:41:42 +00:00
Jb Audras
99e04b155c Editor: Change location of block support styles in wp_head.
Backports changes from https://github.com/WordPress/gutenberg/pull/39164.

Props ndiego, alexstine, cbravobernal, mamaduka.
Merges [53015] to the 5.9 branch.
See #55474.


git-svn-id: https://develop.svn.wordpress.org/branches/5.9@53017 602fd350-edb4-49c9-b593-d223f7449a82
2022-03-29 13:47:15 +00:00
Jb Audras
f4837d7b62 Editor: Use wp_unique_id() instead of uniqid() to generate CSS class names.
Backports changes from https://github.com/WordPress/gutenberg/pull/38891.
See https://github.com/WordPress/gutenberg/issues/38889.

Props westonruter, mamaduka.
Merges [53012] to the 5.9 branch.
See #55474.


git-svn-id: https://develop.svn.wordpress.org/branches/5.9@53013 602fd350-edb4-49c9-b593-d223f7449a82
2022-03-29 13:07:07 +00:00
Jb Audras
930b56bd36 Themes: Avoid undefined variable warning on get_svg_filters().
This change fixes an undefined variable warning thrown when `duotone` color setting was set to null in Block Themes `theme.json` file.

Follow-up to [52768].

Props aliakseyenkaihar, audrasjb, rafiahmedd.
Merges [52791] to the 5.9 branch.
Fixes #55241.


git-svn-id: https://develop.svn.wordpress.org/branches/5.9@53009 602fd350-edb4-49c9-b593-d223f7449a82
2022-03-29 09:10:55 +00:00
Jb Audras
5963fa5694 Themes: Hide block themes live preview link following installation.
Prevent the Customizer/Live Preview button from showing for installed block themes when on the theme installation page.

Props antonvlasenko, costdev, ironprogrammer.
Merges [52819] to the 5.9 branch.
Fixes #54878.


git-svn-id: https://develop.svn.wordpress.org/branches/5.9@53008 602fd350-edb4-49c9-b593-d223f7449a82
2022-03-29 08:53:31 +00:00
Jb Audras
e258cac7bc Media: Make get_post_galleries() only return galleries.
This change makes sure only gallery content is returned by `get_post_galleries()`. It fixes an issue where non gallery block content was also returned by the function.

Props BinaryMoon, costdev, glendaviesnz.
Merges [52797] to the 5.9 branch.
Fixes #55203.


git-svn-id: https://develop.svn.wordpress.org/branches/5.9@53006 602fd350-edb4-49c9-b593-d223f7449a82
2022-03-28 20:51:00 +00:00
Jb Audras
1f2b9ce4f9 Editor: Optimize preload paths for post and site editors.
This patch optimizes preload paths in post and site editors so that they match the real requests:

- Remove the `/` preload as the payload is very big and the response is not needed on any critical path.
- Modify the preloaded path for `/wp/v2/taxonomies` so that it corresponds to what `loadTaxonomyEntities` requests. After Gutenberg PR 37685 was merged to core, these preloads need to be modified to use `context=view` instead of `context=edit`.
- Modify the `/wp/v2/users/me` path so that it matches the real request (no query params).
- Add a preload of `/wp/v2/settings` because it is requested on critical path (editor boot). Site editor already preloads this, the changeset is only adding it to the post editor.

This is related to Gutenberg PR 39256 which introduces compatibility code to modify the preload paths with a filter, when the Gutenberg plugin is active.
See https://github.com/WordPress/gutenberg/pull/39256.

Props jsnajdr, noisysocks.
Merges [52995] to the 5.9 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/5.9@53005 602fd350-edb4-49c9-b593-d223f7449a82
2022-03-28 20:29:09 +00:00
Sergey Biryukov
0b800e21c3 Post WordPress 5.9.2 version bump.
git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52920 602fd350-edb4-49c9-b593-d223f7449a82
2022-03-11 02:31:20 +00:00
Jorge Costa
27d3af825b Block Editor: Improve Global Styles filtering order.
From the conceptual point it makes sense to execute global styles filters before post filters. So the post filters are always the last.

Props xknown, sergey, audrasjb, vortfu, oandregal, get_dave.
Merges [52895] to the 5.9 branch.

git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52896 602fd350-edb4-49c9-b593-d223f7449a82
2022-03-10 23:36:14 +00:00
Jorge Costa
c78c876173 Update WordPress packages.
Updates the WordPress packages to their most recent patch versions.

Props xknown, sergey, audrasjb.

git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52894 602fd350-edb4-49c9-b593-d223f7449a82
2022-03-10 23:01:12 +00:00
Jb Audras
1b34d90183 WordPress 5.9.2.
git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52874 602fd350-edb4-49c9-b593-d223f7449a82
2022-03-10 22:00:39 +00:00
Jb Audras
0709236f2b External Librairies: Update jQuery.query to version 2.2.3.
This updates the "jquery-query" library from version 2.1.7 to 2.2.3.

Props jorbin, peterwilsoncc, xknown, audrasjb, jorgefilipecosta.
Merges [52844] to the 5.9 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52845 602fd350-edb4-49c9-b593-d223f7449a82
2022-03-10 19:18:24 +00:00
Jb Audras
8cc9e53847 Themes: Remove the Live Preview link when installing a block theme from a zip archive.
This changeset removes the Live Preview link for block-based themes when installing for a zip archive, since the customizer is disabled by default for block themes.

Follow-up to [52353].

Props alanjacobmathew, hellofromTonya, antonvlasenko, ironprogrammer.
Fixes #54578.


git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52803 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-26 08:27:50 +00:00
Sergey Biryukov
67d7e50407 Post WordPress 5.9.1 version bump.
The 5.9 branch is now 5.9.2-alpha.

git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52788 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-22 16:05:13 +00:00
Jb Audras
35cd881c66 WordPress 5.9.1.
git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52786 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-22 15:15:08 +00:00
Jb Audras
d6e0fa764e Help/About: Update the About page for WordPress 5.9.1.
Props hellofromTonya, audrasjb.
Fixes #55173.


git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52785 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-22 11:03:05 +00:00
Jb Audras
fd74b1fa69 Twenty Twenty-Two: Bump theme version to 1.1.
This change bumps the version of the Twenty Twenty-Two bundled theme in preparation for release with WordPress 5.9.1.

Props peterwilsoncc, petaryoast, audrasjb, SergeyBiryukov, rafiahmedd.
Merges [52781] to the 5.9 branch.
Fixes #55056.


git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52782 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-21 21:13:36 +00:00
Jb Audras
bc9067bdd5 Post WordPress 5.9.1 RC1 version bump.
git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52771 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-17 21:46:21 +00:00
Jb Audras
f3c1894502 WordPress 5.9.1 RC1.
git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52770 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-17 21:22:23 +00:00
Tonya Mork
4c522660c0 Editor: Automatically apply global styles duotone filters to render in post editor.
Global styles duotone filters were not rendering in the post editor. This fixes that by adding `wp_global_styles_render_svg_filters` to the `in_admin_header` so it renders in the body before the editor.

Follow-up [52757].

Props ajlende, abhanonstopnewsuk.
Merges [52768] to the 5.9 branch.
Fixes #55190.

git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52769 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-17 20:49:37 +00:00
Tonya Mork
de80656938 Options: Disable transients while installing.
Prevent the transient setters and getters from attempting to use the database table before they exist during the installation process. 

During installation transients now use the `wp_cache_*()` functions on all sites, including those without a persistent cache, to prevent database errors. The use of the caching functions stores the data in memory for the duration of the request to account for transient data that is used multiple times during installation.

Props dd32, audrasjb, tnolte, antonvlasenko, noisysocks, peterwilsoncc.
Merges [52694] to the 5.9 branch.
Fixes #54849.

git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52767 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-17 19:51:30 +00:00
Jb Audras
632b4c9b70 Editor: Update block editor packages for WordPress 5.9.1.
The following packages were updated:

- @wordpress/block-directory@3.0.27
- @wordpress/block-editor@8.0.17
- @wordpress/block-library@6.0.26
- @wordpress/components@19.2.3
- @wordpress/core-data@4.0.10
- @wordpress/customize-widgets@2.0.27
- @wordpress/e2e-tests@2.5.18
- @wordpress/edit-post@5.0.27
- @wordpress/edit-site@3.0.27
- @wordpress/edit-widgets@3.1.22
- @wordpress/editor@12.0.21
- @wordpress/format-library@3.0.23
- @wordpress/interface@4.1.18
- @wordpress/list-reusable-blocks@3.0.20
- @wordpress/nux@5.0.20
- @wordpress/reusable-blocks@3.0.23
- @wordpress/server-side-render@3.0.20
- @wordpress/widgets@2.0.23

Props Mamaduka.
Merges [52765] to the 5.9 branch.
See #55179.


git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52766 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-17 19:40:17 +00:00
Tonya Mork
7a401187ce Editor: Adds an additional check to guard against incompete presets.
Adds an additional guard to ensure the value of `$preset_metadata['value_key']` actually exists as a key in the `$preset` array. Fixes `Warning: Undefined array key` error. 

Intentionally adds the check into the existing `isset()` as it's native to PHP, more efficient, and a good pattern.

Follow-up [52049].

Props jeherve, swissspidy, sergeybiryukov, jrf.
Merges [52763] to the 5.9 branch.
Fixes #55161.

git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52764 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-17 18:54:37 +00:00
Tonya Mork
2f1ca7986c Script Loader: Prevent normalizing data URIs in _wp_normalize_relative_css_links().
This prevents making data URIs as in `mask-image:url('data:image/svg+xml;utf8,<svg...` relative to the WordPress installation.

Props staatic.
Merges [52754] to the 5.9 branch.
See #54243.
Fixes #55177.

git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52762 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-17 17:58:11 +00:00