In some cases, it's possible to seek back into a location found inside
an element which has been closed before the point in the document where
the `seek()` was made. In these cases the breadcrumb stack is lost, and
calling `get_breadcrumbs()` after the seek will return the wrong information.
In this patch, the HTML Processor takes a conservative approach and
moves to the front of the document, then reparses the document until
it reaches the sought-after location. This ensures consistency on
the stack of open elements and active formats, and preserves
breadcrumbs.
Developed in https://github.com/WordPress/wordpress-develop/pull/6185
Discussed in https://core.trac.wordpress.org/ticket/60687
Props jonsurrell.
Follow-up to [60687].
See #58517.
Fixes#60687.
git-svn-id: https://develop.svn.wordpress.org/trunk@57768 602fd350-edb4-49c9-b593-d223f7449a82
The images have been uploaded to the w.org CDN and added into the About page. Additionally, two unencoded apostrophes have been replaced in strings.
Props benjamin_zekavica, richtabor, laurlittle.
See #60303.
git-svn-id: https://develop.svn.wordpress.org/trunk@57767 602fd350-edb4-49c9-b593-d223f7449a82
Fixes some design changes and improves quality of comments and code styles following previous changes. Follow-up to [57708].
Props sabernhardt, huzaifaalmesbah, joedolson.
Fixes#43633. See #34668.
git-svn-id: https://develop.svn.wordpress.org/trunk@57765 602fd350-edb4-49c9-b593-d223f7449a82
Previously, the spacing between media toolbar elements in grid and list view did not match. We now use the same select margin across both views.
Props desrosj, seusmaniqbal, ianbelanger, subrataemfluence, sabernhardt, pooja1210, sumitbagthariya16, shailu25, devmuhib, huzaifaalmesbah, audrasjb.
Fixes#43904.
git-svn-id: https://develop.svn.wordpress.org/trunk@57764 602fd350-edb4-49c9-b593-d223f7449a82
In gettext, `0x950412de` is used to signal GNU MO files. In `WP_Translation_File_MO` this magic marker is used to detect whether a file uses little endian or big endian.
On 32 bit systems, this number will be interpreted by PHP as a float rather than an integer. This change adds extra casting to force an integer.
A similar change was done in the pomo library in the past, see #3780.
Props tmatsuur, swissspidy.
Fixes#60678.
git-svn-id: https://develop.svn.wordpress.org/trunk@57763 602fd350-edb4-49c9-b593-d223f7449a82
Increases clarity about where the function belongs to, bringing it in line with other related functions.
After initially merging this change in [57742] and reverting it in [57743], this reintroduces it now that the Gutenberg packages have been updated accordingly in [57760].
Props swissspidy, gziolo, cbravobernal, youknowriad, ankitmaru, westonruter, luisherranz, darerodz.
Fixes#60575.
git-svn-id: https://develop.svn.wordpress.org/trunk@57762 602fd350-edb4-49c9-b593-d223f7449a82
GitHub recently sunset support for Subversion, causing the `precommit:emoji` Grunt script to break. Since there’s no direct replacement for `svn ls` in Git, this has been replaced with a query through the GitHub CLI.
This also adds a step in the workflow that tests the build process to run the `precommit:emoji` script to ensure no changes to built files are missed when updating the Twemoji library in the future.
Follow up to [57626].
Props kraftbj, peterwilsoncc, swissspidy.
Fixes#60520. See #57600.
git-svn-id: https://develop.svn.wordpress.org/trunk@57758 602fd350-edb4-49c9-b593-d223f7449a82
This updates the following GitHub Actions to their latest versions:
- `shivammathur/setup-php` from `2.29.0` to `2.30.0`
- `actions/cache` from `4.0.0` to `4.0.1`
- `ramsey/composer-install` from `2.2.0` to `3.0.0`
- `codecov/codecov-action` from `4.0.1` to `4.1.0`
This should address the remaining notices caused by running Node.js 16.x on GitHub Actions runner machines in `trunk`.
Follow up to [57197], [57362], [57655].
See #59805.
git-svn-id: https://develop.svn.wordpress.org/trunk@57757 602fd350-edb4-49c9-b593-d223f7449a82
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