5911 Commits

Author SHA1 Message Date
Jb Audras
a50bc0185b General: Fix various typo issues found in deprecated.php and Font Library unit tests.
Props shailu25, mukesh27, sabernhardt, audrasjb.
Fixes #60870.




git-svn-id: https://develop.svn.wordpress.org/trunk@57909 602fd350-edb4-49c9-b593-d223f7449a82
2024-04-01 20:43:46 +00:00
Sergey Biryukov
1cc5883e0c Tests: Revert the image size change in wp_remote_head() and wp_remote_get() tests.
The exact size in the response appears to differ between platforms, but this should make the tests pass for now.

Follow-up to [57903].

See #60865.

git-svn-id: https://develop.svn.wordpress.org/trunk@57904 602fd350-edb4-49c9-b593-d223f7449a82
2024-04-01 14:30:47 +00:00
Sergey Biryukov
7d7b92afd7 Tests: Update expectations in wp_remote_head() and wp_remote_get() tests.
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.

git-svn-id: https://develop.svn.wordpress.org/trunk@57903 602fd350-edb4-49c9-b593-d223f7449a82
2024-04-01 13:55:59 +00:00
Sergey Biryukov
86d427315c Tests: Use an existing user fixture in the test for logging in with an email address.
Creating a new user is redundant here, the fixture shared by other tests can be used instead.

Follow-up to [36617].

See #60705.

git-svn-id: https://develop.svn.wordpress.org/trunk@57892 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-28 11:17:02 +00:00
Pascal Birchler
9bf06950a1 Editor: disable shadow.defaultPresets for classic themes.
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.

git-svn-id: https://develop.svn.wordpress.org/trunk@57885 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-27 15:58:46 +00:00
Peter Wilson
f8e1870778 Editor: Relocate font files uploads to the uploads directory.
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.



git-svn-id: https://develop.svn.wordpress.org/trunk@57878 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-26 01:23:14 +00:00
Peter Wilson
ca8d78e5f2 Editor: Prevent font folder naive filtering causing infinite loops.
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.


git-svn-id: https://develop.svn.wordpress.org/trunk@57868 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-22 22:59:01 +00:00
Sergey Biryukov
8d0aed455b Tests: Remove unnecessary use of utf8_encode() in KSES tests.
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.

git-svn-id: https://develop.svn.wordpress.org/trunk@57861 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-21 15:45:56 +00:00
Pascal Birchler
3d3d510697 Build/Test Tools: Make WP_Filesystem_Direct tests more robust.
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.

git-svn-id: https://develop.svn.wordpress.org/trunk@57849 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-18 09:25:33 +00:00
Pascal Birchler
04993f1a21 Interactivity API: Do not print state if it’s an empty array.
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.

git-svn-id: https://develop.svn.wordpress.org/trunk@57841 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-15 12:10:49 +00:00
Pascal Birchler
2915f33c1e Script Loader: Add new script_module_loader_src filter for the script module src.
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.

git-svn-id: https://develop.svn.wordpress.org/trunk@57840 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-15 11:27:12 +00:00
Pascal Birchler
b4dea6b056 REST API: Prevent error when passing invalid type parameter to search endpoint.
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.

git-svn-id: https://develop.svn.wordpress.org/trunk@57839 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-15 11:23:18 +00:00
Greg Ziółkowski
6770127ae9 Tests: Fix invalid @covers annotations for Interactivity API
Follow-up [57563], #60356.
Fixes #60757.
Props jonsurrell, cbravobernal, swissspidy.



git-svn-id: https://develop.svn.wordpress.org/trunk@57836 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-15 11:15:11 +00:00
Pascal Birchler
ad9d7ea39d Interactivity API: Prevent warning when using a bind directive with a short attribute name.
Adds new tests and improves existing ones by using `assertSame` to do type comparison as well.

Props jonsurrell, cbravobernal, swissspidy, gziolo.
Fixes #60758.

