Commit Graph

46878 Commits

Author SHA1 Message Date
Sergey Biryukov
d08e3420a1 Tests: Split the tests from multisite.php into individual test classes.
This aims to bring some consistency to the location of multisite function tests, as well as to make the tests more discoverable and easier to expand.

Follow-up to [29916], [32638], [46251], [54717].

See #56793.
Built from https://develop.svn.wordpress.org/trunk@54726


git-svn-id: http://core.svn.wordpress.org/trunk@54278 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-31 12:57:14 +00:00
Sergey Biryukov
3a3cb930d6 Tests: Prevent wp_update_themes() from running in wp_ajax_update_theme() tests.
In the tests for updating a theme via Ajax, `wp_installing( true )` is called to prevent `wp_update_themes()` from running.

This worked as expected in `test_update_theme()`, however, it was missed in `test_uppercase_theme_slug()`, which was accidentally relying on the `wp_installing()` status not being properly restored in the previous test.

Now that the `wp_installing()` status was corrected in [54723], the latter test started throwing an error on PHP 8.2:
{{{
1) Tests_Ajax_wpAjaxUpdateTheme::test_uppercase_theme_slug
http_build_query(): Passing null to parameter #2 ($numeric_prefix) of type string is deprecated

/var/www/src/wp-includes/Requests/Transport/cURL.php:345
/var/www/src/wp-includes/Requests/Transport/cURL.php:135
/var/www/src/wp-includes/class-requests.php:381
/var/www/src/wp-includes/class-wp-http.php:395
/var/www/src/wp-includes/class-wp-http.php:615
/var/www/src/wp-includes/http.php:179
/var/www/src/wp-includes/update.php:719
/var/www/src/wp-admin/includes/ajax-actions.php:4292
/var/www/src/wp-includes/class-wp-hook.php:308
/var/www/src/wp-includes/class-wp-hook.php:332
/var/www/src/wp-includes/plugin.php:517
/var/www/tests/phpunit/includes/testcase-ajax.php:265
/var/www/tests/phpunit/tests/ajax/wpAjaxUpdateTheme.php:157
}}}

Replicating the `wp_installing()` status changes in this test too resolves the error.

Follow-up to [38168], [38710], [54722], [54723].

See #56793.
Built from https://develop.svn.wordpress.org/trunk@54725


git-svn-id: http://core.svn.wordpress.org/trunk@54277 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-30 03:50:12 +00:00
Sergey Biryukov
172ab851c5 Tests: Temporarily skip WOFF file test on PHP 8.1.
A recent change to how WOFF files are processed in PHP 8.2 RC3 has caused a new test failure.

The tests was previously skipped on PHP 8.2, however, apparently after a `fileinfo` extension update, it started failing on PHP 8.1 too.

This commit adjusts the skipping condition to include PHP 8.1.

Follow-up to [54508], [54509].

See #56817.
Built from https://develop.svn.wordpress.org/trunk@54724


git-svn-id: http://core.svn.wordpress.org/trunk@54276 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-30 03:28:11 +00:00
Sergey Biryukov
9e04245227 Tests: Correctly restore the wp_installing() status in Ajax tests.
In the tests for updating a plugin or theme via Ajax, `wp_installing( true )` was called to prevent `wp_update_plugins()` or `wp_update_themes()` from running.

Since the subsequent `wp_installing( false )` call was in the same `try { ... }` block, it could not be executed if an exception was thrown, affecting other tests.

In this case, after rearranging the Ajax tests in [54722], this started affecting the `get_site_option()` calls in the tests for `wp_ajax_wp_compression_test()`.

By moving both `wp_installing()` calls out of the `try`/`catch` block, we can ensure the status is correctly restored.

Follow-up to [734/tests], [37150], [38168], [38710], [54722].

See #56793.
Built from https://develop.svn.wordpress.org/trunk@54723


git-svn-id: http://core.svn.wordpress.org/trunk@54275 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-30 02:54:11 +00:00
Sergey Biryukov
7b71916b53 Tests: Rename classes in phpunit/tests/ajax/ per the naming conventions.
This updates the test classes to match the names of the functions being tested.

Includes moving the `@covers` tags from individual test methods to the class DocBlocks.

