52689 Commits

Author SHA1 Message Date
Adam Silverstein 52aeb83024 Media: Re-introduce client-side media processing feature.
Reverts the removal in [62081] now that WordPress 7.1 has forked. Restores all PHP functions, REST API endpoints, cross-origin isolation infrastructure, VIPS script module handling, build configuration, and associated tests.

Follow-up to [62081].

Props adamsilverstein, jorbin, westonruter.
Fixes #64919.
See #64906.


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


git-svn-id: http://core.svn.wordpress.org/trunk@61709 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-28 15:28:46 +00:00
gziolo ff4453309e Abilities API: Harden ability schema preparation for REST responses
Merge `normalize_schema_empty_object_defaults()` and `strip_internal_schema_keywords()` into a single recursive `prepare_schema_for_response()` helper on `WP_REST_Abilities_V1_List_Controller`. Empty object defaults now normalize to `stdClass` at every depth — not just the top level — so nested `{}` defaults serialize consistently alongside the existing internal-keyword stripping.

Follow-up to [62221], [61244].

Props gziolo, westonruter.
See #64955.



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


git-svn-id: http://core.svn.wordpress.org/trunk@61708 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-28 08:15:41 +00:00
gziolo 8176690b3c Abilities API: Unify schema conventions across core abilities
Align `core/get-site-info`, `core/get-user-info`, and `core/get-environment-info` on a shared blueprint: every output property carries a Title Case `title` and a `description`, `core/get-environment-info` gains the optional `fields` input parameter the other two already accept, and `core/get-user-info` is exposed via REST. Descriptions are also tightened for programmatic consumers, and registration tests now lock the exact ordered set of property keys.


Props gziolo, westonruter.
Fixes #65355.


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


git-svn-id: http://core.svn.wordpress.org/trunk@61707 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-28 07:47:41 +00:00
dmsnell d9242f3fab Charset: Update antispambot to handle multibyte characters.
In preparation for handling Unicode email addresses (non-US-ASCII
characters in the mailbox name), the `antispambot()` function needs to
be multi-byte aware so that it creates proper HTML numeric character
references and percent-encoded strings.

Previously it has been scanning the input email address byte-by-byte,
but with multibyte characters this will produce invalid sequences of the
transformations by encoding individual bytes of a multi-byte sequence as
if they were whole characters on their own.

This patch relies on the newly-polyfilled `mb_ord()` function and the
`_wp_scan_utf8()` function to crawl through an input email by code
point, assuming UTF-8 encoding. This ensures proper transformation.

Developed in: https://github.com/WordPress/wordpress-develop/pull/11567
Discussed in: https://core.trac.wordpress.org/ticket/31992

Props agulbra, akirk, benniledl, dmsnell, siliconforks.
See #65342.

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


git-svn-id: http://core.svn.wordpress.org/trunk@61706 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-28 06:22:44 +00:00
dmsnell 3a46a19914 Charset: Polyfill mb_ord() and mb_chr().
These functions are useful primitives but missing when the mbstring
extension isn’t available. This patch adds polyfills for those few
environments where this is the case so that WordPress code can
unconditionally call them.

Developed in: https://github.com/WordPress/wordpress-develop/pull/11965
Discussed in: https://core.trac.wordpress.org/ticket/65342

Fixes #65342.

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


git-svn-id: http://core.svn.wordpress.org/trunk@61705 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-28 01:55:38 +00:00
Sergey Biryukov 91b8026f4b Help/About: Use absolute URLs for inline images on About pages.
This ensures the images are loaded correctly from both single site and network About pages.

Follow-up to [61204].

Props umesh.nevase, sabernhardt, khokansardar, mukesh27, SergeyBiryukov.
Fixes #65352.
Built from https://develop.svn.wordpress.org/trunk@62423


git-svn-id: http://core.svn.wordpress.org/trunk@61704 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-27 23:41:41 +00:00
desrosj 6bafa0a195 Build/Test Tools: Support testing unmerged changes from Gutenberg.
The `gutenberg.sha` property in the `package.json` file expects a full-length SHA value to be specified in order to download the built assets from the Gutenberg repository and include the files through the build script.

After https://github.com/WordPress/gutenberg/pull/78211, assets are now published for `pull_request` events in addition to `push` so long as the `HEAD` branch of the pull request exists in the repository and not in a fork. This makes the built assets for pull requests available for testing within `wordpress-develop` before they are merged through a `pr-###` tag on the GHCR package.

