46656 Commits

Author SHA1 Message Date
Sergey Biryukov
c39a45cd3f Tests: Delete leftover image sub-sizes after WP_Customize_Manager tests.
After running `phpunit --filter test_import_theme_starter_content`, the following files were generated and left in place in the version-controlled `DIR_TESTDATA` directory, resulting in a dirty working copy of the project:
{{{
tests/phpunit/data/images/canola-150x150.jpg
tests/phpunit/data/images/canola-300x225.jpg
}}}

In the test, `canola.jpg` is mocked as an **existing attachment**. When the test invokes `WP_Customize_Manager::import_theme_starter_content()`, existing attachments are passed directly to `wp_generate_attachment_metadata()`, which does not make a copy of the file, and `wp_create_image_subsizes()` creates the above referenced files in the original image's location.

By contrast, `waffles.jpg`, also used in the test, is **not** set as an existing attachment, and in  `import_theme_starter_content()` is passed to `media_handle_sideload()`, which makes a **copy** of the file in the `wp-content/uploads/` directory, and then calls `wp_create_image_subsizes()` against the new file. The resulting sub-sizes are generated in that location, and are cleaned up during `tear_down()`.

The test's `tear_down()` uses `remove_added_uploads()`, which only clears items created in `wp-content/uploads/` (i.e. `waffles*.jpg`), but not the files in the `DIR_TESTDATA` directory (`canola-*.jpg`).

This commit addresses the issue by creating a copy of the file in uploads. This better matches the intention of the test, as existing attachments will most likely be located in uploads and not in an arbitrary path like the test data directory.

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

Props ironprogrammer, audrasjb, boniu91, dariak, SergeyBiryukov.
Fixes #56807.

git-svn-id: https://develop.svn.wordpress.org/trunk@54519 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-15 01:08:33 +00:00
Sergey Biryukov
0023f179d2 REST API: Simplify the check for an array of arrays in register_rest_route().
The previous implementation of checking whether the `args` parameter is an array of arrays used `array_filter()`, which would always loop the full array, even though we are only interested in finding one (the first) non-array to display a `_doing_it_wrong()` message.

This commit aims to improve readability and performance of this check by using a `foreach` loop instead, leaving it as soon as the first non-array argument is found.

Follow-up to [54339].

Props TobiasBg, audrasjb, costdev, SergeyBiryukov.
Fixes #56804.

git-svn-id: https://develop.svn.wordpress.org/trunk@54518 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-14 15:53:33 +00:00
Jorge Costa
cb98544ed1 Global Styles: Improve performance of WP_Theme_JSON::get_merged_data method.
In the WordPress 6.1 cycle, WP_Theme_JSON_Resolver::get_merged_data method has become a hot path that is called many times. By improving small things that are repeated multiple times, we get more performance wins.
This commit reduces the number of calls of the low-level WP_Theme_JSON->merge method, with the corresponding performance improvements.

Props oandregal, aristath, mukeshpanchal27.
See #56467.

git-svn-id: https://develop.svn.wordpress.org/trunk@54517 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-14 10:45:23 +00:00
Jonathan Desrosiers
fe58b3e518 Build/Test Tools: Update third-party GitHub Actions.
This updates the following third-party actions to their latest versions:

- `actions/cache`
- `actions/checkout`
- `actions/setup-node`
- `actions/github-script`
- `slackapi/slack-github-action`

The latest versions of these actions fix the warnings that are being triggered after the deprecation of `set-output` and `save-state` on GitHub Actions.

For more information, see https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/.

See #56820.

git-svn-id: https://develop.svn.wordpress.org/trunk@54511 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-13 17:49:07 +00:00
Sergey Biryukov
77b3243518 Docs: Correct parameter name for deleted_{$meta_type}meta action.
Follow-up to [27698].

Props divyeshgodhani, costdev.
Fixes #56806.

