52689 Commits

Author SHA1 Message Date
desrosj fbe359fbb5 Build/Test Tools: Test against 7.0-RC3.
This updates the upgrade testing workflows to test against RC3. After 7.0 final release, this should be updated to test `7.0` proper.

Fixes #64966.
Built from https://develop.svn.wordpress.org/trunk@62358


git-svn-id: http://core.svn.wordpress.org/trunk@61639 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-13 17:04:44 +00:00
wildworks b5e0fddaf1 Taxonomy: Fix delete button alignment on Edit Tag screen.
The delete button on the Edit Tag screen was misaligned after the form control updates in [61645]. Switch the action buttons row to a flexbox layout for stable alignment.

Follow-up to [61645].

Props mukesh27, tusharbharti, wildworks.
Fixes #65233.
Built from https://develop.svn.wordpress.org/trunk@62357


git-svn-id: http://core.svn.wordpress.org/trunk@61638 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-13 12:00:45 +00:00
Sergey Biryukov c5b8025f72 Tests: Add unit tests for wp_refresh_heartbeat_nonces().
Follow-up to [44275].

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


git-svn-id: http://core.svn.wordpress.org/trunk@61637 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-13 08:39:43 +00:00
audrasjb 8bdcaa3d1c I18N: Add translator context to disambiguate translation strings for "Preview".
This changeset disambiguates translation strings for "Preview" by adding a verb|noun context to its occurrences.

Props timse201, audrasjb, anupkankale, mohamedahamed, rafaeldella, motylanogha, wildworks, jorbin, khokansardar, sergeybiryukov.
Fixes #64986.

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


git-svn-id: http://core.svn.wordpress.org/trunk@61634 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-13 03:03:45 +00:00
Sergey Biryukov 914ccf31de Tests: Add unit tests for _customizer_mobile_viewport_meta().
Follow-up to [48412].

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


git-svn-id: http://core.svn.wordpress.org/trunk@61633 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-12 22:20:43 +00:00
Sergey Biryukov d39e76350c Tests: Add unit tests for wp_heartbeat_set_suspension().
Follow-up to [26428], [26549].

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


git-svn-id: http://core.svn.wordpress.org/trunk@61632 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-11 22:25:31 +00:00
wildworks 0204f78868 Toolbar: Revert add CSS from admin color scheme on front-end.
The implementation issues a server-side HTTP request on every front-end page load and extracts the toolbar CSS via fragile substring matching. Alternatives are too large to land this late in the release cycle, so the fix is deferred to a future release.

Reverts [62025].

Props desrosj, jorbin, mukesh27, sabernhardt, wildworks.

See #64762.
Built from https://develop.svn.wordpress.org/trunk@62349


git-svn-id: http://core.svn.wordpress.org/trunk@61630 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-11 12:47:43 +00:00
ramonopoly ac10586750 [REVERT] WP_Theme_JSON: Prevent implicit coercion in to_ruleset
Reverts r62347. The fix the patch proposes is destined for 7.1. There is a general block for such patches until the 7.0 general release.

Props ramonopoly, andrewserong, westonruter.

See #64848.


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


git-svn-id: http://core.svn.wordpress.org/trunk@61629 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-11 03:17:40 +00:00
ramonopoly b41ae0e5f0 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@62347


git-svn-id: http://core.svn.wordpress.org/trunk@61628 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-11 02:05:43 +00:00
Sergey Biryukov c69a2d8f54 Coding Standards: Correct alignment in _wp_privacy_settings_filter_draft_page_titles() tests.
This resolves a WPCS warning:
{{{
Array double arrow not aligned correctly
}}}

Follow-up to [62345].

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


git-svn-id: http://core.svn.wordpress.org/trunk@61627 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-10 23:43:42 +00:00
Sergey Biryukov 1303dd2552 Tests: Add unit tests for _wp_privacy_settings_filter_draft_page_titles().
Follow-up to [43376].

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


