44217 Commits

Author SHA1 Message Date
Sergey Biryukov
ae3d9432ad 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.8 branch.
See #56126.

git-svn-id: https://develop.svn.wordpress.org/branches/5.8@53675 602fd350-edb4-49c9-b593-d223f7449a82
2022-07-06 16:26:08 +00:00
Jonathan Desrosiers
ae13cba729 Build/Test Tools: Use the Slack notifications workflow as a reusable one.
This backports several changesets that are required to remove the reliance on the `workflow_run` event for posting Slack notifications.

The Slack notification workflow will now be called as a reusable one, which has several benefits (see [53591]).

Several other minor GitHub Actions related updates are also being backported in this commit to maintain tooling consistency across branches that still receive security updates as a courtesy when necessary.

Merges [51921], [51924], [51925], [51937], [52002], [52130], [52183], [52233], [53112], [53581], [53582], [53592] to the 5.8 branch.
See #56095.

git-svn-id: https://develop.svn.wordpress.org/branches/5.8@53597 602fd350-edb4-49c9-b593-d223f7449a82
2022-06-30 16:26:30 +00:00
Jonathan Desrosiers
f0c665aafc Build/Test Tools: Specify NodeJS version 14.x in the .nvmrc file.
As of 2021-10-26, the LTS version of NodeJS is now `16.x`.

This pins the `14.x` version in the `.nvmrc` file to ensure contributors are able to contribute without issue until compatibility with version `16.x` can be confirmed in both `trunk` and the Gutenberg repository on GitHub.

Merges [52240] to the 5.8 branch.
Fixes #54502.

git-svn-id: https://develop.svn.wordpress.org/branches/5.8@53583 602fd350-edb4-49c9-b593-d223f7449a82
2022-06-27 19:34:38 +00:00
Jorge Costa
bb6cdf6848 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.8@52887 602fd350-edb4-49c9-b593-d223f7449a82
2022-03-10 22:13:10 +00:00
Jb Audras
1407733bda WordPress 5.8.4.
git-svn-id: https://develop.svn.wordpress.org/branches/5.8@52880 602fd350-edb4-49c9-b593-d223f7449a82
2022-03-10 22:06:20 +00:00
Jb Audras
4b8e7423c2 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.8 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/5.8@52848 602fd350-edb4-49c9-b593-d223f7449a82
2022-03-10 20:47:06 +00:00
Jonathan Desrosiers
7f4efc55b6 Post WordPress 5.8.3 version bump.
The 5.8 branch is now 5.8.4 alpha.

git-svn-id: https://develop.svn.wordpress.org/branches/5.8@52533 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-06 20:54:25 +00:00
Jonathan Desrosiers
cc58650ba4 WordPress 5.8.3.
git-svn-id: https://develop.svn.wordpress.org/branches/5.8@52487 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-06 18:43:54 +00:00
Jonathan Desrosiers
c755259dc8 Formatting: Correctly encode ASCII characters in post slugs.
Merges [52457] to the 5.8 branch.
Props zieladam, whyisjake, xknown, peterwilsoncc, desrosj, iandunn.

git-svn-id: https://develop.svn.wordpress.org/branches/5.8@52465 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-06 17:34:57 +00:00
Jonathan Desrosiers
257814ebb4 Upgrade/Install: Avoid using unserialize() unnecessarily.
Merges [52456] to the 5.8 branch.
Props vortfu, xknown, dd32.

git-svn-id: https://develop.svn.wordpress.org/branches/5.8@52463 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-06 17:27:15 +00:00
Jonathan Desrosiers
c09ccfbc54 Query: Improve sanitization within WP_Meta_Query.
Merges [52455] to the 5.8 branch.
Props vortfu, xknown, dd32.

git-svn-id: https://develop.svn.wordpress.org/branches/5.8@52461 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-06 17:22:56 +00:00
Jonathan Desrosiers
17efac8c8e Query: Improve sanitization within WP_Tax_Query.
Merges [52454] to the 5.8 branch.
Props dd32, xknown, peterwilsoncc, ehtis.