To test a given pull request, just set the `gutenberg.sha` value to the corresponding `pr-###` tag. In addition to pull request-specific tags, each `wp/X.Y`, `release/X.Y`, and `trunk` now have a tag that can be used to test the latest changes. Each time `build` or `build:dev` is called the script will attempt to confirm the latest version of the assets are present locally, pulling down the latest changes when an update is available.

All of the tags described in this changeset are mutable, so they should never be committed. Only immutable SHA values should be used for `gutenberg.sha` in commits to this repository.

This commit also adds the related JavaScript files to the TypeScript configuration file.

Props westonruter, jorbin, manhar.
Fixes #65224.
Built from https://develop.svn.wordpress.org/trunk@62422


git-svn-id: http://core.svn.wordpress.org/trunk@61703 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-27 18:20:41 +00:00
Sergey Biryukov 9f3d2c4e7a Docs: Correct swapped variable names and comments in get_weekstartend().
The variables `$mm` and `$md` had their `substr()` positions and inline comments swapped — `$mm` was extracting the day digits (position 8) while `$md` was extracting the month digits (position 5), contrary to what the comments indicated.

The output was accidentally correct because the two mistakes cancelled each other out in the `mktime()` call, but the misleading naming posed a future maintenance risk.

This commit corrects the `substr()` positions and `mktime()` argument order so that variable names, comments, and logic are all consistent.

Follow-up to [8598], [28918].

Props saratheonline, westonruter.
Fixes #65046.
Built from https://develop.svn.wordpress.org/trunk@62421


git-svn-id: http://core.svn.wordpress.org/trunk@61702 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-26 15:10:45 +00:00
gziolo 68332d64fa Abilities API: Add filtering support to wp_get_abilities()
Extends `wp_get_abilities()` with an optional `$args` array, giving callers a shared primitive for filtering registered abilities by `category`, `namespace`, or `meta`. Two callback slots — `item_include_callback` (per ability) and `result_callback` (on the full matched array) — round out the caller-scoped pipeline.

Two new filters, `wp_get_abilities_item_include` and `wp_get_abilities_result`, expose ecosystem-scoped extension points so plugins can participate in ability resolution without monkey-patching call sites. This replaces the ad-hoc `array_filter` passes that consumers (the REST list controller, the MCP adapter, WooCommerce) had each implemented independently.

The REST list controller now delegates to the new primitive instead of running its own post-retrieval filtering, and gains a `namespace` query parameter alongside the existing `category` filter.

Called without arguments, `wp_get_abilities()` behaves exactly as before — no backward compatibility break.

Props sheldorofazeroth, gziolo.
Fixes #64990.





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


git-svn-id: http://core.svn.wordpress.org/trunk@61701 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-26 09:30:39 +00:00
gziolo fa893f1320 Abilities API: Expand core/get-user-info with profile fields
Extends the `core/get-user-info` ability with additional profile fields (`first_name`, `last_name`, `nickname`, `description`, `user_url`) and a new optional `fields` input parameter that lets callers limit the response to a specific subset.

The output schema now documents each property with a `title` and `description`, mirroring the user profile form labels where they apply and aligning the descriptions with the WP REST API user schema voice.

Also ensures `roles` is encoded as a JSON array regardless of the underlying PHP array keys.


Props sukhendu2002, apermo, gziolo.
Fixes #65234.



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


git-svn-id: http://core.svn.wordpress.org/trunk@61700 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-26 08:59:37 +00:00
gziolo 2c2a769281 Abilities API: Add wp_ability_invoked action
Introduces a new `wp_ability_invoked` action that fires at the start of `WP_Ability::execute()`, before input normalization, validation, or permission checks. This gives observers a reliable entry point for every invocation regardless of outcome (short-circuit, validation failure, permission denial, or successful execution).

Also extends the existing `wp_before_execute_ability` and `wp_after_execute_ability` actions with a new `$ability` parameter exposing the `WP_Ability` instance.

Follow-up for #64989.

Props sukhendu2002, peterwilsoncc, gziolo.
Fixes #65248.




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


git-svn-id: http://core.svn.wordpress.org/trunk@61699 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-26 08:15:43 +00:00
ramonopoly 0484004a0b Disable pings/trackbacks for local, development, and staging environments
When WP_ENVIRONMENT_TYPE is not `production`, disable pingbacks and trackbacks.  

Otherwise, when `WP_ENVIRONMENT_TYPE` is `local`, `development`, or `staging`, pingbacks and trackbacks are sent when posts are published. This creates confusion on the receiving end and is unnecessary for testing workflows.  

