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.
Props peterwilsoncc, dd32.
Fixes#60741.
git-svn-id: https://develop.svn.wordpress.org/trunk@57804 602fd350-edb4-49c9-b593-d223f7449a82
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].
Props swissspidy, timothyblynjacobs.
See #60671.
git-svn-id: https://develop.svn.wordpress.org/trunk@57799 602fd350-edb4-49c9-b593-d223f7449a82
This is a micro-optimization to reduce unnecessary memory allocation.
Follow-up to [28682].
Props mujuonly, swissspidy, mukesh27.
Fixes#60683.
git-svn-id: https://develop.svn.wordpress.org/trunk@57796 602fd350-edb4-49c9-b593-d223f7449a82
For PRs that originate from forked repositories, `pull_request_review` and `pull_request_review_comment` events do not have the permissions necessary to comment on the PR.
This avoids needlessly running the bot when these conditions are met.
Props jorbin, wildworks.
See #60733.
git-svn-id: https://develop.svn.wordpress.org/trunk@57795 602fd350-edb4-49c9-b593-d223f7449a82
This updates various WP-Admin related links that have been redirected to new HelpHub pages, to avoid unnecessary redirections.
Props mkismy.
See #60732, #60699.
git-svn-id: https://develop.svn.wordpress.org/trunk@57793 602fd350-edb4-49c9-b593-d223f7449a82
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].
Props bgnicolepaschen, sabernhardt, huzaifaalmesbah, ironprogrammer, shailu25.
Fixes#60707.
See #43633.
git-svn-id: https://develop.svn.wordpress.org/trunk@57792 602fd350-edb4-49c9-b593-d223f7449a82
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.
Props tomjcafferkey, gziolo, swissspidy, karolmanijak.
Fixes#60671.
git-svn-id: https://develop.svn.wordpress.org/trunk@57790 602fd350-edb4-49c9-b593-d223f7449a82
Add `fetchpriority` to the attributes accepted by the `wp_preload_resources` filter. Developers can now use this filter to set fetchpriority for resources being preloaded.
Props nihar007, luboslives, tabrisrp.
Fixes#58510.
git-svn-id: https://develop.svn.wordpress.org/trunk@57789 602fd350-edb4-49c9-b593-d223f7449a82
This adds a link back to the plugin or theme installers when an incompatible archive error message is encountered.
Props Presskopp, swissspidy, smub, pmbaldha, aneeshd16.
Fixes#60578.
git-svn-id: https://develop.svn.wordpress.org/trunk@57786 602fd350-edb4-49c9-b593-d223f7449a82
Now that 6.5 has been branched, the `test-build-processes.yml` workflow can be added to the list of workflows to run for old branches.
Fixes#59632.
git-svn-id: https://develop.svn.wordpress.org/trunk@57783 602fd350-edb4-49c9-b593-d223f7449a82
This changeset fixes an issue where plugin card dependencies notice and plugin icon were overlapping in some cases.
Props costdev, euthelup, shailu25, desrosj, swissspidy, audrasjb.
Fixes#60501.
git-svn-id: https://develop.svn.wordpress.org/trunk@57776 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@57770 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@57769 602fd350-edb4-49c9-b593-d223f7449a82
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