Commit Graph

46540 Commits

Author SHA1 Message Date
audrasjb f4521ee2a1 Docs: Improve `wp_get_object_terms()` return type.
Props dd32, audrasjb, desrosj, mukesh27.
Fixes #56327.
See #55646.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54000 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-10 12:30:16 +00:00
audrasjb 1795435a9f Users: Fix Users list bottom filters margins on small screens.
This changeset fixes bottom filters margins of the Users list screen on small screens.

Props sumitsingh, sabernhardt, shreyasikhar26, audrasjb.
Fixes #54813.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53988 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-09 23:02:31 +00:00
Sergey Biryukov 7b8972ba63 Tests: Minimize file copying in `WP_REST_Attachments_Controller` tests.
The tests use two images that were deleted on teardown and recreated on setup for every single test. This appears to be unnecessary, as the files can instead only be recreated if they are missing, and deleted after the test run is complete.

This commit reduces ~200 redundant file copying operations to ~5 when running this test class.

Follow-up to [38832], [48291], [54424].

See #55652.
Built from https://develop.svn.wordpress.org/trunk@54428


git-svn-id: http://core.svn.wordpress.org/trunk@53987 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-09 17:47:27 +00:00
Sergey Biryukov 05c3709db3 External Libraries: Upgrade PHPMailer to version 6.6.5.
This is a maintenance release with minor changes:
* Don't try to issue `RSET` if there has been a connection error.
* Reject attempts to add folders as attachments.
* Don't suppress earlier error messages on `close()`.
* Handle `Host === null` better.

Release notes:
https://github.com/PHPMailer/PHPMailer/releases/tag/v6.6.5

For a full list of changes in this update, see the PHPMailer GitHub:
https://github.com/PHPMailer/PHPMailer/compare/v6.6.4...v6.6.5

Follow-up to [50628], [50799], [51169], [51634], [51635], [52252], [52749], [52811], [53500], [53535], [53917].

Props ayeshrajans, Synchro.
Fixes #56772.
Built from https://develop.svn.wordpress.org/trunk@54427


git-svn-id: http://core.svn.wordpress.org/trunk@53986 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-09 17:12:31 +00:00
Sergey Biryukov 2e827f55b4 Coding Standards: Correct alignment in `test_import_theme_starter_content()`.
This fixes an `Equals sign not aligned correctly` WPCS warning.

Follow-up to [54425].

See #55652.
Built from https://develop.svn.wordpress.org/trunk@54426


git-svn-id: http://core.svn.wordpress.org/trunk@53985 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-09 16:39:28 +00:00
Sergey Biryukov 98ae9ab132 Tests: Clean up test images in `WP_Customize_Manager` tests.
The test for `WP_Customizer_Manager::import_theme_starter_content()` creates two attachments that remain in the `uploads` directory after the test run is complete.

This commit follows the approach from `WP_REST_Posts_Controller` tests and utilizes an `$attachments_created` property to track any files uploaded in the current test run and clean them up afterwards.

This makes sure there are no leftover images after the test class is run.

Follow-up to [39276], [39346], [39411], [40142], [53935], [54424].

See #55652.
Built from https://develop.svn.wordpress.org/trunk@54425


git-svn-id: http://core.svn.wordpress.org/trunk@53984 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-09 16:28:30 +00:00
Sergey Biryukov c8257d0821 Tests: Remove unnecessary file copying in `WP_Customize_Manager` tests.
This was added to avoid creating leftover image sub-sizes in the version-controlled `DIR_TESTDATA` directory.