git-svn-id: https://develop.svn.wordpress.org/trunk@54510 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-13 17:22:59 +00:00
Jonathan Desrosiers
e6240966b7 Tests: Revert unintentional change in [54508].
Unprops desrosj.
See #56817.

git-svn-id: https://develop.svn.wordpress.org/trunk@54509 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-13 16:43:36 +00:00
Jonathan Desrosiers
b267249df9 Tests: Temporarily skip WOFF file test on PHP 8.2.
A recent change to how WOFF files are processed in PHP 8.2 RC3 has caused a new test failure.

This temporarily marks the `test_wp_check_filetype_and_ext_with_filtered_woff()` test skipped until a deeper analysis can be performed.

Props SergeyBiryukov, jrf, desrosj, oandregal.
See #56817.

git-svn-id: https://develop.svn.wordpress.org/trunk@54508 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-13 16:34:42 +00:00
Jonathan Desrosiers
cfe4548fde Build/Test Tools: Remove note about some PHP versions being allowed to fail.
This removes the note stating that PHP 8.1 (see [51604]) and 8.2 (see [53922]) are temporarily allowed to fail.

The compatibility issues were resolved and `continue-on-error` was removed in [53922].

See #56009.

git-svn-id: https://develop.svn.wordpress.org/trunk@54507 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-13 14:28:04 +00:00
Jb Audras
70dedb0866 Docs: Fix $cache_headers param type in site_status_page_cache_supported_cache_headers.
Follow-up to [54043].

Props skithund.
Fixes #56805.
See #55646.


git-svn-id: https://develop.svn.wordpress.org/trunk@54506 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-12 13:41:43 +00:00
Jb Audras
8f1bbe7724 Docs: Inline comment typo correction in wp_image_file_matches_image_meta().
Props kebbet.
See #55646, #56792.


git-svn-id: https://develop.svn.wordpress.org/trunk@54505 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-12 13:21:56 +00:00
Sergey Biryukov
af607a83a6 Docs: Fix typo in a @since note for _get_cron_array().
Follow-up to [53791].

Props kebbet.
See #55646, #56792.

git-svn-id: https://develop.svn.wordpress.org/trunk@54504 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-12 11:51:18 +00:00
David Baumwald
88440b9305 Post WordPress 6.1 RC1 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@54503 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-11 20:49:31 +00:00
David Baumwald
efdf041a05 WordPress 6.1 RC1.
git-svn-id: https://develop.svn.wordpress.org/trunk@54502 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-11 20:33:24 +00:00
Tonya Mork
90a7ecc474 Editor: Rename new theme_json_{$context} filters.
The newly introduced filters are renamed to use the `wp_theme_json_data{$context}` structure:

* `theme_json_default` renamed to `wp_theme_json_data_default`
* `theme_json_theme` renamed to `wp_theme_json_data_theme`
* `theme_json_blocks` renamed to `wp_theme_json_data_blocks`
* `theme_json_user` renamed to `wp_theme_json_data_user`

The following new filter gets the `wp_` prefix added:
* `theme_json_get_style_nodes` renamed to `wp_theme_json_get_style_nodes`

Follow-up to [56467], [54183], [54118].

Props kebbet, desrosj, mukesh27, ocean90, sergeybiryukov, davidbaumwald, hellofromTonya.
Fixes #56796.

git-svn-id: https://develop.svn.wordpress.org/trunk@54501 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-11 20:06:16 +00:00
David Baumwald
64591219a0 Editor: Add test data for Fluid Typography.
Follow-up to [54280] and [54497].

Props desrosj, hellofromTonya, SergeyBiryukov.
See #56467.

git-svn-id: https://develop.svn.wordpress.org/trunk@54500 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-11 19:50:46 +00:00
Kelly Choyce-Dwan
33d50ae846 Help/About: Update the About page for 6.1.
This is the start of the WordPress 6.1 about page, introducing new content and a first pass of the new style.