Props arcangelini, cagrimmett, ramonopoly, tyxla, khushipatel15.  

Fixes #64837.


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


git-svn-id: http://core.svn.wordpress.org/trunk@61698 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-26 00:18:45 +00:00
Sergey Biryukov e138887f3a Docs: Remove extra $args in WP_Ability_Category::prepare_properties().
Follow-up to [61032].

Props thriveteam, westonruter.
Fixes #65109.
Built from https://develop.svn.wordpress.org/trunk@62416


git-svn-id: http://core.svn.wordpress.org/trunk@61697 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-25 21:36:37 +00:00
ramonopoly 4ce91528f0 WP_Theme_JSON: Prevent implicit coercion in to_ruleset
`to_ruleset` used string concatenation (`$element['name'] . ': ' . $element['value'] . ';'`), so PHP implicitly coerced non-string values (e.g. booleans → `'1'`/`''`, arrays → `'Array'`). That could emit invalid or misleading CSS.  

At the same time, pass a `style` theme.json path in `test_get_styles_with_appearance_tools()` to simulate a style node. Before it was `settings`.  

Props ramonopoly, andrewserong, isabel_brison.  

Fixes #64848.

 --This line, and those below, will be ignored--

M    src/wp-includes/class-wp-theme-json.php
M    tests/phpunit/tests/theme/wpThemeJson.php

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


git-svn-id: http://core.svn.wordpress.org/trunk@61696 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-25 01:19:43 +00:00
Sergey Biryukov 192f987ac6 Pings/Trackbacks: Escape the XML error message in trackback_response().
Props maheshpatel, pbiron, sabernhardt, westonruter, SergeyBiryukov.
Fixes #65047.
Built from https://develop.svn.wordpress.org/trunk@62414


git-svn-id: http://core.svn.wordpress.org/trunk@61695 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-24 21:46:43 +00:00
Sergey Biryukov 9c43743d53 Role/Capability: Add is_user_member_of_blog filter.
This aims to make it easier to dynamically grant or revoke a user access to the site without giving them a role directly.