git-svn-id: https://develop.svn.wordpress.org/trunk@57835 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-14 15:28:12 +00:00
Pascal Birchler
14c94f8174 Interactivity API: Do not propagate context from void tags to its siblings.
Resolves an issue where context on a void tag element such as `<img>` was incorrectly passed to following elements.
Adds tests.

Props santosguillamot, luisherranz, cbravobernal, dmsnell, gziolo, swissspidy.
Fixes #60768.

git-svn-id: https://develop.svn.wordpress.org/trunk@57832 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-14 13:32:56 +00:00
Pascal Birchler
8fafc3acae I18N: Improve translation file cache group & expiration.
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.

git-svn-id: https://develop.svn.wordpress.org/trunk@57831 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-14 09:04:00 +00:00
Pascal Birchler
0d456e2f05 Interactivity API: Increase hook priority for processing directives.
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.

git-svn-id: https://develop.svn.wordpress.org/trunk@57826 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-13 10:46:53 +00:00
Dennis Snell
b1b97f9672 Interactivity API: Ensure proper directive processing on special elements.
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.



git-svn-id: https://develop.svn.wordpress.org/trunk@57822 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-12 18:52:20 +00:00
Dennis Snell
3c2a87e2ae HTML API: Add tests ensuring text nodes reconstruct active formatting elements.
Adds tests that should have been merged in [57806].

Follow-up to: [57806].



git-svn-id: https://develop.svn.wordpress.org/trunk@57807 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-12 00:24:11 +00:00
Dennis Snell
2452282fa6 HTML API: Trigger active format reconstruction when reaching text nodes.
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].



git-svn-id: https://develop.svn.wordpress.org/trunk@57806 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-12 00:22:40 +00:00
Dennis Snell
dabde02a67 HTML API: Defer applying attribute updates until necessary.
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].



git-svn-id: https://develop.svn.wordpress.org/trunk@57805 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-11 23:53:07 +00:00
bernhard-reiter
d09c0f5c4c Block Hooks: Remove filter global reset from test teardown.
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
2024-03-11 12:52:18 +00:00
bernhard-reiter
9a616a5734 Block Hooks: Use new Templates Controller filter instead of action.
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
2024-03-07 14:10:31 +00:00
Adam Silverstein
a38f5a1305 Script loader: enable fetchpriority attribute in the wp_preload_resources filter.
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
2024-03-07 07:06:53 +00:00
Pascal Birchler
da1e42392c Build/Test Tools: Fix typo in variation-new-font-family.json fixture file.
Props huzaifaalmesbah, mukesh27.
Fixes #60712.

git-svn-id: https://develop.svn.wordpress.org/trunk@57788 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-07 06:25:33 +00:00
Jonathan Desrosiers
7002bce8ab Coding standards: Apply some changes after composer format.
Follow up to [57565], [57627], [57755], 

See #60233, #60506, #60524.

git-svn-id: https://develop.svn.wordpress.org/trunk@57771 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-05 06:53:44 +00:00
Dennis Snell
4d562a102d HTML API: Ensure that breadcrumbs are properly retained after seeking.
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
2024-03-05 05:32:19 +00:00
Pascal Birchler
d61c508896 Interactivity API: Rename data_wp_context() to wp_interactivity_data_wp_context().
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
2024-03-04 15:37:53 +00:00
Joe Dolson
ee5142efbc Media: Accessibility: Copy attachment properties on site icon crop.
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
2024-03-02 20:13:02 +00:00
Pascal Birchler
04afd909aa Editor: do not expose protected post meta fields in block bindings.
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
2024-03-02 14:11:53 +00:00
Pascal Birchler
5bf25d881f Build/Test Tools: Add initial tests for the WP_Filesystem_Direct class.
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
2024-03-02 14:05:38 +00:00
Pascal Birchler
919b833fbf Query: Remove leading whitespace from certain database queries.
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
2024-03-02 13:36:02 +00:00
Sergey Biryukov
0efafc1dfd Build/Test Tools: Use a consistent parameter name between rand_str() and rand_long_str().
Follow-up to [36272], [50265].

