Commit Graph

48892 Commits

Author SHA1 Message Date
Pascal Birchler
892d83f1eb Coding Standards: Fix array key alignment after [57539].
See #59166.
Built from https://develop.svn.wordpress.org/trunk@57541


git-svn-id: http://core.svn.wordpress.org/trunk@57042 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-06 10:58:13 +00:00
youknowriad
adeec9a08a Editor: Fix Font Library PHP unit tests.
These font assets files used in phpunit tests were missing in the original commit [57539].

Props mukesh27.
See #59166.
Built from https://develop.svn.wordpress.org/trunk@57540


git-svn-id: http://core.svn.wordpress.org/trunk@57041 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-06 09:24:09 +00:00
youknowriad
ea8080d8c8 Editor: Introduce the Font Library post types and low level APIs.
This is the first step towards adding the font library to WordPress.
This commit includes the font library and font face CPTs.
It also adds the necessary APIs and classes to register and manipulate font collections.

This PR backports the font library post types and low level APIs to Core. This is the first step to include the font library entirely into Core. Once this merged, we'll open a PR with the necessary REST API controllers.

Props youknowriad, get_dave, grantmkin, swissspidy, hellofromtonya, mukesh27, mcsf.
See #59166.
Built from https://develop.svn.wordpress.org/trunk@57539


git-svn-id: http://core.svn.wordpress.org/trunk@57040 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-06 08:42:12 +00:00
Sergey Biryukov
b769f2b0cd Coding Standards: Rename the $oSelf variable in WP_MatchesMapRegex::apply().
This resolves a WPCS warning:
{{{
Variable "$oSelf" is not in valid snake_case format, try "$o_self"
}}}

Follow-up to [11853], [38376].

See #59650.
Built from https://develop.svn.wordpress.org/trunk@57538


git-svn-id: http://core.svn.wordpress.org/trunk@57039 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-06 01:25:14 +00:00
Peter Wilson
6309a41a68 Upload: Fallback to PclZip to validate ZIP file uploads.
`ZipArchive` can fail to validate ZIP files correctly and report valid files as invalid. This introduces a fallback to `PclZip` to check validity of files if `ZipArchive` fails them.

This introduces the new function `wp_zip_file_is_valid()` to validate archives.

Follow up to [57388].

Props audunmb, azaozz, britner, cdevroe, colorful-tones, costdev, courane01, endymion00, feastdesignco, halounsbury, jeffpaul, johnbillion, jorbin, jsandtro, karinclimber, kevincoleman, koesper, maartenbelmans, mathewemoore, melcarthus, mujuonly, nerdpressteam, olegfuture, otto42, peterwilsoncc, room34, sayful, schutzsmith, stephencronin, svitlana41319, swissspidy, tnolte, tobiasbg, vikram6, welaunchio.
Fixes #60398.

Built from https://develop.svn.wordpress.org/trunk@57537


git-svn-id: http://core.svn.wordpress.org/trunk@57038 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-05 22:23:06 +00:00
desrosj
3b3adbbdfd Build/Test Tools: Pass a token to the Codecov action.
Version 4 of the action now requires a token to be provided in order to upload coverage results.

Follow up to [57534].

Props swissspidy.
See #59658.
Built from https://develop.svn.wordpress.org/trunk@57536


git-svn-id: http://core.svn.wordpress.org/trunk@57037 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-05 22:21:14 +00:00
Pascal Birchler
cfba421707 General: Add tests for array_is_list polyfill added in r57337.
Props costdev.
See #55105.
Built from https://develop.svn.wordpress.org/trunk@57535


git-svn-id: http://core.svn.wordpress.org/trunk@57036 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-05 21:59:13 +00:00
desrosj
b539238a65 Build/Test Tools: Update the codecov/codecov-action action.
This updates the `codecov/codecov-action` from version `3.1.5` to `4.0.1`.

Version 4 switches to using the Codecov CLI to upload test report date, and changes the version of Node.js used for the action to 20.x. This fixes the notices currently shown for the test coverage workflow.

Props: mukesh27.
See #59658.
Built from https://develop.svn.wordpress.org/trunk@57534


