48955 Commits

Author SHA1 Message Date
Riad Benguella
a770c6da8d REST API: Introduce the necessary endpoints for the font library.
This commits add three endpoints to retrieve and manipulate fonts in WordPress.
This commit also means that we now have a fully functional Font Library in the site editor.

Props get_dave, youknowriad, mmaattiiaass, grantmkin, swissspidy, mcsf, jorbin, ocean90.
See #59166.

git-svn-id: https://develop.svn.wordpress.org/trunk@57548 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-07 09:18:38 +00:00
Riad Benguella
952004a2b3 Editor: Fix block style variation selector generation.
These changes fix the generation of selectors for block style variations. Previously, an incorrect CSS selector could be generated if the block's base selector used an element tag etc.

Props aaronrobertshaw, youknowriad, mukesh27.
Fixes #60453.

git-svn-id: https://develop.svn.wordpress.org/trunk@57547 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-07 08:51:39 +00:00
Isabel Brison
27087b71e0 Script Loader: always output core block global styles after base global styles.
Changes the output of core block global styles when `should_load_separate_core_block_assets` is true so they are appended to base global styles instead of block-library styles.

Props isabel_brison, oandregal, azaozz, ajlende.
Fixes #60280.


git-svn-id: https://develop.svn.wordpress.org/trunk@57546 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-07 04:35:34 +00:00
Colin Stewart
2b08a77f5c Upgrade/Install: Introduce Plugin Dependencies.
Introduces a new "Requires Plugins" plugin header so that plugin developers can list the slugs of the plugins theirs depends on.

This will inform users of the requirements, and provide links to the WordPress.org Plugins Repository that they can click to install and activate the dependencies first.

Plugins whose requirements are not met cannot be installed or activated, and they will be deactivated automatically if their requirements become unmet.
Plugins that others rely on cannot be deactivated or deleted until their dependent plugins are deactivated or deleted.

In memory of Alex Mills and Alex King.
WordPress Remembers.

Props ahoereth, afragen, alanfuller, alexkingorg, amykamala, anonymized_10690803, apeatling, ashfame, atimmer, audrasjb, aristath, azaozz, batmoo, beaulebens, blobaugh, bobbingwide, boonebgorges, brianhenryie, chanthaboune, chrisdavidmiles, coolmann, costdev, courane01, danielbachhuber, davidperez, dd32, Denis-de-Bernardy, dingo_d, DJPaul, dougal, DrewAPicture, ethitter, filosofo, georgestephanis, giuseppemazzapica-1, goldenapples, griffinjt, hellofromTonya, husobj, ideag, jarednova, jbobich, jbrinley, jltallon, joedolson, johnciacia, johnjamesjacoby, joppuyo, jsmoriss, karmatosed, kebbet, knutsp, kraftbj, kraftner, kurtpayne, lkraav, logikal16, luisherranz, man4toman, markjaquith, matt, mbijon, megphillips91, mikeschinkel, mordauk, morehawes, mrwweb, mte90, mukesh27, mzaweb, nacin, norcross, nvwd, nwjames, obliviousharmony, ocean90, oglekler, paaljoachim, pauldewouters, pbaylies, pbiron, peterwilsoncc, Philipp15b, poena, pogidude, retlehs, rmccue, ryan, sabreuse, sc0ttkclark, scribu, sereedmedia, SergeyBiryukov, ShaneF, shidouhikari, soean, spacedmonkey, stephenh1988, swissspidy, taylorde, tazotodua, threadi, TimothyBlynJacobs, TJNowell, tollmanz, toscho, tropicalista, Viper007Bond, westi, whiteshadow, williamsba1, wpsmith, ZaneMatthew.
Fixes #22316.

git-svn-id: https://develop.svn.wordpress.org/trunk@57545 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-06 23:44:09 +00:00
Aaron Jorbin
3eb7bd1b29 Build/Test Tools: Make the props bot message shorter.
The new default is a git flavored version, while Core wants the SVN flavor. This update is required after https://github.com/WordPress/props-bot-action/pull/61

Props desrosj, jorbin, noisysocks, gziolo.
See #60417.


