Introduces `WP_Connector_Registry` class and a `wp_connectors_init` action hook so plugins can register their own connectors alongside the built-in defaults (Anthropic, Google, OpenAI).
Key changes:
* `WP_Connector_Registry` — A `final` singleton class managing connector registration and lookup, with validation for IDs, required fields, and authentication methods.
* `wp_connectors_init` action — Fired during `init` after built-in connectors are registered. Passes the registry instance so plugins call `$registry->register()` directly.
* `_wp_connectors_init()` — Private function that creates the registry, merges hardcoded defaults with AI Client registry data, registers them, then fires the action.
* Public read-only functions — `wp_is_connector_registered()`, `wp_get_connector()`, `wp_get_connectors()` for querying the registry after initialization.
* Logo URL support — Connectors can include an optional `logo_url` field resolved from plugin directories via `_wp_connectors_resolve_ai_provider_logo_url()`.
* Timing guards — `set_instance()` rejects calls after `init` completes. Registration is only possible during `wp_connectors_init`.
* Connector API key settings are now only registered when the provider exists in the AI Client registry.
* Refactors `_wp_connectors_get_connector_settings()` to read from the registry via `wp_get_connectors()`.
Developed in https://github.com/WordPress/wordpress-develop/pull/11175
Props gziolo, flixos90, mukesh27, westonruter.
Fixes#64791.
Built from https://develop.svn.wordpress.org/trunk@61943
git-svn-id: http://core.svn.wordpress.org/trunk@61225 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Remove duplicate CSS setting the checked state for checkbox and radio inputs from `_admin.scss`. The duplicate selectors overrode the white checkmark in older browsers, impacting alternate color schemes.
Props sabernhardt, joedolson.
Fixes#64822.
Built from https://develop.svn.wordpress.org/trunk@61940
git-svn-id: http://core.svn.wordpress.org/trunk@61222 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This updates `wp_get_loading_optimization_attributes()` and `wp_maybe_add_fetchpriority_high_attr()` to account for cases where an `IMG` has `fetchpriority=low` or `fetchpriority=auto`:
* `IMG` tags with `fetchpriority=low` are not lazy-loaded since they may be in a Navigation overlay, Details block, or Accordion Item block and need to be loaded the instant the user toggles the block.
* `IMG` tags with `fetchpriority=auto` do not increase the media count since they may be hidden in a viewport by block visibility settings.
* Blocks with conditional visibility (such as hidden on mobile or desktop) now automatically add `fetchpriority="auto"` to their contained `IMG` tags to prevent them from erroneously receiving `fetchpriority=high` or affecting the lazy-loading of subsequent images.
* An `IMG` with `fetchpriority=auto` which also surpasses the `wp_min_priority_img_pixels` threshold will prevent a subsequent image from getting `fetchpriority=high`.
Developed in https://github.com/WordPress/wordpress-develop/pull/11196
Includes backport of [https://github.com/WordPress/gutenberg/pull/76302 Gutenberg#76302].
See related Gutenberg issues:
- [https://github.com/WordPress/gutenberg/issues/76181 76181]: Image in navigation overlay can get `fetchpriority=high` and degrade LCP metric for page.
- [https://github.com/WordPress/gutenberg/issues/76268 76268]: Image in collapsed Details block may erroneously get `fetchpriority=high` even though hidden.
- [https://github.com/WordPress/gutenberg/issues/76301 76301]: Block Visibility: `IMG` in viewport-conditional block may get `fetchpriority=high` even when not displayed.
- [https://github.com/WordPress/gutenberg/issues/76335 76335]: Image in collapsed Accordion block may erroneously get `fetchpriority=high` even though hidden.
Follow-up to r56347, r56037.
Props westonruter, mukesh27, ramonopoly, wildworks.
See #58235.
Fixes#64823.
Built from https://develop.svn.wordpress.org/trunk@61934
git-svn-id: http://core.svn.wordpress.org/trunk@61216 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Previously in r61397, `add_query_arg()` was used to append versions or handle-specific query arguments. This resulted in stripping any existing duplicate query variables in the source URL (common in Google Fonts URLs). This change refactors `WP_Styles::_css_href()` and `WP_Scripts::do_item()` to manually append these parameters to the URL string. This ensures all original query variables are preserved exactly as provided. It also improves fragment handling by ensuring query parameters are inserted before any '#' anchor while maintaining the anchor's presence.
The URL encoding changes in `tests/phpunit/tests/dependencies/scripts.php` are reversions of what had previously been done in r61397.
Developed in https://github.com/WordPress/wordpress-develop/pull/11164
Follow-up to r61397, r61358.
Props westonruter, jonsurrell.
Fixes#64372.
Built from https://develop.svn.wordpress.org/trunk@61927
git-svn-id: http://core.svn.wordpress.org/trunk@61209 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This has historically worked until [61892] increased the strictness of the template file validation which dismissed any value of a type other than a string, which a stringable object is not.
Props dmsnell, westonruter.
Built from https://develop.svn.wordpress.org/trunk@61913
git-svn-id: http://core.svn.wordpress.org/trunk@61195 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This iterates on the changes from [61438] by removing the need to:
- Check out the WordPress/gutenberg repository at the pinned hash.
- Run `npm install` within that checkout.
- Run `npm build` within that checkout.
Instead, the build script will now download a prebuilt zip file published to the GitHub Container Registry by a GitHub Actions workflow recently merged to the Gutenberg Repository (related PR: https://github.com/WordPress/gutenberg/pull/75844).
This also removes redundant code responsible for:
- Copying files from the `gutenberg` directory to the appropriate locations during the build script in favor of using `grunt copy`.
- Modifying built files to replace specific text, such as `sourceMappingURL`, in favor of `grunt replace`.
The remaining files within the `tools/gutenberg` directory have been renamed to remove `gutenberg` from the file names. Since these are already nested in a `gutenberg` directory, that was redundant.
Since the intention of the pinned value for the repository in the `package.json` file is to specify a full-length commit hash, `ref` has been renamed to `sha`. In Git `ref` encompasses branches, tags, and commit hashes, so this hopefully makes it more clear that something like `branch-name` should not be used.
Follow up to [61438], [61439], [61458], [61492], [61677], [61867].
Props desrosj, dmsnell, westonruter, mcsf, jorbin.
See #64393.
Built from https://develop.svn.wordpress.org/trunk@61873
git-svn-id: http://core.svn.wordpress.org/trunk@61159 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The `theme.json` file `$schema` URL is relative in the `gutenberg` repository upstream. The URL is not currently being replaced with an aboslute one pointing to w.org due to a missing `transform: true` configuration.
Follow up to [61438], [61439], [61458], [61492], [61677].
See #64393.
Built from https://develop.svn.wordpress.org/trunk@61867
git-svn-id: http://core.svn.wordpress.org/trunk@61154 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Though `add_action()` and `add_filter()` are functionally equivalent internally, for proper semantics the former should be used on actions and the latter on filters.
Follow-up to [37920], [38046], [53266].
Props apermo.
Fixes#64828.
Built from https://develop.svn.wordpress.org/trunk@61866
git-svn-id: http://core.svn.wordpress.org/trunk@61153 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The option to enable real-time collaboration was first added in [61689] as `enable_real_time_collaboration` with a value of `1` and the `$db_version` was bumped in [61696].
The option then went through a series of changes. This included: the default value changing to `0` in [61702], being renamed to `wp_enable_real_time_collaboration` in [61722], removed entirely in [61828], and finally being re-added as `wp_enable_real_time_collaboration` in [61862].
Because the `$db_version` was not bumped after these changes, it’s possible that the `wp_enable_real_time_collaboration` option is not present on any site that ran the nightly build generated between [61696] and [61702], or a nightly build/beta release published after [61828]. Since `populate_options()` runs when a new site is installed, this issue only affects pre-existing sites that had upgradd their database when `wp_enable_real_time_collaboration` was not specified as a default option within `$defaults`.
This bumps the database version to `61833`, which is the most recent changeset to have modified the `$defaults` array in `populate_options()`.
Props dlh, maxschmeling, smithjw1, kbat82.
See #64824, #64622.
Built from https://develop.svn.wordpress.org/trunk@61864
git-svn-id: http://core.svn.wordpress.org/trunk@61151 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Set the generated content in the gallery selection strip to `content: none;` to remove the generated overlay. Follow up to [61757].
Props wildworks, hbhalodia, divyeshpatel01, huzaifaalmesbah, apermo, joedolson.
Fixes#64820.
Built from https://develop.svn.wordpress.org/trunk@61862
git-svn-id: http://core.svn.wordpress.org/trunk@61149 1a063a9b-81f0-0310-95a4-ce76da25c4cd
`wp_normalize_path()` is called thousands of times on a given request. This patch adds memoization via a function-local static variable. This reduces the call count to the underlying `wp_is_stream()` function, and measured in testing around a 66% cache hit rate.
In testing, for a site making 4000 calls to `wp_normalize_path()`, this patch led to a reduction in runtime from 1.4 ms to 0.4 ms on the test computer. While small, this time occurs early in the hotpath of the loading WordPress.
Developed in: https://github.com/WordPress/wordpress-develop/pull/10770
Discussed in: https://core.trac.wordpress.org/ticket/64538
Props dmsnell, josephscott, mreishus, westonruter.
Fixes#64538.
Built from https://develop.svn.wordpress.org/trunk@61857
git-svn-id: http://core.svn.wordpress.org/trunk@61144 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset clarifies the error message displayed when the current user tries to change their role to one that does not allow managing other users.
Props dpknauss, audrasjb, huzaifaalmesbah, noruzzaman, r1k0.
Fixes#64690.
Built from https://develop.svn.wordpress.org/trunk@61854
git-svn-id: http://core.svn.wordpress.org/trunk@61141 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Replace COEP/COOP headers with Document-Isolation-Policy (DIP) for cross-origin isolation in the block editor. DIP enables sharedBufferArray while avoiding the breakage COEP/COOP caused for third-party plugins whose iframes lost credentials and DOM access. Non supporting browsers have the client-side media feature disabled by default - falling back to the existing server side processing - to avoid a degraded editor experience.
Developed in https://github.com/WordPress/wordpress-develop/pull/11098
Props adamsilverstein, westonruter, manhar, swissspidy, mukesh27.
Fixes#64766.
Built from https://develop.svn.wordpress.org/trunk@61844
git-svn-id: http://core.svn.wordpress.org/trunk@61131 1a063a9b-81f0-0310-95a4-ce76da25c4cd