Add parity between site icon, custom header, and default image crop behaviors. [53027] fixed a bug where alt text and caption were not copied on custom headers, but did not apply that change in any other context.
Deprecate the `create_attachment_object` method in the `Wp_Site_Icon` and `Custom_Image_Header` classes and replace that functionality with the new function `wp_copy_parent_attachment_properties()` to improve consistency.
Props afercia, rcreators, jorbin, joedolson, huzaifaalmesbah, shailu25, swissspidy, mukesh27.
Fixes#60524.
git-svn-id: https://develop.svn.wordpress.org/trunk@57755 602fd350-edb4-49c9-b593-d223f7449a82
Ignores meta keys which are considered protected or not registered to be shown in the REST API. Adds tests.
Props santosguillamot, swissspidy, gziolo, xknown, peterwilsoncc.
Fixes#60651.
git-svn-id: https://develop.svn.wordpress.org/trunk@57754 602fd350-edb4-49c9-b593-d223f7449a82
Since `WP_Filesystem_Direct` is by far the most used filesystem abstraction class, this facilitates future changes with sufficient test coverage.
Props swissspidy, costdev, mukesh27.
Fixes#57774.
git-svn-id: https://develop.svn.wordpress.org/trunk@57753 602fd350-edb4-49c9-b593-d223f7449a82
Removes the custom `WP_Theme_JSON::is_assoc()` method again in favor of the existing `wp_is_numeric_array()` helper function.
Props mmaattiiaass, costdev, swissspidy, spacedmonkey.
Fixes#60360.
git-svn-id: https://develop.svn.wordpress.org/trunk@57751 602fd350-edb4-49c9-b593-d223f7449a82
Unintended leading whitespace at the beginning of a raw MySQL query led to unexpected behavior such as broken pagination. Eliminating said whitespace avoids that.
Adds unit tests to prevent regressions.
Props wpfed, swissspidy, ironprogrammer, tadamarketing, afercia.
Fixes#56841.
git-svn-id: https://develop.svn.wordpress.org/trunk@57750 602fd350-edb4-49c9-b593-d223f7449a82
Fix missing subitem indicator when menu items in the Customizer are children of parent menu items & add menu item original title to button text. Adds parity with the admin menu editor and fixes a bug where the button text was 'untitled' if the menu item title had not been edited.
Props designsimply, afercia, celloexpressions, kushang78, joedolson, rcreators.
Fixes#32728.
git-svn-id: https://develop.svn.wordpress.org/trunk@57746 602fd350-edb4-49c9-b593-d223f7449a82
When removing a single item from the bulk edit box or when adding more items, the “All” checkboxes at the top and bottom of the posts list table should be properly toggled.
Props hiteshtalpada, oglekler, webcommsat, ugyensupport, chaion07, Toru.
Fixes#59121.
git-svn-id: https://develop.svn.wordpress.org/trunk@57745 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.
Includes correcting the test class name.
Follow-up to [56714].
See #59655.
git-svn-id: https://develop.svn.wordpress.org/trunk@57744 602fd350-edb4-49c9-b593-d223f7449a82
This function can only be renamed after updating Gutenberg npm packages, as some of the core blocks already use this function.
See #60575.
git-svn-id: https://develop.svn.wordpress.org/trunk@57743 602fd350-edb4-49c9-b593-d223f7449a82
Increases clarity about where the function belongs to, bringing it in line with other related functions.
Props swissspidy, gziolo, cbravobernal, youknowriad, ankitmaru, westonruter, luisherranz, darerodz.
Fixes#60575.
git-svn-id: https://develop.svn.wordpress.org/trunk@57742 602fd350-edb4-49c9-b593-d223f7449a82
Changing the font library is something we expect hosts to perform.
It's important that we make this filter as seemless as possible.
This commit prevents a potential infinite loop caused by calling wp_get_upload_dir() within the font_dir filter.
Props mmaattiiaass, ironprogrammer, costdev, swissspidy.
Fixes#60652.
git-svn-id: https://develop.svn.wordpress.org/trunk@57740 602fd350-edb4-49c9-b593-d223f7449a82
Improvements made to the focus outline style for Twenty Twenty-Four caused a regression in the focus outlines of the block editor. This commit solves the regressions by reducing the CSS specificity while keeping the improvements.
Follow-up to [57554].
Props wildworks, poena, sabernhardt, youknowriad, oglekler.
Fixes#60535.
git-svn-id: https://develop.svn.wordpress.org/trunk@57739 602fd350-edb4-49c9-b593-d223f7449a82
When returning modifiable text in the HTML API, if the text segment
coerces to `false` inside `empty()`, then an empty string has been
returned instead of the string itself. For example, the text node in the
following HTML snippet:
{{{
<div>0</div>
}}}
In this patch the `empty()` check is removed. The purpose of the original
check was to skip further processing if the text content is empty, but
the check is not needed and the additioanl processing is minimal.
Removing the code removes the defect and leaves a cleaner method in its
absence.
Developed in https://github.com/WordPress/wordpress-develop/pull/6199
Follow-up to [57348]
Follow-up to #60170
git-svn-id: https://develop.svn.wordpress.org/trunk@57738 602fd350-edb4-49c9-b593-d223f7449a82
Includes:
* Moving pre-existing `wp_parse_id_list()` tests to their own file.
* Merging new and pre-existing `wp_parse_slug_list()` tests.
* Using named data provider in `wp_parse_list()` tests.
Follow-up to [25170], [40044], [44546], [57284], [57725].
Props pbearne, mukesh27, SergeyBiryukov.
Fixes#60218. See #60217, #59647.
git-svn-id: https://develop.svn.wordpress.org/trunk@57737 602fd350-edb4-49c9-b593-d223f7449a82
Previously, `WP_Plugin_Dependencies::get_dependency_api_data()` attempted to set an array key using the `slug` property returned in a Plugins API response. However, the Plugins API response is filterable and may not contain a `slug` property.
Earlier in the method, a local `$slug` variable is used as a key for the same array.
For safety and consistency, this replaces array key references to `$information->slug` with `$slug`.
Follow-up to [57545].
Props pbiron, afragen, swissspidy, costdev.
Fixes#60540.
git-svn-id: https://develop.svn.wordpress.org/trunk@57736 602fd350-edb4-49c9-b593-d223f7449a82
r57698 caused a regression for arrays of objects which have magic methods and dynamic properties. A fix is identified.
However, a deeper dive discovered additional scenarios which will require a different fix.
Reverting gives more time for resolving these scenarios and more soak time to discover if there are others.
Props dd32, jamescollins, swissspidy.
See #59774.
git-svn-id: https://develop.svn.wordpress.org/trunk@57732 602fd350-edb4-49c9-b593-d223f7449a82
This documents the new `filePath` property supported by `WP_Block_Patterns_Registry::register` and also updates the property name to camel case formatting to be consistent with other block pattern properties.
Props thekt12, spacedmonkey, joemcgill.
See #59532.
git-svn-id: https://develop.svn.wordpress.org/trunk@57731 602fd350-edb4-49c9-b593-d223f7449a82
This uses the new strings for alt text and site icon description that were introduced in [57713] as a part of #54370.
The strings are translated in PHP and then use `wp.i18n.sprintf` since the alt text strings live in a PHP file even though they are output as part of a template that is used in JavaScript.
Props westonruter, swissspidy, jorbin.
Fixes#60641.
git-svn-id: https://develop.svn.wordpress.org/trunk@57730 602fd350-edb4-49c9-b593-d223f7449a82
This commit updates the theme.json style generation to allow a font family name to be repeated across theme.json origins (default, theme, custom).
Props mmaattiiaass, hellofromtonya, arthur791004, ironprogrammer.
Fixes#60605.
git-svn-id: https://develop.svn.wordpress.org/trunk@57720 602fd350-edb4-49c9-b593-d223f7449a82
The new test checks the functionality of the text direction setting, ensuring it correctly switches between `rtl` and `ltr` options.
Props pbearne, SergeyBiryukov.
Fixes#60219.
git-svn-id: https://develop.svn.wordpress.org/trunk@57718 602fd350-edb4-49c9-b593-d223f7449a82
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