git-svn-id: http://core.svn.wordpress.org/trunk@57035 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-05 21:00:13 +00:00
Pascal Birchler
aed15fedb9 Script Loader: Remove unused WP_Scripts::get_unaliased_deps() method.
This private method was introduced in [56033] / #12009 but it's not actually used.
It was part of the inline script implementation which was later reverted before final merge.
The method can be safely removed because it’s private and cannot be used by extenders.

Props joemcgill.
Fixes #60438.
Built from https://develop.svn.wordpress.org/trunk@57533


git-svn-id: http://core.svn.wordpress.org/trunk@57034 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-05 09:43:12 +00:00
Sergey Biryukov
98b3a8d314 Coding Standards: Rename the $expires_offset variable in cache_javascript_headers().
This resolves a WPCS warning:
{{{
Variable "$expiresOffset" is not in valid snake_case format, try "$expires_offset"
}}}

Follow-up to [4109], [21996].

See #59650.
Built from https://develop.svn.wordpress.org/trunk@57532


git-svn-id: http://core.svn.wordpress.org/trunk@57033 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-05 03:42:11 +00:00
Peter Wilson
91b28e5a07 Build/Test Tools: Mock plugin API response in WP_REST_Plugins_Controller_Test.
Avoid false test failures due to network conditions in the `WP_REST_Plugins_Controller_Test` class. This mocks HTTP responses from the plugin information endpoint for the link-manager plugin.

Props: peterwilsoncc, costdev.
See #59647.


Built from https://develop.svn.wordpress.org/trunk@57531


git-svn-id: http://core.svn.wordpress.org/trunk@57032 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-04 22:04:14 +00:00
Sergey Biryukov
8f3e5f1640 Coding Standards: Rename the $ID parameter to $post_id in trackback().
This resolves a few WPCS warnings:
{{{
Variable "$ID" is not in valid snake_case format, try "$i_d"
}}}

See #59650.
Built from https://develop.svn.wordpress.org/trunk@57530


git-svn-id: http://core.svn.wordpress.org/trunk@57031 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-04 18:46:14 +00:00
Sergey Biryukov
0865d6ec9d Coding Standards: Use strict comparison in wp-admin/update-core.php.
Follow-up to [11273], [25784], [54654].

Props wpfy, mukesh27, azaozz, viralsampat.
Fixes #58061, #60415.
Built from https://develop.svn.wordpress.org/trunk@57529


git-svn-id: http://core.svn.wordpress.org/trunk@57030 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-03 14:24:15 +00:00
dmsnell
9fb7267542 HTML API: Fix typo setting the wrong self-closing flag.
The HTML Processor tracks whether a token was found with the self-closing flag.
Depending on the context, this flag may or may not indicate that the element is
self closing. Unfortunately it's been tracking the wrong flag: it's been tracking
the end-tag flag, which indicates that a token is an end tag.

In this patch the right flag is set in the HTML Processor. This hasn't been an
issue because the HTML Processor doesn't yet read that stored flag, but it's an
important fix to make before adding support for foreign content (SVG and MathML)
since that behavior depends on reading the correct flag.

Follow-up to [56274].

Props dmsnell.


Built from https://develop.svn.wordpress.org/trunk@57528


git-svn-id: http://core.svn.wordpress.org/trunk@57029 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-02 23:27:14 +00:00
dmsnell
22b4a0870d HTML API: Reset parser state after seeking to bookmark.
When parser states were introduced, nothing in the `seek()` method reset the
parser state. This is problematic because it could leave the parser in the
wrong state.

In this patch the parser state is reset so that it's properly adjusted on
the successive call to `next_token()`.

Developed in https://github.com/WordPress/wordpress-develop/pull/6021
Discussed in https://core.trac.wordpress.org/ticket/60428

Follow-up to [57211]

Props dmsnell, kevin940726
Fixes #60428


Built from https://develop.svn.wordpress.org/trunk@57527


git-svn-id: http://core.svn.wordpress.org/trunk@57028 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-02 22:57:18 +00:00
gziolo
742e8aae9c Editor: Refactor the way block bindings sources are handled
It fixes the coding style issues reported. It goes further and improves the code quality it other places where the logic for block bindings was added.

Follow-up for [57514].
Props: gziolo, mukesh27, youknowriad, santosguillamot.
See #60282.


Built from https://develop.svn.wordpress.org/trunk@57526


