When resolving theme.json preset variables, add a check to make sure the value is not empty before we run it through strpos() and preg_match_all().
Props ramonopoly, mukesh27, get_dave.
Fixes#60613.
git-svn-id: https://develop.svn.wordpress.org/trunk@57716 602fd350-edb4-49c9-b593-d223f7449a82
Introducing the new content & design for the 6.5 About page & related pages. This style is simplified, with no header images, and brings back the illustrations from previous versions for Contribute, Freedoms, and Privacy.
This also includes a fix for heading hierarchy on the Get Involved page.
Props laurlittle, dansoschin, benjamin_zekavica, richtabor, joen, annezazu, swissspidy, marybaum, ryelle, huzaifaalmesbah.
See #60303.
git-svn-id: https://develop.svn.wordpress.org/trunk@57715 602fd350-edb4-49c9-b593-d223f7449a82
Adds context to strings where applicable to disambiguate them, coherently throughout the admin. Also improves some of the strings introduced in [57545] to ease localization.
Props swissspidy, costdev.
Fixes#60630. See #22316.
git-svn-id: https://develop.svn.wordpress.org/trunk@57714 602fd350-edb4-49c9-b593-d223f7449a82
This fixes a number of issues, chief among them:
- Updates to the site title are reflected in the preview.
- Improve alt text for preview
- Make string describing site icon more succinct.
- Add inline documentation to JavaScript
Props kebbet, jorbin, swissspidy, afercia, mukesh27, alexstine, jameskoster, andraganescu.
Fixes#54370.
git-svn-id: https://develop.svn.wordpress.org/trunk@57713 602fd350-edb4-49c9-b593-d223f7449a82
This aims to make the file, button, quote, pullquote, and search block selectors work on multiple WordPress versions.
Follow-up to [57637].
Props poena, mukesh27.
Fixes#59922.
git-svn-id: https://develop.svn.wordpress.org/trunk@57712 602fd350-edb4-49c9-b593-d223f7449a82
Addresses an issue with password reset keys when the email address contains special characters such as apostrophes.
Props emirpprime, rajinsharwar, fnpen, hellofromTonya, oglekler, nicolefurlan.
Fixes#52529.
git-svn-id: https://develop.svn.wordpress.org/trunk@57711 602fd350-edb4-49c9-b593-d223f7449a82
Fix variable alignment in changed tests. Follow-up to [r57708]. Because I edited the wrong local copy when I fixed that.
Props joedolson.
See #34668.
git-svn-id: https://develop.svn.wordpress.org/trunk@57709 602fd350-edb4-49c9-b593-d223f7449a82
Change the admin toolbar to have `role="menu"` and support opening for screen readers. Remove screen reader only log out link and collapse duplicate profile links into one link. This is an imperfect solution to a complex problem in the adminbar, but the lack of screen reader access to submenus is a major accessibility problem, and this fix provides access, even if the mechanism is imperfect.
Screen reader log out added in [21452].
Props abletec, Cheffheid, sabernhardt, alexstine, joedolson, afercia, sparklingrobots, danieltj, swissspidy, netweb, dionysous.
Fixes#34668, #43633.
git-svn-id: https://develop.svn.wordpress.org/trunk@57708 602fd350-edb4-49c9-b593-d223f7449a82
Modify `is_wp_version_compatible()` to return the expected result for major WordPress versions formatted as either `x.x` or `x.x.0` (for example `6.5` and `6.5.0`).
The WordPress project currently documents major version numbers in both formats leading to confusion for developers using the `is_wp_version_compatible()` function. As the PHP function `version_compare()` treats `x.x` and `x.x.0` as different version numbers this leads to unexpected results in the WP function.
This change removes a trailing `.0` from major version numbers to account for the WordPress project using the two formats interchangeably.
Props afragen, azaozz, costdev, joemcgill, jorbin, kkmuffme, sessioncookiemonster, swissspidy, wazeter.
Fixes#59448.
git-svn-id: https://develop.svn.wordpress.org/trunk@57707 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 [57283].
See #59655.
git-svn-id: https://develop.svn.wordpress.org/trunk@57706 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 [34456], [34460].
Props costdev.
See #59655.
git-svn-id: https://develop.svn.wordpress.org/trunk@57705 602fd350-edb4-49c9-b593-d223f7449a82
Removes the `WP_Translation_Controller::set_locale()` call from `wp-settings.php`, which happened before the current user was loaded.
That caused translations to be missing when the site locale and user locale were different, as the translation was associated with the wrong locale.
Turns out this call was not needed at all, as the locale will be set/updated when calling `load_textdomain()` anyway.
Props oglekler.
See #59656.
git-svn-id: https://develop.svn.wordpress.org/trunk@57704 602fd350-edb4-49c9-b593-d223f7449a82
This is a followup to [57683], which adds additional unit test coverage to ensure block pattern content is not loaded from files during registration, but instead when those patterns are accessed. This also improves the `set_up` and `tear_down` methods for the `Tests_Blocks_wpBlockPattersRegistry` test class to ensure that any modifications made to registered blocks during the tests are reset after each test.
Props thekt12, joemcgill.
See #59532.
git-svn-id: https://develop.svn.wordpress.org/trunk@57703 602fd350-edb4-49c9-b593-d223f7449a82
Removes deprecated options that no longer have any effect, and updates the targeted ES version in line with WordPress’ browser support.
This change mostly allows new code to properly use trailing commas, as added by the Prettier formatter.
Future efforts should rather go towards adopting ESLint for code formatting, see #31823.
Props netweb.
Fixes#28236.
git-svn-id: https://develop.svn.wordpress.org/trunk@57702 602fd350-edb4-49c9-b593-d223f7449a82
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