git-svn-id: https://develop.svn.wordpress.org/trunk@57544 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-06 21:11:27 +00:00
Riad Benguella
7a7133908f Editor: Show the patterns page for classic themes.
Block themes and classic themes with template parts support 
can already access the patterns list within the site editor.
This adds a "Patterns" menu item under Appearance for classic themes
without template parts support.

Props wildworks, kevin940726, aaronrobertshaw, fabiankaegy, swissspidy, get_dave, kebbet.
Fixes #58827.

git-svn-id: https://develop.svn.wordpress.org/trunk@57543 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-06 19:40:21 +00:00
Dennis Snell
b7027a85e0 HTML API: Join text nodes on invalid-tag-name boundaries.
A fix was introduced to the Tag Processor to ensure that contiguous text
in an HTML document emerges as a single text node spanning the full
sequence. Unfortunately, that patch was marginally over-zealous in
checking if a "<" started a syntax token or not. It used the following:

{{{
<?php
if ( 'A' <= $c && 'z' >= $c ) { ... }
}}}

This was based on the assumption that the A-Z and a-z letters are
contiguous in the ASCII range; they aren't, and there's a gap of
several characters in between. The result of this is that in some
cases the parser created a text boundary when it didn't need to.
Text boundaries can be surprising and can be created when reaching
invalid syntax, HTML comments, and more hidden elements, so
semantically this wasn't a major bug, but it was an aesthetic
challenge.

In this patch the check is properly compared for both upper- and
lower-case variants that could potentially form tag names.

{{{
<?php
if ( ( 'A' <= $c && 'Z' >= $c ) || ( 'a' <= $c && 'z' >= $c ) ) { ... }
}}}

This solves the problem and ensures that contiguous text appears
as a single text node when scanning tokens.

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

Follow-up to [57489]
Props dmsnell, jonsurrell
Fixes #60385



git-svn-id: https://develop.svn.wordpress.org/trunk@57542 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-06 19:21:36 +00:00
Pascal Birchler
a0fedc97f5 Coding Standards: Fix array key alignment after [57539].
See #59166.

git-svn-id: https://develop.svn.wordpress.org/trunk@57541 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-06 10:56:38 +00:00
Riad Benguella
d928e5f916 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@57540 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-06 09:22:39 +00:00
Riad Benguella
0cab832eef 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@57539 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-06 08:40:38 +00:00
Sergey Biryukov
5810f22747 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@57538 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-06 01:23:54 +00:00
Peter Wilson
2ac96bcd07 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@57537 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-05 22:21:35 +00:00
Jonathan Desrosiers
1950da3f17 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@57536 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-05 22:19:19 +00:00
Pascal Birchler
77aad3a72b General: Add tests for array_is_list polyfill added in r57337.
Props costdev.
See #55105.

git-svn-id: https://develop.svn.wordpress.org/trunk@57535 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-05 21:57:44 +00:00
Jonathan Desrosiers
4e633b50a1 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@57534 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-05 20:58:59 +00:00
Pascal Birchler
2ae28c50f9 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@57533 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-05 09:41:28 +00:00
Sergey Biryukov
8d47e64971 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@57532 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-05 03:40:25 +00:00
Peter Wilson
ac240f068d 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@57531 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-04 22:02:02 +00:00
Sergey Biryukov
629d4c5753 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@57530 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-04 18:44:02 +00:00
Sergey Biryukov
7d9eb8fc95 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@57529 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-03 14:22:44 +00:00
Dennis Snell
324f2d70b8 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@57528 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-02 23:25:56 +00:00
Dennis Snell
f80516dfab 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



git-svn-id: https://develop.svn.wordpress.org/trunk@57527 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-02 22:55:27 +00:00
Greg Ziółkowski
235cb39891 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@57526 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-02 20:22:11 +00:00
Adam Silverstein
7e34c4b7d3 Media: fix AVIF tests.
Follow up to r57524. Properly add AVIF images for unit tests.

Fixes #51228.