git-svn-id: http://core.svn.wordpress.org/trunk@57027 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-02 20:24:12 +00:00
Adam Silverstein
62171b4d26 Media: fix AVIF tests.
Follow up to r57524. Properly add AVIF images for unit tests.

Fixes #51228.


Built from https://develop.svn.wordpress.org/trunk@57525


git-svn-id: http://core.svn.wordpress.org/trunk@57026 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-02 18:50:13 +00:00
Adam Silverstein
f94f194552 Media: enable AVIF support.
Add support for uploading, editing and saving AVIF images when supported by the server.

Add 'image/avif' to supported mime types. Correctly identify AVIF images and sizes even when PHP doesn't support AVIF. Resize uploaded AVIF files (when supported) and use for front end markup.

Props adamsilverstein, lukefiretoss, ayeshrajans, navjotjsingh, Tyrannous, jb510, gregbenz, nickpagz, JavierCasares, mukesh27, yguyon, swissspidy.
Fixes #51228.


Built from https://develop.svn.wordpress.org/trunk@57524


git-svn-id: http://core.svn.wordpress.org/trunk@57025 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-02 17:48:15 +00:00
desrosj
0faeaecd5d Build/Test Tools: Some improvements to the Props Bot workflow.
This makes a few improvements made to the Props Bot workflow:

- The bot will no longer run on draft PRs.
- The bot will no longer run on closed PRs.
- The bot will no longer run when a comment is deleted (this should almost never happen).

Props mamaduka, gziolo.
See #60417.
Built from https://develop.svn.wordpress.org/trunk@57523


git-svn-id: http://core.svn.wordpress.org/trunk@57024 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-02 16:37:13 +00:00
Sergey Biryukov
6f6b383040 Coding Standards: Use strict comparison for functions lookup in plugin/theme editors.
Follow-up to [10607], [44617].

Props upadalavipul.
See #60415.
Built from https://develop.svn.wordpress.org/trunk@57522


git-svn-id: http://core.svn.wordpress.org/trunk@57023 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-02 15:30:12 +00:00
gziolo
86121f4f25 Editor: Add allowed_blocks field to block registration and REST API
There is a new block.json field called allowedBlocks, added in Gutenberg in https://github.com/WordPress/gutenberg/pull/58262. This adds support for this new field also on the server. 

Props: gziolo, jsnajdr.
Fixes #60403.



Built from https://develop.svn.wordpress.org/trunk@57521


git-svn-id: http://core.svn.wordpress.org/trunk@57022 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-02 13:01:21 +00:00
Andrea Fercia
a9bb1bb5f7 Administration: Accessibility: Use the default cursor style for labels and disabled form controls.
The native cursor style for labels and form controls is `default`, which is the platform-dependent default cursor. Typically an arrow. Historically, WordPress always used the `pointer` style for all form controls and labels. While this isn't standard, there is some value in using the `pointer` style for form controls. However, labels should use the default style especially when the associated controls are disabled.
Additionally, makes sure the disabled styling works for form controls with an `aria-disabled="true"` attribute.

Props joedolson, afercia.
Fixes #59733.

Built from https://develop.svn.wordpress.org/trunk@57520


git-svn-id: http://core.svn.wordpress.org/trunk@57021 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-02 09:55:14 +00:00
Pascal Birchler
4c37cdc1a4 I18N: Add type declaration to new method missed in [57518].
See #59656.
Built from https://develop.svn.wordpress.org/trunk@57519


git-svn-id: http://core.svn.wordpress.org/trunk@57020 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-02 09:07:14 +00:00
Pascal Birchler
953e148764 I18N: Fix plural forms parsing in WP_Translation_File.
Ensures the plural expression from the translation file header is correctly parsed.
Prevents silent failures in the attempt to create the plural form function.

Adds additional tests.

Props Chouby.
See #59656.
Built from https://develop.svn.wordpress.org/trunk@57518


git-svn-id: http://core.svn.wordpress.org/trunk@57019 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-01 20:59:14 +00:00
desrosj
18c47606f2 Build/Test Tools: Introduce Props Bot workflow.
Props Bot is a new GitHub Action that will compile a list of contributors for a given pull request. The bot will leave a comment with a list of contributors formatted for use in both Trac SVN and GitHub.

