The value of `start` is not fully supported by Opera Mini which has 1.01% usage. There is no material change in functionality with this change.
Follow-up to [55919].
Props davidbaumwald, sabernhardt, khokansardar, devsahadat.
Fixes#60876.
Built from https://develop.svn.wordpress.org/trunk@57933
git-svn-id: http://core.svn.wordpress.org/trunk@57434 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Due to some changes on the WP.com side to compress the requested images on the fly, the exact image size in the response could be different between platforms.
This commit aims to make the affected tests more reliable.
Follow-up to [139/tests], [31258], [34568], [47142], [57903], [57904], [57924].
Props peterwilsoncc, jorbin.
See #60865.
Built from https://develop.svn.wordpress.org/trunk@57931
git-svn-id: http://core.svn.wordpress.org/trunk@57432 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This adds an `is_dir()` check in `_get_block_templates_paths` before trying to run a `RecursiveDirectoryIterator` to avoid errors being reported in New Relic even thought the errors should be handled by a try/catch block.
Follow-up to [57215].
Props iCaleb, sean212, mukesh27, joemcgill.
Fixes#60915.
Built from https://develop.svn.wordpress.org/trunk@57928
git-svn-id: http://core.svn.wordpress.org/trunk@57429 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Since WordPress 6.5, the minimum supported version of MySQL and MariaDB is 5.5.5. This means all supported database servers now support the `utf8mb4` character set and therefore the conditional logic for this is no longer necessary.
Props l1nuxjedi, craigfrancis, OllieJones, johnbillion
Fixes#60096
Built from https://develop.svn.wordpress.org/trunk@57926
git-svn-id: http://core.svn.wordpress.org/trunk@57427 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Some plugins pass invalid values such as `null` instead of a string, which has never been supported by WordPress (no translations are loaded) and was technically undefined behavior. With the introduction of the new l10n library in #59656, which has stricter type hints, this could end up causing warnings or even fatal errors.
This change adds a deliberate short-circuit to `load_textdomain()` & co. to better handle such a case and document that it is not supported.
Props verygoode, swissspidy.
Fixes#60888.
Built from https://develop.svn.wordpress.org/trunk@57925
git-svn-id: http://core.svn.wordpress.org/trunk@57426 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Follow-up to #60865 / [57903] where similar instances were recently updated due to an upstream change.
Particularly the `test_wp_crop_image_with_url()` test recently began to fail on some environments, likely because of the same change.
This updates the image URLs with the aim to bring more consistency and to get the test passing again more broadly.
Fixes#60907.
Built from https://develop.svn.wordpress.org/trunk@57924
git-svn-id: http://core.svn.wordpress.org/trunk@57425 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Previously, when `WP_PLUGIN_DIR` was set to something other than `wp-content/plugins`, e.g. `wp-content/mods`, `load_script_textdomain` was searching for script translations in `wp-content/languages/mods`. However, that is incorrect, as `WP_PLUGIN_DIR` does not affect where translations are stored. The location is always `wp-content/languages/plugins`.
Props coreymckrill, swissspidy.
Fixes#60891.
Built from https://develop.svn.wordpress.org/trunk@57922
git-svn-id: http://core.svn.wordpress.org/trunk@57423 1a063a9b-81f0-0310-95a4-ce76da25c4cd
An excessive amount of autoloaded options is a common cause for slow database responses, sometimes caused by very large individual autoloaded options. As it is not mandatory to provide an autoload value when adding an option to the database, it tends to be ignored, which in combination with a default value of "yes" and lack of documentation can lead to the aforementioned problem.
This changeset enhances the option autoloading behavior in several ways:
* Update the function documentation to encourage the use of boolean `true` or `false` to explicitly provide an autoload value for an option.
* Use new string values `on` and `off` for explicitly provided values stored in the database, to distinguish them from `yes` and `no`, since `yes` does not allow determining whether it was set intentionally by the developer or only as a default.
* Effectively deprecate the values `yes` and `no`. They are still supported for backward compatibility, but now discouraged.
* Use `null` as new default autoload value for `add_option()`. If the developer does not provide an explicit value, this will now trigger WordPress logic to determine an autoload value to use:
* If WordPress determines that the option should not be autoloaded, it is stored in the database as `auto-off`. As part of this changeset, the single heuristic introduced for that is to check whether the option size is larger than a threshold of 150k bytes. This threshold is filterable via a new `wp_max_autoloaded_option_size` filter.
* If WordPress determines that the option should be autoloaded, it is stored in the database as `auto-on`. No logic to make such a decision is introduced as part of this changeset, but a new filter `wp_default_autoload_value` can be used to define such heuristics, e.g. by optimization plugins.
* If WordPress cannot determine whether or not to autoload the option, it is stored in the database as `auto`.
* This effectively means that any option without an explicit autoload value provided by the developer will be stored with an autoload value of `auto`, unless the option's size exceeds the aforementioned threshold. Options with a value of `auto` are still autoloaded as of today, most importantly for backward compatibility. A new function `wp_autoload_values_to_autoload()` returns the list of autolaod values that dictate for an option to be autoloaded, and a new filter `wp_autoload_values_to_autoload` can be used to alter that list.
These behavioral changes encourage developers to be more mindful of autoloading, while providing WordPress core and optimization plugins with additional control over heuristics for autoloading options where no explicit autoload value was provided.
At the same time, the changes are fully backward compatible from a functionality perspective, with the only exception being that very large options will now no longer be autoloaded if the developer did not explicitly request for them to be autoloaded. Neither WordPress core nor plugins are able to override an explicitly provided value, which is intentional to continue giving developers full control over their own options.
Props pbearne, flixos90, joemcgill, azaozz, spacedmonkey, swissspidy, mukesh27, markjaquith.
Fixes#42441.
Built from https://develop.svn.wordpress.org/trunk@57920
git-svn-id: http://core.svn.wordpress.org/trunk@57421 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The `$context` argument passed to filters such as `hooked_block_types`, `hooked_block`, and `hooked_block_{$hooked_block_type}` allows them to conditionally insert a hooked block. If the anchor block is contained in a template or template part, `$context` will be set to a `WP_Block_Template` object reflecting that template or part.
The aforementioned filters are applied when hooked block insertion is run upon reading a template (or part) from the DB (and before sending the template/part content with hooked blocks inserted over the REST API to the client), but also upon writing to the DB, as that's when the `ignoredHookedBlocks` metadata attribute is set.
Prior to this changeset, the `$context` passed to Block Hooks related filters in the latter case reflected the template/part that was already stored in the database (if any), which is a bug; instead, it needs to reflect the template/part that will result from the incoming `POST` network request that will trigger a database update.
Those incoming changes are encapsulated in the `$changes` argument passed to the `reset_pre_insert_template` and `reset_pre_insert_template_part` filters, respectively, and thus to the `inject_ignored_hooked_blocks_metadata_attributes` function that is hooked to them. `$changes` is of type `stdClass` and only contains the fields that need to be updated. That means that in order to create a `WP_Block_Template` object, a two-step process is needed:
- Emulate what the updated `wp_template` or `wp_template_part` post object in the database will look like by merging `$changes` on top of the existing `$post` object fetched from the DB, or from the theme's block template (part) file, if any.
- Create a `WP_Block_Template` from the resulting object.
To achieve the latter, a new helper method (`_build_block_template_object_from_post_object`) is extracted from the existing `_build_block_template_result_from_post` function. (The latter cannot be used directly as it includes a few database calls that will fail if no post object for the template has existed yet in the database.)
While somewhat complicated to implement, the overall change allows for better separation of concerns and isolation of entities. This is visible e.g. in the fact that `inject_ignored_hooked_blocks_metadata_attributes` no longer requires a `$request` argument, which is reflected by unit tests no longer needing to create a `$request` object to pass to it, thus decoupling the function from the templates endpoint controller.
Unit tests for `inject_ignored_hooked_blocks_metadata_attributes` have been moved to a new, separate file. Test coverage has been added such that now, all three relevant scenarios are covered:
- The template doesn't exist in the DB, nor is there a block theme template file for it.
- The template doesn't exist in the DB, but there is a block theme template file for it.
- The template already exists in the DB.
Those scenarios also correspond to the logical branching inside `WP_REST_Templates_Controller::prepare_item_for_database`, which is where `inject_ignored_hooked_blocks_metadata_attributes` gets its data from.
Props tomjcafferkey, bernhard-reiter, gziolo, swissspidy.
Fixes#60754.
Built from https://develop.svn.wordpress.org/trunk@57919
git-svn-id: http://core.svn.wordpress.org/trunk@57420 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Compose V2, which was first released in 2020, is included with all currently supported versions of Docker Desktop. Compose V1 stopped receiving updates in July 2023.
The biggest difference is that the command to interact with Compose changed from `docker-compose` to `docker compose`.
GitHub has now started removing V1 from Ubuntu & Windows images, which caused all Docker-based GitHub Actions workflows to fail.
This change migrates to the new `docker compose` command to address these failures.
Props swissspidy, thelovekesh.
Fixes#60901.
Built from https://develop.svn.wordpress.org/trunk@57918
git-svn-id: http://core.svn.wordpress.org/trunk@57419 1a063a9b-81f0-0310-95a4-ce76da25c4cd
It appears that something has changed on the WP.com side to compress the requested images on the fly, which interfered with the previous expectations in these tests.
This commit uses a direct file URL and updates the expected image size to match the currently returned response.
Follow-up to [139/tests], [31258], [47142].
Props dextorlobo, swissspidy, davidbaumwald, SergeyBiryukov.
See #60865.
Built from https://develop.svn.wordpress.org/trunk@57903
git-svn-id: http://core.svn.wordpress.org/trunk@57404 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The pullquote block wasn't reflecting text color added for quote and add citation text across the front and back of editor. This fixes that by adding ensuring whatever color is selected is shown in both
Props kajalgohel.
Fixes#56524.
Built from https://develop.svn.wordpress.org/trunk@57896
git-svn-id: http://core.svn.wordpress.org/trunk@57397 1a063a9b-81f0-0310-95a4-ce76da25c4cd
There wasn't enough padding and the spacing was deteriorating the more depth there was. This reflects the front now and respects background coloring. Impacts both types of lists although original reporting was just on one.
Props aezazshekh, krupalpanchal, multidots1896, kajalgohel, sabernhardt.
Fixes#56083.
Built from https://develop.svn.wordpress.org/trunk@57895
git-svn-id: http://core.svn.wordpress.org/trunk@57396 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset put back the context parameter of the "Patterns" string which was previously removed to fix a translation issue without introducing a string change during WP 6.5 string freeze period.
Follow-up to [57864].
Props kebbet, narenin, nestea29950.
Fixes#60827.
Built from https://develop.svn.wordpress.org/trunk@57887
git-svn-id: http://core.svn.wordpress.org/trunk@57388 1a063a9b-81f0-0310-95a4-ce76da25c4cd
With this change default shadow presets are never shown for classic themes, and classic themes have no options for adding custom ones.
This essentially reverts [57717] and [57827] / [57828], which had unintended consequences.
Props ajlende, oandregal, madhudollu, swissspidy, get_dave, andrewserong, desrosj.
Fixes#60815.
Built from https://develop.svn.wordpress.org/trunk@57885
git-svn-id: http://core.svn.wordpress.org/trunk@57386 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Relocate the upload of font files uploaded via the Font Library feature to the `wp-content/uploads/fonts` (or multisite equivalent) directory.
This accounts for immutable file systems in which directories are unable to be created within `wp-content` and deploy processes which require special consideration of the `uploads` directory to ensure it remains persistent between deploys.
Props azaozz, burnuser, cbirdsong, christopherplus, costdev, davidbaumwald, desrosj, elrae, euthelup, get_dave, grantmkin, hellofromtonya, janthiel, jazzs3quence, johnbillion, jorbin, justlevine, kraftner, matveb, mcsf, mmaattiiaass, nico23, peterwilsoncc, priethor, rmccue, samuelsidler, swissspidy, youknowriad.
Fixes#60845.
Built from https://develop.svn.wordpress.org/trunk@57878
git-svn-id: http://core.svn.wordpress.org/trunk@57379 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This modifies the font directory API to more closely reflect the upload directory API to help account for naive filtering when uploading fonts.
This moves the protection of infinite loops to the new function `_wp_filter_font_directory()` to allow developers extending and maintaining the font library to apply the filter without the need for a closure.
These changes also ensure both the `upload_dir` and `font_dir` filter are applied consistently when both creating and deleting fonts faces. Prior to this commit the `upload_dir` filter was only fired when creating fonts faces via the REST API.
Applying the font directory filter to the `upload_dir` filter is now done by adding the `_wp_filter_font_directory` function rather than `wp_get_font_dir()`. Developers who have previously modified the font upload directory using the `font_dir` filter will NOT need to upload their code.
Extenders wishing to upload files to the font directory can do so via the code:
{{{#!php
<?php
add_filter( 'upload_dir', '_wp_filter_font_directory' );
// Your code to upload or sideload a font file.
remove_filter( 'upload_dir', '_wp_filter_font_directory' );
}}}
Introduces:
* `wp_font_dir()`: Attempt to create and retrieve the font upload directory. The equivalent to `wp_upload_dir()`.
* `_wp_filter_font_directory()`: To run on the `upload_dir` filter, this sets the default destination of the fonts directory and fires the `font_dir` filter.
`wp_get_font_dir()` has been modified to be a lightweight getter for the font directory. It returns the location without attempting to create it. The equivalent to `wp_get_upload_dir()`.
Follow up to [57740].
Props peterwilsoncc, mukesh27, mikachan, costdev, mmaattiiaass, swissspidy, youknowriad, dd32, grantmkin.
Fixes#60652.
Built from https://develop.svn.wordpress.org/trunk@57868
git-svn-id: http://core.svn.wordpress.org/trunk@57369 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset updates a translation string to ensure the "Patterns" menu item introduced in [57543] is translatable.
This quickfix simply removes the erroneous `context` parameter so no new string is introduced during WP 6.5 string freeze period. A follow-up changeset will be needed to replace the current `__()` function with `_x()` and put back the `context` parameter.
Follow-up to [57543].
Props jdy68, audrasjb, kebbet, swissspidy.
Fixes#60825.
Built from https://develop.svn.wordpress.org/trunk@57864
git-svn-id: http://core.svn.wordpress.org/trunk@57365 1a063a9b-81f0-0310-95a4-ce76da25c4cd
One of the tests for the `wp_kses_xml_named_entities()` function used `utf8_encode( chr( 160 ) )` to set an expectation of a Unicode character for a non-breaking space.
It is understandable that this expectation was previously set this way, as it is not possible for a developer to distinguish between a ''breaking'' space and a ''non-breaking'' space visually, so the chances of the test accidentally breaking on an incorrect save when the plain Unicode character would be used, was high.
However, the `utf8_encode()` function is deprecated as of PHP 8.2, and its use needs to be removed from the WP codebase.
PHP 7.0 has introduced [https://wiki.php.net/rfc/unicode_escape Unicode escape sequences], which allows to create a text string using Unicode characters referenced by their codepoint. By switching the test case to provide the test expectation using a Unicode escape sequence, we remove the use of the deprecated PHP function and still preserve the safeguard against the test accidentally breaking.
Follow-up to [52229].
Props jrf, afercia, poena, SergeyBiryukov.
See #55603, #60705.
Built from https://develop.svn.wordpress.org/trunk@57861
git-svn-id: http://core.svn.wordpress.org/trunk@57362 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The hooks fire before the general `delete_post` / `deleted_post` hooks and have the same parameters.
They complement the `save_post_{$post->post_type}` hook added in [25050] and the `edit_post_{$post->post_type}` hook added in [43617].
Props benniledl, swissspidy, dargus.
Fixes#60433.
Built from https://develop.svn.wordpress.org/trunk@57853
git-svn-id: http://core.svn.wordpress.org/trunk@57354 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Follow-up to [57753] to make tests more robust, as there were multiple permission-related errors in the hosting test results.
With this change, the tests now don’t try setting an owner that doesn’t exist.
Props peterwilsoncc, costdev, javiercasares.
See #57774.
Built from https://develop.svn.wordpress.org/trunk@57849
git-svn-id: http://core.svn.wordpress.org/trunk@57350 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Follow up to [57687]. If no icons of the preferred type are available, then the icon array should return the collection of valid icons found, rather than an empty array.
Props sabernhardt, swissspidy, sabernhardt, antpb, joedolson.
Fixes#60740.
Built from https://develop.svn.wordpress.org/trunk@57845
git-svn-id: http://core.svn.wordpress.org/trunk@57346 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This prunes stores and configurations that are empty arrays, as stores are expected to be JSON objects.
By not printing empty configurations, less redundant data is serialized into the HTML.
Props jonsurrell, luisherranz, darerodz, gziolo, swissspidy.
Fixes#60761.
Built from https://develop.svn.wordpress.org/trunk@57841
git-svn-id: http://core.svn.wordpress.org/trunk@57342 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Ensures parity with the `script_loader_src` filter for regular scripts, allowing the URL to be filtered, for example to load them from a CDN or alter query parameters.
Props dd32, peterwilsoncc, westonruter.
Fixes#60742.
Built from https://develop.svn.wordpress.org/trunk@57840
git-svn-id: http://core.svn.wordpress.org/trunk@57341 1a063a9b-81f0-0310-95a4-ce76da25c4cd
In `WP_REST_Search_Controller`, the `type` parameter is accessed via the sanitization callback for the `subtype` parameter, which is too early for `type` itself to be already sanitized. This change adds a type check in the `get_search_handler()` method to prevent errors when the type doesn’t match.
Props swissspidy, timothyblynjacobs, dd32.
Fixes#60771.
Built from https://develop.svn.wordpress.org/trunk@57839
git-svn-id: http://core.svn.wordpress.org/trunk@57340 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Adds an explicit 1 hour expiration for the translation file cache introduced in [57287] / #58919.
This prevents stale caches when a site does not use the regular way of installing language packs, for example when an atomic filesystem is involved.
Also configures the `translation_files` group as a global cache group on multisite.
Props dd32.
Fixes#60764.
Built from https://develop.svn.wordpress.org/trunk@57831
git-svn-id: http://core.svn.wordpress.org/trunk@57332 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This is a follow-up to [57717] to ensure that classic themes without a `theme.json` file or without `appearanceTools: true` in `theme.json` do not have shadow controls by default.
Props wildworks, vcanales, madhudollu, swissspidy, youknowriad.
Fixes#60633
Built from https://develop.svn.wordpress.org/trunk@57827
git-svn-id: http://core.svn.wordpress.org/trunk@57328 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Use a priority of 100 to ensure that other filters can add additional directives before the processing starts.
This way, directives will be processed even if the `$parsed_block` variable is edited by a filter.
Props cbravobernal, swissspidy, flixos90, joemcgill, gziolo.
Fixes#60743.
Built from https://develop.svn.wordpress.org/trunk@57826
git-svn-id: http://core.svn.wordpress.org/trunk@57327 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Short-circuits directive processing when the markup does not actually contain any `data-wp-*` attributes.
This reduces function calls and memory usage for the best case scenario due to not involving `WP_HTML_Tag_Processor`.
Props joemcgill, swissspidy, gziolo, cbravobernal, flixos90.
Fixes#60749.
Built from https://develop.svn.wordpress.org/trunk@57824
git-svn-id: http://core.svn.wordpress.org/trunk@57325 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Adds a test to ensure proper processing of directives on special HTML elements,
or HTML which contains special elements. These special elements are defined by
the HTML API and are the HTML elements which cannot contain other tags, such as
the IFRAME, SCRIPT, TEXTAREA, TITLE, elements, etc...
The server diretive processor performs a custom tracking of HTML structure and
this test ensures it isn't mislead by the handling of those special elements.
Developed in https://github.com/WordPress/wordpress-develop/pull/6247
Discussed in https://core.trac.wordpress.org/ticket/60746
Props santosguillamot, cbravobernal, mukesh27, westonruter, swissspidy, dmsnell.
Follow-up to [57348].
Fixes#60746.
Built from https://develop.svn.wordpress.org/trunk@57822
git-svn-id: http://core.svn.wordpress.org/trunk@57323 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].
Props ryelle, benjamin_zekavica.
See #60303.
Built from https://develop.svn.wordpress.org/trunk@57809
git-svn-id: http://core.svn.wordpress.org/trunk@57310 1a063a9b-81f0-0310-95a4-ce76da25c4cd
When encountering text nodes in an HTML document, the HTML parser needs
to run the active format reconstruction algorithm, even if it doesn't
stop to visit those text nodes. This is because the formats, which might
need reconstructing, will impact the breadcrumbs of all downstream nodes
from the text node.
In this patch, this process is triggered, which properly triggers the
active format reconstruction. It also enables the visiting of other token
types as is possible in the Tag Processor.
Developed in https://github.com/WordPress/wordpress-develop/pull/6054
Discussed in https://core.trac.wordpress.org/ticket/60170
Props: dmsnell, jonsurrell, westonruter.
Fixes: #60455.
Follow-up to: [57348].
Built from https://develop.svn.wordpress.org/trunk@57806
git-svn-id: http://core.svn.wordpress.org/trunk@57307 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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
Props: dmsnell, bernhard-reiter, jonsurrell, westonruter.
Fixes#60697.
Follow-up to [55706], [56941], [57348].
Built from https://develop.svn.wordpress.org/trunk@57805
git-svn-id: http://core.svn.wordpress.org/trunk@57306 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.
Props peterwilsoncc, dd32.
Fixes#60741.
Built from https://develop.svn.wordpress.org/trunk@57804
git-svn-id: http://core.svn.wordpress.org/trunk@57305 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].
Props swissspidy, timothyblynjacobs.
See #60671.
Built from https://develop.svn.wordpress.org/trunk@57799
git-svn-id: http://core.svn.wordpress.org/trunk@57300 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@57795
git-svn-id: http://core.svn.wordpress.org/trunk@57296 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].
Props bgnicolepaschen, sabernhardt, huzaifaalmesbah, ironprogrammer, shailu25.
Fixes#60707.
See #43633.
Built from https://develop.svn.wordpress.org/trunk@57792
git-svn-id: http://core.svn.wordpress.org/trunk@57293 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.
Props tomjcafferkey, gziolo, swissspidy, karolmanijak.
Fixes#60671.
Built from https://develop.svn.wordpress.org/trunk@57790
git-svn-id: http://core.svn.wordpress.org/trunk@57291 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@57789
git-svn-id: http://core.svn.wordpress.org/trunk@57290 1a063a9b-81f0-0310-95a4-ce76da25c4cd