Props harsh175, sabernhardt.
Fixes #60401.

git-svn-id: https://develop.svn.wordpress.org/trunk@57749 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-02 12:53:53 +00:00
Sergey Biryukov
0fb376ba9b Tests: Use assertSame() in post meta revisioning tests.
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
2024-02-29 20:00:07 +00:00
Pascal Birchler
56f1a37bbe Interactivity API: Revert [57742] pending a Gutenberg package update.
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
2024-02-29 14:28:52 +00:00
Pascal Birchler
a92b25a341 Interactivity API: Rename data_wp_context() to wp_interactivity_data_wp_context().
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
2024-02-29 12:26:19 +00:00
Sergey Biryukov
9da33adc85 Tests: Expand wp_parse_id_list() unit tests.
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
2024-02-28 18:09:38 +00:00
Colin Stewart
0366ad880a Plugin Dependencies: Don't assume API response has a slug property.
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
2024-02-28 18:02:09 +00:00
Pascal Birchler
a69052a75f Tests: Address capitalization and docblock inconsistencies in some test class names.
Follow-up to [57060], [57718], [57725], [57726], [57727], [57728], [57733].

Props swissspidy, costdev.
See #59647.

git-svn-id: https://develop.svn.wordpress.org/trunk@57735 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-28 09:44:40 +00:00
Sergey Biryukov
b75d47cfd8 Tests: Correct capitalization and fix typos in some test class names.
Follow-up to [57060], [57718], [57725], [57726], [57727], [57728].

See #59647.

git-svn-id: https://develop.svn.wordpress.org/trunk@57733 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-27 23:05:18 +00:00
Tonya Mork
1de7ddb4ac General: Revert r57698 for WP_List_Util::pluck().
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
2024-02-27 22:36:09 +00:00
Joe McGill
2b85d22d6a Docs: Improve docblock for WP_Block_Patterns_Registry::register.
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
2024-02-27 21:03:54 +00:00
Pascal Birchler
e80e07fb5d Build/Test Tools: Add unit tests for _delete_option_fresh_site().
Props pbearne, costdev, desrosj.
Fixes #57191.

git-svn-id: https://develop.svn.wordpress.org/trunk@57729 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-27 19:07:08 +00:00
swissspidy
a5f635ef2f Build/Test Tools: Add unit tests for maybe_hash_hex_color().
Props pbearne.
Fixes #60272.

git-svn-id: https://develop.svn.wordpress.org/trunk@57728 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-27 18:51:02 +00:00
swissspidy
9c9708dd73 Build/Test Tools: Add unit tests for sanitize_hex_color_no_hash().
Props pbearne.
Fixes #60271.

git-svn-id: https://develop.svn.wordpress.org/trunk@57727 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-27 18:49:01 +00:00
Pascal Birchler
17287999af Build/Test Tools: Add unit tests for sanitize_hex_color().
Props pbearne.
Fixes #60270.

git-svn-id: https://develop.svn.wordpress.org/trunk@57726 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-27 18:47:35 +00:00
Pascal Birchler
6e0ca03ba6 Build/Test Tools: Add unit tests for wp_parse_slug_list().
Props pbearne.
Fixes #60217.

git-svn-id: https://develop.svn.wordpress.org/trunk@57725 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-27 17:15:25 +00:00
Pascal Birchler
07a68a6620 Build/Test Tools: Add unit tests for absint().
Props pbearne.
Fixes #60101.

git-svn-id: https://develop.svn.wordpress.org/trunk@57724 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-27 17:13:04 +00:00
Riad Benguella
eb7a0a454c Font face resolver: print font faces from font families defined in all theme.json origins.
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
2024-02-27 12:04:55 +00:00
Pascal Birchler
0f086aebc8 Build/Test Tools: Add PHPUnit test for the _mce_set_direction function.
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
2024-02-27 10:23:34 +00:00