Props dharm1025, desrosj, jorbin, jeffpaul, dd32, pento, gziolo, swissspidy, talldanwp, noisysocks, youknowriad, peterwilsoncc, joemcgill, chrisdavidmiles, wpscholar, annezazu, chanthaboune, desrosjbot.
See #60417.
Built from https://develop.svn.wordpress.org/trunk@57517


git-svn-id: http://core.svn.wordpress.org/trunk@57018 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-01 19:28:19 +00:00
Pascal Birchler
5b1d220d1e I18N: Support loading .l10n.php translation files on their own.
Adjusts the translation file lookup in `WP_Textdomain_Registry` so that just-in-time translation loading
works even if there is only a `.l10n.php` translation file without a corresponding `.mo` file.

While language packs continue to contain both file types, this makes it easier to use translations in a project
without having to deal with `.mo` or `.po` files.

Props Chrystl.
See #59656.
Built from https://develop.svn.wordpress.org/trunk@57516


git-svn-id: http://core.svn.wordpress.org/trunk@57017 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-01 19:05:13 +00:00
joedolson
3664cc3698 Media: Prevent local edits during media upload.
Prevent `options.allowLocalEdits` from toggling to true during the upload cycle. Otherwise, media meta fields can be edited, but the data will be lost as soon as the upload process is completed.

Props codepo8, oglekler, nicolefurlan, antpb, syamraj24, joedolson.
Fixes #58783, #23374.
Built from https://develop.svn.wordpress.org/trunk@57515


git-svn-id: http://core.svn.wordpress.org/trunk@57016 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-01 16:28:15 +00:00
youknowriad
a2786a3785 Editor: Add the Block Bindings API.
This introduces the Block Bindings API for WordPress.

The API allows developers to connects block attributes to different sources. In this PR, two such sources are included: "post meta" and "pattern". Attributes connected to sources can have their HTML replaced by values coming from the source in a way defined by the binding.

Props czapla, lgladdy, gziolo, sc0ttkclark, swissspidy, artemiosans, kevin940726, fabiankaegy, santosguillamot, talldanwp, wildworks.
Fixes #60282.
Built from https://develop.svn.wordpress.org/trunk@57514


git-svn-id: http://core.svn.wordpress.org/trunk@57015 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-01 12:54:15 +00:00
Pascal Birchler
3af51954e0 I18N: Improve singular lookup of pluralized strings.
Ensures that string lookup in MO files only uses the singular string.

This matches expected behavior with gettext files and improves compatibility for cases where for example both `__( 'Product' )` and `_n( 'Product', 'Products’, num )` are used in a project, where both will use the same translation for the singular version. Maintains backward compatibility and feature parity with the pomo library and the PHP translation file format.

Replaces [57386], which was reverted in [57505], with a more accurate and performant solution.

See #59656.
Built from https://develop.svn.wordpress.org/trunk@57513


git-svn-id: http://core.svn.wordpress.org/trunk@57014 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-01 11:45:16 +00:00
Sergey Biryukov
7a7f7ec0d3 Twenty Fifteen: Fix typo in css/blocks.css.
Follow-up to [43798].

Props shailu25, harshgajipara.
Fixes #60383.
Built from https://develop.svn.wordpress.org/trunk@57512


git-svn-id: http://core.svn.wordpress.org/trunk@57013 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-01 11:33:17 +00:00
youknowriad
7d60c616d1 Editor: Add deprecated functions from interactivity core blocks.
In 6.5 we are removing a couple of functions in Core blocks that were enqueuing the files needed to add that interactivity. Interactivity is handled with modules, so those functions are not needed anymore and are deprecated.

Props swissspidy, cbravobernal.
Fixes #60380.
Built from https://develop.svn.wordpress.org/trunk@57511


git-svn-id: http://core.svn.wordpress.org/trunk@57012 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-01 09:31:12 +00:00
youknowriad
4624f178a3 Editor: Remove shadow support via direct attribute.
Shadow block support should always rely on the style attribute instead.

Props madhudollu.
Fixes #60377.
Built from https://develop.svn.wordpress.org/trunk@57510


git-svn-id: http://core.svn.wordpress.org/trunk@57011 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-01 09:26:15 +00:00
Pascal Birchler
a8616f8e33 Docs: Fix typo in do_robots() docblock.
This was introduced in [45928].

Props shailu25, mukesh27.
Fixes #60405.
Built from https://develop.svn.wordpress.org/trunk@57509


