Commit Graph

52194 Commits

Author SHA1 Message Date
gziolo
90d7aada35 AI: Sync Ability_Function_Resolver API enhancement to harden security
Make `WP_AI_Client_Ability_Function_Resolver` non-static and require specifying the allowed abilities list in the constructor. This hardens security by ensuring that only explicitly specified abilities can be executed, preventing potential vulnerabilities such as prompt injection from triggering arbitrary abilities.

The constructor accepts either `WP_Ability` objects or ability name strings. If an ability is not in the allowed list, an error response with code `ability_not_allowed` is returned.

Developed in https://github.com/WordPress/wordpress-develop/pull/11103.
Upstream: https://github.com/WordPress/wp-ai-client/pull/61.

Props felixarntz, gziolo, JasonTheAdams, dkotter, johnbillion.
Fixes #64769.



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


git-svn-id: http://core.svn.wordpress.org/trunk@61101 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-03-03 14:01:43 +00:00
Adam Silverstein
ec46a05c78 General: VIPS library omit un-minimized and .map files.
Omit these files which offer little value since the VIPS library is primarily inlined WASM. Saves ~30MB total from the build output.

Props swissspidy, westonruter, adamsilverstein, berislav.grgicak, knutsp.
Fixes: #64734.


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


git-svn-id: http://core.svn.wordpress.org/trunk@61100 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-03-03 13:46:42 +00:00
jonsurrell
7ae743a4d9 HTML API: Exclude internal classes and methods from documentation.
Add `@ignore` annotations to internal HTML API methods and classes to exclude them from generated documentation. The HTML API relies heavily on internal methods and classes and they create a lot of noise in documentation.

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

Props jonsurrell, westonruter.
See #64224.

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


git-svn-id: http://core.svn.wordpress.org/trunk@61099 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-03-03 13:11:46 +00:00
jonsurrell
28b9161f17 HTML API: Remove incorrect "stub implementation" since annotations.
Developed in https://github.com/WordPress/wordpress-develop/pull/11076.

Props jonsurrell, westonruter.
See #64224.

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


git-svn-id: http://core.svn.wordpress.org/trunk@61098 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-03-03 12:37:47 +00:00
jonsurrell
dc0654a64c Script Loader: Document deprecated html5 script and style theme support.
Add a `@since` annotation to `add_theme_support()` to deprecate `html5` feature's `script` and `style` arguments.

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

Follow-up to [61415].

Props jonsurrell, westonruter.
Fixes #64442.

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


git-svn-id: http://core.svn.wordpress.org/trunk@61097 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-03-03 12:26:46 +00:00
Weston Ruter
892fcc25be Coding Standards: Apply changes from running composer format.
Developed in https://github.com/WordPress/wordpress-develop/pull/11111

Follow-up to r61745, r61703, r33268.

Props soean.
See #64226.

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


git-svn-id: http://core.svn.wordpress.org/trunk@61096 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-03-03 07:18:43 +00:00
Weston Ruter
59e1bba290 Code Quality: Normalize object as type being supplied as comment, post, site, term, and user.
When constructing these objects, the specific instance type is redundantly used in a union with a generic `object`. A generic object can be passed directly from database row result. This also hardens `get_post()` to account for passing an object that lacks an `ID` property. Similarly, `sanitize_term()` is hardened to account for an object lacking a `term_id` property. Comprehensive unit tests are added for `get_post()` and `sanitize_term()`.

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

Props westonruter, apermo.
See #64238, #64225.

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


git-svn-id: http://core.svn.wordpress.org/trunk@61095 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-03-03 05:54:45 +00:00
Peter Wilson
6a8831a74e Real-time collaboration: Slash meta key/values for updates and deletes.
Slashes the meta key and meta values when adding or deleting meta data in the `WP_Sync_Post_Meta_Storage` class for real time collaboration.

Props peterwilsoncc, westonruter.
Fixes #64783.

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


git-svn-id: http://core.svn.wordpress.org/trunk@61094 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-03-03 04:22:43 +00:00
Felix Arntz
86c7cd47c7 AI: Catch exceptions in WP_AI_Client_Prompt_Builder::__construct().
Exceptions were already caught and transformed into `WP_Error` objects in all instance methods of `WP_AI_Client_Prompt_Builder`, but not in the constructor. This meant that if an exception was thrown during construction, it would not be caught and would cause a fatal error instead of returning a `WP_Error` object.