Follow-up to [https://mu.trac.wordpress.org/changeset/804 mu:804], [19016].

Props dd32, mukesh27.
Fixes #65096.
Built from https://develop.svn.wordpress.org/trunk@62413


git-svn-id: http://core.svn.wordpress.org/trunk@61694 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-23 18:17:42 +00:00
Sergey Biryukov 038ebfd64b Administration: Change code tags to regular text for dimensions in “Site Icon” help text.
Follow-up to [57713], [58927].

Props juanfra, sabernhardt, niravsherasiya7707, manhar, mukesh27, vgnavada, wpdevsxyz, kevinrobles, SergeyBiryukov.
Fixes #64792.
Built from https://develop.svn.wordpress.org/trunk@62412


git-svn-id: http://core.svn.wordpress.org/trunk@61693 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-22 23:41:42 +00:00
John Blackbourn f9aadfa7fa Build/Test Tools: Switch from Puppeteer to Playwright for the QUnit test runner.
This brings the QUnit tests inline with the e2e and performance tests that switched to Playwright in #59517.

This removes the `puppeteer` dependency, but `puppeteer-core` remains a transitive dependency due to `wp-scripts` and `lighthouse`.

See #64894

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


git-svn-id: http://core.svn.wordpress.org/trunk@61692 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-22 20:23:47 +00:00
Weston Ruter 69933411cb Emoji: Use the admin_print_footer_scripts action for printing the emoji detection script in the admin.
This corrects an oversight in an optimization made to `print_emoji_detection_script()` which moved the emoji detection script to the `wp_print_footer_scripts` action. Since this action doesn't fire in the admin, no script was printed. Now in the admin, the script is printed at the `admin_print_footer_scripts` action. Existing sites that wish to omit emoji can continue to do `remove_action( 'admin_print_scripts', 'print_emoji_detection_script' )`.

Tests are added covering all four branches of `print_emoji_detection_script()`: hooking the script onto the appropriate footer action, and printing it directly when that action has already fired, in both the admin and the frontend.

Missing parameter and return types are added to the `get_echo()` test helper.

Developed in https://github.com/WordPress/wordpress-develop/pull/11931.
Follow-up to r60902.

Props westonruter, jonsurrell.
See #64076, #65260.
Fixes #65310.

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


git-svn-id: http://core.svn.wordpress.org/trunk@61691 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-22 19:33:33 +00:00
John Blackbourn 3d68315252 Build/Test Tools: Switch to PCOV for the coverage report runner.
PCOV is a dedicated coverage reporting tool that performs significantly faster than Xdebug in coverage mode. This reduces the time that tests with coverage enabled take to run by around 50%.

This also removes the HTML report generation which was producing unusable artifacts in excess of 7 GB in size.

Props johnbillion, desrosj, swissspidy

See #64893

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


git-svn-id: http://core.svn.wordpress.org/trunk@61690 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-22 08:53:43 +00:00
Weston Ruter c59080381e Plugins: Improve hook performance by using spl_object_id() instead of spl_object_hash() to construct unique IDs.
* Also use `spl_object_id()` similarly when registering and unregistering classic widgets.
* Improve typing and phpdoc in `_wp_filter_build_unique_id()`. Return `null` for malformed callbacks.
* Add tests for `_wp_filter_build_unique_id()`.
* Improve type safety of `WP_Hook::add_filter()` in case an invalid callback is provided for parity with `::has_filter()` and `::remove_filter()`.

Developed in https://github.com/WordPress/wordpress-develop/pull/11865
Follow-up to r46220, r46801, r60179.

Props bor0, westonruter, SergeyBiryukov, schlessera, arshidkv12, knutsp, spacedmonkey, swissspidy.
See #64898.
Fixes #58291.

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


git-svn-id: http://core.svn.wordpress.org/trunk@61689 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-22 07:00:45 +00:00
desrosj a211709722 Build/Test Tools: Add MySQL 9.7 to relevenat test matrices.
This adds `9.7` (released on April 21, 2026) to the relevant testing strategies and makes it the default version in the local Docker environment.

MySQL 9.7 is also an LTS release.

Props chrisdavidmiles.
See #64894.
Built from https://develop.svn.wordpress.org/trunk@62407


git-svn-id: http://core.svn.wordpress.org/trunk@61688 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-22 04:21:43 +00:00
desrosj 790676563f Build/Test Tools: Change how BASE_TAG version is downlaoded.
Recent attempts to change the `BASE_TAG` version in the Performance Testing workflows  in [60324] and [62402] have failed due to memory exhaustion errors when trying to download the version using WP-CLI in the local Docker environment.

While the. performance tests are run within the Docker environment, there’s no hard requirement for the `wp core download` command to happen through the `wordpressdevelop/cli` conatiner. This adjusts the workflow to perform the failing WP-CLI call within the GitHub Action runner and outside of Docker to avoid the memory exhaustion issue.

Props westonruter, swissspidy.
Fixes #65289.
Built from https://develop.svn.wordpress.org/trunk@62406


git-svn-id: http://core.svn.wordpress.org/trunk@61687 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-21 23:32:38 +00:00
Sergey Biryukov 935b6d5898 Tests: Get rid of extra remove_filter()/remove_action() calls in Abilities API tests.
These are redundant: `WP_UnitTestCase_Base::tear_down()` runs `::_restore_hooks()`, which restores `$wp_filter`/`$wp_actions` to a pre-test baseline, so hooks added during a test are removed automatically.

Follow-up to [61032].

Props mohamedahamed, gziolo, westonruter, SergeyBiryukov.
Fixes #65301.
Built from https://develop.svn.wordpress.org/trunk@62405


git-svn-id: http://core.svn.wordpress.org/trunk@61686 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-21 23:21:42 +00:00
desrosj e3db179058 Build/Test Tools: Update third-party GitHub Actions.
This updates the following GitHub Actions to their latest versions:

- `actions/upload-artifact` from `7.0.0` to ` 7.0.1`
- `shivammathur/setup-php` from `2.37.0` to ` 2.37.1`
- `actions/setup-node` from `6.3.0` to ` 6.4.0`
- `actions/cache` from `5.0.4` to ` 5.0.5`
- `github/codeql-action` from `4.33.0` to ` 4.35.4`
- `slackapi/slack-github-action` from `3.0.1` to ` 3.0.3`

See #64893.
Built from https://develop.svn.wordpress.org/trunk@62404


git-svn-id: http://core.svn.wordpress.org/trunk@61685 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-21 16:50:44 +00:00
John Blackbourn 8741c37312 Build/Test Tools: Improve the "Commit Built File Changes" workflow.
Developed in https://github.com/WordPress/wordpress-develop/pull/11808

Props desrosj, johnbillion

See #64893

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


git-svn-id: http://core.svn.wordpress.org/trunk@61684 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-21 16:24:42 +00:00
desrosj 41e863cd55 Build/Test Tools: Bump baseline version for performance testing.
This ensures that the the performance testing workflow is providing meaningful data to track performance regressions and improvements.

Props mukesh27.
Fixes #65289.
Built from https://develop.svn.wordpress.org/trunk@62402


git-svn-id: http://core.svn.wordpress.org/trunk@61683 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-21 13:34:42 +00:00
gziolo ffa39fdccd Abilities API: Stop HTML-escaping the ability name in WP_Error messages
Ability names are pattern-validated at registration, so `esc_html()` on them is always a no-op. Drop it from the `WP_Error` messages, which are commonly serialized to JSON where the escaping would be incorrect.

Follow-up to [62398].
See #64311.


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


git-svn-id: http://core.svn.wordpress.org/trunk@61682 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-21 10:28:39 +00:00
wildworks 285d71b5c0 Admin Reskin: Fix mobile list table control heights.
On the mobile admin viewport, interactive elements on list table pages had inconsistent heights. Give them a consistent height.

Follow-up to [61645].

Props andrewssanya, sainathpoojary, wildworks.
See #64999.
Built from https://develop.svn.wordpress.org/trunk@62400


git-svn-id: http://core.svn.wordpress.org/trunk@61681 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-21 10:21:36 +00:00
gziolo 76233303e7 EST API: Preserve custom status for ability validation errors
he REST run controller for the Abilities API already preserves a custom
HTTP status returned by `wp_ability_normalize_input` filter errors. Apply
the same behavior to validation errors from `wp_ability_validate_input`:
a `WP_Error` is only defaulted to a 400 status when it does not already
include one.

The shared defaulting logic is extracted into a new private
`ensure_error_status()` helper and reused for both normalization and
validation errors.

Follow-up to [62398].
See #64311.


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


git-svn-id: http://core.svn.wordpress.org/trunk@61680 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-21 10:19:41 +00:00
gziolo 766edbe807 Abilities API: Add filters for input and output validation
Introduce the `wp_ability_validate_input` and `wp_ability_validate_output` filters so developers can layer custom validation on top of the default JSON
Schema checks, either augmenting an existing WP_Error or rejecting otherwise valid data.

Props priethor, gziolo, westonruter, enej.
Fixes #64311.


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


git-svn-id: http://core.svn.wordpress.org/trunk@61679 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-21 08:32:42 +00:00
gziolo 8e76f7215a Abilities API: Add execution lifecycle filters to WP_Ability methods
Introduce four filters that give plugins hook points across the ability execution lifecycle, complementing the existing observation-only actions
(`wp_before_execute_ability`, `wp_after_execute_ability`):

- `wp_pre_execute_ability`: short-circuits `execute()` when it returns a value other than the supplied default.
- `wp_ability_normalize_input`: transforms input inside `normalize_input()`, and returning `WP_Error` halts execution.
- `wp_ability_permission_result`: overrides the `permission_callback` result inside `check_permissions()`, consistently for `execute()` and direct callers.
- `wp_ability_execute_result`: transforms the result inside `do_execute()` before output validation, and can recover from execute callback failures.

The input and result filters fire before their respective schema validation steps, so `validate_input()` and `validate_output()` remain the final integrity gates. Only `wp_pre_execute_ability` can bypass validation, with the caller owning the returned value's shape.

Add `WP_Filter_Sentinel`, a reusable marker class loaded alongside `WP_Hook`, whose per-instance identity lets a filter default be distinguished from any
user value — including `null`, `false`, or arbitrary objects — via `===`.

Update `WP_REST_Abilities_V1_Run_Controller::check_ability_permissions()` to propagate `WP_Error` results from `normalize_input()` directly, defaulting to
status 400 while preserving filter-set statuses (e.g. 422, 429).

Props gziolo, westonruter, migueluy.
Fixes #64989.


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


git-svn-id: http://core.svn.wordpress.org/trunk@61678 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-21 07:57:42 +00:00
gziolo 34361a2546 Abilities: Return the site locale for the core/get-site-info language field
The `core/get-site-info` ability resolved the `language` field via `get_bloginfo( 'language' )`, which runs through `determine_locale()` and can return the current user's locale in the admin context. As a site-level ability, the `language` field should consistently represent the site locale. Use `get_locale()` (with `_` normalized to `-`) instead so the value reflects the site locale regardless of the requesting user.

Props iamadisingh, afercia, audrasjb, yusufmudagal, r1k0, gziolo.
Fixes #64977.



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


git-svn-id: http://core.svn.wordpress.org/trunk@61677 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-21 06:53:44 +00:00
desrosj 9e3b052a6e Security: Update composer/ca-bundle to version 1.5.12.
This removes 24 certificates from the bundle.

See #64969.
Built from https://develop.svn.wordpress.org/trunk@62393


git-svn-id: http://core.svn.wordpress.org/trunk@61674 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-21 03:44:43 +00:00
Aaron Jorbin 210f735145 Build/Test Tools: Test 7.0 in upgrade testing workflows.
This sets 7.0 as the most recent branch of WordPress in the upgrade testing workflows.

See #64893, #64966.



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


git-svn-id: http://core.svn.wordpress.org/trunk@61673 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-20 19:59:43 +00:00
Sergey Biryukov 54ba28eb13 Tests: Add unit tests for wp_make_theme_file_tree().
Follow-up to [41851].

Props pbearne.
Fixes #65175.
Built from https://develop.svn.wordpress.org/trunk@62388


git-svn-id: http://core.svn.wordpress.org/trunk@61669 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-19 21:51:43 +00:00
ellatrix 63cb1b75a9 Upgrade/Install: Add missing path to the $_old_files array for 7.0.
See #65273.
Built from https://develop.svn.wordpress.org/trunk@62384


git-svn-id: http://core.svn.wordpress.org/trunk@61665 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-19 17:10:43 +00:00
ellatrix 6f24501b34 Upgrade/Install: Update the $_old_files array for 7.0.
Props desrosj, ellatrix.
Fixes #65273.
Built from https://develop.svn.wordpress.org/trunk@62383


git-svn-id: http://core.svn.wordpress.org/trunk@61664 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-19 16:28:43 +00:00
ellatrix ba5188ade6 Editor: Bump pinned hash for the Gutenberg repository.
This updates the pinned hash from the `gutenberg` from `3a4e8d1418d25da83b70158bcaabf65580690b6b ` to `a2a354cf35e5b69c3330d6c1cfd42d8dc2efb9fd`.

The following changes are included:

- Bump the github-actions group across 1 directory with 5 updates (https://github.com/WordPress/gutenberg/pull/76530) (https://github.com/WordPress/gutenberg/pull/78298)
- Improve GHCR asset publishing and expand trigger events to include `pull_request` (https://github.com/WordPress/gutenberg/pull/78211) (https://github.com/WordPress/gutenberg/pull/78324)
- I18N: Polyfill script module translations for WordPress < 7.0 (https://github.com/WordPress/gutenberg/pull/77214)
- Fonts: Move admin menu compat from experimental to wordpress-7.0 (https://github.com/WordPress/gutenberg/pull/78227) (https://github.com/WordPress/gutenberg/pull/78370)
- Connectors: Consolidate WP 7.0 compat loading and move from experimental (https://github.com/WordPress/gutenberg/pull/78228) (https://github.com/WordPress/gutenberg/pull/78371)
- RTC: Make sync/collaboration APIs private (https://github.com/WordPress/gutenberg/pull/78267)
- Interactivity API: Fix popover bind hydration (https://github.com/WordPress/gutenberg/pull/77797)
- Script Loader: Defer single-page admin init until DOMContentLoaded (Trac https://github.com/WordPress/gutenberg/pull/65103) (https://github.com/WordPress/gutenberg/pull/78136)

A full list of changes can be found on GitHub: https://github.com/WordPress/gutenberg/compare/3a4e8d1418d25da83b70158bcaabf65580690b6b…a2a354cf35e5b69c3330d6c1cfd42d8dc2efb9fd.

Log created with:

git log --reverse --format="- %s" 3a4e8d1418d25da83b70158bcaabf65580690b6b..a2a354cf35e5b69c3330d6c1cfd42d8dc2efb9fd | sed 's|#\([0-9][0-9]*\)|https://github.com/WordPress/gutenberg/pull/\1|g; /github\.com\/WordPress\/gutenberg\/pull/!d' | pbcopy

See #64595.
Built from https://develop.svn.wordpress.org/trunk@62380


git-svn-id: http://core.svn.wordpress.org/trunk@61661 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-19 13:34:37 +00:00
audrasjb 63babe9651 Editor: Remove an unwanted negative margin in Classic Editor metaboxes CSS styles.
This changeset reverts a negative `-4px` margin on `#poststuff #post-body` introduced in [61646].

Follow-up to [61646], [61759], [62284].

Props TobiasBg, umeshnevase, audrasjb, jadavsanjay, khokansardar, darshitrajyaguru97, gaurangsondagar.
Fixes #65141.


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


git-svn-id: http://core.svn.wordpress.org/trunk@61658 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-19 11:24:45 +00:00
desrosj 3b8a888193 External Libraries: Update lodash to version 4.18.1.
This updates Lodash to the latest version, `14.18.1`.

A full list of changes can be found on GitHub: https://github.com/lodash/lodash/compare/4.17.23...4.18.1.

Props johnbillion.
Fixes #65264.
Built from https://develop.svn.wordpress.org/trunk@62372


git-svn-id: http://core.svn.wordpress.org/trunk@61653 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-19 02:45:50 +00:00
Sergey Biryukov 12fd459758 Tests: Add unit tests for wp_admin_canonical_url().
Follow-up to [31736].

Props pbearne.
Fixes #65192.
Built from https://develop.svn.wordpress.org/trunk@62371


git-svn-id: http://core.svn.wordpress.org/trunk@61652 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-18 22:37:42 +00:00
Sergey Biryukov e8303bd415 Tests: Correct some test class names.
Follow-up to [62313], [62352], [62366].

See #64894.
Built from https://develop.svn.wordpress.org/trunk@62370


git-svn-id: http://core.svn.wordpress.org/trunk@61651 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-17 22:52:30 +00:00
Sergey Biryukov abfd56cc64 Tests: Add unit tests for wp_doc_link_parse().
Follow-up to [10607].

Props pbearne.
Fixes #65182.
Built from https://develop.svn.wordpress.org/trunk@62369


git-svn-id: http://core.svn.wordpress.org/trunk@61650 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-16 23:46:42 +00:00
Weston Ruter fe7b727fe4 Script Loader: Warn when classic scripts with module dependencies lack footer/defer.
A classic script with `module_dependencies` may be evaluated before the script modules import map is printed if it loads blocking in the document head, causing a "Failed to resolve module specifier" error on dynamic imports.

* Trigger `_doing_it_wrong()` from `_wp_scripts_add_args_data()` when a classic script provides `module_dependencies` without setting `in_footer` to `true` or using a `defer` loading `strategy`, and document this requirement in the `wp_register_script()` and `wp_enqueue_script()` docblocks.
* Remove the `module_dependencies` arg from the `wp-codemirror` script registration in favor of passing the espree module URL directly through `wp_get_code_editor_settings()`. This avoids registering `espree` as a publicly-available script module when it is only ever used internally as a private implementation detail of the code editor.
* Add a `console.warn()` in `wp.codeEditor.initialize()` when invoked before `DOMContentLoaded`, so developers are alerted if the function is called too early for the import map to have been parsed.
* Add PHPStan types which were missing when `module_dependencies` were initially introduced.
* Harden `WP_Scripts::add_data()` against non-string `strategy` values being passed to `sprintf()`.

Developed in https://github.com/WordPress/wordpress-develop/pull/11788

Follow-up to r61587.

Props khokansardar, westonruter, jonsurrell, jorbin.
See #61500, #64238.
Fixes #65165.

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


git-svn-id: http://core.svn.wordpress.org/trunk@61649 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-16 05:05:28 +00:00
Sergey Biryukov 0b5b981e55 Tests: Add unit tests for wp_page_reload_on_back_button_js().
Follow-up to [37619].

Props pbearne.
Fixes #65193.
Built from https://develop.svn.wordpress.org/trunk@62367


git-svn-id: http://core.svn.wordpress.org/trunk@61648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-15 23:48:41 +00:00
Sergey Biryukov 28e6ee4cc7 Tests: Add unit tests for wp_admin_viewport_meta().
Follow-up to [48412].

Props pbearne.
Fixes #65187.
Built from https://develop.svn.wordpress.org/trunk@62366


git-svn-id: http://core.svn.wordpress.org/trunk@61647 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-14 21:54:43 +00:00
ryelle adddca92e3 Help/About: Update the About page for 7.0.
Introducing the new content for the 7.0 About page.

Fixes #64536.
Props mukesh27, audrasjb, jorbin, ankit-k-gupta, parinpanjari, fcoveram, joen, markoserb, Benjamin_Zekavica, westonruter, peterwilsoncc, JeffPaul.


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


git-svn-id: http://core.svn.wordpress.org/trunk@61643 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-14 14:34:41 +00:00
desrosj 087d11b1a4 Editor: Bump pinned hash for the Gutenberg repository.
This updates the pinned hash from the `gutenberg` from `c15cef1d6b07f666df28dac0383bafb0edfe0914 ` to `3a4e8d1418d25da83b70158bcaabf65580690b6b`.

The following changes are included:

- [WP.7.0] Admin UI: Backport accessibility fixes (https://github.com/WordPress/gutenberg/pull/77617, https://github.com/WordPress/gutenberg/pull/78001) (https://github.com/WordPress/gutenberg/pull/78002)
- Fix: Shortcode block does not render in Navigation Overlay (https://github.com/WordPress/gutenberg/pull/77511)
- feat: Enhance Connectors page on read-only file system (https://github.com/WordPress/gutenberg/pull/77521)
- Connectors: Avoid using centered text (https://github.com/WordPress/gutenberg/pull/78125)
- Revisions: Add tooltip to diff marker buttons  (https://github.com/WordPress/gutenberg/pull/77690)
- Add backport for WP_ALLOW_COLLABORATION (https://github.com/WordPress/gutenberg/pull/78160)
- Add aria-label to Revisions button in Post Summary sidebar (https://github.com/WordPress/gutenberg/pull/78140)
- Revisions diff markers: enforce 24×24px minimum target size (WCAG 2.5.8) (https://github.com/WordPress/gutenberg/pull/77671)
- Connectors: Replace @wordpress/ui Link and Notice usage (https://github.com/WordPress/gutenberg/pull/78117)
- Connectors: Increase right padding of callout for mobile layout (https://github.com/WordPress/gutenberg/pull/78126)
- isFulfilled: don't change resolution state, call in resolveSelect (https://github.com/WordPress/gutenberg/pull/78201)
- Connectors: Restyle AI plugin callout with pastel background and beaker decoration (https://github.com/WordPress/gutenberg/pull/78243)
- Block supports: Optimize custom CSS class rendering and parsing (https://github.com/WordPress/gutenberg/pull/78217)
- Block Inspector: Hide Styles tab in preview mode (https://github.com/WordPress/gutenberg/pull/78230)
- Navigation Link: Preserve custom labels during link updates (https://github.com/WordPress/gutenberg/pull/77186)
- Editor: Fix Visual Revisions meta keys overlap (https://github.com/WordPress/gutenberg/pull/78156)
- Editor: Disable Visual Revisions when classic meta boxes are present (https://github.com/WordPress/gutenberg/pull/78249) (https://github.com/WordPress/gutenberg/pull/78286)
- Revisions: Scale diff markers width with user text-size preference (https://github.com/WordPress/gutenberg/pull/78273)

A full list of changes can be found on GitHub: https://github.com/WordPress/gutenberg/compare/c15cef1d6b07f666df28dac0383bafb0edfe0914…3a4e8d1418d25da83b70158bcaabf65580690b6b.

Log created with:

`git log --reverse --format="- %s" c15cef1d6b07f666df28dac0383bafb0edfe0914..3a4e8d1418d25da83b70158bcaabf65580690b6b | sed 's|#\([0-9][0-9]*\)|https://github.com/WordPress/gutenberg/pull/\1|g; /github\.com\/WordPress\/gutenberg\/pull/!d' | pbcopy`

Reviewed by desrosj.
Merges [62360] to `trunk`.

See #64595.
Built from https://develop.svn.wordpress.org/trunk@62361


git-svn-id: http://core.svn.wordpress.org/trunk@61642 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-14 13:49:47 +00:00
Weston Ruter 3861015995 Block Supports: Improve performance and hardening of block-level custom CSS rendering.
Short-circuits the custom CSS support filter before the more expensive lookups so blocks without custom CSS return faster.

Replaces the regex class name parsing in `wp_render_custom_css_class_name()` with a cheap `str_contains()` guard followed by an HTML spec-compliant `strtok()` walk over the className tokens. This avoids the regex engine for the common case where no `wp-custom-css-` class is present, and correctly handles tab/form-feed/CR/LF separators as well as classes such as `my-wp-custom-css-*` that merely contain the prefix as a substring after a hyphen.

Also hardens both functions against malformed parsed blocks (non-string `className`, missing keys), tightens `@phpstan-param` array shapes, and corrects the `block_has_support()` `@param` to allow `WP_Block_Type|null`. Lastly, a `@return Generator<int, non-empty-string>` phpdoc tag is added to `WP_HTML_Tag_Processor::class_list()`.

Developed in https://github.com/WordPress/wordpress-develop/pull/11686 and https://github.com/WordPress/gutenberg/pull/78217

Follow-up to r61678.

Props mukesh27, westonruter, ramonopoly, jonsurrell.
See #64544, #64238.

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


git-svn-id: http://core.svn.wordpress.org/trunk@61640 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-13 19:30:47 +00:00