git-svn-id: https://develop.svn.wordpress.org/branches/5.8@52459 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-06 17:20:19 +00:00
Jonathan Desrosiers
dcaa0934c0 Help/About: Use the correct number of bugs fixed in 5.8.2.
Follow up to [52112].

git-svn-id: https://develop.svn.wordpress.org/branches/5.8@52113 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-10 17:04:18 +00:00
Jonathan Desrosiers
3e8ac64fd3 WordPress 5.8.2.
git-svn-id: https://develop.svn.wordpress.org/branches/5.8@52112 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-10 17:02:52 +00:00
Jonathan Desrosiers
77ed0acb06 Post WordPress 5.8.2 RC1 version bump.
git-svn-id: https://develop.svn.wordpress.org/branches/5.8@51987 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-02 20:08:12 +00:00
Jonathan Desrosiers
d8e77bdef8 WordPress 5.8.2 RC1.
git-svn-id: https://develop.svn.wordpress.org/branches/5.8@51986 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-02 19:45:56 +00:00
Sergey Biryukov
9e7602b2e1 Media: Use WP_Query::get() method to retrieve the posts_per_page value in wp_ajax_query_attachments().
This avoids a PHP notice and ensures that a default value is always provided if none is set by the user.

Follow-up to [51145], [51485].

Props davidwebca, mukesh27, circlecube, desrosj.
Merges [51982] to the 5.8 branch.
Fixes #54129.

git-svn-id: https://develop.svn.wordpress.org/branches/5.8@51983 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-02 18:32:24 +00:00
Jonathan Desrosiers
4f3ab0478b Script Loader: Correct the number of arguments passed to the closure in enqueue_block_styles_assets().
This avoids an `Uncaught ArgumentCountError: Too few arguments to function {closure}(), 1 passed` PHP fatal error when registering a block style with the `should_load_separate_core_block_assets` filter enabled.

Follow-up to [51471].

Props aristath, shimon246, jrf, gziolo, SergeyBiryukov.
Merges [54323] to the 5.8 branch.
Fixes #54323.

git-svn-id: https://develop.svn.wordpress.org/branches/5.8@51981 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-02 18:21:29 +00:00
Jonathan Desrosiers
55d6908dfb HTTP: Remove the DST Root CA X3 certificate expired on September 30, 2021.
> The currently recommended certificate chain as presented to Let’s Encrypt ACME clients when new certificates are issued contains an intermediate certificate (ISRG Root X1) that is signed by an old DST Root CA X3 certificate that expires on 2021-09-30. In some cases the OpenSSL 1.0.2 version will regard the certificates issued by the Let’s Encrypt CA as having an expired trust chain.
> 
> Most up-to-date CA cert trusted bundles, as provided by operating systems, contain this soon-to-be-expired certificate. The current CA cert bundles also contain an ISRG Root X1 self-signed certificate. This means that clients verifying certificate chains can find the alternative non-expired path to the ISRG Root X1 self-signed certificate in their trust store.
> 
> Unfortunately this does not apply to OpenSSL 1.0.2 which always prefers the untrusted chain and if that chain contains a path that leads to an expired trusted root certificate (DST Root CA X3), it will be selected for the certificate verification and the expiration will be reported.