Props gziolo.
See #64591.

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


git-svn-id: http://core.svn.wordpress.org/trunk@61093 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-03-03 02:58:44 +00:00
Felix Arntz
d77b57a227 AI: Remove unnecessary PHP AI Client polyfills file.
These functions, which are needed for the package, are already polyfilled by WordPress Core. They were never loaded by the custom autoloader in Core anyway, so they are dead code that is safe to remove.

Props gziolo.
See #64591.

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


git-svn-id: http://core.svn.wordpress.org/trunk@61092 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-03-03 02:36:45 +00:00
joedolson
f24f5f8711 Admin: Reskin - fix empty dashboard widget alignment.
Fix alignment of the empty dashboard widget placeholders to match the alignment of populated dashboard widget regions.

Props fabiankaegy, shailu25, r1k0, noruzzaman, mirmpro, tusharaddweb, joedolson.
Fixes #64743.
Built from https://develop.svn.wordpress.org/trunk@61785


git-svn-id: http://core.svn.wordpress.org/trunk@61091 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-03-02 23:59:45 +00:00
joedolson
57d8ba3332 Admin: Reskin - update dismiss icons sizing.
Update the sizing of icons in the welcome panel, bulk edit, quick edit, and admin notifications to use relative sizing, fixing alignment issues.

Update focus state for bulk edit remove buttons.

Props mohitbsf, opurockey, sabernhardt, huzaifaalmesbah, madhavishah01, r1k0, ozgursar, noruzzaman, shailu25, joedolson, mukesh27.
Fixes #64684.
Built from https://develop.svn.wordpress.org/trunk@61784


git-svn-id: http://core.svn.wordpress.org/trunk@61090 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-03-02 19:52:21 +00:00
Weston Ruter
19a7a980ef General: Update wp.sanitize.stripTags() to return empty string when not passed a string.
Developed in https://github.com/WordPress/wordpress-develop/pull/10994

Follow-up to r61585, r61578.

Props westonruter, jonsurrell, dmsnell, hugod.
See #64574, #64274.

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


git-svn-id: http://core.svn.wordpress.org/trunk@61089 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-03-02 19:51:43 +00:00
audrasjb
536d107250 Customize: Make the "View All Locations" link consistent with the new admin styles.
This changeset ensures the "View All Locations" link in the Customizer is consistent with the new admin styles.

Props huzaifaalmesbah, hmbashar, noruzzaman, audrasjb, mukesh27, shailu25.
Fixes #64758.


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


git-svn-id: http://core.svn.wordpress.org/trunk@61088 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-03-02 14:09:45 +00:00
Sergey Biryukov
5f913088f4 Code Modernization: Use str_starts_with() in WP_Duotone class methods.
This aims to make the code more readable and consistent, as the function is already used extensively in core files.

WordPress core includes a polyfill for `str_starts_with()` on PHP < 8.0 as of WordPress 5.9.

Follow-up to [55703], [58313].

Props Soean, mukesh27.
Fixes #64773.
Built from https://develop.svn.wordpress.org/trunk@61781


git-svn-id: http://core.svn.wordpress.org/trunk@61087 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-03-02 09:11:52 +00:00
joedolson
abdf1dfea1 Admin: Reskin - update active plugin colors.
Update the background and border colors to new admin color scheme on active plugin highlighting.

Props fabiankaegy, r1k0, shailu25, noruzzaman, rahultank, joedolson.
Fixes #64745.
Built from https://develop.svn.wordpress.org/trunk@61780


git-svn-id: http://core.svn.wordpress.org/trunk@61086 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-03-02 00:35:44 +00:00
joedolson
22b8dc66bc Admin: Update focus state on color picker.
Fix the focus color on the Iris color picker slider and color base selectors to the new admin color scheme.

Props shailu25, hmbashar, huzaifaalmesbah, noruzzaman, rahultank, joedolson.
Fixes #64754.
Built from https://develop.svn.wordpress.org/trunk@61779


git-svn-id: http://core.svn.wordpress.org/trunk@61085 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-03-02 00:15:48 +00:00
Sergey Biryukov
f3ed2d5b09 Docs: Correct @see tag syntax for @param descriptions in the Recovery Mode services.
Follow-up to [44973], [45211].