git-svn-id: http://core.svn.wordpress.org/trunk@61626 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-10 23:02:43 +00:00
Tammie Lister 2d48f546c5 Bundled themes: Version bumps for version 7.0.
This bumps the version for the upcoming release WordPress 7.0.
Twenty Ten: 4.6.
Twenty Eleven: 5.1.
Twenty Twelve: 4.8.
Twenty Thirteen: 4.6.
Twenty Fourteen: 4.5.
Twenty Fifteen: 4.2.
Twenty Sixteen: 3.8.
Twenty Seventeen: 4.1.
Twenty Nineteen: 3.3.
Twenty Twenty: 3.1.
Twenty Twenty-One: 2.8.
Twenty Twenty-Two: 2.1.
Twenty Twenty-Three: 1.6.
Twenty Twenty-Four: 1.5.
Twenty Twenty-Five: 1.5.

Props sabernhardt, shailu25, audrasjb.
Fixes #64817.

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


git-svn-id: http://core.svn.wordpress.org/trunk@61625 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-10 10:09:44 +00:00
Sergey Biryukov c74d360cc9 Tests: Add unit tests for wp_check_php_version().
Follow-up to [44735].

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


git-svn-id: http://core.svn.wordpress.org/trunk@61624 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-09 23:02:44 +00:00
Sergey Biryukov d297ade379 Tests: Rename some newly added files as per the proposed directory structure.
This aims to make the test suite directory and file structure more intuitive for new contributors to work with, as well as follow the PHPUnit recommended test class name pattern with having `Test` as the end of the class name.

Follow-up to [61407], [62096], [62297], [62313], [62328].

See #65208.
Built from https://develop.svn.wordpress.org/trunk@62342


git-svn-id: http://core.svn.wordpress.org/trunk@61623 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-08 23:55:39 +00:00
jorgefilipecosta 413a7503ed Connectors: Expose isFileModDisabled flag to connector script module data.
Adds an `isFileModDisabled` boolean — derived from `wp_is_file_mod_allowed(   'install_plugins' )` — to the data exposed via the `script_module_data_options-connectors-wp-admin` filter, so the connectors UI can adapt when file modifications are disabled.

Props jorgefilipecosta, westonruter, jeffpaul.
See #65209.
Built from https://develop.svn.wordpress.org/trunk@62341


git-svn-id: http://core.svn.wordpress.org/trunk@61622 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-08 19:03:43 +00:00
ellatrix 77d6fdbb88 Properly delete RTC files after [62334].
Props desrosj.
See #65205.
Built from https://develop.svn.wordpress.org/trunk@62337


git-svn-id: http://core.svn.wordpress.org/trunk@61618 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-08 14:52:44 +00:00
ellatrix ae418d5505 Remove real-time collaboration.
Removes all RTC related code from core. There will still be RTC related code in Gutenberg, but effectively disabled for core since nothing turns it on. The wp.sync global has also been hidden by bundling in https://github.com/WordPress/gutenberg/pull/78085.

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

Props maxschmeling, ellatrix, mukesh27.
Fixes #65205.
Built from https://develop.svn.wordpress.org/trunk@62334


git-svn-id: http://core.svn.wordpress.org/trunk@61615 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-08 14:04:45 +00:00
ellatrix 8d38a750e2 Editor: Bump pinned hash for the Gutenberg repository.
This updates the pinned hash from the `gutenberg` from `e2970ba736edb99e08fb369d4fb0c378189468ee ` to `c15cef1d6b07f666df28dac0383bafb0edfe0914`.

The following changes are included:

- RTC: Predefined retry schedules for disconnect dialog, make more lenient (https://github.com/WordPress/gutenberg/pull/76966)
- Block Editor: Prevent Enter key from inserting paragraphs in contentOnly sections (https://github.com/WordPress/gutenberg/pull/76989)
- Cover block: fix embed video background Error 153 in editor (https://github.com/WordPress/gutenberg/pull/76904)
- Restore original template registration tests alongside activation variants (https://github.com/WordPress/gutenberg/pull/77068)
- Avoid stale values in core/cover block for RTC compatibility (https://github.com/WordPress/gutenberg/pull/76916)
- Bump oras-project/setup-oras (https://github.com/WordPress/gutenberg/pull/77096) (https://github.com/WordPress/gutenberg/pull/77110)
- RTC: Change SyncConnectionModal to isSyncConnectionErrorHandled filter and drop IS_GUTENBERG_PLUGIN check (https://github.com/WordPress/gutenberg/pull/76853)
- contentOnly template lock: Fix block insertion and removal rules (https://github.com/WordPress/gutenberg/pull/77119)
- Global Styles Revisions: Fix footer overflow (https://github.com/WordPress/gutenberg/pull/77103)
- Revision: Fix 'Show changes' button reset state (https://github.com/WordPress/gutenberg/pull/77122)
- Link picker: Decode HTML entities in link preview title (https://github.com/WordPress/gutenberg/pull/77170)
- Connectors: don't clobber third-party custom render in registerDefaultConnectors (https://github.com/WordPress/gutenberg/pull/77116)
- Connectors: Replace speak() with notice store for state changes (https://github.com/WordPress/gutenberg/pull/77174)
- Core Data: Fix 'useEntityProp' for raw attributes (https://github.com/WordPress/gutenberg/pull/77120)
- Fix PatternsActions prop name from postType to type (https://github.com/WordPress/gutenberg/pull/77251)
- Fix: restore editor canvas padding in classic themes (https://github.com/WordPress/gutenberg/pull/76864)
- RTC: Add filterable flag for meta box RTC compatibility (https://github.com/WordPress/gutenberg/pull/76939)
- Fix failing 'WP_HTTP_Polling_Sync_Server' unit test (https://github.com/WordPress/gutenberg/pull/77025) (https://github.com/WordPress/gutenberg/pull/77325)
- Edit Post: Fix warning in 'useMetaBoxInitialization' hook (https://github.com/WordPress/gutenberg/pull/77311)
- Update the page slug we link to for the AI plugin after the plugin has been installed and activated (https://github.com/WordPress/gutenberg/pull/77336)
- Test: Connectors Point to the righ page. (https://github.com/WordPress/gutenberg/pull/77272)
- Post Editor: Store metaboxes RTC-compatible flag on location entries (https://github.com/WordPress/gutenberg/pull/77361)
- Core Abilities: Export initialization promise as `ready` (https://github.com/WordPress/gutenberg/pull/77254)
- Block Editor: Strip per-block custom CSS on save for users without edit_css (https://github.com/WordPress/gutenberg/pull/76650)
- Add heading level 1 for the fonts page (https://github.com/WordPress/gutenberg/pull/77482)
- Connectors: Treat network-active plugins as active in plugin status check (https://github.com/WordPress/gutenberg/pull/77661)
- RTC: Fix disconnect dialog due to uneditable entity (https://github.com/WordPress/gutenberg/pull/77242)
- RTC: Fix "Connection Lost" dialog when too many entities are loaded (https://github.com/WordPress/gutenberg/pull/77631)
- RTC: Fix "Edit as HTML" content reset during collaboration (https://github.com/WordPress/gutenberg/pull/77043)
- RTC: Add optional `shouldSync` function to entity sync config (https://github.com/WordPress/gutenberg/pull/76947)
- RTC: Fixed orphaned meta causing dirty editor state (https://github.com/WordPress/gutenberg/pull/77529)
- Ensure "Retry" button is stable during retries (https://github.com/WordPress/gutenberg/pull/77234)
- Patterns: add confirmation dialog before disconnecting/detaching (https://github.com/WordPress/gutenberg/pull/75713)
- Template parts: make 'Detach' context menu item consistent across patterns and template parts (https://github.com/WordPress/gutenberg/pull/77581)
- Remove sandbox `allow-same-origin` for core/html blocks (Merge https://github.com/WordPress/gutenberg/pull/77212 to `wp/7.0`) (https://github.com/WordPress/gutenberg/pull/77699)
- Added Context for Next/Prev Enlarge Image (https://github.com/WordPress/gutenberg/pull/76967)
- Backport: Writing Flow: fix arrow keys skipping paragraph containing link (https://github.com/WordPress/gutenberg/pull/77478)
- Revisions: Improve screen reader accessibility for diff markers region and slider (https://github.com/WordPress/gutenberg/pull/77660)
- Connectors: Add role="list" wrapper to connector cards for valid ARIA structure (https://github.com/WordPress/gutenberg/pull/77689)
- Command Palette: Fix macOs label for sites unable to determine UA via PHP (https://github.com/WordPress/gutenberg/pull/77638)
- RTC: Fix inline inserter reset on update sync (https://github.com/WordPress/gutenberg/pull/76980) (https://github.com/WordPress/gutenberg/pull/77706)
- Connectors: keep focus on action Button during install (https://github.com/WordPress/gutenberg/pull/77544)
- Added Translator Context for Reply (https://github.com/WordPress/gutenberg/pull/77891)
- Editor: Improve revisions diff pairing performance (https://github.com/WordPress/gutenberg/pull/77126)
- Core Data: Treat single-item responses specially (https://github.com/WordPress/gutenberg/pull/76318)
- Site editor: preserve non-global styles in pattern previews (https://github.com/WordPress/gutenberg/pull/77957)
- RTC: Fix divergence when two offline users reconnect (https://github.com/WordPress/gutenberg/pull/77980)
- RTC: Fix compaction unit test (https://github.com/WordPress/gutenberg/pull/77986)
- Connectors: Stop e2e capability restriction from leaking across specs (https://github.com/WordPress/gutenberg/pull/77857)
- Connectors: Clarify AI plugin callout copy (https://github.com/WordPress/gutenberg/pull/78043)
- Fix: Only auto register settings if the plugin the connector references is installed and active. (https://github.com/WordPress/gutenberg/pull/77273)
- Connectors: Add is_active callback support to plugin registration (https://github.com/WordPress/gutenberg/pull/77897)
- RTC: Fix race condition on room creation which can cause a split update log (https://github.com/WordPress/gutenberg/pull/77675)
- RTC: Fix find_canonical_storage_post_id() always returning null (https://github.com/WordPress/gutenberg/pull/78053)
- i18n: add context to scale (https://github.com/WordPress/gutenberg/pull/76917)
- Revisions: Simplify fetching (https://github.com/WordPress/gutenberg/pull/77086)
- e2e: Add e2e tests for template and template part revisions (https://github.com/WordPress/gutenberg/pull/76923)
- Editor: Paginate revisions slider by 100 per page (https://github.com/WordPress/gutenberg/pull/77200) (https://github.com/WordPress/gutenberg/pull/78070)
- Revisions: Add diagonal stripe patterns to diff markers to avoid color-only distinction (https://github.com/WordPress/gutenberg/pull/77904)
- Revision: Fix failing e2e test (https://github.com/WordPress/gutenberg/pull/78079)
- Real-time collaboration: Bundle @wordpress/sync instead of exposing as wp.sync (https://github.com/WordPress/gutenberg/pull/78085)

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

Log created with:

git log --reverse --format="- %s" e2970ba736edb99e08fb369d4fb0c378189468ee..c15cef1d6b07f666df28dac0383bafb0edfe0914 | 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@62333


git-svn-id: http://core.svn.wordpress.org/trunk@61614 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-08 11:50:48 +00:00
wildworks 5e62b3f06c Connectors: Refine plugin install check and PHPStan types.
Replace `file_exists()` with `validate_plugin()` in the connectors script module data, and refine PHPStan type definitions in the connectors code to better reflect the actual shape of registered connector data.

Follow-up to [62288].

Props jorgefilipecosta, mukesh27, peterwilsoncc, westonruter, wildworks.
See #65020.
Built from https://develop.svn.wordpress.org/trunk@62332


git-svn-id: http://core.svn.wordpress.org/trunk@61613 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-08 10:39:43 +00:00
Sergey Biryukov 034da2217a Tests: Rename the admin/includesComment.php test file to match the new pattern.
This aims to make the test suite directory and file structure more intuitive for new contributors to work with, as well as follow the PHPUnit recommended test class name pattern with having `Test` as the end of the class name.

Follow-up to [34456].

Props poena.
See #53010.
Built from https://develop.svn.wordpress.org/trunk@62328


git-svn-id: http://core.svn.wordpress.org/trunk@61608 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-07 21:46:38 +00:00
joedolson ae7ce5a915 Media: Restore usage of attachment filters in media modal.
[61757] wrapped the media attachment filters, which changed the return value of toolbar filters from `AttachmentFilters` to a `wp.media.View` instance, breaking the API to customize media library filters.

Reverts the shape change in the attachment filter return value and implements CSS based positioning for the visible labels.

Props bernhard-reiter, joedolson, ozgursar, audrasjb, darshitrajyaguru97, jorbin.
Fixes #64948.
Built from https://develop.svn.wordpress.org/trunk@62326


git-svn-id: http://core.svn.wordpress.org/trunk@61606 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-07 21:36:43 +00:00
Aaron Jorbin f0ec22b948 I18N: Add translator context to the use of "Reply".
Props timse201, audrasjb, sanketparmar.
Fixes #64984.

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


git-svn-id: http://core.svn.wordpress.org/trunk@61604 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-07 20:48:44 +00:00
desrosj 78581f225a Build/Test Tools: Remove gutenberg:verify script on postinstall.
In [61458], a `postinstall` script was introduced that ensured the source code from the `gutenberg` repository was present before attempting to run the build script.

The WordPress.org Hosting Tests surfaced an edge case where the `postinstall` script was failing when `nodevenv` is used. Because it serves as a wrapper for Node.js, `NPM_CONFIG_PREFIX` is set to the virual envirnoment directory and not the actual project source directory.

This removes `gutenberg:verify` from `postinstall` entirely. `gutenberg:verify` is responsible for confirming that the `gutenberg` directory exists, that the commit SHA value in `gutenberg/.gutenberg-hash` matches `gutenberg.sha` in the `package.json` file, and it downloads a fresh copy if not.

While this will result in the necessary files not being present locally after running `npm install`, `gutenberg:verify` is specified as the first task executed when the `build` and `build:dev` scripts are run. Running either build script has been a requirement to run WordPress locally for some time now, so this does not introduce a new required step. It simply delays when the built asset will be retrieved from the GitHub Container Registry when necessary.

`postinstall` scripts should also be avoided entirely due to their significantly insecure nature (see #64543).

Follow up to [61492], [61873], and [62021].

Props jorbin, johnbillion.
Fixes #64874. See #64393, #64543.
Built from https://develop.svn.wordpress.org/trunk@62321


git-svn-id: http://core.svn.wordpress.org/trunk@61601 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-07 17:07:46 +00:00
desrosj 97af967f02 Toolbar: Improvements to changes in [62282].
This updates the JavaScript based regular expression to be case-insensitive, which matches the corresponding PHP pattern.

A defensive check has alos been added to avoid a `TypeError` if the admin bar is manipulated in a way that changes the path of the targeted element.

Follow up to [62282].

Props westonruter.
Fixes #65121.
Built from https://develop.svn.wordpress.org/trunk@62320


git-svn-id: http://core.svn.wordpress.org/trunk@61600 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-07 16:37:43 +00:00
wildworks 579974ea91 Toolbar: Fix icon colors in mobile layout.
Swap the default and hover color rules for admin bar icons on mobile so icons use `$menu-icon` by default and `$menu-submenu-focus-text` on hover.

Props sabernhardt, peterwilsoncc, wildworks.
Fixes #65140.
Built from https://develop.svn.wordpress.org/trunk@62317


git-svn-id: http://core.svn.wordpress.org/trunk@61597 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-07 07:02:43 +00:00
Peter Wilson a57d4a066f Tests/Build Tools: Coding standards, typo fixes following r62313.
Follow up to r62313.

See #53010.


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


git-svn-id: http://core.svn.wordpress.org/trunk@61594 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-07 00:01:44 +00:00
Sergey Biryukov 631f18e56d Tests: Split the admin/includesMisc.php test file to match the new pattern.
This aims to make the test suite directory and file structure more intuitive for new contributors to work with, as well as follow the PHPUnit recommended test class name pattern with having `Test` as the end of the class name.

Follow-up to [434/tests], [57283].

See #53010.
Built from https://develop.svn.wordpress.org/trunk@62313


git-svn-id: http://core.svn.wordpress.org/trunk@61593 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-06 23:21:40 +00:00
Aaron Jorbin 1500d178b7 I18N: Add translator context to scale strings in image editor
Props shailu25, audrasjb, timse201, sanketparmar.
Fixes #64983.

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


git-svn-id: http://core.svn.wordpress.org/trunk@61592 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-06 23:06:43 +00:00
dmsnell ba02d144e2 RTC: Promote auto-draft posts on first autosave for collaborative sessions to avoid post loss.
When an RTC session in the editor saves edits on a draft post, they always save into an autosave revision. This prevents a sync but where storing to the post itself would lead to duplicate edits. This was set in wordpress/gutenberg commit 9df142b839320316b406ee1a02e23704d42f8719. However, there is an exception to this rule: the first session to save edits needs to promote the autosave revision into a real draft post, if a post doesn’t exist. The reason is that WordPress hides autosaves.

That is, multiple people could be editing a draft post and then once they close it, never be able to find it again. While the data is still in the database, this is a loss of the post from a practical standpoint.

This change introduces an exception where the first time a collaborative session is saving draft edits, the autodraft is promoted to a real draft post, making it visible in the post list.

AI Disclaimer: This bug was detected in a fuzzing system built by AI models and the fix was first proposed by an AI model.

Developed in: https://github.com/WordPress/gutenberg/pull/77865
Discussed in: https://core.trac.wordpress.org/ticket/65138
See also: https://github.com/WordPress/gutenberg/pull/77716

Follow-up to [61680].
Props danluu, dmsnell.
See #65138.

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


git-svn-id: http://core.svn.wordpress.org/trunk@61591 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-06 21:56:44 +00:00
jorgefilipecosta 069ccea738 Connectors: Register Akismet Anti-Spam as a connector.
Akismet is bundled with WordPress core, but it wasn't appearing on the Connectors screen even when present on the file system.

Partially reverts [62210], bringing back the main part of [62193].
Follow-up to [62210], [62193].
Developed in https://github.com/WordPress/wordpress-develop/pull/11688.

Props audrasjb, bluefuton, davidbaumwald, desrosj, eclev91, gziolo, johnbillion, jorbin, jorgefilipecosta, lukecarbis, matt, matveb, peterwilsoncc, westonruter.
See #65012.
Built from https://develop.svn.wordpress.org/trunk@62310


git-svn-id: http://core.svn.wordpress.org/trunk@61590 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-06 21:45:43 +00:00
ramonopoly fd91c41426 wp_register_custom_css_support: update PHP doc to clarify purpose
Clarify the purpose of the `wp_register_custom_css_support` function. "Removing styles.css" is technically correct, but the comment didn't explain the "why" in plain language.

Props audrasjb, ramonopoly, peterwilsoncc.

Follow-up to [64771].


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


git-svn-id: http://core.svn.wordpress.org/trunk@61579 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-06 03:22:43 +00:00
Peter Wilson c8fecf9715 REST API/RTC: Fix divergence when two offline users reconnect.
Prevent Real-Time Collaboration sessions from becoming out of sync when an offline editor returns to an online state. The change ensures that the updates are merged rather than discarded when each client is at a different cursor after reconnecting or experiencing slow network conditions.

Props alecgeatches, peterwilsoncc, maxschmeling, joefusco.
See #64622.

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


git-svn-id: http://core.svn.wordpress.org/trunk@61578 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-06 00:30:41 +00:00
Sergey Biryukov ea4614793b Tests: Rename the wpGetPluginActionButton.php test file to match the new pattern.
This aims to make the test suite directory and file structure more intuitive for new contributors to work with, as well as follow the PHPUnit recommended test class name pattern with having `Test` as the end of the class name.

Follow-up to [58396], [61407].

See #53010.
Built from https://develop.svn.wordpress.org/trunk@62297


git-svn-id: http://core.svn.wordpress.org/trunk@61577 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-05 23:17:45 +00:00
Sergey Biryukov 1c9260e0f7 Quick/Bulk Edit: Restore compact size of inline edit select.
Follow-up to [61827], [62171].

Props wildworks, mukesh27, audrasjb, SergeyBiryukov.
Fixes #64685.
Built from https://develop.svn.wordpress.org/trunk@62296


git-svn-id: http://core.svn.wordpress.org/trunk@61576 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-04 23:48:36 +00:00
Sergey Biryukov 44aad851fc Admin Reskin: Correct Customizer “Publish” button size.
Follow-up to [61646].

Props mohitbsf, wildworks, joedolson, audrasjb, huzaifaalmesbah, SergeyBiryukov.
Fixes #64689.
Built from https://develop.svn.wordpress.org/trunk@62295


git-svn-id: http://core.svn.wordpress.org/trunk@61575 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-03 22:36:45 +00:00
Sergey Biryukov 683e215403 Admin Reskin: Standardize theme install overlay button height on mobile.
Follow-up to [61646].

Props abcd95, wildworks, mosescursor, sainathpoojary, SergeyBiryukov.
See #64999.
Built from https://develop.svn.wordpress.org/trunk@62294


git-svn-id: http://core.svn.wordpress.org/trunk@61574 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-02 22:45:45 +00:00
Weston Ruter c57812377f I18N: Harden against undefined index in _load_script_textdomain_from_src().
This guards against an undefined index warning being raised when a script or script module is registered with a URL that lacks a path component. 

This also adds full PHPStan type definitions for `wp_parse_url()`, ensuring that the `_load_script_textdomain_from_src()` function has no PHPStan errors at rule level 10.

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

Follow-up to r62278.

Props westonruter, manzoorwanijk, mukesh27.
See #65015, #64238.

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


git-svn-id: http://core.svn.wordpress.org/trunk@61573 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-02 05:55:44 +00:00
Weston Ruter 1c7ee22b14 Build/Test Tools: Honor @global docblock tags in PHPStan analysis.
This adds a PHPStan extension with a parser-node visitor that bridges WordPress core's `@global Type $varname` PHPDoc convention to PHPStan's variable type resolution, eliminating 3,784 spurious errors caused by globals resolving as `mixed` when on rule level 10 (out of 40,069 errors total, so a 9.4% reduction). This avoids the need to add `/** @var Type $varname */` annotations with each global variable.

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

Props westonruter, apermo, szepeviktor.
See #64898.

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


git-svn-id: http://core.svn.wordpress.org/trunk@61572 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-02 05:17:43 +00:00
Sergey Biryukov 75958daa14 Admin Reskin: Correct alignment for spinners across the admin.
Follow-up to [61646].

Props wildworks, anupkankale, shailu25, gaurangsondagar, jadavsanjay, SergeyBiryukov.
Fixes #65131.
Built from https://develop.svn.wordpress.org/trunk@62291


git-svn-id: http://core.svn.wordpress.org/trunk@61571 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-05-01 23:39:44 +00:00
Sergey Biryukov e37a51ed32 Admin Reskin: Add more spacing below the plugin card header.
Follow-up to [61646].

Props wildworks, mukesh27, shailu25, noruzzaman, darshitrajyaguru97, SergeyBiryukov.
Fixes #64987.
Built from https://develop.svn.wordpress.org/trunk@62290


git-svn-id: http://core.svn.wordpress.org/trunk@61570 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-04-30 18:50:43 +00:00
jorgefilipecosta ed30473ca2 Connectors: Gate default setting auto-registration on is_active.
Update `_wp_register_default_connector_settings()` to register a connector's
default API key setting only when the connector's `plugin.is_active` callback
returns `true`. 
Add tests covering the gate's branches: setting skipped when `is_active`
returns `false`, setting registered when it returns `true`.

Props jorgefilipecosta, gziolo, peterwilsoncc.
Fixes #65099.
Built from https://develop.svn.wordpress.org/trunk@62289


git-svn-id: http://core.svn.wordpress.org/trunk@61569 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-04-30 14:07:38 +00:00
jorgefilipecosta f86048cd6e Connectors: Add is_active callback support to plugin registration.
Adds an optional `is_active` callable to the `plugin` definition accepted by
`WP_Connector_Registry::register()`. The callback receives no arguments, must
return a boolean, and is used by the Connectors screen to decide whether a
connector's backing plugin is currently active. When omitted, it defaults to
`__return_true`; when provided but not callable, registration fails with a
`_doing_it_wrong()` notice.

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

Props iamadisingh, jorgefilipecosta, mukesh27, gziolo.
Fixes #65020.
Built from https://develop.svn.wordpress.org/trunk@62288


git-svn-id: http://core.svn.wordpress.org/trunk@61568 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-04-30 12:17:44 +00:00
Sergey Biryukov be69a1f6fd Administration: Correct alignment of meta boxes on the Edit screen with classic editor.
Follow-up to [61646], [61759].

Props umeshnevase, sabernhardt, SergeyBiryukov.
Fixes #65141.
Built from https://develop.svn.wordpress.org/trunk@62284


git-svn-id: http://core.svn.wordpress.org/trunk@61564 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-04-29 23:41:49 +00:00
Peter Wilson cb9387eb51 Toolbar: Add JavaScript fallback for determining command palette icon.
Introduces a JavaScript fallback for determining whether the command palette icon in the toolbar should display ⌘Kfor Apple devices.

This is to account for sites behind a CDN as it's common for the User-Agent header to be stripped from the request sent to the application server in order to increase cache hits on the edge.

Props peterwilsoncc, westonruter, mukesh27, ramonopoly.
Fixes #65121.


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


git-svn-id: http://core.svn.wordpress.org/trunk@61562 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-04-28 23:58:44 +00:00
Sergey Biryukov 86fa738da7 Tests: Correct @covers tag for resolve_pattern_blocks() tests.
Follow-up to [58303].

See #64225.
Built from https://develop.svn.wordpress.org/trunk@62281


git-svn-id: http://core.svn.wordpress.org/trunk@61561 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-04-28 23:00:40 +00:00
Sergey Biryukov eff2ed0b2d Editor: Correct alignment for “Remove tag” icon in classic editor.
Follow-up to [38880], [61645].

Props umesh.nevase, sabernhardt, SergeyBiryukov.
Fixes #65133.
Built from https://develop.svn.wordpress.org/trunk@62279


git-svn-id: http://core.svn.wordpress.org/trunk@61559 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-04-27 23:48:47 +00:00
Weston Ruter 18b839d12f I18N: Add translation support for script modules.
Add automatic translation loading for script modules (ES modules), so strings using `__()` and friends from `@wordpress/i18n` can be translated at runtime. This brings classic script i18n parity to script modules registered via `wp_register_script_module()`, which previously had no way to load translation data, leaving strings untranslated on screens like Connectors and Fonts that are built as script modules.

At the `admin_print_footer_scripts` and `wp_footer` actions, every enqueued script module and its dependencies are walked, the translation chunk is loaded for each, and an inline `<script>` calls `wp.i18n.setLocaleData()` so translations are available before deferred modules execute. Note there is currently a runtime dependency on the `wp-i18n` classic script, which is printed just-in-time if not already enqueued. This coupling is to be removed in a future release.

Public API:

* `WP_Script_Modules::set_translations()` stores the text domain (and optional path) per registered module to override the text domain and path. A global `wp_set_script_module_translations()` function is added as a wrapper around `wp_script_modules()->set_translations()`.
* `WP_Script_Modules::get_registered()` obtains a registered module's data. See #60597.
* `WP_Script_Modules::print_script_module_translations()` emits inline `wp.i18n.setLocaleData()` calls after classic scripts load but before modules execute.
* `load_script_module_textdomain()` loads the translation data for a given script module ID and text domain.
* The existing `load_script_textdomain_relative_path` filter gains a third `$is_module` parameter so callers can distinguish classic-script and script-module lookups when resolving translation paths.

PHPStan types are also added in `WP_Script_Modules`. See #64238.

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

Props manzoorwanijk, westonruter, jsnajdr, jonsurrell, mukesh27, peterwilsoncc, 369work, desrosj, sabernhardt, nilambar, jorgefilipecosta, malayladu.
See #64238, #60597.
Fixes #65015.

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


git-svn-id: http://core.svn.wordpress.org/trunk@61558 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-04-27 18:31:40 +00:00
wildworks 7e58622f5b Revisions: Fix misplaced buttons in comparison UI.
Align the Previous, Next, and Restore This Revision buttons consistently across viewports on the revisions comparison screen.

Props audrasjb, mokshasharmila13, peterwilsoncc, presskopp, shailu25, wildworks.
Fixes #65062.
Built from https://develop.svn.wordpress.org/trunk@62273


git-svn-id: http://core.svn.wordpress.org/trunk@61553 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-04-27 05:59:45 +00:00
wildworks a681248154 Administration: Fix misaligned icon in user profile password field on mobile.
In [62262], the show/hide button next to the password field was aligned using `line-height` and `vertical-align`. This approach
left the icon misaligned on mobile viewports.

Follow-up to [62262].

Props mukesh27, wildworks.
Fixes #65031.
Built from https://develop.svn.wordpress.org/trunk@62272


git-svn-id: http://core.svn.wordpress.org/trunk@61552 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-04-27 04:37:45 +00:00
Peter Wilson 27e084e5e0 Security: Update composer/ca-bundle to version 1.5.11.
This update adds 1 certificate to the bundle.

Props desrosj.
Fixes #64245.

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


git-svn-id: http://core.svn.wordpress.org/trunk@61551 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-04-27 03:40:45 +00:00