git-svn-id: http://core.svn.wordpress.org/trunk@57010 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-01 08:40:16 +00:00
dmsnell
8be95c6c7c HTML API: Test cleanup
Rename `$p` variable to `$processor` in tests for clarity.

Use static data providers. A mix of static and non-static data providers were
used in HTML API tests.  Data providers are required to be static in the next
PHPUnit version and there's no harm in using them consistently now.

Follow-up to [57507]

Props jonsurrell
See #59647


Built from https://develop.svn.wordpress.org/trunk@57508


git-svn-id: http://core.svn.wordpress.org/trunk@57009 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-01 01:02:15 +00:00
dmsnell
0dc136bcb9 HTML API: Fix void tag nesting with next_token
When `next_token()` was introduced, it introduced a regression in the HTML
Processor whereby void tags remain on the stack of open elements when they
shouldn't. This led to invalid values returned from `get_breadcrumbs()`.

The reason was that calling `next_token()` works through a different code path
than the HTML Processor runs everything else. To solve this, its sub-classed
`next_token()` called `step( self::REPROCESS_CURRENT_TOKEN )` so that the proper
HTML accounting takes place.

Unfortunately that same reprocessing code path skipped the step whereby void
and self-closing elements are popped from the stack of open elements.

In this patch, that step is run with a third mode for `step()`, which is the
new `self::PROCESS_CURRENT_TOKEN`. This mode acts as if `self::PROCESS_NEXT_NODE`
were called, except it doesn't advance the parser.

Developed in https://github.com/WordPress/wordpress-develop/pull/5975
Discussed in https://core.trac.wordpress.org/ticket/60382

Follow-up to [57348]

Props dmsnell, jonsurrell
Fixes #60382


Built from https://develop.svn.wordpress.org/trunk@57507


git-svn-id: http://core.svn.wordpress.org/trunk@57008 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-01 00:43:15 +00:00
dmsnell
4266e2daf5 HTML API: Fix CDATA lookalike matching invalid CDATA
When `next_token()` was introduced to the HTML Tag Processor, it started
classifying comments that look like they were intended to be CDATA sections.
In one of the changes made during development, however, a typo slipped
through code review that treated comments as CDATA even if they only
ended in `]>` and not the required `]]>`.

The consequences of this defect were minor because in all cases these are
treated as HTML comments from invalid syntax, but this patch adds the
missing check to ensure the proper reporting of CDATA-lookalikes.

Follow-up to [57348]

Props jonsurrell
Fixes #60406


Built from https://develop.svn.wordpress.org/trunk@57506


git-svn-id: http://core.svn.wordpress.org/trunk@57007 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-01 00:12:14 +00:00
Pascal Birchler
ec68b4743e I18N: Revert [57386] pending further investigation.
Reverts the change for fallback string lookup due to a performance regression in the bad case scenario.

See #59656.
Built from https://develop.svn.wordpress.org/trunk@57505


git-svn-id: http://core.svn.wordpress.org/trunk@57006 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-31 21:51:14 +00:00
Pascal Birchler
e9b8c1cd49 I18N: Load new translation library in wp_load_translations_early().
Ensures localization continues to work as expected with the new library in case
translations need to be loaded early in the process.

See #59656.
Built from https://develop.svn.wordpress.org/trunk@57504


git-svn-id: http://core.svn.wordpress.org/trunk@57005 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-31 21:28:15 +00:00
Pascal Birchler
d8996a3c77 Script Loader: Use a global variable in wp_script_modules().
This brings the function more in line with its related `wp_scripts()` and `wp_styles()` functions and makes it easier to reset the class instance in tests.

Props westonruter, luisherranz.
See #56313.
Built from https://develop.svn.wordpress.org/trunk@57503


git-svn-id: http://core.svn.wordpress.org/trunk@57004 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-31 18:16:14 +00:00
Pascal Birchler
1550a2bf77 Twenty Twenty-Three: Rename Comments template part.
This renames the Comments template part to 'Comments Template Part', to reduce confusion with the 'Comments' block when viewing both in the inserter.

Props mikachan, mukesh27, poena.
Fixes #56999.
Built from https://develop.svn.wordpress.org/trunk@57502