Props marian1, shailu25, westonruter, apermo.
Fixes #64765.
Built from https://develop.svn.wordpress.org/trunk@61778


git-svn-id: http://core.svn.wordpress.org/trunk@61084 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-03-01 23:04:45 +00:00
Felix Arntz
d54af3bae9 AI: Remove unused use statements in tests.
Follow up to [61700].

Props soean.
See #64591.

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


git-svn-id: http://core.svn.wordpress.org/trunk@61083 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-03-01 21:41:44 +00:00
Felix Arntz
0fbb7bfc1c AI: Update PHP AI Client package to 1.2.1.
This package update allows registered providers to have a description, and it fixes an issue with Redis compatibility.

Props jason_the_adams, laurisaarni.
See #64591.

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


git-svn-id: http://core.svn.wordpress.org/trunk@61082 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-03-01 20:59:47 +00:00
Sergey Biryukov
76da79263d Code Quality: Remove extra leading space in the class attribute in login_header().
Follow-up to [28096].

Props opurockey.
Fixes #64673.
Built from https://develop.svn.wordpress.org/trunk@61775


git-svn-id: http://core.svn.wordpress.org/trunk@61081 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-02-28 22:57:46 +00:00
Weston Ruter
27c65a99cf Code Quality: Add @phpstan-assert-if-true to is_wp_error().
This ensures PHPStan is aware that passing a `WP_Error` instance to `is_wp_error()` will cause the function to return `true`. This reduces the total number of PHPStan errors at rule level 7 from 14,271 to 13,233 (-1,038 or -7.27%). 

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

See #64238.

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


git-svn-id: http://core.svn.wordpress.org/trunk@61080 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-02-28 19:59:46 +00:00
Weston Ruter
4bbdf78c53 REST API: Guard against passing null as $prepared_args to WP_REST_Posts_Controller::prepare_items_query().
The variable may get set to `null` by a filter or subclass.

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

Follow-up to r38832.

Props apermo, dmsnell, westonruter.
Fixes #62287.

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


git-svn-id: http://core.svn.wordpress.org/trunk@61079 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-02-28 00:42:43 +00:00
johnjamesjacoby
f178cca743 Cache API: Handle numerically-keyed global_groups when switching sites.
This commit protects against another multisite cache edge-case where a persistent object-cache drop-in plugin (namely memcached) may use a numerically-keyed `global_groups` array instead of `'key' => true` like the default object-cache class, and includes the following changes:

* Use `wp_is_numeric_array()` inside of `wp_cache_switch_to_blog_fallback()` so that the global group names array are always properly formatted regardless of the caching back-end in use
* Add private helper methods to `Tests_Multisite_WpCacheSwitchToBlogFallback` to properly format global group names, and tweak a few tests to make them more resilient to different caching back-ends

Follow up to r61760.

See #23290.
Built from https://develop.svn.wordpress.org/trunk@61772


git-svn-id: http://core.svn.wordpress.org/trunk@61078 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-02-28 00:13:45 +00:00
joedolson
b5dbbdc0f5 Quick/Bulk Edit: Fix misleading error on bulk edits.
The same error message was returned whether a user attempted bulk edit without selecting an action or attempted without selecting any posts. These two situations need different messages.

Return error messages appropriate to the actual user error.

Props Presskopp, r1k0, pratiknawkar94, joedolson.
Fixes #64659.
Built from https://develop.svn.wordpress.org/trunk@61771


git-svn-id: http://core.svn.wordpress.org/trunk@61077 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-02-27 23:57:41 +00:00
joedolson
0345ce64d2 Administration: Consistent styling for site icon setting.
In General Settings, set the `remove-site-icon` class in initial state and add border for clearer control boundaries.

Props sabernhardt, noruzzaman, madhavishah01, huzaifaalmesbah, hmbashar, shailu25, joedolson.
Fixes #64736.
Built from https://develop.svn.wordpress.org/trunk@61770


