This ensures that data providers or helper functions used by a single test are located next to the test, for consistency with the rest of the test suite.
Follow-up to [37905], [37943], [45809], [47239], [47260], [47351], [48947], [49252], [49257], [51960], [53110], [56096], [59032].
See #64225.
Built from https://develop.svn.wordpress.org/trunk@62205
git-svn-id: http://core.svn.wordpress.org/trunk@61485 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The design changes to admin notices links in the admin refresh were applied broadly to `.notice, .error, and .updated` classes, but these classes are sometimes used outside the context of an admin notice.
Change selectors from `.notice a, .error a, .updated a` to `div.notice a, div.error a, div.updated a`.
Props opurockey, audrasjb, vgnavada, gaisma22, shailu25, rbcorrales, joedolson.
Fixes#64976.
Built from https://develop.svn.wordpress.org/trunk@62200
git-svn-id: http://core.svn.wordpress.org/trunk@61480 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Use the plugin's main file path relative to the plugins directory
(e.g. `akismet/akismet.php` or `hello.php`) instead of the WordPress.org slug
to identify a connector's associated plugin.
This lets `_wp_connectors_get_connector_script_module_data()` check plugin
status with `file_exists()` and `is_plugin_active()` directly, removing the
`get_plugins()` slug-to-file mapping that was previously needed.
Props jorgefilipecosta, mukesh27, gziolo.
Fixes#65002.
Built from https://develop.svn.wordpress.org/trunk@62192
git-svn-id: http://core.svn.wordpress.org/trunk@61472 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Update min-height from 30px to 32px for the color picker button and related elements to match new design system.
Props audrasjb, hmbashar, huzaifaalmesbah, joedolson, juanmaguitar, mukesh27, noruzzaman, ozgursar, rahultank, rcorrales, sajib1223, tusharaddweb, vgnavada, wildworks.
Fixes#64761.
Built from https://develop.svn.wordpress.org/trunk@62191
git-svn-id: http://core.svn.wordpress.org/trunk@61471 1a063a9b-81f0-0310-95a4-ce76da25c4cd
In [62145], an `::after` CSS rule was added that caused an overflow, resulting in an unintended scrollbar always appearing on Windows OS for example. This changeset removes the related CSS rule which is unnecessary to fix the initial issue.
Follow-up to [62145].
Props wildworks, SergeyBiryukov, sabernhardt, audrasjb, huzaifaalmesbah, mehrazmorshed, mukesh27.
Fixes#64744.
Built from https://develop.svn.wordpress.org/trunk@62187
git-svn-id: http://core.svn.wordpress.org/trunk@61467 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The "Bulk Edit" translation string is used for both verbs and nouns, and may have different translations in some Locales. This changeset helps disambuguating these different contexts.
Follow-up to [61255].
Props audrasjb, shailu25.
Fixes#64994.
Built from https://develop.svn.wordpress.org/trunk@62186
git-svn-id: http://core.svn.wordpress.org/trunk@61466 1a063a9b-81f0-0310-95a4-ce76da25c4cd
"Notes" translation string is used in both the Notes features and in the Link Manager, and they can have different meaning in some Locales, like in German for example. This changeset helps disambuguating these different contexts.
Props westonruter, dmsnell, johnbillion.
Fixes#64980.
Built from https://develop.svn.wordpress.org/trunk@62185
git-svn-id: http://core.svn.wordpress.org/trunk@61465 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Validate `setting_name`, `constant_name`, and `env_var_name` in connector
registration — reject invalid values with `_doing_it_wrong()` instead of
silently falling back.
Change the auto-generated `setting_name` pattern from
`connectors_ai_{$id}_api_key` to `connectors_{$type}_{$id}_api_key` so it
works for any connector type. Built-in AI providers infer their names using
the existing `connectors_ai_{$id}_api_key` convention, preserving backward
compatibility.
Add `constant_name` and `env_var_name` as optional authentication fields,
allowing connectors to declare explicit PHP constant and environment
variable names for API key lookup. AI providers auto-generate these using
the `{CONSTANT_CASE_ID}_API_KEY` convention.
Refactor `_wp_connectors_get_api_key_source()` to accept explicit
`env_var_name` and `constant_name` parameters instead of deriving them from
the provider ID. Environment variable and constant checks are skipped when
not provided.
Generalize REST dispatch, settings registration, and script module data to
work with all connector types, not just `ai_provider`. Settings
registration skips already-registered settings. Non-AI connectors determine
`isConnected` based on key source.
Replace `isInstalled` with `pluginFile` in script module data output to fix
plugin entity ID resolution on the frontend.
Update PHPDoc to reflect current behavior — widen `type` from literal
`'ai_provider'` to `non-empty-string`, document new authentication fields,
and use Anthropic examples throughout.
Props gziolo, jorgefilipecosta.
Fixes#64957.
Built from https://develop.svn.wordpress.org/trunk@62180
git-svn-id: http://core.svn.wordpress.org/trunk@61462 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Replace `void` in union return types with `null` or remove it where the function always returns a value or dies, across 8 files in `wp-admin/includes`. Adds explicit `return null;` statements where functions previously fell through without a return value.
Additionally:
* Adds `@return never` for `media_send_to_editor()` and removes misleading `return` from its callers.
* Removes `void` from return types where the function always returns a value or exits: `write_post()`, `WP_Importer::set_blog()`, `WP_Importer::set_user()`.
* Replaces `mixed|void` with a specific array shape for `WP_Site_Health::perform_test()`.
Developed in https://github.com/WordPress/wordpress-develop/pull/11008
Follow-up to r62178, r62177, r61766, r61719.
Props apermo, xate, westonruter, mukesh27, desrosj.
Fixes#64702.
Built from https://develop.svn.wordpress.org/trunk@62179
git-svn-id: http://core.svn.wordpress.org/trunk@61461 1a063a9b-81f0-0310-95a4-ce76da25c4cd
In PHP's type system, `void` means a function does not return a value and cannot be part of a union type. Many functions in core were documented as returning e.g. `string|void` while actually returning `null` implicitly via bare `return;` statements. This replaces `void` with `null` in union return types, adds explicit `return null;` statements, and updates `@return` annotations across 22 files in `wp-includes`.
Additionally:
* Adds `@return never` for `WP_Recovery_Mode::redirect_protected()`.
* Fixes `WP_Theme_JSON::set_spacing_sizes()` to use `@return void` instead of `@return null|void`.
* Removes `void` from return types where the function always returns a value or dies: `remove_theme_support()`, `WP_Recovery_Mode::handle_error()`.
* Fixes `wp_die()` return type from `never|void` to `void` with clarified description.
* Initializes `$primary` variable in `get_active_blog_for_user()` to prevent a possible undefined variable notice.
Developed in https://github.com/WordPress/wordpress-develop/pull/11012
Follow-up to r62177, r61766, r61719.
Props apermo, xateman, westonruter, parthvataliya, nimeshatxecurify.
See #64704.
Built from https://develop.svn.wordpress.org/trunk@62178
git-svn-id: http://core.svn.wordpress.org/trunk@61460 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Replace `void` in union return types with `null`, `false`, or `never` as appropriate, and add explicit `return null` statements where methods previously fell through without a return value.
Methods updated in `wpdb`: `prepare()`, `print_error()`, `check_connection()`, `get_row()`, `get_col_info()`, `bail()`, `check_database_version()`.
Also adds `@return never` to `dead_db()` and fixes the `@phpstan-return` syntax for `wp_die()`.
Developed in https://github.com/WordPress/wordpress-develop/pull/11009
Props apermo, westonruter, xate, mukesh27, SergeyBiryukov.
Fixes#64703.
Built from https://develop.svn.wordpress.org/trunk@62177
git-svn-id: http://core.svn.wordpress.org/trunk@61459 1a063a9b-81f0-0310-95a4-ce76da25c4cd
* Add `is_array()` checks before accessing return values from `wp_get_attachment_image_src()` in `get_oembed_response_data_rich()`, `wp_playlist_shortcode()`, and `wp_prepare_attachment_for_js()`.
* Guard `wp_getimagesize()` calls within `wp_get_attachment_image_src()` itself.
* Ensure `wp_get_attachment_image_src()` always returns the expected `array{0: string, 1: int, 2: int, 3: bool}` type or `false` by normalizing the filter result with explicit type casting and default values.
* Add `@phpstan-return` annotations to both `wp_get_attachment_image_src()` and `wp_getimagesize()` for the specific array shapes.
Developed in https://github.com/WordPress/wordpress-develop/pull/11073
Props hbhalodia, westonruter, mukesh27, edent, ozgursar, roshniahuja14.
Fixes#64742.
Built from https://develop.svn.wordpress.org/trunk@62176
git-svn-id: http://core.svn.wordpress.org/trunk@61458 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This makes minor code simplifications by removing unnecessary ternary operations and directly assigning boolean expressions. These changes make the code easier to read and maintain, but do not alter the underlying logic.
Props Soean.
See #64898.
Built from https://develop.svn.wordpress.org/trunk@62173
git-svn-id: http://core.svn.wordpress.org/trunk@61455 1a063a9b-81f0-0310-95a4-ce76da25c4cd
`line-height` values that were previously used to match the height of input fields affect the height of the background shown when text inside those fields is selected. Removing these `line-height` declarations allows the text selection highlight to render more naturally.
Additionally, update the height of the custom Date/Time format input fields on the General Settings screen to `32px` to align with the new design system.
Props arkaprabhachowdhury, audrasjb, hmrisad, huzaifaalmesbah, manhar, manishxdp, noruzzaman, ozgursar, r1k0, sachinrajcp123, wildworks.
Fixes#64763.
Built from https://develop.svn.wordpress.org/trunk@62171
git-svn-id: http://core.svn.wordpress.org/trunk@61453 1a063a9b-81f0-0310-95a4-ce76da25c4cd
A test in the `external-http` group that detects when the recommended version of MySQL is too old is failing due to an upstream change to the content of version documentation pages.
Because the required information is no longer on the page, this switches to using the public API from endoflife.date. This site is an open source (MIT licensed) resource that is actively maintained.
Props peterwilsoncc.
See #64894.
Built from https://develop.svn.wordpress.org/trunk@62170
git-svn-id: http://core.svn.wordpress.org/trunk@61452 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Configured the Real Time Collaboration post type to be excluded from exports by default. The data is considered ephemeral and includes data on post IDs that may not match the IDs of posts on the importing site.
Introduces a test to the export test suite to ensure that post types set to be excluded from exports are, in fact, excluded from exports.
Props peterwilsoncc, desrosj, westonruter, jorbin, mukesh27, czarate.
Fixes#64964.
Built from https://develop.svn.wordpress.org/trunk@62168
git-svn-id: http://core.svn.wordpress.org/trunk@61450 1a063a9b-81f0-0310-95a4-ce76da25c4cd
In [61873], the `build` script started failing in some environemnts due to logic that added a requirement for `php-cli`.
While WordPress itself cannot be run without PHP, the build script has never required PHP to be present to prepare `wordpress-develop` for use. This adjusts the relevant code to make use of the `php-array-reader` package instead.
Reviewed by peterwilsoncc.
Props dmsnell, peterwilsoncc, gaisma22, SirLouen, sabernhardt, manhar.
Fixes#64925. See #64393.
Built from https://develop.svn.wordpress.org/trunk@62157
git-svn-id: http://core.svn.wordpress.org/trunk@61439 1a063a9b-81f0-0310-95a4-ce76da25c4cd
After [62117] through [62144] along with [62147] through [62149], a number of block directories included css files as the result of `npm build`. To fix this and prevent a recurrence when new blocks are added, this moves from the `svn:ignore` property needing to be set on each individual directory to using the `svn:global-ignores` property which is recursive.
This was accomplished by running the following commands:
{{{
svn propdel svn:ignore -R src/wp-includes/blocks/*
svn propset svn:global-ignores '*.css
*.js
*.js.map' src/wp-includes/blocks
}}}
Discussed in https://wordpress.slack.com/archives/C08D0Q6BHNY/p1774546046110849
Reviewed-by:dmsnell and jonsurrell.
Props dmsnell, johnbillion, jonsurrell, jorbin.
See #64393.
Built from https://develop.svn.wordpress.org/trunk@62155
git-svn-id: http://core.svn.wordpress.org/trunk@61437 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Since button and media view CSS can sometimes be enqueued by extenders in contexts where either `wp-base-styles` are not present or the `body` wrapper class is omitted, these variables should use fallback values.
Reviewed by audrasjb.
Props huzaifaalmesbah, wildworks, mukesh27, noruzzaman, joedolson, sabernhardt, audrasjb, shailu25.
Fixes#64840.
Built from https://develop.svn.wordpress.org/trunk@62154
git-svn-id: http://core.svn.wordpress.org/trunk@61436 1a063a9b-81f0-0310-95a4-ce76da25c4cd
When RTC is enabled, let the "Join" action link in the post list turn into "Edit" after the post lock expires. Do this by rendering both "Edit" and "Join" as separate spans and toggling visibility via CSS using the `wp-collaborative-editing` class that heartbeat already manages. Do the same to aria-label with screen-reader-text spans so the accessible name stays in sync with the visible text across lock state changes.
Developed in https://github.com/WordPress/wordpress-develop/pull/11346.
Follow-up to [62074].
Props shekharnwagh.
See #64622.
Built from https://develop.svn.wordpress.org/trunk@62146
git-svn-id: http://core.svn.wordpress.org/trunk@61428 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset ensures the styles for bar, highlight and contextual help always take into account the admin color scheme settings.
Reviewed by joedolson.
Props fabiankaegy, audrasjb, ozgursar, noruzzaman, shailu25, sandipsinh007, tusharaddweb, hbhalodia, amesplant, joedolson.
Fixes#64744.
See #64308.
Built from https://develop.svn.wordpress.org/trunk@62145
git-svn-id: http://core.svn.wordpress.org/trunk@61427 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commits changes to built files that were not included in the previous commit that restored version history for files that were previously subject to version control.
This also reverts [62069], which was a temporary fix to ensure deleted files that are no longer desired were cleaned up on the build server prior to committing the changes.
Finally, the `src/wp-includes/build` and all its contents to the exclusion list for PHPCS scans. There are small coding standards failures in these files that need to be resolved upstream before the scan will pass on this directory.
Props dmsnell, ellatrix, desrosj.
See #64393.
Built from https://develop.svn.wordpress.org/trunk@62144
git-svn-id: http://core.svn.wordpress.org/trunk@61426 1a063a9b-81f0-0310-95a4-ce76da25c4cd
In [61438] and successive fixes, a number of files were deleted and added to `.gitignore`. These files were removed because they are built from the Gutenberg repo and copied into the Core repo. However, because the only artifact of udpates to those files are an opaque hash change, it’s important to have a copy of the files at the change in version control for the purposes of auditing, debugging, benchmarking, and tracking.
This patch merges a version-history from before the initial changeset and reattaches the version-tracking to these files, creating immitation commits along each step where the files were updated in a Gutenberg sync.
Developed in: https://github.com/WordPress/wordpress-develop/pull/11064
Discussed in: https://core.trac.wordpress.org/ticket/64393
Follow-up to [61438].
Props 762e5e74, aidvu, desrosj, dmsnell, jonsurrell, youknowriad.
See #64393.
Built from https://develop.svn.wordpress.org/trunk@62143
git-svn-id: http://core.svn.wordpress.org/trunk@61425 1a063a9b-81f0-0310-95a4-ce76da25c4cd
`WP_Connector_Registry::register()` always auto-generates the `setting_name`
for connectors with `api_key` authentication, ignoring any caller-provided
value. This prevents connectors from using existing WordPress options as their
API key storage.
This change checks for a non-empty `setting_name` in the provided args before
falling back to the auto-generated name.
Props jorgefilipecosta, gziolo.
Fixes#64957.
Built from https://develop.svn.wordpress.org/trunk@62116
git-svn-id: http://core.svn.wordpress.org/trunk@61398 1a063a9b-81f0-0310-95a4-ce76da25c4cd