Reference: [https://make.wordpress.org/core/handbook/testing/automated-testing/writing-phpunit-tests/#naming-and-organization Writing PHP Tests: Naming and Organization].

Follow-up to [47780], [48911], [49327], [50291], [50292], [50342], [50452], [50453], [50456], [50967], [50968], [50969], [51491], [51492], [51493], [51623], [51639], [51646], [51650], [51651], [51860], [52264], [52265], [53489], [53561], [54704].

See #56793.
Built from https://develop.svn.wordpress.org/trunk@54722


git-svn-id: http://core.svn.wordpress.org/trunk@54274 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-30 01:07:12 +00:00
Sergey Biryukov
fa79a5e83c Coding Standards: Correct alignment in Tests_Ajax_Autosave::wpSetUpBeforeClass().
This fixes an `Equals sign not aligned with surrounding assignments` WPCS warning.

Follow-up to [54720].

See #56793.
Built from https://develop.svn.wordpress.org/trunk@54721


git-svn-id: http://core.svn.wordpress.org/trunk@54273 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-29 17:12:14 +00:00
Sergey Biryukov
c2a843c36a Tests: Remove unused $user_ids property in Tests_Ajax_Autosave class.
This was previously used to delete the users created during `wpSetUpBeforeClass()`, however that now happens automatically in `WP_UnitTestCase_Base::tear_down_after_class()` via `_delete_all_data()`.

Follow-up to [35311], [37404], [38398].

See #56793.
Built from https://develop.svn.wordpress.org/trunk@54720


git-svn-id: http://core.svn.wordpress.org/trunk@54272 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-29 15:59:11 +00:00
Sergey Biryukov
3316e53dc8 Tests: Remove skipWithMultisite() and skipWithoutMultisite() from get_user_count() tests.
As the tests belong to either the `ms-excluded` or the `ms-required` group, the skipping should not be necessary.

While these methods were initially intended to be used in conjunction with the respective group, the PHPUnit configuration files for single site and multisite exclude these groups as appropriate, so calling these methods explicitly is no longer required.

Follow-up to [40520], [40543], [40564], [43005], [46683], [53011].

See #56793.
Built from https://develop.svn.wordpress.org/trunk@54719


git-svn-id: http://core.svn.wordpress.org/trunk@54271 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-29 15:44:10 +00:00
Sergey Biryukov
76eb6c4b4e Tests: Remove skipWithMultisite() from an Ajax test for attachments.
This was previously removed in [51870] and appears to be accidentally readded in [53561].

As the test belongs to the `ms-excluded` group, the skipping is unnecessary and does not affect anything in practice.

Follow-up to [46693], [49835], [51870], [53561].

See #56793.
Built from https://develop.svn.wordpress.org/trunk@54718


git-svn-id: http://core.svn.wordpress.org/trunk@54270 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-29 15:15:11 +00:00
Sergey Biryukov
1de5f1ad95 Tests: Split the tests from category.php into individual test classes.
This aims to bring some consistency to the location of category function tests, as well as to make the tests more discoverable and easier to expand.

Follow-up to [28438], [28566], [31006], [31025], [37464], [28438], [31299], [36988], [42364], [42367], [42368], [46413], [53684].

See #56793.
Built from https://develop.svn.wordpress.org/trunk@54717


git-svn-id: http://core.svn.wordpress.org/trunk@54269 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-29 14:40:13 +00:00
Sergey Biryukov
81a1638e9a Tests: Move the tests for pluggable function signatures to the pluggable directory.
This aims to bring some consistency to the location of pluggable function tests.

Includes:
* Renaming the test class to better reflect the intention of the tests.
* Adding a `@coversNothing` tag to the class DocBlock.

Follow-up to [34126], [53478], [54702].

Props pbearne, SergeyBiryukov.
See #56793, #56782.
Built from https://develop.svn.wordpress.org/trunk@54716


git-svn-id: http://core.svn.wordpress.org/trunk@54268 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-29 13:41:15 +00:00
antpb
1d4fa825b8 Media: Reverts get_attached_file() changes for normalized Windows paths.
Based on feedback from network storage configurations there was a noticed slowdown due to the usage of the `path_join()` function. This needs more time to find a workaround.

Follow-up to [53934].
Props mreishus, SergeyBiryukov, desrosj, mikeschroder.
Reverts [53934].
See #56924.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54264 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-28 15:18:11 +00:00
Sergey Biryukov
322445185a Tests: Move dbDelta() tests to the db directory.
This aims to bring some consistency with other database-related tests.

Includes adding a missing `@covers` tag to the class DocBlock.

Follow-up to [30345], [32108], [32770], [51798].

Props pbearne, SergeyBiryukov.
See #56793, #56782.
Built from https://develop.svn.wordpress.org/trunk@54711


git-svn-id: http://core.svn.wordpress.org/trunk@54263 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-28 14:49:11 +00:00
Sergey Biryukov
42da3b9dd3 Tests: Move the tests for WP class methods to the wp directory.
This aims to bring some consistency to the location of the tests for this class.

Includes adding the missing `@covers` tags.

Follow-up to [36177], [51622], [54250].

Props pbearne, SergeyBiryukov.
See #56793, #56782.
Built from https://develop.svn.wordpress.org/trunk@54710


git-svn-id: http://core.svn.wordpress.org/trunk@54262 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-28 14:10:15 +00:00
davidbaumwald
44881d209b Themes: Ensure custom global styles are imported properly.
This change removes caching of global styles for logged in users, allowing "wp_global_styles" custom post type to be imported completely, regardless of any previously cached data.  This change now relies on the lower-level native `WP_Query` cache invalidation methods for the global styles post type.

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

Props anariel-design, bernhard-reiter, andrewserong, spacedmonkey, andraganescu, peterwilsoncc, oandregal, hellofromTonya.
Fixes #56901.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54258 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-27 16:34:12 +00:00
Sergey Biryukov
32ec2dec3d Tests: Rename classes in phpunit/tests/comment/ per the naming conventions.
https://make.wordpress.org/core/handbook/testing/automated-testing/writing-phpunit-tests/#naming-and-organization

Follow-up to [47780], [48911], [49327], [50291], [50292], [50342], [50452], [50453], [50456], [50967], [50968], [50969], [51491], [51492], [51493], [51623], [51639], [51646], [51650], [51651], [51860], [52264], [52265], [53489], [53863].

See #56793.
Built from https://develop.svn.wordpress.org/trunk@54704


git-svn-id: http://core.svn.wordpress.org/trunk@54256 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-27 15:55:11 +00:00
davidbaumwald
94ba2c6bf1 Editor: Ensure global styles are rendered for third-party blocks.
This change ensures custom styles for all third-party blocks are rendered on the front end if assets are set to be loaded on a per-block basis.  Additionally, this change includes new unit tests to help prevent a similar bug in the future.

Props scruffian, aristath, poena, wildworks, ajlende, andraganescu, ndiego, gigitux, cbravobernal, ramonopoly, andrewserong, oandregal, hellofromTonya, bernhard-reiter.
Fixes #56915.
Built from https://develop.svn.wordpress.org/trunk@54703


git-svn-id: http://core.svn.wordpress.org/trunk@54255 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-27 15:41:12 +00:00
Sergey Biryukov
d60cae82a1 Tests: Move wp_mail() tests to the pluggable directory.
This aims to bring some consistency with other pluggable function tests.

Includes moving the `@covers` tag from a single test method to the class DocBlock.

Follow-up to [221/tests], [909/tests], [54529].

See #56793.
Built from https://develop.svn.wordpress.org/trunk@54702


git-svn-id: http://core.svn.wordpress.org/trunk@54254 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-27 15:23:12 +00:00
Sergey Biryukov
dc8b497eb7 Tests: Move wp_handle_comment_submission() tests to the comment directory.
This aims to bring some consistency with other comment function tests.

Includes moving the `@covers` tags from individual test methods to the class DocBlock.

Follow-up to [34799], [34801], [53863].

See #56793.
Built from https://develop.svn.wordpress.org/trunk@54701


git-svn-id: http://core.svn.wordpress.org/trunk@54253 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-27 15:03:15 +00:00
desrosj
72ae8d87ac Build/Test Tools: Introduce a workflow for testing and building default themes.
This introduces a GitHub Action workflow that performs the following steps for default themes:

- Test installing npm dependencies and running the build script (for relevant themes).
- Create ZIP files for the .org Theme directory and uploads them as workflow artifacts.

The workflow will only run on limited occasions, one of those being when Twenty Nineteen, Twenty Twenty, or Twenty Twenty-One is edited. These are the themes with build scripts that need to be tested for issues.

It can also be manually run through the GitHub Actions UI for occasions when the ZIP files are needed for a release.

Props peterwilsoncc, desrosj
Fixes #56898.
Built from https://develop.svn.wordpress.org/trunk@54699


git-svn-id: http://core.svn.wordpress.org/trunk@54251 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-26 15:08:13 +00:00
Sergey Biryukov
c7f6abe9f4 Docs: Add a @since note for object-fit support in safecss_filter_attr().
Follow-up to [54675].

Props peterwilsoncc.
See #56855.
Built from https://develop.svn.wordpress.org/trunk@54698


git-svn-id: http://core.svn.wordpress.org/trunk@54250 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-26 14:22:16 +00:00
Bernhard Reiter
70fd2c8b72 Editor: Update packages for 6.1 Release Candidate 3.
Package updates for bug and regression fixes:

- @wordpress/block-directory: 3.15.10
- @wordpress/block-editor: 10.0.9
- @wordpress/block-library: 7.14.10
- @wordpress/customize-widgets: 3.14.10
- @wordpress/edit-post: 6.14.10
- @wordpress/edit-site: 4.14.12
- @wordpress/edit-widgets: 4.14.10
- @wordpress/editor: 12.16.9
- @wordpress/format-library: 3.15.9
- @wordpress/reusable-blocks: 3.15.9
- @wordpress/widgets: 2.15.9

Original PRs from Gutenberg repository:

* [WordPress/gutenberg#45189 Gutenberg PR 45189] - Fix resizeable editor scrolling
* [WordPress/gutenberg#45234 Gutenberg PR 45234] - Reset background-image property for outline button style
* [WordPress/gutenberg#45161 Gutenberg PR 45161] - Table Block: Add a deprecation for the figcaption element class name
* [WordPress/gutenberg#45159 Gutenberg PR 45159] - File Block: Add a deprecation for the button element class name
* [WordPress/gutenberg#45169 Gutenberg PR 45169] - Video: Add a deprecation for the caption element
* [WordPress/gutenberg#45166 Gutenberg PR 45166] - Embed: Add deprecation for the caption element
* [WordPress/gutenberg#45173 Gutenberg PR 45173] - Gallery: Add a deprecation for captions in the gallery block
* [WordPress/gutenberg#44854 Gutenberg PR 44854] - Embed Block: Add support for Tumblr Dashboard URLs
* [WordPress/gutenberg#45074 Gutenberg PR 45074] - Post editor: Rename view to Preview
* [WordPress/gutenberg#45163 Gutenberg PR 45163] - Featured Image Block: Add missing output escaping
* [WordPress/gutenberg#45118 Gutenberg PR 45118] - [WP6.1] Site editor clips body background style

Follow-up to [54257], [54335], [54383], [54483], [54486], [54490], and [54632].
Props czapla, cbravobernal, ndiego, annezazu, davidbaumwald, desrosj, mikeschroder, hellofromtonya, ocean90.
See #56467.
Built from https://develop.svn.wordpress.org/trunk@54693


git-svn-id: http://core.svn.wordpress.org/trunk@54245 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-25 19:08:45 +00:00
ryelle
bd47098589 Help/About: Update About section images.
Switch to the CDN URLs for the images on the About page. Update the images used on Freedoms & Privacy to match the 6.1 design style.

Props richtabor, audrasjb, kebbet.
See #56357.


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


git-svn-id: http://core.svn.wordpress.org/trunk@54242 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-25 14:56:17 +00:00
Sergey Biryukov
27fa0510e6 Administration: Improve the wording of "Site Address" field description.
This aims to clarify that "Site Address (URL)" is a required field that should not be left blank, whether or not the site home page is intended to be different from the WordPress installation directory.

Follow-up to [1203], [3058], [5093], [5141], [13750], [41986].

Props digical, sabernhardt.
Fixes #50629.
Built from https://develop.svn.wordpress.org/trunk@54689


git-svn-id: http://core.svn.wordpress.org/trunk@54241 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-25 14:22:12 +00:00
Bernhard Reiter
bbb40de012 Editor: Correctly apply Button block styles for classic themes
In [54358], styling for Button blocks that had been removed from classic themes was reintroduced. However, it was added with a global scope, whereas editor styles are usually added with a `.editor-styles-wrapper` selector, which makes them more specific.

This change modifies the way that classic theme styles are added so that they also get wrapped in an `.editor-styles-wrapper` selector to match specificity.

Furthermore, adjust specificity for some Button block related styling in the editor for the Twenty Twelve and Twenty Twenty themes.

Merges [https://github.com/WordPress/gutenberg/pull/44731 Gutenberg PR 44731] into trunk.

Follow-up to [54358].
Props scruffian, cbravobernal, sabernhardt, audrasjb.
See #56467.
Built from https://develop.svn.wordpress.org/trunk@54687


git-svn-id: http://core.svn.wordpress.org/trunk@54239 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-25 12:19:18 +00:00
desrosj
a921157f3a Twenty Twenty-Three: Merge the latest changes from GitHub.
For a full list of changes included, see the `twentytwentythree` repository on GitHub: 0f273d7874...e2005b0272.

Props kafleg, poena, mikachan, tobifjellner, aristath.
See #56383.
Built from https://develop.svn.wordpress.org/trunk@54686


git-svn-id: http://core.svn.wordpress.org/trunk@54238 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-25 01:25:12 +00:00
Peter Wilson
ea18ccfdb4 Query: Move cache key generation to its own method.
Introduce `WP_Query::generate_cache_key()` for generating the cache key used by the main database query.

This removes the need for a filter to test that cache keys do not include the WPDB placeholder causing unreachable cache keys. The tests now call `WP_Query::generate_cache_key()` directly.

The filter `wp_query_cache_key` is removed as a hard deprecation. The filter was not included in a stable release.

Follow up to [54634].

Props spacedmonkey, jorbin, azaozz, hellofromtonya, mukesh27, peterwilsoncc, desrosj, audrasjb, adamsilverstein, flixos90, davidbaumwald, joedolson, sergeybiryukov.
Fixes #56802.


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


git-svn-id: http://core.svn.wordpress.org/trunk@54237 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-25 00:37:17 +00:00
desrosj
60cf27f53c Build/Test Tools: Ensure PHPCS related workflows are properly marked as failed.
When a ruleset error is encountered during a PHPCodeSniffer scan, an XML report is not generated and `cs2pr` will exit with a `0`.

In this situation, a workflow run will be marked as passing (even though a failure has occurred) due to the presence of `continue-on-error`.

This adjusts the logic in the Coding Standards and PHP Compatibility workflows to remove the need for the `continue-on-error` option and ensures all failures are accurately reflected within the GitHub Actions UI.

Follow up to [54371].

Props jrf, TobiasBg.
See #55652.
Built from https://develop.svn.wordpress.org/trunk@54678


git-svn-id: http://core.svn.wordpress.org/trunk@54230 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-24 16:49:15 +00:00
davidbaumwald
a5213e123f 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.
Fixes #56855.
Built from https://develop.svn.wordpress.org/trunk@54675


git-svn-id: http://core.svn.wordpress.org/trunk@54227 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-24 15:36:13 +00:00
desrosj
03a200a9c0 Build/Test Tools: Hardcode the ref for the workflow dispatch on failure.
This removes the dynamic aspect of the `createWorkflowDispatch()` call that dispatches a Failed Workflow run when another workflow encounters an issue.

By hardcoding `trunk` as the `ref`, the version of the workflow used will always be the latest, most up to date. This ensures older branches receive the bug fixes and improvements made in `trunk` without having to backport them.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54226 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-24 15:20:14 +00:00
davidbaumwald
0f9b449466 Role/Capability: Revert the newly added update_role function for 6.1.
Based on feedback, this enhancement isn't quite ready.  Reverting [54213] for now to continue the work in the next cycle.

Follow-up to [54213].

Props manfcarlo, peterwilsoncc.
Built from https://develop.svn.wordpress.org/trunk@54673


git-svn-id: http://core.svn.wordpress.org/trunk@54225 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-24 14:56:16 +00:00
Sergey Biryukov
89e665383f KSES: Display a notice if any of the required globals are not set.
When using the `CUSTOM_TAGS` constant, these global variables should be set to arrays:

* `$allowedposttags`
* `$allowedtags`
* `$allowedentitynames`
* `$allowedxmlentitynames`

This commit aims to improve developer experience by displaying a more helpful message to explain a PHP fatal error further in the code if any of these globals are either not set or not an array.

Note Using `CUSTOM_TAGS` is not recommended and should be considered deprecated. The `wp_kses_allowed_html` filter is more powerful and supplies context.

Follow-up to [832], [834], [2896], [13358], [21796], [28845], [43016], [48072].

Props doctorlai, pento, KnowingArt_com, bosconiandynamics, TJNowell, ironprogrammer, audrasjb, mukesh27, SergeyBiryukov.
Fixes #47357.
Built from https://develop.svn.wordpress.org/trunk@54672


git-svn-id: http://core.svn.wordpress.org/trunk@54224 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-24 14:49:15 +00:00
Bernhard Reiter
ca3cfae579 Blocks: Allow arrays for deprecated asset types in block registration.
In `register_block_type`, continue to allow passing arrays as the `editor_script`, `script`, `view_script`, `editor_style`, and `style` arguments. Note that those fields were soft-deprecated in favor of their `_handles` counterparts in [54155], which would allow specifying multiple items. At the same time, the deprecated fields were limited to `string` or `null`.

However, this broke existing code that passed an array as one of those arguments. For backwards compatibility, this change thus restores the previous behavior. It is implemented in `WP_Block_Type` as a pair of `__get()` and `__set()` methods that wrap around the corresponding `_handles` members, which are arrays of strings.

It also affects the REST API endpoint for block types. The latter’s schema has never allowed for anything other than `string` or `null` for any of those fields. For this reason, it now returns the first element of the array stored in the corresponding `_handles` member in `WP_Block_Type`.

Follow-up [54155].
Props nendeb55, costdev, gziolo, spacedmonkey, mukesh27, sergeybiryukov, audrasjb.
Fixes #56707.
Built from https://develop.svn.wordpress.org/trunk@54670


git-svn-id: http://core.svn.wordpress.org/trunk@54222 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-24 14:16:12 +00:00
Pascal Birchler
ba19b8412d I18N: Change how WP_Textdomain_Registry stores the default languages path.
`WP_Textdomain_Registry` was introduced in [53874] to store text domains and their language directory paths, addressing issues with just-in-time loading of textdomains when using locale switching and when using`load_*_textdomain()` functions.

Said change has inadvertently caused a performance regression exactly when using`load_*_textdomain()`, which still often is the case, where the cached information was not further used or even overridden.

This change addresses that issue by storing the default languages paths in a separate way, while at the same time making `WP_Textdomain_Registry` easier to maintain and adding new tests to catch future regressions.

Props flixos90, spacedmonkey, ocean90, SergeyBiryukov, costdev.
Fixes #39210.
Built from https://develop.svn.wordpress.org/trunk@54669


git-svn-id: http://core.svn.wordpress.org/trunk@54221 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-24 10:02:16 +00:00
Sergey Biryukov
7240236672 Tests: Make the message for skipping some tests with an external object cache more consistent.
Follow-up to [33702], [34767], [49857], [53821].

See #56793.
Built from https://develop.svn.wordpress.org/trunk@54668


git-svn-id: http://core.svn.wordpress.org/trunk@54220 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-23 12:38:15 +00:00
Sergey Biryukov
faba855bfb Tests: Add a test case for safecss_filter_attr() with object-position property.
Follow-up to [50634].

See #56793.
Built from https://develop.svn.wordpress.org/trunk@54667


git-svn-id: http://core.svn.wordpress.org/trunk@54219 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-22 12:57:15 +00:00
Sergey Biryukov
1a538e7278 Tests: Move padding-* test data in KSES tests into its own test case.
This creates separate test cases for `safecss_filter_attr()` with `margin-*` and `padding-*` logical properties for additional clarity.

Follow-up to [54102].

See #56793.
Built from https://develop.svn.wordpress.org/trunk@54666


git-svn-id: http://core.svn.wordpress.org/trunk@54218 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-22 12:26:20 +00:00
audrasjb
1ef93acbe6 Help/About: Typo correction in Dashboard Screen Options.
This changeset fixes a typo in meta boxes preferences. It also changes the related sentence from passive to active voice.

Follow-up to [49179].

Props sabernhardt.
Fixes #56884.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54217 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-22 07:05:16 +00:00
audrasjb
65cdec186b Docs: Align spelling with American English.
This changeset replaces "cancelled" with "canceled" in various docblocks, per the [https://make.wordpress.org/core/handbook/best-practices/spelling/ Spelling Guidelines].

Props costdev.
See #56811, #56792.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54216 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-21 21:51:14 +00:00
audrasjb
823517e1de Docs: Align spelling with American English.
This changeset replaces "behaviour" with "behavior" in various docblocks.

Props kebbet, jrf.
See #56811, #56792.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54215 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-21 21:12:14 +00:00
ryelle
1f9aedf926 Help/About: Update the About header image.
When used inline, the SVG needs the `aria-hidden`, `focusable`, and `viewBox` properties for accessibility. Additionally, this optimizes the SVG by using `cirlce` elements in place of `path`, and removing `clipPath`. There is no visible change, but the file is now one-third the size.

Props sabernhardt.
See #56703, #56357.


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


git-svn-id: http://core.svn.wordpress.org/trunk@54214 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-21 16:44:16 +00:00
Sergey Biryukov
72469add22 Docs: Document the usage of $wp_query global in WP_Media_List_Table::display_rows().
Follow-up to [34127].

Props upadalavipul, saumil1611.
Fixes #56839.
Built from https://develop.svn.wordpress.org/trunk@54661


git-svn-id: http://core.svn.wordpress.org/trunk@54213 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-21 13:35:21 +00:00
joedolson
9f988fec20 Editor: Fix modal height responsiveness on link popup editor.
Fix the responsive breakpoint styles for short vertical viewports on the link popup modal. Follow up to [54216].

Props sabernhardt.
Fixes #53174.
Built from https://develop.svn.wordpress.org/trunk@54660


git-svn-id: http://core.svn.wordpress.org/trunk@54212 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-20 21:46:15 +00:00
Aaron Jorbin
105b321283 Docs: Add missing default parameter value in themes_api() docblock.
Previously: [54655] [54657]

Props rezakhan995, costdev.
Fixes #56862.
See #56792.


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


git-svn-id: http://core.svn.wordpress.org/trunk@54211 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-20 18:25:12 +00:00
Aaron Jorbin
67cb80cac3 Docs: Add missing default parameter value in trackback_response() docblock.
Previously: [54656] [54657]

Props rakibwordpress, audrasjb, SergeyBiryukov.
Fixes #56867.
See #56792.


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


git-svn-id: http://core.svn.wordpress.org/trunk@54210 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-20 18:23:14 +00:00
Sergey Biryukov
7490127885 Coding Standards: Use strict comparison in wp-admin/update-core.php.
This updates a conditional in `do_core_upgrade()` to use strict comparison for error codes that are static strings.

Follow-up to [8595], [36349].

Props rezakhan995, kebbet, mukesh27, jrf, SergeyBiryukov.
Fixes #56866.
Built from https://develop.svn.wordpress.org/trunk@54654


git-svn-id: http://core.svn.wordpress.org/trunk@54206 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-20 14:30:20 +00:00
Gary Pendergast
12d9878827 Embeds: Broaden the Tumblr oEmbed matcher to include all Tumblr URL structures.
Tumblr's oEmbed API correctly rejects invalid URLs, we can rely on that for the handful of cases that aren't embeddable URLs.

Props cbravobernal, bernhard-reiter.
Fixes #56733.


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


git-svn-id: http://core.svn.wordpress.org/trunk@54204 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-20 00:00:16 +00:00
desrosj
6994dfddd0 Build/Test Tools: Update third-party welcome Action.
This updates the third-party action used to post a welcome message to pull requests opened by first time contributors.

This release updates the action to use Node.js version 16 instead of 12, the latter of which support has been deprecated for in GitHub Action runners.

The action has also changed from `bukboo/welcome-action` to `wow-action/welcome`.

See #56793.
Built from https://develop.svn.wordpress.org/trunk@54651


git-svn-id: http://core.svn.wordpress.org/trunk@54203 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-19 18:28:12 +00:00
desrosj
a0da955b66 General: Correctly refer to “npm” and “Node.js”.
This update all references to npm and Node.js to their correct spelling.

Fixes #56816.
Built from https://develop.svn.wordpress.org/trunk@54650


git-svn-id: http://core.svn.wordpress.org/trunk@54202 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-19 18:20:11 +00:00
desrosj
4d2e4791f0 Build/Test Tools: Remove use of set-output in Action workflows.
The `save-state` and `set-output` commands have been deprecated in GitHub Actions. This removes all occurrences of the command within workflow steps.

This will not remove all deprecated notices from workflow summaries (some third-party actions still contain instances of these commands and need to be fixed upstream), but it will fix the notices caused by custom workflow code.

See #56820.
Built from https://develop.svn.wordpress.org/trunk@54649


git-svn-id: http://core.svn.wordpress.org/trunk@54201 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-19 18:12:14 +00:00