git-svn-id: https://develop.svn.wordpress.org/trunk@57525 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-02 18:48:03 +00:00
Adam Silverstein
575ce15b5d 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@57524 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-02 17:46:50 +00:00
Jonathan Desrosiers
e9e2281afe 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@57523 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-02 16:35:59 +00:00
Sergey Biryukov
b645284c4f Coding Standards: Use strict comparison for functions lookup in plugin/theme editors.
Follow-up to [10607], [44617].

Props upadalavipul.
See #60415.

git-svn-id: https://develop.svn.wordpress.org/trunk@57522 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-02 15:28:18 +00:00
Greg Ziółkowski
2a494ac363 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.




git-svn-id: https://develop.svn.wordpress.org/trunk@57521 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-02 12:59:21 +00:00
Andrea Fercia
50215dfbd7 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@57520 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-02 09:53:07 +00:00
Pascal Birchler
88bcfb7663 I18N: Add type declaration to new method missed in [57518].
See #59656.

git-svn-id: https://develop.svn.wordpress.org/trunk@57519 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-02 09:05:43 +00:00
Pascal Birchler
5e178ff9c9 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@57518 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-01 20:57:03 +00:00
Jonathan Desrosiers
9486dc1bec 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@57517 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-01 19:26:10 +00:00
Pascal Birchler
8d3e4a1eeb 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@57516 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-01 19:03:55 +00:00
Joe Dolson
67e9ffb9fd 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@57515 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-01 16:26:47 +00:00
Riad Benguella
1e564ad6c0 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@57514 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-01 12:52:54 +00:00
Pascal Birchler
5b46851f7c 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@57513 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-01 11:43:21 +00:00
Sergey Biryukov
d27872e29e Twenty Fifteen: Fix typo in css/blocks.css.
Follow-up to [43798].

Props shailu25, harshgajipara.
Fixes #60383.

git-svn-id: https://develop.svn.wordpress.org/trunk@57512 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-01 11:31:05 +00:00
Riad Benguella
3600105163 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@57511 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-01 09:29:38 +00:00
Riad Benguella
ef37e6bf82 Editor: Remove shadow support via direct attribute.
Shadow block support should always rely on the style attribute instead.

Props madhudollu.
Fixes #60377.

git-svn-id: https://develop.svn.wordpress.org/trunk@57510 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-01 09:24:09 +00:00
Pascal Birchler
65be4cd635 Docs: Fix typo in do_robots() docblock.
This was introduced in [45928].

Props shailu25, mukesh27.
Fixes #60405.

git-svn-id: https://develop.svn.wordpress.org/trunk@57509 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-01 08:38:15 +00:00
Dennis Snell
f16c79281c 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



git-svn-id: https://develop.svn.wordpress.org/trunk@57508 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-01 01:00:56 +00:00
Dennis Snell
cdb218b200 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



git-svn-id: https://develop.svn.wordpress.org/trunk@57507 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-01 00:41:40 +00:00
Dennis Snell
4a2aa99d51 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



git-svn-id: https://develop.svn.wordpress.org/trunk@57506 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-01 00:10:19 +00:00
Pascal Birchler
5e33f4be2d 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@57505 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-31 21:49:08 +00:00
Pascal Birchler
e26bbdbbf7 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@57504 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-31 21:26:55 +00:00
Pascal Birchler
03cb3e30f2 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@57503 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-31 18:14:30 +00:00
Pascal Birchler
6dd00b1ffa 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@57502 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-31 12:53:33 +00:00
Pascal Birchler
7076ebbdd1 HTTP API: Ensure cookie names are cast to strings.
Props nosilver4u, darssen, kraftbj, engahmeds3ed, barry.hughes, schlessera.
Fixes #58566.

git-svn-id: https://develop.svn.wordpress.org/trunk@57501 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-31 12:51:39 +00:00
Pascal Birchler
1338984fb4 Editor: fix small typos in block bindings API docblocks.
Props shailu25.
See #60282.
Fixes #60386.

git-svn-id: https://develop.svn.wordpress.org/trunk@57500 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-31 12:45:35 +00:00
Riad Benguella
9453f3a85b 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@57499 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-31 11:54:09 +00:00