However, this does not appear to be necessary:
* `WP_Customizer_Manager::import_theme_starter_content()` already [source:tags/6.0.2/src/wp-includes/class-wp-customize-manager.php?marks=1370-1374#L1367 makes a copy of the image] before sideloading, so the test was essentially working with a copy of a copy.
* The images were only used in one test out of 70 and do not need to be copied for every single test.

Upon further investigation, there is also no evidence that creating these copies actually resolved the reported issue:
* `WP_UnitTest_Factory_For_Attachment::create_object()` inserts an attachment, but does not create image sub-sizes.
* `media_handle_sideload()` does create image sub-sizes, but the file is already in the media library by that time, and sub-sizes are created in the `uploads` directory, not in the version-controlled `DIR_TESTDATA` directory.

This commit removes ~140 redundant file copying operations when running the test suite.

Follow-up to [39276], [39346], [39411], [40142].

See #55652.
Built from https://develop.svn.wordpress.org/trunk@54424


git-svn-id: http://core.svn.wordpress.org/trunk@53983 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-09 13:47:31 +00:00
Sergey Biryukov cbe943d1d1 Tests: Add `wp_cache_*_multiple()` functions to Memcached implementation used in the test suite.
Since this object cache implementation was added, WordPress has introduced a variety of caching API improvements:
* `wp_cache_add_multiple()`
* `wp_cache_set_multiple()`
* `wp_cache_get_multiple()`
* `wp_cache_delete_multiple()`

Although WordPress core provides a compatibility layer if these functions are missing from third-party object caches, this commit updates the Memcached object cache used in the test suite to implement these new functions directly.

Follow-up to [40561], [47938], [47944], [52700], [52703], [52706], [52708].

Props petitphp, spacedmonkey, tillkruss, SergeyBiryukov.
Fixes #54864.
Built from https://develop.svn.wordpress.org/trunk@54423


git-svn-id: http://core.svn.wordpress.org/trunk@53982 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-08 13:41:13 +00:00
audrasjb 62edbe0bbe Build/Test Tools: Add tests coverage for `_wp_check_alternate_file_names()`.
This changeset adds missing unit tests for this function.

Props pbearne, costdev, peterwilsoncc.
Fixes #55199.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53981 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-08 09:18:11 +00:00
audrasjb 0a0f4795bb Build/Test Tools: Add tests for `WP_List_Util::pluck` and `WP_List_Util::sort`.
This changeset adds additional unit tests for these two functions.

Props pbearne, costdev, afragen.
Fixes #55300.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53980 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-08 08:46:13 +00:00
audrasjb 22f52c83c2 Build/Test Tools: Add tests for `wp_nonce_field()` and `wp_referer_field()`.
This changeset adds missing unit tests for these two functions.

Props pbearne, costdev, audrasjb.
Fixes #55578.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53979 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-07 22:19:11 +00:00
Weston Ruter 6d7dd31236 Customize: Prevent PHP notice in Customizer when using block theme.
Use the `customize_panel_active` filter to deactivate the Menus panel instead of overriding the `check_capabilities` method. This ensures the panel remains registered but is still hidden.

See #54888.
Fixes #54905.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53978 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-07 20:48:12 +00:00
audrasjb d8175f4121 Twenty Twenty: Improve Separator Block rendering.
This changeset fixes inconsistent alignment behavior of the Separator Block in the editor.

Props kmadhak, sabernhardt, mukesh27, nidhidhandhukiya, kajalgohel.
Fixes #55910.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53977 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-07 20:42:11 +00:00
Adam Silverstein b0a552657e Media: ensure the `wp_editor_set_quality` filter consistently passes the correct output mime type.
Ensure that the mime type passed to the `wp_editor_set_quality` filter is correct when the output format is altered with the `image_editor_output_format` filter and the image is saved multiple times, for example when generating sub sizes. Previously, the original image mime type was passed instead of the output type after the initial save.

Props flixos90, peterwilsoncc.
Fixes #56442.



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


git-svn-id: http://core.svn.wordpress.org/trunk@53976 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-07 19:17:12 +00:00
Adam Silverstein 2d9ac13f69 Media: improve image engine detection when using the output format filter.
When the output format is altered with the `image_editor_output_format` filter, prefer the image engine that supports both input an output types, falling back to the engine that supports the input type.

Correct an issue where the output format filter wasn't respected because the selected engine didn't support the output format.

Props mikeschroder, ironprogrammer.
Fixes #54476.



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


git-svn-id: http://core.svn.wordpress.org/trunk@53975 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-07 19:03:11 +00:00
Sergey Biryukov 59b066ef11 Blocks: Avoid extra calls to `realpath()` in block scripts and styles registration.
This affects:
* `register_block_script_handle()`
* `register_block_style_handle()`

Both functions set a variable with this code:
{{{
$wpinc_path_norm = wp_normalize_path( realpath( ABSPATH . WPINC ) );
}}}

That value never changes during page load, so we can save it to a static variable. By doing so, we can avoid ~200 calls to `realpath()` and `wp_normalize_path()`, or even more if third-party plugins register scripts or styles.

Follow-up to [52291], [52939], [54290], [54291], [54309], [54327].

Props aristath, mukesh27, SergeyBiryukov.
Fixes #56758.
Built from https://develop.svn.wordpress.org/trunk@54415


git-svn-id: http://core.svn.wordpress.org/trunk@53974 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-07 15:46:12 +00:00
davidbaumwald 8a8bd9192b Administration: Guard against undefined `$GLOBALS['hook_suffix']` in `WP_Screen::get()`.
When initially defaulting the screen `$id` in `WP_Screen::get()`, if the `$hook_name` parameter is not supplied, an `else` fallback uses `$GLOBALS['hook_suffix']`.  However, in some cases, `hook_suffix` doesn't exist in the global scope.  This produces an "Undefined index" notice on < PHP 8, and a warning in >= PHP 8.

This change ensures `$GLOBALS['hook_suffix']` has a value before using it as a fallback for the screen ID.

Props splendorstudio, SergeyBiryukov, htdat, mukesh27, dd32, costdev.
Fixes #49089.
Built from https://develop.svn.wordpress.org/trunk@54414


git-svn-id: http://core.svn.wordpress.org/trunk@53973 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-07 14:25:14 +00:00
audrasjb 6441d199f2 Twenty Nineteen: Ensure Pullquote Block text color is reflected on front-end.
This changeset ensures Pullquote Block text is consistent between the editor a on front-end.

Props nithins53, umesh84, sabernhardt, deepakvijayan, poena.
Fixes #55981.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53972 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-07 12:12:12 +00:00
audrasjb ea2a6daa0b Docs: Various docblock fixes in `global-styles-and-settings.php`, as per documentation standards.
Follow-up to [54408].

See #55646.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53971 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-07 12:09:11 +00:00
audrasjb cd0a4ee190 Docs: Various docblock fixes in `WP_Theme_JSON` class, as per documentation standards.
Follow-up to [54408].

See #55646.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53970 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-07 12:01:13 +00:00
spacedmonkey be3c6666d9 Query: Move call to `update_menu_item_cache` in `WP_Query`
Move call to `update_menu_item_cache` in `WP_Query` to after post meta caches for menu items are primed. 

Props spacedmonkey, peterwilsoncc, mukesh27.
See #55620.
Built from https://develop.svn.wordpress.org/trunk@54410


git-svn-id: http://core.svn.wordpress.org/trunk@53969 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-07 10:00:15 +00:00
jorgefilipecosta 148049329d Fix: cite styles declared via theme.json not working.
Fixes an issue where cite elements declared on theme.json are not being output on the front end of the website.

Props oandregal, carolinan, scruffian.
See #56467.
Built from https://develop.svn.wordpress.org/trunk@54409


git-svn-id: http://core.svn.wordpress.org/trunk@53968 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-07 09:46:13 +00:00
audrasjb ae50e2c014 Editor: Add missing `blocks` origin to `theme.json`.
This changeset updates the blocks origin name from core to blocks and adds it to the list of valid origins for `theme.json`.
(See the original fix in [https://github.com//pull/3319 Gutenberg's PR 44363]).

Why?

- This new origin was missing from the list.
- The `core` name is not reflective of what it does, as this data origin is related to block styles, whether they come with WordPress or third-party blocks.
- The existing filter for this piece of data is called `theme_json_blocks`, to reflect it filters "block" data.
- Though `core` origin was used in the past for `default`, this commit reverts it. Why? It was confusing. The goal is to use names that communicate what part of the pipeline are processing (`default > blocks > theme > custom`).

How?

- Renames the string, from `core` to `blocks`.
- Adds `blocks` to the list of valid origins.
- Verifies that the `$theme_json->get_stylesheet()` call uses the proper `$origins` at all times.

Follow-up to [54162], [54251].

Props oandregal, czapla, jorgefilipecosta, scruffian, bernhard-reiter hellofromTonya.
See #56467.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53967 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-07 09:40:13 +00:00
Peter Wilson a1518e3bc4 Build/Test tools: Add tests for `wp_nonce_url()`.
Props pbearne, costdev.
See #55652.
Fixes #54870.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53966 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-07 02:51:10 +00:00
desrosj e26b369fb2 Build/Test Tools: Use `require_once` instead of `require`.
The `sync-stable-blocks.js` file is used to compile the contents of `require-dynamic-blocks.php`, which includes the PHP files required for dynamic Core blocks.

Since these files define PHP functions, `require_once` should be used instead of `require` to guard against fatal errors.

Follow up to [53688].

Props aristath, SergeyBiryukov, desrosj.
Fixes #56738. See #56179.
Built from https://develop.svn.wordpress.org/trunk@54406


git-svn-id: http://core.svn.wordpress.org/trunk@53965 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-07 01:58:11 +00:00
desrosj 7163f9fd3e Bundled Themes: Properly escape URLs.
This adds output escaping to several theme related URLs.

Props alberuni-azad, sabernhardt.
Fixes #56696.
Built from https://develop.svn.wordpress.org/trunk@54405


git-svn-id: http://core.svn.wordpress.org/trunk@53964 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-07 01:34:11 +00:00
desrosj a35232fc60 Twenty Eleven: Pass template directory URLs through `esc_url()`.
Props alberuni-azad, sabernhardt, costdev.
Fixes #56717. See #56696.
Built from https://develop.svn.wordpress.org/trunk@54404


git-svn-id: http://core.svn.wordpress.org/trunk@53963 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-07 01:25:10 +00:00
Sergey Biryukov 646a284e71 Tests: Clean up test image for site icon in `Tests_REST_Server` on teardown.
This makes sure there are no leftover images after the test class is run.

Follow-up to [52080], [53463], [53920].

See #55652.
Built from https://develop.svn.wordpress.org/trunk@54403


git-svn-id: http://core.svn.wordpress.org/trunk@53962 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-07 01:09:11 +00:00
desrosj 5adad0ead8 Tests: Replace some occurrences of `assertEquals()` with `assertSame()`.
This ensures that not only the return values match the expected results, but also that their type is the same.

Props costdev, desrosj.
See #55654.
Built from https://develop.svn.wordpress.org/trunk@54402


git-svn-id: http://core.svn.wordpress.org/trunk@53961 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-07 01:04:11 +00:00
Sergey Biryukov 1d10384608 Tests: Bring some consistency to `WP_Image_Editor_GD` and `WP_Image_Editor_Imagick` tests.
Includes:
* Adjusting test method descriptions and comments per the documentation standards.
* Creating image editor class instances directly, instead of calling `wp_get_image_editor()`.
* Cleaning up temporary files before performing assertions, where possible.
* Using more consistent variable names for image editor class instances.
* Reordering some test methods.

Follow-up to [1182/tests], [1188/tests], [27794], [30549], [30990], [31040], [39580], [40123], [49230], [49488], [49542], [49751].

See #55652.
Built from https://develop.svn.wordpress.org/trunk@54401


git-svn-id: http://core.svn.wordpress.org/trunk@53960 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-07 00:42:12 +00:00
desrosj 0edbc3da00 Build/Test Tools: Update npm dependencies to their latest versions.
This updates the following `devDependencies`:

- `chalk` from `5.0.1` to `5.1.0`
- `dotenv` from `16.0.2` to `16.0.3`
- `sinon` from `14.0.0` to `14.0.1`
- `uglify-js` from `3.17.1` to `3.17.3`

This is the final dependency bump for 6.1.

See #56641.
Built from https://develop.svn.wordpress.org/trunk@54400


git-svn-id: http://core.svn.wordpress.org/trunk@53959 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-06 18:57:22 +00:00
davidbaumwald 428915d739 Editor: Ensure block styles in `theme.json` are rendered.
This change removes the caching of theme data in `WP_Theme_JSON_Resolver::get_theme_data()`, instead freshly compiling theme data on each call.

Also, to prevent any performance degradation by the removal, the file contents of `theme.json` files are now cached in `WP_Theme_JSON_Resolver::read_json_file()`, preventing multiple filesystem reads.

Follow-up to [54385].

Props ndiego, bph, mikachan, andrewserong, oandregal, cbravobernal, bernhard-reiter, aristath.
Fixes #56736.
Built from https://develop.svn.wordpress.org/trunk@54399


git-svn-id: http://core.svn.wordpress.org/trunk@53958 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-06 18:02:10 +00:00
Sergey Biryukov 4943dbf577 Themes: Replace `array_map()` usage in `WP_Theme_JSON::get_default_slugs()`.
When loading a page on the frontend using Xdebug & Webgrind, with the Twenty Twenty-Three theme and no plugins activated, the biggest performance bottleneck currently (on the PHP side) is `WP_Theme_JSON::merge()`. Analysing the data a bit more, it became evident that `WP_Theme_JSON::get_default_slugs()` is the part of that method which takes most of the resources and time.

Further analysis of the method revealed that `array_map()` was the call that slowed it down.

This commit replaces the `array_map()` call with a simple `foreach` loop, improving page load speed significantly.

Follow-up to [52275], [52364].

Props aristath.
Fixes #56745.
Built from https://develop.svn.wordpress.org/trunk@54398


git-svn-id: http://core.svn.wordpress.org/trunk@53957 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-06 15:27:13 +00:00
Peter Wilson b879d04354 Users: Revert use of shared objects for current user.
Reverts [50790].

Props oztaser, ravipatel, dd32, costdev, SergeyBiryukov, tykoted, cu121, xknown.
Fixes #54984.


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


git-svn-id: http://core.svn.wordpress.org/trunk@53956 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-06 04:38:14 +00:00
Sergey Biryukov 14f891f733 Tests: Add comments to clarify a REST API test for password protected posts.
Authenticated users should only be allowed to read password protected content if they have the `edit_post` meta capability for the post. In other words, the content of a password protected post created by an Editor should not be viewable by a Contributor.

This commit aims to clarify the usage of a negative assertion `assertStringNotContainsString()` and describe the intention behind the test to avoid confusion.

Follow-up to [50717].

Fixes #56681.
Built from https://develop.svn.wordpress.org/trunk@54396


git-svn-id: http://core.svn.wordpress.org/trunk@53955 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-05 14:49:13 +00:00
audrasjb 81cbe2c55b General: Add a default `font-style` value for Adminbar links.
If a theme includes a `theme.json` file and sets a specific `font-style` on links, the font-style also changes the links in the WordPress admin bar, when the admin bar is visible on front-end. For example, this happens with the `pitch` style variation of Twenty Twenty-Three.

Using a default value for the `font-style` property prevents `theme.json` files from overriding it.

Props audrasjb, poena.
Fixes #56737.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53954 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-05 14:09:11 +00:00
Sergey Biryukov 160d25ed91 Tests: Ignore EOL differences in Style Engine API tests.
Unix vs. Windows EOL style mismatches can cause misleading failures in tests using the heredoc syntax (`<<<`) or multiline strings as the expected result.

This resolves two failures when running the test suite on Windows along the lines of:
{{{
1) Tests_Style_Engine_wpStyleEngineCSSRule::test_should_prettify_css_rule_output
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
 #Warning: Strings contain different line endings!
-'.baptiste {
-       margin-left: 0;
-       font-family: Detective Sans;
+'.baptiste {
+       margin-left: 0;
+       font-family: Detective Sans;
}'

/var/www/tests/phpunit/tests/style-engine/wpStyleEngineCssRule.php:159
}}}

Follow-up to [46612], [48443], [48466], [49691], [51135], [53282], [53319], [54156].

See #56467, #55652.
Built from https://develop.svn.wordpress.org/trunk@54394


git-svn-id: http://core.svn.wordpress.org/trunk@53953 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-05 14:06:15 +00:00
Gary Pendergast 32a7a3b5cd Embeds: Add support for Tumblr Dashboard URLs.
WordPress has supported embedding Tumblr blog network posts since 4.2.0. This commit adds support for embedding posts using Tumblr Dashboard URLs.

Fixes #56733.


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


git-svn-id: http://core.svn.wordpress.org/trunk@53952 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-05 00:15:11 +00:00
audrasjb 009cd01c3b Administration: Avoid menu/sub-menu overlap on small screens.
This changeset fixes overlapping glitches discovered in WordPress Admin menu behavior when used on small screens.

Props turtlepod, collieit, chaion07, hilayt24, mehedi890, markparnell, webcommsat, mehedi890, ryokuhi, sabernhardt, ironprogrammer, audrasjb, costdev, ugyensupport.
Fixes #32747.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53951 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-04 23:12:08 +00:00
audrasjb 50309fa1e3 Docs: Various docblock fixes in `WP_Rewrite` class, as per documentation standards.
See #55646.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53950 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-04 23:01:13 +00:00
davidbaumwald 42552675cc Post WordPress 6.1 Beta 3 version bump.
Built from https://develop.svn.wordpress.org/trunk@54390


git-svn-id: http://core.svn.wordpress.org/trunk@53949 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-04 17:51:14 +00:00
davidbaumwald 7641a389bb WordPress 6.1 Beta 3.
Built from https://develop.svn.wordpress.org/trunk@54389


git-svn-id: http://core.svn.wordpress.org/trunk@53948 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-04 17:27:11 +00:00
davidbaumwald 9fc0351883 Editor: Sync latest `@wordpress/edit-site` package to include dynamic template names updates.
Updates `@wordpress/edit-site` from version 4.14.5 to version 4.14.6.

Follow-up to [54280], [54333], and [54370].

Props bernhard-reiter.
See #56467.
Built from https://develop.svn.wordpress.org/trunk@54388


git-svn-id: http://core.svn.wordpress.org/trunk@53947 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-04 17:03:24 +00:00
davidbaumwald a8af293608 Editor: Fix server-side attribute registration via typography support.
Ensures the `fontFamily` attribute is registered for block types on the server side. This change resolves a `400` error when attempting to change the font family for a server-side rendered block in the editor.

Props aaronrobertshaw, mamaduka, wildworks, upadalavipul.
See #56467.
Built from https://develop.svn.wordpress.org/trunk@54387


git-svn-id: http://core.svn.wordpress.org/trunk@53946 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-04 16:47:13 +00:00
desrosj 436bf77300 External Libraries: Update `clipboard` and `polyfill-library`.
This updates the Clipboard.js and `polyfill-library` dependencies to their latest versions (`2.0.11` and `4.4.0`, respectively).

Fixes #56670.
Built from https://develop.svn.wordpress.org/trunk@54386


git-svn-id: http://core.svn.wordpress.org/trunk@53945 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-04 15:55:23 +00:00
davidbaumwald 335ecfdca9 Editor: Invalidate blocks metadata cache when needed in `WP_Theme_JSON::get_blocks_metadata()`.
This change ensures that user-supplied global styles settings for blocks aren't lost due to sanitization.  This could previously occur due to outdated blocks metadata that did not include all registered blocks.

Props jorgefilipecosta, andrewserong, oandregal, talldanwp, cbravobernal, bernhard-reiter, hellofromTonya.
Fixes #56644.
Built from https://develop.svn.wordpress.org/trunk@54385


git-svn-id: http://core.svn.wordpress.org/trunk@53944 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-04 15:50:12 +00:00
Sergey Biryukov 2ede19910a Database: Correct MariaDB version check in `wpdb::has_cap()`.
MariaDB version is reported differently between PHP versions:
* PHP 8.0.16 or later: `10.6.8-MariaDB`
* PHP 8.0.15 or earlier: `5.5.5-10.6.8-MariaDB`

The latter includes PHP 7.4.x and PHP 5.6.x as well, where the version is also reported with the `5.5.5-` prefix.

This commit makes an adjustment to `wpdb::has_cap()` to check for the correct MariaDB version.

This resolves an issue where the `utf8mb4_unicode_520_ci` collation, which is available in MariaDB since version 10.2, was previously not detected correctly.

References:
* [https://github.com/php/php-src/issues/7972 php-src: #7972: MariaDB version prefix 5.5.5- is not stripped]
* [https://github.com/php/php-src/pull/7963 php-src: PR #7963 Fix GH-7932: MariaDB version prefix not always stripped]
* [https://mariadb.com/docs/reference/mdb/collations/utf8mb4_unicode_520_ci/ MariaDB Documentation: utf8mb4_unicode_520_ci]

Follow-up to [37523], [53919].

Props jamieburchell, SergeyBiryukov.
Fixes #54841.
Built from https://develop.svn.wordpress.org/trunk@54384


git-svn-id: http://core.svn.wordpress.org/trunk@53943 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-04 15:41:18 +00:00
davidbaumwald 4de88db482 Editor: Update packages for 6.1 Beta 3.
Package updates for bug and regression fixes:

* @wordpress/annotations: 2.17.3
* @wordpress/block-directory: 3.15.4
* @wordpress/block-editor: 10.0.4
* @wordpress/block-library: 7.14.4
* @wordpress/blocks: 11.16.4
* @wordpress/components: 21.0.4
* @wordpress/core-data: 5.0.4
* @wordpress/customize-widgets: 3.14.4
* @wordpress/data: 7.1.3
* @wordpress/data-controls: 2.17.3
* @wordpress/edit-post: 6.14.4
* @wordpress/edit-site: 4.14.5
* @wordpress/edit-widgets: 4.14.4
* @wordpress/editor: 12.16.4
* @wordpress/format-library: 3.15.4
* @wordpress/interface: 4.16.3
* @wordpress/keyboard-shortcuts: 3.15.3
* @wordpress/list-reusable-blocks: 3.15.4
* @wordpress/notices: 3.17.3
* @wordpress/nux: 5.15.4
* @wordpress/preferences: 2.9.4
* @wordpress/reusable-blocks: 3.15.4
* @wordpress/rich-text: 5.15.3
* @wordpress/server-side-render: 3.15.4
* @wordpress/style-engine: 1.0.3
* @wordpress/viewport: 4.15.3
* @wordpress/widgets: 2.15.4

References:
* [https://github.com/WordPress/gutenberg/pull/44634 Gutenberg PR 44634] – Quote block: stop slash inserter popup showing in citation
* [https://github.com/WordPress/gutenberg/pull/44630 Gutenberg PR 44630] – Query Loop: Fix condition for displaying 'parents' control
* [https://github.com/WordPress/gutenberg/pull/44554 Gutenberg PR 44554] – Hide the Classic block in the Site Editor
* [https://github.com/WordPress/gutenberg/pull/44594 Gutenberg PR 44594] – Fix navigation block console error
* [https://github.com/WordPress/gutenberg/pull/44555 Gutenberg PR 44555] – Theme export: Fix broken spacingScale export
* [https://github.com/WordPress/gutenberg/pull/44580 Gutenberg PR 44580] – Code Block: Add box-sizing to fix inconsistent layout
* [https://github.com/WordPress/gutenberg/pull/44556 Gutenberg PR 44556] – Remove border from Global Styles previews
* [https://github.com/WordPress/gutenberg/pull/44141 Gutenberg PR 44141] – Spacing presets: Modify the styling of the input controls when in unlinked mode in order to better differentiate sides
* [https://github.com/WordPress/gutenberg/pull/44453 Gutenberg PR 44453] – Preserve the generic signature of getEntityRecord and getEntityRecords through currying
* [https://github.com/WordPress/gutenberg/pull/44504 Gutenberg PR 44504] – Theme.json: fix some outline properties doesn't work properly on the editor
* [https://github.com/WordPress/gutenberg/pull/44516 Gutenberg PR 44516] – Add style engine to editor tsconfig references
* [https://github.com/WordPress/gutenberg/pull/44523 Gutenberg PR 44523] – Query Loop Block: Rename Query Loop variations allowControls to allowedControls
* [https://github.com/WordPress/gutenberg/pull/44520 Gutenberg PR 44520] – Post Featured Image: Fix application of default border style in editor
* [https://github.com/WordPress/gutenberg/pull/44286 Gutenberg PR 44286] – Post Featured Image: Fix borders after addition of overlay feature
* [https://github.com/WordPress/gutenberg/pull/44482 Gutenberg PR 44482] – Template Editor: Fix crashes due to undefined variables
* [https://github.com/WordPress/gutenberg/pull/44480 Gutenberg PR 44480] – Template Parts: Prevent adding block in post editor or inside post template or content blocks
* [https://github.com/WordPress/gutenberg/pull/44425 Gutenberg PR 44425] – Fix rotated image crop area aspect ratio
* [https://github.com/WordPress/gutenberg/pull/44485 Gutenberg PR 44485] – Fix padding/margin visualizer accuracy
* [https://github.com/WordPress/gutenberg/pull/44569 Gutenberg PR 44569] – Theme.json: Fix some shadow properties that do not work properly in the site editor
* [https://github.com/WordPress/gutenberg/pull/44575 Gutenberg PR 44575] – ToggleGroupControl: Fix unselected icon color
* [https://github.com/WordPress/gutenberg/pull/44526 Gutenberg PR 44526] – TokenInput Field: Try alternative approach to fix screen reader focus issue
* [https://github.com/WordPress/gutenberg/pull/44506 Gutenberg PR 44506] – Edit Post: Optimize legacy post content layout
* [https://github.com/WordPress/gutenberg/pull/44258 Gutenberg PR 44258] – Add layout styles from Post Content block to post editor

Follow-up to [54257] and [54335].

Props czapla, isabel_brison, wildworks, bernhard-reiter, hellofromTonya.
See #56467.
Built from https://develop.svn.wordpress.org/trunk@54383


git-svn-id: http://core.svn.wordpress.org/trunk@53942 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-04 15:06:52 +00:00
hellofromTonya 9017d4beb0 Editor: Add PHPUnit tests for 5.9.0 new functions.
During the 5.9.0 cycle, tests were missed during the porting from Gutenberg to Core for the following functions:

* `_disable_block_editor_for_navigation_post_type()`
* `_disable_content_editor_for_navigation_post_type()`
* `_enable_content_editor_for_navigation_post_type()`
* `wp_filter_global_styles_post()`

This commit adds new test classes for these functions.

Reference:
* [https://github.com/WordPress/gutenberg/blob/release/13.6/phpunit/global-styles-test.php Gutenberg v13.6] for `WP_Global_Styles_Test`
* [https://github.com/WordPress/gutenberg/blob/release/13.6/phpunit/navigation-test.php Gutenberg v13.6] for `WP_Navigation_Test`

Follow-up to [52298], [52145], [52052].

Props antonvlasenko, costdev, ironprogrammer, robinwpdeveloper, hellofromTonya.
Fixes #56266.
Built from https://develop.svn.wordpress.org/trunk@54382


git-svn-id: http://core.svn.wordpress.org/trunk@53941 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-04 14:22:14 +00:00
audrasjb 13b79b4a3b Twenty Sixteen: Improve Pullquote Block text color consistency between editor and front-end.
This changeset ensures the text color selected for the text of the Pullquote Block is reflected on both front-end and on the editor.

Props nithins53, nidhidhandhukiya, audrasjb, sabernhardt, poena.
Fixes #56008.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53940 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-04 08:22:10 +00:00