git-svn-id: http://core.svn.wordpress.org/trunk@57003 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-31 13:05:53 +00:00
Pascal Birchler
1942f49fe6 HTTP API: Ensure cookie names are cast to strings.
Props nosilver4u, darssen, kraftbj, engahmeds3ed, barry.hughes, schlessera.
Fixes #58566.
Built from https://develop.svn.wordpress.org/trunk@57501


git-svn-id: http://core.svn.wordpress.org/trunk@57002 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-31 13:03:57 +00:00
Pascal Birchler
112955169b Editor: fix small typos in block bindings API docblocks.
Props shailu25.
See #60282.
Fixes #60386.
Built from https://develop.svn.wordpress.org/trunk@57500


git-svn-id: http://core.svn.wordpress.org/trunk@57001 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-31 13:01:58 +00:00
youknowriad
9aaa49f5a7 Editor: Update WordPress packages to Gutenberg 16.7 RC3.
It brings with a set of iterations and follow-ups to the initial package update.
It also fixes a regression that happened for interactive blocks.

Props gziolo, luisherranz, cbravobernal.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57499


git-svn-id: http://core.svn.wordpress.org/trunk@57000 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-31 12:59:56 +00:00
youknowriad
bc902b5cd4 Editor: Fix Theme.json font settings unit test.
This file has been ommitted from the previous commit [57497].

See #60341.
Built from https://develop.svn.wordpress.org/trunk@57498


git-svn-id: http://core.svn.wordpress.org/trunk@56999 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-31 11:38:10 +00:00
youknowriad
9293a10257 Editor: Fix Theme.json font settings in unit test.
These changes fix incorrect font settings when testing the generation of a theme.json stylesheet.

Props aaronrobertshaw, mukesh27.
Fixes #60341.
Built from https://develop.svn.wordpress.org/trunk@57497


git-svn-id: http://core.svn.wordpress.org/trunk@56998 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-31 11:01:12 +00:00
youknowriad
e28108b73e Editor: Sanitize nested array in theme.json properly.
WP_Theme_JSON sanitization is now able to sanitize data contained on indexed arrays. 
So certain data from theme.json, for example, settings.typography.fontFamilies which is a JSON array will be sanitized.

Props mmaattiiaass, mukesh27.
Fixes #60360.
Built from https://develop.svn.wordpress.org/trunk@57496


git-svn-id: http://core.svn.wordpress.org/trunk@56997 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-31 10:55:10 +00:00
Sergey Biryukov
4a56947b5b Twenty Eleven: Fix typo in twentyeleven_widgets_init() description.
Follow-up to [17738].

Props harshgajipara.
See #60383.
Built from https://develop.svn.wordpress.org/trunk@57495


git-svn-id: http://core.svn.wordpress.org/trunk@56996 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-31 10:52:12 +00:00
youknowriad
2889f76e92 REST API: Add route for single styles revisions.
Adds a route for single global styles revisions: /wp/v2/global-styles/${ parentId }/revisions/${ revisionsId }
This fixes the `getRevision` actions in the core-data package.

Props ramonopoly, get_dave.
Fixes #59810.
Built from https://develop.svn.wordpress.org/trunk@57494


git-svn-id: http://core.svn.wordpress.org/trunk@56995 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-31 10:41:14 +00:00
gziolo
9eea02e31b Editor: Add viewStyle property to block.json for frontend-only block styles
Related issue in Gutenberg: https://github.com/WordPress/gutenberg/issues/54491.

For block scripts there was already `script`, `viewScript` and `editorScript`. For block styles there was only `style` and `editorStyle`. This brings the parity.

Props gaambo.
Fixes #59673. 


Built from https://develop.svn.wordpress.org/trunk@57493


git-svn-id: http://core.svn.wordpress.org/trunk@56994 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-31 09:11:17 +00:00
gziolo
2de003154d Script Modules API: Add import map polyfill for older browsers
Syncs the changes from https://github.com/WordPress/gutenberg/pull/58263. Adds a polyfill to make import maps compatible with unsported browsers (https://caniuse.com/import-maps).

Fixes #60348.
Props cbravobernal, jorbin, luisherranz, jonsurrell.


Built from https://develop.svn.wordpress.org/trunk@57492


git-svn-id: http://core.svn.wordpress.org/trunk@56993 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-31 08:31:29 +00:00