Props adampickering, joen, iamarinoh, dansoschin, desrosj, ryelle, cbringmann, annezazu, priethor, laurlittle, eidolonnight, jeffpaul, sabernhardt, ndiego, richtabor, spacedmonkey, marybaum, abhanonstopnewsuk, courane01, tweetythierry, adamsilverstein, flixos90, ironprogrammer.
See #56357.



git-svn-id: https://develop.svn.wordpress.org/trunk@54499 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-11 18:49:40 +00:00
Tonya Mork
b7a40f1fc1 Editor: Fix PHP notice in WP_Block_Supports when no attributes declared.
A check is added to verify if the block's `'attrs'` key exists before accessing it. If no, it defaults to an empty array.

How was this found?
WP 6.1 removed the attributes from the `core/page-list` block. When this block is being processed by `WP_Block_Supports::apply_block_supports()`, the key `'attrs'` does not exist in `self::$block_to_render`.

This commit includes a tiny micro-optimization by moving this line of code after the existing guard clause. Why? If the guard clause is triggered, the method bails out early, meaning the attributes code is not used. By moving it after the guard clause, it saves a tiny bit of memory and processing if this happens.

Follow-up to [49310], [54399].

Props petitphp, spacedmonkey, hellofromTonya.
Fixes #56799.

