The name of this function should not be editable by the translator in the internationalized return error string.
Props naoki0h, swissspidy, kirasong.
Fixes#60590.
git-svn-id: https://develop.svn.wordpress.org/trunk@57699 602fd350-edb4-49c9-b593-d223f7449a82
Handles when the `$field` (i.e. key or property) is missing in one of the `$input_list` items by checking the key (array) or property (object) exists before using it for assignment.
Resolves the following bugs:
* a PHP warning for undefined key|property.
* `null` being set for that array or object within the returned list.
The changes resolve the issues in both `WP_List_Util::pluck()` (if invoked directly) and `wp_list_pluck()`.
Also includes an additional test for the scenario where the `wp_list_pluck()` `$index_key` is not `null`, the `$field` is missing in one of the `$input_list` items.
Follow-up to [55423], [51663], [42527], [38928].
Props iamarunchaitanyajami, davidbinda, hellofromTonya, helgatheviking.
Fixes#59774.
git-svn-id: https://develop.svn.wordpress.org/trunk@57698 602fd350-edb4-49c9-b593-d223f7449a82
Fixes a misaligned spinner icon when opening the plugin details information in a new tab rather than the modal, and then installing the plugin in that window.
Props huzaifaalmesbah, zunaid321, swissspidy.
Fixes#60494.
git-svn-id: https://develop.svn.wordpress.org/trunk@57697 602fd350-edb4-49c9-b593-d223f7449a82
Fixes a JavaScript error that caused the update count bubble not to decrement when updating a plugin.
Props nendeb55, swissspidy.
Fixes#60589.
git-svn-id: https://develop.svn.wordpress.org/trunk@57696 602fd350-edb4-49c9-b593-d223f7449a82
This resolves a WPCS warning:
{{{
Equals sign not aligned with surrounding statements
}}}
so that the output of `composer format` is clean.
Follow-up to [57687].
See #59650.
git-svn-id: https://develop.svn.wordpress.org/trunk@57694 602fd350-edb4-49c9-b593-d223f7449a82
The `$x_redirect_by` parameter is supported by `wp_redirect()` and `wp_safe_redirect()` to set the `X-Redirect-By` header.
It can be modified via the `x_redirect_by` filter.
This updates the docblock to clarify that `false` can be passed to disable sending the header, which was previously undocumented behavior.
Props kkmuffme, swissspidy.
Fixes#60209.
git-svn-id: https://develop.svn.wordpress.org/trunk@57693 602fd350-edb4-49c9-b593-d223f7449a82
Update XX-large font-sizes so that the responsive typography meets the minimum ratio between the min and max font-sizes of 0.61 required for accessible responsive typography.
Props mikachan, ryokuhi, poena, dhruvishah2203, joedolson.
Fixes#58603.
git-svn-id: https://develop.svn.wordpress.org/trunk@57690 602fd350-edb4-49c9-b593-d223f7449a82
Changes to the `test_readme_mariadb_version()` test were made in an effort to stabilize the connection tests and CI failures. After the changeset, all multisite tests CI jobs connected and passed, but oddly all single site tests CI jobs repeatedly and consistently failed.
Reverting to unblock the CI jobs while continued investigation happens.
See #59647.
git-svn-id: https://develop.svn.wordpress.org/trunk@57689 602fd350-edb4-49c9-b593-d223f7449a82
Fix an issue where the actions sidebar in the media library could appear when there are no relevant actions available.
Props sruthi89, nithi22, ivanzhuck, dhruvishah2203, joemcgill, ukdrahul, joedolson, shailu25.
Fixes#58973.
git-svn-id: https://develop.svn.wordpress.org/trunk@57688 602fd350-edb4-49c9-b593-d223f7449a82
Add an argument to `wp_mime_type_icon()` to control the file type returned. Following [57638], there are two file formats in the media icons directory. Different systems would pull up different files by default dependent on the order loaded into the cached array, causing intermittent test failures and unpredictable behavior.
Function update allows core usages to always return the `.svg` while maintaining backwards compatibility for any extended usage that expects a `.png`. Follow up to [57638].
Also handles a missed case in media list view.
Props SergeyBiryukov, sabernhardt, joedolson, antpb.
Fixes#31352.
git-svn-id: https://develop.svn.wordpress.org/trunk@57687 602fd350-edb4-49c9-b593-d223f7449a82
Updates `wp_register_font_collection()` and `WP_Font_Collection` so that only font families can be loaded from a file or URL.
All metadata, such as name, description, and list of font categories, needs to be passed directly in PHP so that it can be properly localized.
Props swissspidy, mmaattiiaass, grantmkin, youknowriad.
Fixes#60509.
git-svn-id: https://develop.svn.wordpress.org/trunk@57686 602fd350-edb4-49c9-b593-d223f7449a82
This fixes a bug introduced by [57129] and [56635] in which deprecating the previous `TEMPLATEPATH` and `STYLESHEETPATH` constants in favor of `get_template_directory()` and `get_stylesheet_directory()` functions caused the active theme template path to change when using `switch_to_blog()`.
This introduces a new function, `wp_set_template_globals()`, which is called during the bootstrap process to store the template paths to new globals values `$wp_template_path` and `$wp_stylesheet_path`. This restores behavior to how things worked prior to [56635] but retains the ability for template values to be reset for better testability.
Related #18298, #60025.
Props joemcgill, flixos90, mukesh27, swissspidy, manfcarlo, metropolis_john, jeremyfelt.
Fixes#60290.
git-svn-id: https://develop.svn.wordpress.org/trunk@57685 602fd350-edb4-49c9-b593-d223f7449a82
The `test_readme_mariadb_version()` test method has been experiencing HTTP failures that result in test and CI failures.
This switches to mariadb.org which may result in more stable test runs.
Some additional safety assertions are also included.
Props hellofromTonya, SergeyBiryukov, costdev.
See #59647.
git-svn-id: https://develop.svn.wordpress.org/trunk@57684 602fd350-edb4-49c9-b593-d223f7449a82
Previously, the content for all registered patterns would get loaded on each request when the patterns are registered. Instead, this stores the path the pattern file during registration and reads the content the first time the pattern is used, which is a performance optimization.
Props thekt12, spacedmonkey, gziolo, aristath, joemcgill.
Fixes#59532.
git-svn-id: https://develop.svn.wordpress.org/trunk@57683 602fd350-edb4-49c9-b593-d223f7449a82
This bugfix resolves an issue in `export_wp()` with featured images.
When using Tools > Export and selecting either Posts or Pages (with or without a specific author), the resulting XML file now includes a XML item for each post|page's featured image attachment and its metadata.
Uses same chunking (for performance) and code patterns from existing code in the same file.
Adds a new test class for `export_wp()` with code coverage specific to this bugfix.
Follow-up to [34326], [14444], [6375], [6335].
Props billseymour, nateallen, petitphp, hellofromTonya, duck_, jane, rcain, jghazally, jghazally, smub, batmoo, axwax, creativeslice, dlocc, nacin, wonderboymusic, ganon, SergeyBiryukov, hlashbrooke, chriscct7, fischfood, hifidesign, ankit-k-gupta, 5um17, shailu25, huzaifaalmesbah, mukesh27.
Fixes#17379.
git-svn-id: https://develop.svn.wordpress.org/trunk@57681 602fd350-edb4-49c9-b593-d223f7449a82
This ensures that not only the return values match the expected results, but also that their type is the same.
Going forward, stricter type checking by using `assertSame()` should generally be preferred to `assertEquals()` where appropriate, to make the tests more reliable.
Follow-up to [34085], [35183], [48937], [53782], [53785], [53883], [54402].
Props costdev.
See #59655.
git-svn-id: https://develop.svn.wordpress.org/trunk@57680 602fd350-edb4-49c9-b593-d223f7449a82
Previously, the notice for listing dependencies in a plugin card was styled with the CSS `order` properties. This created a mismatch between the visual order and DOM order of elements in the plugin card.
For accessibility, visual order and DOM order must always match when they affect meaning and functionality.
This removes the CSS `order` properties and outputs the dependencies notice later, making the visual and DOM order match. Some unused/empty CSS is also removed.
Follow-up to [57545].
Props afercia, afragen, bosskhj, huzaifaalmesbah, mukesh27, costdev.
Fixes#60488.
git-svn-id: https://develop.svn.wordpress.org/trunk@57679 602fd350-edb4-49c9-b593-d223f7449a82
This changeset allows using symbolic links for `editorScript` and `editorStyle` in `register_block_type()`. This adds `realpath` to template and stylesheet in `get_block_asset_url()` to ensure returning canonicalized absolute pathnames.
Follow-up to [56683].
Props antonlukin, spacedmonkey, maxpertici.
Fixes#59175.
See #58525.
git-svn-id: https://develop.svn.wordpress.org/trunk@57675 602fd350-edb4-49c9-b593-d223f7449a82
Previously, the tests for `WP_Plugin_Dependencies::get_dependency_names()` performed an API request to WordPress.org. If an HTTP failure occurred when connecting to WordPress.org, this could trigger test failures.
This mocks the API response to prevent HTTP failures from triggering test failures.
Follow-up to [57545].
Props swissspidy, peterwilsoncc, costdev.
See #59647.
git-svn-id: https://develop.svn.wordpress.org/trunk@57674 602fd350-edb4-49c9-b593-d223f7449a82
This ensures that not only the return values match the expected results, but also that their type is the same.
Going forward, stricter type checking by using `assertSame()` should generally be preferred to `assertEquals()` where appropriate, to make the tests more reliable.
Follow-up to [49/tests], [198/tests], [34374], [48937], [52269].
Props costdev.
See #59655.
git-svn-id: https://develop.svn.wordpress.org/trunk@57673 602fd350-edb4-49c9-b593-d223f7449a82
Allow returning null from the `hooked_block` and `hooked_block_{$hooked_block_type}` filters to suppress a hooked block from being inserted. This is required to allow extenders conditionally inserting a hooked block based on e.g. the value of an attribute of the anchor block.
Props swissspidy, gziolo, joshuatf, tomjcafferkey.
Fixes 60580.
git-svn-id: https://develop.svn.wordpress.org/trunk@57668 602fd350-edb4-49c9-b593-d223f7449a82
This bumps the version of Node.js used in GitHub Codespaces from 16 to 20.
Follow up to [57212].
Props itschristiandale, huzaifaalmesbah.
Fixes#60555.
git-svn-id: https://develop.svn.wordpress.org/trunk@57667 602fd350-edb4-49c9-b593-d223f7449a82
In test assertions for the `set_ignored_hooked_blocks_metadata` function, the actual value was erroneously passed as the first argument, and the expected value as the second. This changeset rectifies this by swapping the arguments.
Follow-up [57627].
See #60506.
git-svn-id: https://develop.svn.wordpress.org/trunk@57666 602fd350-edb4-49c9-b593-d223f7449a82
These changes fix the selector used by block instance element styles for links so they do not get incorrectly applied to buttons.
Props aaronrobertshaw, freewebmentor, mukesh27.
Fixes#60557.
git-svn-id: https://develop.svn.wordpress.org/trunk@57664 602fd350-edb4-49c9-b593-d223f7449a82
Merges the changes from Core and Gutenberg for the following tests:
- WP_REST_Global_Styles_Controller_Test
- Tests_Theme_wpThemeJsonResolver
- Tests_Theme_wpThemeJsonSchema
- Tests_Theme_wpThemeJson
This will help ensure the stability of the theme.json style generation.
Props ajlende, scruffian, aaronrobertshaw, get_dave, youknowriad.
Fixes#60387.
git-svn-id: https://develop.svn.wordpress.org/trunk@57662 602fd350-edb4-49c9-b593-d223f7449a82
Ensures that `wp_is_block_theme()` is not called too early before the themes are fully setup.
This addresses an issue where a parent theme was mistakenly marked as being missing.
Props scruffian, youknowriad, swissspidy, poena, dennysdionigi, bgardner, westonruter.
Fixes#60411.
git-svn-id: https://develop.svn.wordpress.org/trunk@57661 602fd350-edb4-49c9-b593-d223f7449a82
This is a counterpart to the dynamic `hooked_block_{$block_type}` filter introduced in [57354],
which makes it easier to modify all hooked blocks prior to insertion.
Also adds the hooked block type as an additional argument to both filters for consistency.
Props bernhard-reiter, swissspidy.
Fixes#60574.
git-svn-id: https://develop.svn.wordpress.org/trunk@57660 602fd350-edb4-49c9-b593-d223f7449a82
Automatic deactivation of dependents with unmet dependencies requires a write operation to the database. This was performed during Core's bootstrap, which risked the database and cache becoming out-of-sync on sites with heavy traffic.
No longer loading plugins that have unmet requirements has not had a final approach decided core-wide, and is still in discussion in #60491 to be handled in a future release.
The `plugin_data` option, used to persistently store plugin data for detecting unmet dependencies during Core's bootstrap, is no longer needed.
Follow-up to [57545], [57592], [57606], [57617].
Props dd32, azaozz, swissspidy, desrosj, afragen, pbiron, zunaid321, costdev.
Fixes#60457. See #60491, #60510, #60518.
git-svn-id: https://develop.svn.wordpress.org/trunk@57658 602fd350-edb4-49c9-b593-d223f7449a82
This fixes two bugs in the font library.
- Fonts using special characters were not being rendered properly in the frontend.
- Allows the ability to use generic() in font family names.
Props mmaattiiaass, nithins53, kafleg, vivekawsm, swissspidy, audrasjb.
Fixes#60537.
git-svn-id: https://develop.svn.wordpress.org/trunk@57657 602fd350-edb4-49c9-b593-d223f7449a82
This ensures that not only the return values match the expected results, but also that their type is the same.
Going forward, stricter type checking by using `assertSame()` should generally be preferred to `assertEquals()` where appropriate, to make the tests more reliable.
Follow-up to [56052].
See #59655.
git-svn-id: https://develop.svn.wordpress.org/trunk@57656 602fd350-edb4-49c9-b593-d223f7449a82
This updates the following third-party GitHub Actions to their latest versions:
* Updates `actions/setup-node` from 4.0.1 to 4.0.2
* Updates `actions/upload-artifact` from 4.3.0 to 4.3.1
Props desrosj, thelovekesh.
See #59805.
git-svn-id: https://develop.svn.wordpress.org/trunk@57655 602fd350-edb4-49c9-b593-d223f7449a82
Update JavaScript files for tag suggestions and the TinyMCE link plugin to use client side translations. This allows for `_n()` to be used for strings requiring singular and plural versions in which the correct form is only known client side.
Props audrasjb, chaion07, costdev, hellofromtonya, johnbillion, marybaum, nicolefurlan, oglekler, rebasaurus, rsiddharth, sergeybiryukov, shaampk1, shahariaazam, swissspidy, tobifjellner.
Fixes#48244.
git-svn-id: https://develop.svn.wordpress.org/trunk@57654 602fd350-edb4-49c9-b593-d223f7449a82
This ensures that not only the return values match the expected results, but also that their type is the same.
Going forward, stricter type checking by using `assertSame()` should generally be preferred to `assertEquals()` where appropriate, to make the tests more reliable.
Follow-up to [48937], [54402], [54768], [57648].
Props costdev.
See #58683, #59655.
git-svn-id: https://develop.svn.wordpress.org/trunk@57653 602fd350-edb4-49c9-b593-d223f7449a82
This improves consistency as it matches the name of the function it is used in.
Props peterwilsoncc, shailu25.
Fixes#59545.
git-svn-id: https://develop.svn.wordpress.org/trunk@57651 602fd350-edb4-49c9-b593-d223f7449a82
This ensures that not only the return values match the expected results, but also that their type is the same.
Going forward, stricter type checking by using `assertSame()` should generally be preferred to `assertEquals()` where appropriate, to make the tests more reliable.
Follow-up to [27055], [48937], [54402], [57244], [57648].
Props costdev.
See #58683, #59655.
git-svn-id: https://develop.svn.wordpress.org/trunk@57650 602fd350-edb4-49c9-b593-d223f7449a82