When making repeated updates to a document, the Tag Processor will end
up copying the entire document once for every update. This can lead to
catastrophic behavior in the worse case.
However, when batch-applying updates it's able to copy chunks of the
document in one thread and only end up copying the entire document once
for the entire batch.
Previously the Tag Processor has been eagerly applying udpates, but in
this patch it defers applying those updates as long as is possible.
Developed in https://github.com/WordPress/wordpress-develop/pull/6120
Discussed in https://core.trac.wordpress.org/ticket/60697
Follow-up to [55706], [56941], [57348].
Reviewed by swissspidy.
Merges [57805] to the to the 6.5 branch.
Props dmsnell, bernhard-reiter, jonsurrell, westonruter.
Fixes#60697.
Built from https://develop.svn.wordpress.org/branches/6.5@57815
git-svn-id: http://core.svn.wordpress.org/branches/6.5@57316 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This removes settings that are the default value or required for side-loading from the `WP_REST_Font_Faces_Controller::handle_font_file_upload()`.
This is to harden the endpoint and future proof against any changes to `wp_handle_upload()` and related functions/security checks.
Reviewed by swissspidy, audrasjb.
Merges [57804] to the to the 6.5 branch.
Props peterwilsoncc, dd32.
Fixes#60741.
Built from https://develop.svn.wordpress.org/branches/6.5@57813
git-svn-id: http://core.svn.wordpress.org/branches/6.5@57314 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset removes the "Pattern overrides" section from features.
Also updates the field guide link, this link should redirect correctly once the post is published.
Follow-up to [57715], [57767].
Reviewed by audrasjb.
Merges [57809] to the to the 6.5 branch.
Props ryelle, benjamin_zekavica, richtabor, laurlittle.
See #60303.
Built from https://develop.svn.wordpress.org/branches/6.5@57810
git-svn-id: http://core.svn.wordpress.org/branches/6.5@57311 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset switches back the admin menu items `height` property to `px` unit to prevent issues with themes using `html { font-size: 62.5%; }`.
Follow-up to [57765].
Reviewed by swissspidy.
Merges [57792] to the to the 6.5 branch.
Props bgnicolepaschen, sabernhardt, huzaifaalmesbah, ironprogrammer, shailu25, mohonchandra.
Fixes#60707.
See #43633.
Built from https://develop.svn.wordpress.org/branches/6.5@57808
git-svn-id: http://core.svn.wordpress.org/branches/6.5@57309 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Resetting the `$wp_current_filter` global during test teardown is unnecessary, as it is taken care of by the unit test's base class.
This changeset removes the reset accordingly.
Follow-up [57790].
Reviewed by swissspidy.
Merges [57799] to the to the 6.5 branch.
Props swissspidy, timothyblynjacobs.
See #60671.
Built from https://develop.svn.wordpress.org/branches/6.5@57803
git-svn-id: http://core.svn.wordpress.org/branches/6.5@57304 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset adds a new `rest_pre_insert_{$this->post_type}` filter in the `WP_REST_Templates_Controller`, where it is applied to the return value of the `prepare_item_for_database` method. (This is consistent with the `WP_REST_Post_Controller`, where that filter has existed before.)
The new filter is then used to inject hooked blocks into the template (or template part) content received via the endpoint, prior to persisting it to the database.
This supersedes the previous mechanism, which was using the `rest_after_insert_{$this->post_type}` ''action'', from which it performed an additional `wp_update_post` call to update the template (part) content with the hooked blocks injected. The new technique eschews that additional call and the resulting extra revision it created, as well as a problem with regard to duplicated escaping and sanitization, which had caused some special characters to be garbled.
Reviewed by swissspidy.
Merges [57790] to the to the 6.5 branch.
Props tomjcafferkey, gziolo, swissspidy, karolmanijak.
Fixes#60671.
Built from https://develop.svn.wordpress.org/branches/6.5@57802
git-svn-id: http://core.svn.wordpress.org/branches/6.5@57303 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This makes several refinements to the various error messages displayed throughout the WordPress admin related to plugin dependencies. Additionally, it adds some conditions to display more appropriate messages for multisite installs with proper context to the user’s capabilities.
Props costdev, swissspidy, afragen, huzaifaalmesbah, knutsp.
Fixes#60465.
Built from https://develop.svn.wordpress.org/trunk@57770
git-svn-id: http://core.svn.wordpress.org/trunk@57271 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This makes several refinements to the various notices displayed in the WordPress admin related to plugin dependencies. Additionally, it adds some conditions to display more appropriate messages for multisite installs with proper context to the user’s capabilities.
Props costdev, joedolson, afragen, swissspidy, peterwilsoncc, euthelup.
Fixes#60465.
Built from https://develop.svn.wordpress.org/trunk@57769
git-svn-id: http://core.svn.wordpress.org/trunk@57270 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@57768
git-svn-id: http://core.svn.wordpress.org/trunk@57269 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@57764
git-svn-id: http://core.svn.wordpress.org/trunk@57265 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@57763
git-svn-id: http://core.svn.wordpress.org/trunk@57264 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@57762
git-svn-id: http://core.svn.wordpress.org/trunk@57263 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@57758
git-svn-id: http://core.svn.wordpress.org/trunk@57259 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@57757
git-svn-id: http://core.svn.wordpress.org/trunk@57258 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@57755
git-svn-id: http://core.svn.wordpress.org/trunk@57256 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@57750
git-svn-id: http://core.svn.wordpress.org/trunk@57251 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@57746
git-svn-id: http://core.svn.wordpress.org/trunk@57247 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@57745
git-svn-id: http://core.svn.wordpress.org/trunk@57246 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@57744
git-svn-id: http://core.svn.wordpress.org/trunk@57245 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@57740
git-svn-id: http://core.svn.wordpress.org/trunk@57241 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@57739
git-svn-id: http://core.svn.wordpress.org/trunk@57240 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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
Built from https://develop.svn.wordpress.org/trunk@57738
git-svn-id: http://core.svn.wordpress.org/trunk@57239 1a063a9b-81f0-0310-95a4-ce76da25c4cd