git-svn-id: https://develop.svn.wordpress.org/trunk@54498 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-11 18:43:52 +00:00
David Baumwald
a874e5fe5e Editor: Merge latest fluid typography bugfixes for 6.1 Release Candidate 1.
Merges the following:
* [https://github.com/WordPress/gutenberg/pull/44761 Gutenberg PR 44761] - Fluid Typography: Fix bug in global styles where fluid `clamp()` rules were not calculated for custom values
* [https://github.com/WordPress/gutenberg/pull/44762 Gutenberg PR 44762] - Fluid Typography: Convert server-side block support values
* [https://github.com/WordPress/gutenberg/pull/44764 Gutenberg PR 44764] - Fluid Typography: Convert font size inline style attributes to fluid values
* [https://github.com/WordPress/gutenberg/pull/44807 Gutenberg PR 44807] - Fluid Typography: Covert font size number values to pixels
* [https://github.com/WordPress/gutenberg/pull/44847 Gutenberg PR 44847] - Fluid Typography: ensure font sizes are strings or integers

Follow-up to [54280].

Props andrewserong, isabel_brison, ramonopoly.
See #56467.

git-svn-id: https://develop.svn.wordpress.org/trunk@54497 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-11 18:42:20 +00:00
Sergey Biryukov
aa11f4cef1 Query: Avoid PHP notices when get_queried_object() returns null.
`WP_Query` methods assume that `get_queried_object()` would return a non-null value, which is not always the case.

This commit resolves various warnings in `WP_Query` along the lines of:
{{{
Attempt to read property "post_type" on null in wp-includes/class-wp-query.php on line 4338
}}}

Follow-up to [1728], [3639], [8807], [49119].

Props dd32, yellyc, boonebgorges, darkskipper, Howdy_McGee, swissspidy, nacin, mikeschroder, mikejolley, sterlo, datainterlock, utsavmadaan823, kanlukasz, woji29911, hellofromTonya, zikubd, deksar, bwbama, noplanman, nouarah, SergeyBiryukov.
Fixes #29660.

git-svn-id: https://develop.svn.wordpress.org/trunk@54496 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-11 18:13:34 +00:00
Sergey Biryukov
bb0ef7cb0e External Libraries: Further fix jQuery deprecations in WordPress core.
This replaces calls to the deprecated jQuery `.bind()` method with `.on()` in Plupload's `handlers.js`.

Reference: [https://api.jquery.com/bind/ jQuery API Documentation: .bind()]

Follow-up to [18482], [19266], [50001], [50270], [50367], [50383], [50410], [50420], [50429], [50627], [51947], [52429].

Props eclev91, ipajen, sarahricker.
See #51812.

git-svn-id: https://develop.svn.wordpress.org/trunk@54495 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-11 17:35:05 +00:00
David Baumwald
628e83d157 Editor: Ensure WP_Query and WP_Term_Query results are referenced properly when creating dynamic template names for use in the site editor.
[54445] updated the new dynamic template name functions used by the site editor in 6.1 to use `WP_Query` and `WP_Term_Query` instances in place of `get_posts` and `get_terms` respectively.  However, the latter functions return an array of results whereas `WP_Query` instances store their found results in a class property.  This change updates the code to reference either `$posts_query->posts` or `$terms_query->terms` where necessary.

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

Props bernhard-reiter, spacedmonkey, davidbaumwald.
See #56467.

git-svn-id: https://develop.svn.wordpress.org/trunk@54494 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-11 17:28:54 +00:00
Tonya Mork
4be76617b9 Editor: Fix performance regression in WP_Theme_JSON_Resolver.
A significant performance regression was added late in WP 6.1 beta cycle when some of the existing caching for `theme.json` processing was removed. The rationale for removing the caching was this code was now used before all the blocks are registered (aka get template data, etc.) and resulted in stale cache that created issues (see [https://github.com/WordPress/gutenberg/issues/44434 Gutenberg Issue 44434] and [https://github.com/WordPress/gutenberg/issues/44619 Gutenberg Issue 44619]). The changes were limited to only reads from the file system. However, it introduced a big impact in performance.

This commit adds caching and checks for blocks with different origins. How? It add caching for the calculated data for core, theme, and user based on the blocks that are registered. If the blocks haven't changed since the last time they were calculated for the origin, the cached data is returned. Otherwise, the data is recalculated and cached.

Essentially, this brings back the previous cache, but refreshing it when the blocks change.

It partially adds unit tests for these changes. Additional tests will be added.

References:
* [https://github.com/WordPress/gutenberg/issues/44772 Performance regression in WP 6.1 for theme.json processing]

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

Props aristath, oandregal, bernhard-reiter, spacedmonkey, hellofromTonya.
See #56467.

git-svn-id: https://develop.svn.wordpress.org/trunk@54493 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-11 17:15:11 +00:00
Jonathan Desrosiers
73b179ab99 Bundled Themes: Bump version numbers for 6.1.
In coordination with the release of 6.1, a new version of each bundled theme will also be released. This bumps the version of each theme to the following:

- Twenty Ten: 3.7
- Twenty Eleven: 4.2
- Twenty Twelve: 3.8
- Twenty Thirteen: 3.7
- Twenty Fourteen: 3.5
- Twenty Fifteen: 3.3
- Twenty Sixteen: 2.8
- Twenty Seventeen: 3.1
- Twenty Nineteen: 2.4
- Twenty Twenty: 2.1
- Twenty Twenty-One: 1.7
- Twenty Twenty-Two: 1.3

Additionally, this audits all `$version` parameters for `wp_(enqueue|register)_(script|style)` calls, ensuring accurate last edited or theme version values for proper caching and cache busting.

Props robinwpdeveloper, desrosj, mukesh27.
Fixes #56450.

git-svn-id: https://develop.svn.wordpress.org/trunk@54492 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-11 17:03:08 +00:00
Tonya Mork
df88d0dc8a Editor: Fix version in WP_Theme_JSON_Resolver::get_block_data().
Introduced during the WP 6.1 alpha cycle, this commit fixes the version number from `1` to `2`.

Follow-up to [54162].

Props oandregal.
See #56467.

git-svn-id: https://develop.svn.wordpress.org/trunk@54491 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-11 16:38:30 +00:00
David Baumwald
c0b76c19be Editor: Bump @wordpress packages for 6.1 Release Candidate 1.
Package updates for bug and regression fixes:
@wordpress/block-directory: 3.15.7
@wordpress/block-library: 7.14.7
@wordpress/customize-widgets: 3.14.7
@wordpress/edit-post: 6.14.7
@wordpress/edit-site: 4.14.9
@wordpress/edit-widgets: 4.14.7

Follow-up to  [54257], [54335], [54383], [54483], and [54486].

Props bernhard-reiter.
See #56467.

git-svn-id: https://develop.svn.wordpress.org/trunk@54490 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-11 16:32:09 +00:00
Sergey Biryukov
c5e9de416b Comments: Consistently normalize user_ID to user_id in wp_new_comment().
For backward compatibility, the `user_id` parameter of `wp_new_comment()` can be spelled as `user_ID`, and plugins utilizing the `preprocess_comment` filter or the `comment_post` action should be able to receive both variations.

Follow-up to [12267], [12300], [28915], [36038], [53729].

Props peterwilsoncc, SergeyBiryukov.
Fixes #56244.

git-svn-id: https://develop.svn.wordpress.org/trunk@54489 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-11 16:30:40 +00:00
Sergey Biryukov
645f474fc0 Comments: Return early from comment_form() if an invalid post ID is passed.
If an invalid post ID is passed to the function, `comments_open()` should return `false`, and no comment form be displayed. This commit restores the previous behavior that was unintentionally changed when standardizing on the `$post` parameter name.

Follow-up to [53715].

Props peterwilsoncc.
Fixes #56243.

git-svn-id: https://develop.svn.wordpress.org/trunk@54488 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-11 15:43:04 +00:00
David Baumwald
20bccea8a7 Editor: Remove extra line break in build_template_part_block_instance_variations().
This extra break was causing a QUnit failure check validating version controlled file contents.

Follow-up to [54483].

See #56467.

git-svn-id: https://develop.svn.wordpress.org/trunk@54487 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-11 15:39:59 +00:00
David Baumwald
a11ac1e13f Editor: Change gutenberg_get_typography_font_size_value() calls to wp_get_typography_font_size_value().
Merged Gutenberg functions should be prefixed with `wp_`.

Follow-up to [54483].

Props spacedmonkey.
See #56467.

git-svn-id: https://develop.svn.wordpress.org/trunk@54486 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-11 15:36:04 +00:00
Jb Audras
14e51e1f16 Editor: Reinstate old persistence system configuration for the block editor usage data.
In [54182], the configuration for the old preference persistence system was removed. This system is still used for block usage data (to show the most frequently used blocks in the inserter). Furthermore some plugins may use this persistence system.

This changeset reinstates the previous persistence system used by the "Most used blocks" feature in the block inserter.

Follow-up to [54182].

Props talldanwp.
Fixes #56778.


git-svn-id: https://develop.svn.wordpress.org/trunk@54485 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-11 15:28:08 +00:00
Sergey Biryukov
394ab0c97f Upgrade/Install: Revert a temporary conditional for testing the Rollbacks feature project.
This will be readded in 6.2-alpha after a 6.1 branch is created.

Follow-up to [53578].

See #56057.

git-svn-id: https://develop.svn.wordpress.org/trunk@54484 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-11 15:26:01 +00:00
David Baumwald
d6f9c7d0bb Editor: Update packages for 6.1 Release Candidate 1.
Package updates for bug and regression fixes:
@wordpress/block-directory: 3.15.6
@wordpress/block-editor: 10.0.6
@wordpress/block-library: 7.14.6
@wordpress/components: 21.0.5
@wordpress/customize-widgets: 3.14.6
@wordpress/edit-post: 6.14.6
@wordpress/edit-site: 4.14.8
@wordpress/edit-widgets: 4.14.6
@wordpress/editor: 12.16.6
@wordpress/format-library: 3.15.6
@wordpress/interface: 4.16.5
@wordpress/list-reusable-blocks: 3.15.5
@wordpress/nux: 5.15.5
@wordpress/preferences: 2.9.5
@wordpress/reusable-blocks: 3.15.6
@wordpress/server-side-render: 3.15.5
@wordpress/widgets: 2.15.6

References:
* [https://github.com/WordPress/gutenberg/pull/43181 Gutenberg PR 43181] - Merge inner blocks if wrappers are equal
* [https://github.com/WordPress/gutenberg/pull/44098 Gutenberg PR 44098] - Fix content blocks with nested blocks always appear as top level
* [https://github.com/WordPress/gutenberg/pull/44150 Gutenberg PR 44150] - Refresh selection styles
* [https://github.com/WordPress/gutenberg/pull/44415 Gutenberg PR 44415] - Removes `__unstableMaxPages` attribute from Page List and Nav blocks
* [https://github.com/WordPress/gutenberg/pull/44463 Gutenberg PR 44463] - Follow discussion settings in the comments block edit
* [https://github.com/WordPress/gutenberg/pull/44584 Gutenberg PR 44584] - Avoid querying block templates during installation
* [https://github.com/WordPress/gutenberg/pull/44637 Gutenberg PR 44637] - Resizable editor: Fix height setting bug
* [https://github.com/WordPress/gutenberg/pull/44640 Gutenberg PR 44640] - Only include theme.css if the theme declares support for wp-block-styles
* [https://github.com/WordPress/gutenberg/pull/44650 Gutenberg PR 44650] - Fix empty links being created for the author's name comment
* [https://github.com/WordPress/gutenberg/pull/44652 Gutenberg PR 44652] - Block Editor: Fix block search for non-Latin characters
* [https://github.com/WordPress/gutenberg/pull/44660 Gutenberg PR 44660] - Legacy Group inner block wrapper should work with constrained layout
* [https://github.com/WordPress/gutenberg/pull/44676 Gutenberg PR 44676] - Hide list items from content area of content locked blocks
* [https://github.com/WordPress/gutenberg/pull/44718 Gutenberg PR 44718] - Margin visualizer: Apply negative value to margins with `calc()`
* [https://github.com/WordPress/gutenberg/pull/44721 Gutenberg PR 44721] - Remove anchor support from the navigation block
* [https://github.com/WordPress/gutenberg/pull/44731 Gutenberg PR 44731] - Buttons: Add specificity for the editor

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

Props bernhard-reiter, czapla, annezazu, cbravobernal, ndiego, bjorsch, nendeb55.
See #56467.

git-svn-id: https://develop.svn.wordpress.org/trunk@54483 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-11 15:24:12 +00:00
Jb Audras
525d6d2a34 Networks and Sites: Ensure fileupload_maxk is an int to avoid potential fatal errors.
This changeset fixes a potential fatal error, for example when "Max upload file size" setting is set to an empty value. It also adds unit tests for `upload_size_limit_filter`.

Props mjkhajeh, bhrugesh12, SergeyBiryukov, kebbet, audrasjb, felipeelia.
Fixes #55926.


git-svn-id: https://develop.svn.wordpress.org/trunk@54482 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-11 15:05:29 +00:00
Sergey Biryukov
e2c6f8c82a Code Modernization: Add AllowDynamicProperties attribute to recently introduced classes.
This commit is a follow-up to [54133] for new classes introduced in WordPress 6.1 since the previous commit.

Dynamic (non-explicitly declared) properties are deprecated as of PHP 8.2 and are expected to become a fatal error in PHP 9.0.

There are a number of ways to mitigate this:
* If it is an accidental typo for a declared property: fix the typo.
* For known properties: declare them on the class.
* For unknown properties: add the magic `__get()`, `__set()`, et al. methods to the class or let the class extend `stdClass` which has highly optimized versions of these magic methods built in.
* For unknown ''use'' of dynamic properties, the `#[AllowDynamicProperties]` attribute can be added to the class. The attribute will automatically be inherited by child classes.

Trac ticket #56034 is open to investigate and handle the third and fourth type of situations, however it has become clear this will need more time and will not be ready in time for WP 6.1.

To reduce “noise” in the meantime, both in the error logs of WP users moving onto PHP 8.2, in the test run logs of WP itself, in test runs of plugins and themes, as well as to prevent duplicate tickets from being opened for the same issue, the `#[AllowDynamicProperties]` attribute has been added to all “parent” classes in WP.

Reference: [https://wiki.php.net/rfc/deprecate_dynamic_properties PHP RFC: Deprecate dynamic properties].

Follow-up to [53922], [54133].

Props jrf.
See #56513, #56034.

git-svn-id: https://develop.svn.wordpress.org/trunk@54481 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-11 14:58:03 +00:00
Jonathan Desrosiers
514cb55812 Coding Standards: Remove two unnecessary spaces.
Props kebbet.
See #55647.

git-svn-id: https://develop.svn.wordpress.org/trunk@54480 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-11 14:45:15 +00:00
Sergey Biryukov
865b8ac065 Tests: Relocate the tests for recommended PHP, MySQL, and MariaDB versions.
This commit moves the tests for recommended versions of dependencies referenced in `readme.html` to a new location for better context. Also updates test class name for clarity, and `@covers` annotations to `@coversNothing`.

Follow-up to [26166], [33946], [35172], [52418], [52424].

Props ironprogrammer, bbobnis, antonvlasenko, azaozz, chaion07, priyomukul.
Fixes #45867.

git-svn-id: https://develop.svn.wordpress.org/trunk@54479 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-11 14:25:47 +00:00
Jb Audras
2414439208 Menus: Remove .menu-item-has-children on wp_nav_menu last level menu items when $depth arg is used.
This changeset prevents `wp_nav_menu` last level menu items from having the `.menu-item-has-children` class when the `$depth` argument is used. It adds a loop in `wp_nav_menu()` to calculate the depth of each menu item with children to make sure the class is added only when applicable.

Props slobodanmanic, kucrut, iCaspar, mdgl, petitphp, audrasjb, costdev.
Fixes #28620.


git-svn-id: https://develop.svn.wordpress.org/trunk@54478 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-11 14:02:55 +00:00
Sergey Biryukov
d136e57d63 Users: Fetch user by login in retrieve_password() if not found by email.
This ensures that sending a password reset link works as expected if the user's login and email were initially the same, but the email address was subsequently updated and no longer matches the login, which is still set to the old address.

Follow-up to [6643], [18513], [19056], [37474], [50129], [50140].

Props donmhico, pbearne, azouamauriac, boblindner, daxelrod, audrasjb, SergeyBiryukov.
Fixes #53634.

git-svn-id: https://develop.svn.wordpress.org/trunk@54477 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-11 13:43:20 +00:00
Jb Audras
5e383d8209 Posts, Post Types: Ensure all entries in the list returned by wp_parse_list() are scalar.
This changeset fixes a warning where `strip_tags()` expected its first parameter to be a string rather than an array. It contains the following changes:

- Removal of sanitize_callback to allow the REST API to handle the validation natively, this also causes the proper error to be output for `?slug[0][1]=2` that it's an invalid value.
- Ensure that `wp_parse_list()` only returns a single-dimensioned array, even if passed a multi-dimension array, which fits the functions expected use case and resolves warnings in code that expects the function to return a single-dimensioned array.

Props dd32, TimothyBlynJacobs.
Fixes #55838.


git-svn-id: https://develop.svn.wordpress.org/trunk@54476 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-11 13:23:49 +00:00
Jb Audras
59829a594f Twenty Ten: Adjust Pullquote Block paragraph font size.
This changeset adjusts the size of paragraphs located inside the Pullquote block to account for changes introduced in [82509b6439 (diff-b45331d9b1b9f01d24ffd110e357ce5722772b0a14303ba72ca216c613fc8076) Gutenberg PR 43195]. This ensures the size of the paragraph is set to 1.5em in the editor.

Props sabernhardt.
Fixes #56730.


git-svn-id: https://develop.svn.wordpress.org/trunk@54475 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-11 12:40:56 +00:00
Jb Audras
b20675e8dd Formatting: Strip object replacement characters from slugs.
This changeset prevents object replacement characters – UTF-8 `%ef%bf%bc`, used as a placeholder in text for an otherwise unspecified object – from being added to slugs.

Props cantuaria, costdev, audrasjb, SergeyBiryukov, archon810, maciejmackowiak, BaneD, markparnell, ironprogrammer, dmsnell, nikkigagency, webprom.
Fixes #55117.


git-svn-id: https://develop.svn.wordpress.org/trunk@54474 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-11 10:27:00 +00:00
Jb Audras
7dfb60533c I18N: Revert [54469].
This changeset reverts [54469] as there is currently no support for parsing JS i18n functions in PHP files which means the strings won't be translatable.

Props ocean90.
Unprops audrasjb.
See #37287.


git-svn-id: https://develop.svn.wordpress.org/trunk@54473 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-11 10:03:16 +00:00
Jb Audras
5b5e1bb8c9 Build/Test Tools: Add unit test for non-existing block-styles registration.
Follow-up to [54155].

Props aristath, mukesh27.
Fixes #56664.


git-svn-id: https://develop.svn.wordpress.org/trunk@54472 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-11 09:58:27 +00:00
John Blackbourn
e5ad18117c Taxonomy: Correct an invalid @param tag.
See #55646


git-svn-id: https://develop.svn.wordpress.org/trunk@54471 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-11 09:54:12 +00:00
John Blackbourn
a99a48c3b9 Docs: Various improvements to inline docblocks.
See #55646


git-svn-id: https://develop.svn.wordpress.org/trunk@54470 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-11 09:00:33 +00:00
Jb Audras
c8a7216896 I18N: Use wp.i18n._n() for plural forms in wp_print_admin_notice_templates().
This changeset adds better support for plural forms in update admin notices generated on the Themes and Plugins screens. This fixes issues when translating into languages that have more than one plural form, or more complicated rules for singular form usage.

Props ideag, SergeyBiryukov, daledupreez, audrasjb.
Fixes #37287.


git-svn-id: https://develop.svn.wordpress.org/trunk@54469 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-11 08:46:00 +00:00
Jonathan Desrosiers
4f62b4eb66 XML-RPC: Avoid loopback request in blogger.getUsersBlogs.
The `blogger.getUsersBlogs` endpoint does not currently work on Multisite environments which require HTTPS.

This changes `wp_xmlrpc_server::_multisite_getUsersBlogs()` to call the method directly instead of relying on a new `IXR_Client` request, which only supports HTTP.

Props dd32.
Fixes #56492.

git-svn-id: https://develop.svn.wordpress.org/trunk@54468 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-11 01:44:09 +00:00
Jonathan Desrosiers
4d75282dee Twenty Twenty-Three: Bug fixes and improvements for RC1.
Most notably in this update, Twenty Twenty-Three becomes the second default theme to have the “Accessibility Ready” tag.

For a full list of changes being included, see the `twentytwentythree` repository on GitHub: ca662828b7...4ea5d832ec.

Follow up to [54235], [54236], [54312], [54372].

Props mikachan, madhudollu, tahmidulkarim, joen, poena, scruffian, beafialho, colorful-tones, audrasjb, critterverse, luminuu, wildworks, hiyascout, desrosj.
Fixes #56383.

git-svn-id: https://develop.svn.wordpress.org/trunk@54467 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-11 00:42:28 +00:00
Jb Audras
8dede96705 Twenty Nineteen: Add missing compiled CSS declarations after [54413].
Follow-up to [54413].

Props sabernhardt, whaze.
Fixes #55981.


git-svn-id: https://develop.svn.wordpress.org/trunk@54466 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-10 23:13:25 +00:00
Peter Wilson
8f26450fba Embeds: Revert Google Data Studio as trusted provider.
Remove Google Data Studio's status as a trusted oEmbed provider pending upstream implementation of the oEmbed specification.

See #55771.



git-svn-id: https://develop.svn.wordpress.org/trunk@54465 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-10 23:09:53 +00:00