References:
* [https://www.openssl.org/blog/blog/2021/09/13/LetsEncryptRootCertExpire/ Old Let’s Encrypt Root Certificate Expiration and OpenSSL 1.0.2]
* [https://letsencrypt.org/docs/dst-root-ca-x3-expiration-september-2021/ DST Root CA X3 Expiration (September 2021)]

Follow-up to [25224], [25426], [25569], [27307], [30491], [30765], [34283], [35919], [36570], [46094].

Props bradleyt, fierevere, SergeyBiryukov.
Merges [51883] to the 5.8 branch.
Fixes #54207. See #50828.

git-svn-id: https://develop.svn.wordpress.org/branches/5.8@51948 602fd350-edb4-49c9-b593-d223f7449a82
2021-10-28 19:20:19 +00:00
Jonathan Desrosiers
bf45274615 Build/Test Tools: Change the patch version used for testing the 5.6 branch of PHP.
This unpins the version of PHP 5.6.20 used when testing the 5.6 branch of PHP.

Using 5.6.20 was an intentional decision in [49162], as that patch version is the oldest version of PHP 5.6 still supported by WordPress. However, as of September 30, 2021, the `5.6.20` image contains a version of OpenSSL with an expired certificate, sometimes resulting in an expired trust chain.

Props Clorith, hellofromTonya, SergeyBiryukov, desrosj.
Fixes #54223.

git-svn-id: https://develop.svn.wordpress.org/branches/5.8@51889 602fd350-edb4-49c9-b593-d223f7449a82
2021-10-05 17:23:37 +00:00
Tonya Mork
50c5eb71e8 Build/Test Tools: Fix test forward-compatibility layer.
In [51838], the test wrapper methods were not being called due to the names not being recognized as supported PHPUnit "hook" names for fixtures.

This commit:
- Fixes the problem by adding extra camelCase wrappers to the `WP_UnitTestCase` to call the methods in the right order.
- Adds wrappers for the `assertPreConditions()` and `assertPostConditions()` fixture methods to make the backport feature complete for the fixture wrappers.

Test wrapper methods call fix:

By adding method overloads for the PHPUnit native camelCase fixture methods and letting those call the (camelCase) parent method first and only calling the snake_case fixture methods after, the snake_case methods can be supported and the typical run order safeguarded.

As not all test classes will have declared snake_case fixture methods, the snake_case fixture methods are also declared in the `WP_UnitTestCase`. Why? This prevents having to wrap these method calls in `method_exists()` conditions checking for the existence of the snake_case methods in an unknown Test child class. And with the normal inheritance rules in combination with calling the method using `static`, the right method will be called anyway without fatal "calling undeclared method" errors.

Note: While it will be rare, there ''may'' be cases where a test class does not adhere to the normal execution order for fixtures, i.e. for the setup methods, parent first, own code second; and for the teardown methods, own code first, parent second. For example a test class which has "some code - `parent::setUp()` call - some more code" in their `setUp()` method. In those (rare) cases, the execution order of the code will now be changed, which may have side-effects. This rare case will be identified in the dev note.

Follow-up to [51838].

Props bjorsch, swisspidy, jrf, hellofromTonya.
See #53911.

git-svn-id: https://develop.svn.wordpress.org/branches/5.8@51861 602fd350-edb4-49c9-b593-d223f7449a82
2021-09-24 13:18:21 +00:00
Jonathan Desrosiers
a147bde1b0 Build/Test Tools: Introduce the PHPUnit Polyfills package for easier cross branch testing.
This backports the PHPUnit Polyfills package and related test infrastructure changes to make it easier for developers to continue testing on multiple versions WordPress while adding tests for newer versions of PHP, which require more modern PHPUnit practices.

One of the changes included is the addition of wrappers for the new snake_case fixture methods in PHPUnit. This allows the native camelCase standard in PHPUnit to be used, but allows for developers to transition to the new naming conventions.

Props hellofromTonya, jrf, SergeyBiryukov, johnbillion, netweb, schlessera, jeherve, lucatume, desrosj.
Merges [51559,51560,51810-51813,51828] to the 5.8 branch.
See #53911.

git-svn-id: https://develop.svn.wordpress.org/branches/5.8@51838 602fd350-edb4-49c9-b593-d223f7449a82
2021-09-21 19:04:34 +00:00
Jonathan Desrosiers
61936d46b3 Post WordPress 5.8.1 version bump.
The 5.8 branch is now 5.8.2 alpha.

git-svn-id: https://develop.svn.wordpress.org/branches/5.8@51778 602fd350-edb4-49c9-b593-d223f7449a82
2021-09-09 03:14:03 +00:00
Jonathan Desrosiers
abde276901 WordPress 5.8.1.
git-svn-id: https://develop.svn.wordpress.org/branches/5.8@51771 602fd350-edb4-49c9-b593-d223f7449a82
2021-09-09 02:11:54 +00:00
Andrew Ozz
c030902e9c Editor: Revert [51748] and [51649]. They intorduced a bug where wp.editor may be replaced with wp.oldEditor in certain cases.
Props desrosj, davidbinda, azaozz.
Merges [51768] to the 5.8 branch.
Fixes #53762.


git-svn-id: https://develop.svn.wordpress.org/branches/5.8@51770 602fd350-edb4-49c9-b593-d223f7449a82
2021-09-09 01:59:03 +00:00
Jonathan Desrosiers
10e975225a Help/About: Update the About page for WordPress 5.8.1.
Props audrasjb, circlecube, mukesh27.
Fixes #54083.

git-svn-id: https://develop.svn.wordpress.org/branches/5.8@51767 602fd350-edb4-49c9-b593-d223f7449a82
2021-09-08 22:50:53 +00:00
Sergey Biryukov
bd3f727f50 Editor: fix the replacement of wp.editor with wp.oldEditor in the inline script outputted when enqueueing the old editor.
Props fullofcaffeine, davidbinda, grantmkin, get_dave, azaozz.
Merges [51748] to the 5.8 branch.
Fixes #53762.

git-svn-id: https://develop.svn.wordpress.org/branches/5.8@51749 602fd350-edb4-49c9-b593-d223f7449a82
2021-09-08 19:23:39 +00:00
Sergey Biryukov
3fa8b55ad6 General: Only use _jsonp_wp_die_handler() for JSONP REST API requests.
Props mdawaffe, peterwilsoncc.
Merges [51740] to the 5.8 branch.

git-svn-id: https://develop.svn.wordpress.org/branches/5.8@51741 602fd350-edb4-49c9-b593-d223f7449a82
2021-09-08 17:19:16 +00:00
Jonathan Desrosiers
09f3dcbe63 Post WordPress 5.8.1 RC1 version bump.
git-svn-id: https://develop.svn.wordpress.org/branches/5.8@51723 602fd350-edb4-49c9-b593-d223f7449a82
2021-09-01 19:56:02 +00:00
Jonathan Desrosiers
be01ada606 WordPress 5.8.1 RC1.
git-svn-id: https://develop.svn.wordpress.org/branches/5.8@51722 602fd350-edb4-49c9-b593-d223f7449a82
2021-09-01 19:45:31 +00:00
Jonathan Desrosiers
d73689ca98 Editor: Update block editor packages for WordPress 5.8.1.
The following packages were updated:
- @wordpress/a11y to `3.1.2`
- @wordpress/annotations to `2.1.6`
- @wordpress/api-fetch to `5.1.2`
- @wordpress/autop to `3.1.2`
- @wordpress/babel-preset-default to `6.2.1`
- @wordpress/blob to `3.1.2`
- @wordpress/block-directory to `2.1.21`
- @wordpress/block-editor to `6.1.14`
- @wordpress/block-library to `3.2.19`
- @wordpress/block-serialization-default-parser to `4.1.2`
- @wordpress/blocks to `9.1.8`
- @wordpress/components to `14.1.11`
- @wordpress/compose to `4.1.6`
- @wordpress/core-data to `3.1.12`
- @wordpress/customize-widgets to `1.0.20`
- @wordpress/data-controls to `2.1.6`
- @wordpress/data to `5.1.6`
- @wordpress/date to `4.1.2`
- @wordpress/deprecated to `3.1.2`
- @wordpress/dom-ready to `3.1.2`
- @wordpress/dom to `3.1.5`
- @wordpress/e2e-test-utils to `5.3.1`
- @wordpress/edit-post to `4.1.21`
- @wordpress/edit-widgets to `2.1.21`
- @wordpress/editor to `10.1.17`
- @wordpress/element to `3.1.2`
- @wordpress/escape-html to `2.1.2`
- @wordpress/format-library to `2.1.14`
- @wordpress/html-entities to `3.1.2`
- @wordpress/i18n to `4.1.2`
- @wordpress/icons to `4.0.3`
- @wordpress/interface to `3.1.12`
- @wordpress/keyboard-shortcuts to `2.1.7`
- @wordpress/keycodes to `3.1.2`
- @wordpress/list-reusable-blocks to `2.1.11`
- @wordpress/media-utils to `2.1.2`
- @wordpress/notices to `3.1.6`
- @wordpress/nux to `4.1.11`
- @wordpress/plugins to `3.1.6`
- @wordpress/primitives to `2.1.2`
- @wordpress/priority-queue to `2.1.2`
- @wordpress/react-i18n to `2.1.2`
- @wordpress/redux-routine to `4.1.2`
- @wordpress/reusable-blocks to `2.1.17`
- @wordpress/rich-text to `4.1.6`
- @wordpress/scripts to `16.1.5`
- @wordpress/server-side-render to `2.1.12`
- @wordpress/shortcode to `3.1.2`
- @wordpress/url to `3.1.2`
- @wordpress/viewport to `3.1.6`
- @wordpress/warning to `2.1.2`
- @wordpress/widgets to `1.1.19`
- @wordpress/wordcount to `3.1.2`

Props oandregal, juanmaguitar, gziolo, jblz, talldanwp, ribaricplusplus, peterwisoncc, youknowriad, paaljoachim, kreppar, ellatrix, aristath, walbo, ajlende, kevin940726, mamaduka, ntsekouras, toro_unit, mkaz, joen, noisysocks, zieladam, andraganescu, antonvlasenko, terraling, dariak, vladytimy, circlecube, desrosj.
Merges [51719] to the 5.8 branch.
Fixes #54052, #52818.

git-svn-id: https://develop.svn.wordpress.org/branches/5.8@51721 602fd350-edb4-49c9-b593-d223f7449a82
2021-09-01 19:26:52 +00:00
Jonathan Desrosiers
befb26b4a7 Customize: Add wp-embed-responsive class to body if using widgets block editor
Appends the wp-embed-responsive class to the body if the widgets block editor is enabled. This fixes a bug preventing embeds (e.g. YouTube embeds) appearing in the widgets block editor.

Props walbo, kevin940726, noisysocks.
Merges [51716] to the 5.8 branch.
Fixes #53609.

git-svn-id: https://develop.svn.wordpress.org/branches/5.8@51720 602fd350-edb4-49c9-b593-d223f7449a82
2021-09-01 19:08:51 +00:00
Jonathan Desrosiers
51bc7e23ca Media: Remove documentation detailing specific edge cases in the image_editor_output_format filter.
In [51422], a few specific edge cases were detailed so that developers using the hook were aware of known pitfalls.

These edge cases have been fixed in 5.8.1 through [51653] and [51704], so the documentation is no longer necessary.

Props azaozz, audrasjb.
Merges [51717] to the 5.8 branch.
Fixes #53955.

git-svn-id: https://develop.svn.wordpress.org/branches/5.8@51718 602fd350-edb4-49c9-b593-d223f7449a82
2021-09-01 17:30:22 +00:00
Peter Wilson
f44a396ddf Build: Clean css/dist as part of the webpack build step.
Move the cleaning of the `wp-includes/css/dist` folder from `clean:css` to `clean:webpack-assets` to avoid an order of operations issue in which the files were built shortly before been deleted later in the build process.

Follow up to [51689].

Props netweb, ramonopoly, peterwilsoncc.
Merges [51713] to the 5.8 branch.
Fixes #53719.



git-svn-id: https://develop.svn.wordpress.org/branches/5.8@51714 602fd350-edb4-49c9-b593-d223f7449a82
2021-09-01 04:04:44 +00:00
Jonathan Desrosiers
d4c3e5a942 Media: apply the wp_editor_set_quality filter not only when loading an image in the editor but also when saving an converted image, after the mime-type of the output image has changed.
Props mikeschroder, desrosj, azaozz.
Merges [51704] to the 5.8 branch.
Fixes #53667.

git-svn-id: https://develop.svn.wordpress.org/branches/5.8@51712 602fd350-edb4-49c9-b593-d223f7449a82
2021-09-01 00:43:39 +00:00
Jonathan Desrosiers
06229e47bc Widgets: Pass correct context to get_block_categories() calls.
The `get_block_categories()` function expects either a `WP_Post` or a `WP_Block_Editor_Context` instance as the context argument, not a string.

Follow-up to [50996], [50997].

Props Enchiridion, pbearne, audrasjb, SergeyBiryukov.
Merges [51700] to the 5.8 branch.
Fixes #53757.

git-svn-id: https://develop.svn.wordpress.org/branches/5.8@51711 602fd350-edb4-49c9-b593-d223f7449a82
2021-09-01 00:33:28 +00:00
Jonathan Desrosiers
f2293e968c Widgets: Show title and media select fields in Accessibility Mode.
This updates the Custom HTML and Media widgets to display the correct fields when adding or editing a widget when using accessibility mode through the Classic Widgets experience.

Follow up to [49973].

Props mark-k, sabernhardt, alexstine, circlecube, audrasjb.
Merges [51701] to the 5.8 branch.
Fixes #53641.

git-svn-id: https://develop.svn.wordpress.org/branches/5.8@51710 602fd350-edb4-49c9-b593-d223f7449a82
2021-09-01 00:28:29 +00:00
Jonathan Desrosiers
b45f595aab Media: fix showing of the "Filter Media" filds when replacing an image from the media modal.
Props mhuntdesign, sabernhardt, azaozz.
Merges [51703] to the 5.8 branch.
Fixes #53833.

git-svn-id: https://develop.svn.wordpress.org/branches/5.8@51708 602fd350-edb4-49c9-b593-d223f7449a82
2021-09-01 00:13:41 +00:00
Jonathan Desrosiers
2562fb4a6e Coding Standards: Apply some minor alignment fixes.
These are updates caused by running `composer format`.

Follow up to [51653].

Partially merges [51693] to the 5.8 branch.
See #53668.

git-svn-id: https://develop.svn.wordpress.org/branches/5.8@51707 602fd350-edb4-49c9-b593-d223f7449a82
2021-09-01 00:10:18 +00:00
Jonathan Desrosiers
bd547a3218 Media: Fix wp_unique_filename() to check for name collisions with all alternate file names when an image may be converted after uploading. This includes possible collinions with pre-existing images whose sub-sizes/thumbnails are regenerated.
Props ianmjones, azaozz.
Merges [51653] to the 5.8 branch.
Fixes #53668.

git-svn-id: https://develop.svn.wordpress.org/branches/5.8@51706 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-31 23:56:11 +00:00
Jonathan Desrosiers
f5de449949 Editor: Conditionally load registered styles for block variations
In WordPress 5.8 we added the ability to only load styles for blocks when these blocks are rendered. However, these optimizations left out block-styles that get added using the register_block_style() function/API.

Props aristath, gziolo.
Merges [51471] to the 5.8 branch.
Fixes #53616.

git-svn-id: https://develop.svn.wordpress.org/branches/5.8@51696 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-30 15:36:31 +00:00
Jonathan Desrosiers
bb7645ddb9 Filesystem API: Make sure to only call fread() on non-empty files in PclZip::privAddFile().
This avoids a fatal error on PHP 8 caused by passing a zero value to `fread()` as the `$length` argument, which must be greater than zero.

This commit also amends the previous solution for similar issues elsewhere in the file to ensure consistent type for string values, instead of changing the type from `string` to `bool` when trying to read from an empty file.

Follow-up to [50355].

Props DavidAnderson, jrf, SergeyBiryukov.
Merges [51686] to the 5.8 branch.
Fixes #54036.

git-svn-id: https://develop.svn.wordpress.org/branches/5.8@51694 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-30 14:27:48 +00:00
Jonathan Desrosiers
9d36011c0c Build: Remove css/dist in grunt clean command.
Modify the `grunt clean:css` command to include the folder `wp-includes/css/dist` to ensure legacy files do not remain if the built files are removed/relocated.

Props desrosj, netweb., peterwilsoncc.
Merges [51689] to the 5.8 branch.
Fixes #53719.

git-svn-id: https://develop.svn.wordpress.org/branches/5.8@51691 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-30 13:39:59 +00:00
Jonathan Desrosiers
851e023fb7 Menus: Save display locations for new menus.
Fixes a bug preventing the locations saving when creating a new menu. Introduced in [50938].

Props dlh, andraganescu, mukesh27, desrosj, peterwilsoncc.
Merges [51688] to the 5.8 branch.
Fixes #53877.

git-svn-id: https://develop.svn.wordpress.org/branches/5.8@51690 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-30 13:38:26 +00:00
Peter Wilson
c617db4676 Customize: Prevent collapsing expanded panel/section/control when Esc is pressed on a block editor instance.
This ensures that the current panel is not collapsed when hitting `Esc` with the focus on the widget block editor.

Follow-up to [37347], [39120].

Props gwwar, dlh, SergeyBiryukov.
Merges [51682,51683] to the 5.8 branch.
Fixes #54030.


git-svn-id: https://develop.svn.wordpress.org/branches/5.8@51687 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-30 03:29:25 +00:00
Jonathan Desrosiers
b77313d258 Editor: Ensure block attribute serialization in PHP matches the JavaScript equivalent.
The `serializeAttributes()` function in JavaScript uses `JSON.stringify`, which does not encode slashes and unicode characters by default. This resulted in the PHP serialization through `json_encode()` producing different results.

This also switches from `json_encode()` to `wp_json_encode()` to prevent failures when any non UTF-8 characters are included.

Props kevinfodness, SergeyBiryukov, timothyblynjacobs.
Merges [51674] to the 5.8 branch.
Fixes #53936.

git-svn-id: https://develop.svn.wordpress.org/branches/5.8@51681 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-27 19:08:21 +00:00
Jonathan Desrosiers
cc3fde44f1 Build/Test Tools: Use list format when defining environment variables in Docker compose file.
This is the correct formatting detailed in the Docker `compose` documentation examples and helps to avoid ambiguities in the yaml parser when values that may cause warnings.

Props pbrearne, ocean90, johnbillion, desrosj.
Merges [51673] to the 5.8 branch.
Fixes #53820.

git-svn-id: https://develop.svn.wordpress.org/branches/5.8@51680 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-27 19:06:32 +00:00
Jonathan Desrosiers
4eca4d346c Editor: Replace the remaining references to wp.editor with wp.oldEditor.
Props zieladam, azaozz.
Merges [51649] to the 5.8 branch.
Fixes #53762.

git-svn-id: https://develop.svn.wordpress.org/branches/5.8@51656 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-25 18:47:22 +00:00
Jonathan Desrosiers
bcc43ad1c6 Media: Increase number of media items displayed per page.
Increase the number of media items displayed per page from 40 to 80 to improve the experience for users navigating the library on sites with a large quantity of media in the library.

Props AlGala, antpb, hellofromTonya, joedolson, SergeyBiryukov, wb1234, peterwilsoncc.
Merges [51632] to the 5.8 branch.
Fixes #53827.

git-svn-id: https://develop.svn.wordpress.org/branches/5.8@51643 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-19 15:00:47 +00:00
Jonathan Desrosiers
f3711d20a3 Media: Fix layout of media library modal on narrow screens.
Reduces the right margin of the media library modal on small and medium width screens to remove excess white-space. On very narrow screens this was preventing the media icons from displaying.

Props andraganescu, desrosj, joedolson, moch11, mukesh27, sabernhardt, SergeyBiryukov, zieladam, peterwilsoncc.
Merges [51631] to the 5.8 branch.
Fixes #53679.

git-svn-id: https://develop.svn.wordpress.org/branches/5.8@51642 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-19 14:59:08 +00:00