git-svn-id: http://core.svn.wordpress.org/trunk@61076 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-02-27 23:43:41 +00:00
Sergey Biryukov
c4822a7416 External Libraries: Update the Requests library to version 2.0.17.
The most notable changes are PHP 8.5 compatibility fixes in version 2.0.16. Other releases between 2.0.11 and 2.0.17 contain only certificate bundle updates, which are skipped as WordPress manages its own certificate bundle (#62812).

References:
* [https://github.com/WordPress/Requests/releases/tag/v2.0.17 Requests 2.0.17 release notes]
* [https://github.com/WordPress/Requests/releases/tag/v2.0.16 Requests 2.0.16 release notes]
* [https://github.com/WordPress/Requests/releases/tag/v2.0.15 Requests 2.0.15 release notes]
* [https://github.com/WordPress/Requests/releases/tag/v2.0.14 Requests 2.0.14 release notes]
* [https://github.com/WordPress/Requests/releases/tag/v2.0.13 Requests 2.0.13 release notes]
* [https://github.com/WordPress/Requests/releases/tag/v2.0.12 Requests 2.0.12 release notes]
* [https://github.com/WordPress/Requests/compare/v2.0.11...v2.0.17 Full list of changes from Requests 2.0.11 to 2.0.17]

Follow-up to [54997], [55629], [56554], [56835], [57086], [57876].		

Props rodrigosprimo, desrosj.
Fixes #64752.
Built from https://develop.svn.wordpress.org/trunk@61769


git-svn-id: http://core.svn.wordpress.org/trunk@61075 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-02-27 23:36:42 +00:00
Weston Ruter
d5fdee0361 Code Quality: Replace void with null in union return types in general-template.php.
Developed in https://github.com/WordPress/wordpress-develop/pull/11005

Follow-up to r61767, r61766, r61719, r61716, r53300, r32598.

Props apermo, xate, mukesh27.
See #64238.
Fixes #64700.

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


git-svn-id: http://core.svn.wordpress.org/trunk@61074 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-02-27 23:29:45 +00:00
Weston Ruter
98b788bf5d Code Quality: Replace void with null in union return types in Customizer classes.
Developed in https://github.com/WordPress/wordpress-develop/pull/11006

Follow-up to r61766, r61719, r61716.

Props apermo, xate, mukesh27.
See #64238.
Fixes #64701.

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


git-svn-id: http://core.svn.wordpress.org/trunk@61073 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-02-27 23:18:40 +00:00
Weston Ruter
6f57b82460 Code Quality: Replace void with null in union return types in link-template.php.
Developed in https://github.com/WordPress/wordpress-develop/pull/11004

Follow-up to r61719, r61716, r32598.

Props apermo, xate, westonruter, noruzzaman.
See #64694, #64238.
Fixes #64699.

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


git-svn-id: http://core.svn.wordpress.org/trunk@61072 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-02-27 23:08:38 +00:00
Weston Ruter
0ea6a88c08 REST API: Prevent fatal error when non-string value is passed in endpoints for font faces and font families.
The value is expected to be a serialized JSON string, which the validation callback validates.

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

Follow-up to r57548.

Props deepaklalwani, westonruter.
See #59166.
Fixes #64666.

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


git-svn-id: http://core.svn.wordpress.org/trunk@61071 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-02-27 22:59:39 +00:00
joedolson
56325ab718 Editor: A11y: Use a tablist pattern for taxonomy terms.
Switch the classic editor's taxonomy tabs to use the APG tablist/tabpanel structure. Add appropriate ARIA roles to tabs and panels and update JS to handle required keyboard events and selected states.

Props alh0319, mukesh27, joedolson.
Fixes #63981.
Built from https://develop.svn.wordpress.org/trunk@61764


git-svn-id: http://core.svn.wordpress.org/trunk@61070 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-02-27 22:49:42 +00:00
joedolson
aaa00322d7 Admin: A11y: Update separator colors.
Update the base color for text in row actions, dashboard widget footers, and similar contexts to meet WCAG color standards.

Props bobbingwide, joedolson.
Fixes #64313.
Built from https://develop.svn.wordpress.org/trunk@61763


git-svn-id: http://core.svn.wordpress.org/trunk@61069 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-02-27 22:19:42 +00:00
joedolson
a0b91785e2 Admin: Update admin colors on Privacy Policy screen.
Update the color used for the active privacy policy tab and focused privacy disclosure accordion title.

Props wildworks, hbhalodia, huzaifaalmesbah, noruzzaman, joedolson.
Fixes #64747.
Built from https://develop.svn.wordpress.org/trunk@61762


git-svn-id: http://core.svn.wordpress.org/trunk@61068 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-02-27 21:00:43 +00:00
joedolson
d7483f0314 Admin: Fix alignment of community events search inputs.
Following the admin reskin, community events inputs were misaligned.

Change to `flex` layout to fix alignment and improve handling for translated strings.

Props huzaifaalmesbah, hmbashar, mirmpro, shailu25, joedolson.
Fixes #64753.
Built from https://develop.svn.wordpress.org/trunk@61761


git-svn-id: http://core.svn.wordpress.org/trunk@61067 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-02-27 20:47:44 +00:00
johnjamesjacoby
02dee695d8 Cache API: Introduce fallback for when the wp_cache_switch_to_blog() function is missing.
This commit protects against an edge-case where a persistent object-cache drop-in plugin not including its own `wp_cache_switch_to_blog()` function would cause non-persistent cache groups to go missing when switching between sites, and includes the following changes:

* A new `wp_cache_switch_to_blog_fallback()` function in `ms-blogs.php` which abstracts duplicated code from `switch_to_blog()` and `restore_current_blog()` for easier unit testing
* A new `wpCacheSwitchToBlogFallback.php` file with approximately 25 new unit tests
* Conditionally declares `wp_cache_switch_to_blog()` in `cache-compat.php` only if it does not already exist, either via core's `cache.php` or a drop-in plugin

With this change, WordPress no longer needs to check if the `wp_cache_switch_to_blog()` function exists (because it always will) so those checks have been removed.

Props ethitter, jeremyfelt, johnjamesjacoby, markjaquith, nacin, ozgursar, r1k0.

Fixes #23290.
Built from https://develop.svn.wordpress.org/trunk@61760


git-svn-id: http://core.svn.wordpress.org/trunk@61066 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-02-27 19:58:43 +00:00
joedolson
7fd6f0b189 Admin: Fix alignment of dashboard widgets and welcome panel.
Adjust padding and margins of dashboard widgets to properly align with the content width, matching the Welcome Panel.

Props marc4, hbhalodia, noruzzaman, soyebsalar01, joedolson.
Fixes #64739.
Built from https://develop.svn.wordpress.org/trunk@61759


git-svn-id: http://core.svn.wordpress.org/trunk@61065 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-02-27 19:39:43 +00:00
joedolson
ac62a6cb92 Admin: Match welcome panel to other dashboard widgets.
Set the Welcome Panel to have the same border color as the other dashboard widgets following the admin reskin.

Props marc4, fabiankaegy, joedolson.
Fixes #64741.
Built from https://develop.svn.wordpress.org/trunk@61758


git-svn-id: http://core.svn.wordpress.org/trunk@61064 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-02-27 19:30:46 +00:00
joedolson
73d20acd0b Media: Make filters & image selection usable by voice control.
Add a visible label with the `aria-label` value for image selection to enable voice control users to select images. Add visible labels on filters to improve access to media filters.

Props grahamarmfield, tomauger, afercia, rianrietveld, antpb, audrasjb, SirLouen, ozgursar, poojapadamad, mukesh27, alh0319, joedolson.
Fixes #23562.
Built from https://develop.svn.wordpress.org/trunk@61757


git-svn-id: http://core.svn.wordpress.org/trunk@61063 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-02-27 19:15:49 +00:00
jonsurrell
8cd3628f37 HTML API: Increase HTML Processor bookmark limit to 10,000.
The limit was overly conservative and bookmark exhaustion may occur on realistic documents. The increased limit allows documents with much greater depth to be safely processed.

The limit is increased from 100 to 10,000.

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

Follow-up to [61755].

Props jonsurrell, dmsnell, westonruter.
See #64394.

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


git-svn-id: http://core.svn.wordpress.org/trunk@61062 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-02-27 15:18:46 +00:00
jonsurrell
72d3fb0034 HTML API: Prevent bookmark exhaustion from throwing.
When bookmark exhaustion occurs during processing, return `false` instead of throwing an `Exception`.

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

Props jonsurrell, westonruter, dmsnell.
Fixes #64394.

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


git-svn-id: http://core.svn.wordpress.org/trunk@61061 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-02-27 13:06:44 +00:00
jonsurrell
9e1e6914e7 HTML API: Preserve ::set_modifiable_text() TEXTAREA leading newlines.
HTML specifies that a single newline is ignored at the start of a `TEXTAREA`. If `::set_modifiable_text()` is called with a leading newline, ensure it is preserved in the resulting HTML.

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

Props jonsurrell, dmsnell.
See #64609.

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


git-svn-id: http://core.svn.wordpress.org/trunk@61060 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-02-27 12:56:45 +00:00
Sergey Biryukov
dded7c75e6 Code Quality: Initialize $message and $message_class in network_step1().
This prevents the variables from being undefined when the condition isn't met.

Follow-up to [56599].

Props huzaifaalmesbah, noruzzaman.
See #64238.
Built from https://develop.svn.wordpress.org/trunk@61753


git-svn-id: http://core.svn.wordpress.org/trunk@61059 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-02-26 22:57:34 +00:00
ellatrix
e361790ad4 Post WordPress 7.0 Beta 2 version bump.
Built from https://develop.svn.wordpress.org/trunk@61752


git-svn-id: http://core.svn.wordpress.org/trunk@61058 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-02-26 16:28:46 +00:00
ellatrix
f05fe878af WordPress 7.0 Beta 2.
Built from https://develop.svn.wordpress.org/trunk@61751


git-svn-id: http://core.svn.wordpress.org/trunk@61057 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-02-26 15:14:43 +00:00
ellatrix
f61911ff7a Gutenberg ref update.
CI run: https://github.com/WordPress/wordpress-develop/pull/11059.

See #64595.

---

I've included a log of the Gutenberg changes with the following command:

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

- Pattern Editing: Fix nested patterns/sections (https://github.com/WordPress/gutenberg/pull/75772)
- QuickEdit: rename status label and remove extra labels in popup (https://github.com/WordPress/gutenberg/pull/75824)
- Fix block editing modes not recomputing when isolated editor value changes (https://github.com/WordPress/gutenberg/pull/75821)
- Synced patterns: Fix block editing mode of synced pattern content when nested in an unsynced pattern (https://github.com/WordPress/gutenberg/pull/75818)
- Block Support: Fix custom CSS not saved when style schema is not defined (https://github.com/WordPress/gutenberg/pull/75797)
- Gallery: Fixes keyboard focus escaping the lightbox overlay when navigating a gallery with Tab/Shift+Tab. (https://github.com/WordPress/gutenberg/pull/75852)
- Navigation Overlay Close: Set Close as default text, rather than using a placeholder (https://github.com/WordPress/gutenberg/pull/75692)
- RTC: Fix entity save call / initial persistence. (https://github.com/WordPress/gutenberg/pull/75841)
- Real-time collaboration: Improve collaboration within the same rich text (https://github.com/WordPress/gutenberg/pull/75703)
- Client Side Media: Add device/browser capability detection (https://github.com/WordPress/gutenberg/pull/75863)
- Navigation editing: simplify edit/view buttons (https://github.com/WordPress/gutenberg/pull/75819)
- Add core/icon block to theme.json schema (https://github.com/WordPress/gutenberg/pull/75813)
- Fix error when undoing newly added pattern (https://github.com/WordPress/gutenberg/pull/75850)
- Page List Item: Replace RawHTML with dangerouslySetInnerHTML for label and title (https://github.com/WordPress/gutenberg/pull/75890)
- REST API: Make filter_wp_unique_filename() static to match core, plus avoid duplicate routes (https://github.com/WordPress/gutenberg/pull/75782)
- RichText: useAnchor: Fix TypeError in virtual element (https://github.com/WordPress/gutenberg/pull/75900)
- DataViews: Remove menu divider again. (https://github.com/WordPress/gutenberg/pull/75908)
- Theme: Add build plugins to inject design token fallbacks (https://github.com/WordPress/gutenberg/pull/75901)
- Theme: Remove global stylesheet (https://github.com/WordPress/gutenberg/pull/75879)
- Real-time collaboration: Remove ghost awareness state explicitly when refreshing (https://github.com/WordPress/gutenberg/pull/75883)
- Real-time collaboration: Expand mergeCrdtBlocks() automated testing (https://github.com/WordPress/gutenberg/pull/75923)
- Fix client-side media file naming (https://github.com/WordPress/gutenberg/pull/75817)
- Add: Connectors screen (https://github.com/WordPress/gutenberg/pull/75833)
- Merge document meta into state map (https://github.com/WordPress/gutenberg/pull/75830)
- Move WordPress meta key from sync package to core-data (https://github.com/WordPress/gutenberg/pull/75846)
- Bugfix: Fix casing of getPersistedCRDTDoc (https://github.com/WordPress/gutenberg/pull/75922)
- Add debug logging to SyncManager (https://github.com/WordPress/gutenberg/pull/75924)
- DataForm: fix label colors (https://github.com/WordPress/gutenberg/pull/75730)
- DataViews: minimize padding for primary action buttons (https://github.com/WordPress/gutenberg/pull/75721) (https://github.com/WordPress/gutenberg/pull/75947)
- Connectors: Add `_ai_` prefix to connector setting names and fix naming inconsistencies (https://github.com/WordPress/gutenberg/pull/75948)
- Connectors: Unhook Core callbacks in Gutenberg coexistence (https://github.com/WordPress/gutenberg/pull/75935)
- Unsynced patterns: Rename 'Disconnect pattern' to 'Detach pattern' in context menu (https://github.com/WordPress/gutenberg/pull/75807)
- Editor: Remove View dropdown and pinned items from revisions header (https://github.com/WordPress/gutenberg/pull/75951)
- Fix: Template revisions infinite spinner (https://github.com/WordPress/gutenberg/pull/75953)
- Backport: Avoid flickering while refreshing (https://github.com/WordPress/gutenberg/pull/74572) (https://github.com/WordPress/gutenberg/pull/75952)
- Add wp_ prefix to real time collaberation option. (https://github.com/WordPress/gutenberg/pull/75837)

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


git-svn-id: http://core.svn.wordpress.org/trunk@61056 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-02-26 13:59:22 +00:00
jorgefilipecosta
c9b5daa18d Connectors: Backport Gutenberg connectors screen.
Adds `wp-includes/connectors.php` (loaded from `wp-settings.php`) and registers
a Settings > Connectors submenu when the AI client and Connectors admin page
renderer are available.
Registers connector API key settings in `/wp/v2/settings`, masks key values on
option reads, validates keys against provider configuration, and returns
`invalid_key` for explicitly requested connector fields when validation fails.
Stored connector keys are also passed to the AI client registry on init.

Gutenberg PR at https://github.com/WordPress/gutenberg/pull/75833.
Developed in https://github.com/WordPress/wordpress-develop/pull/11056.

Props jorgefilipecosta, gziolo, flixos90, justlevine, westonruter, jeffpaul, JasonTheAdams, audrasjb, shaunandrews, noruzzaman, mukesh27.
Fixes #64730.
Built from https://develop.svn.wordpress.org/trunk@61749


git-svn-id: http://core.svn.wordpress.org/trunk@61055 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-02-26 13:35:44 +00:00
mcsf
49fba6adce Icons library: Prefer 'protected' visibility in WP_Icons_Registry
Make it easier to iterate on this class in Gutenberg via class extension.

See proof of concept and discussion in:
https://github.com/WordPress/gutenberg/pull/75878

Follow-up to [61674].

Props mcsf.

See #64651.


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


git-svn-id: http://core.svn.wordpress.org/trunk@61054 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-02-26 12:16:42 +00:00
jonsurrell
7e9ef6641a HTML API: Preserve newlines when normalizing special elements.
Ensures normalization preserves content in `PRE`, `LISTING`, and `TEXTAREA` elements. These elements ignore a single leading newline during parsing. Normalization now injects a newline after the tag opener to trigger this behavior, preventing significant newlines from being incorrectly stripped.

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

Props jonsurrell, dmsnell, mukesh27.
Fixes #64607.

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


git-svn-id: http://core.svn.wordpress.org/trunk@61053 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-02-26 10:37:39 +00:00
ellatrix
f29ad11f8e Real-time collaboration: Remove ghost awareness state explicitly when refreshing.
Syncs PHP changes from https://github.com/WordPress/gutenberg/pull/75883. Changes the real-time collaboration polling server endpoint to accept null for awareness values, which is used to explicitly disconnect users leaving the page and remove their awareness data more quickly.

CI run: https://github.com/WordPress/wordpress-develop/pull/11049.

Fixes #64622.
Props alecgeatches.
Built from https://develop.svn.wordpress.org/trunk@61746


git-svn-id: http://core.svn.wordpress.org/trunk@61052 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-02-26 10:35:44 +00:00