Commit Graph

49906 Commits

Author SHA1 Message Date
Sergey Biryukov
8efc6e1807 Script Loader: Check if error_reporting() exists in load-(scripts|styles).php.
This avoids a fatal error on PHP 8 if `error_reporting()` is disabled in `php.ini`.

On systems with this function disabled, it's best to add a dummy function to the `wp-config.php` file, as there are multiple other calls in core or plugins.

However, as this call to the function is run prior to `wp-config.php` loading, it is now wrapped in a `function_exists()` check.

Follow-up to [50447].

Props gansbrest, sabernhardt, jrf, martin.krcho, SergeyBiryukov.
Fixes #61873.
Built from https://develop.svn.wordpress.org/trunk@58905


git-svn-id: http://core.svn.wordpress.org/trunk@58301 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-08-16 14:29:15 +00:00
Mamaduka
bfcd875946 Editor: Fix preloaded REST API paths
When providing an incorrect path to preload, the `rest_preload_api_request` will silently fail, and nothing will be preloaded.

* Fix typo for `wp_template_part` post type preload path for the Site Editor.
* Do not preload the `wp_block` post type for post editors. The endpoint doesn't support unbound queries, and the data is no longer needed during editor initialization.

Props kirasong, tyxla, mamaduka.
Fixes #61884.
Built from https://develop.svn.wordpress.org/trunk@58904


git-svn-id: http://core.svn.wordpress.org/trunk@58300 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-08-16 06:23:17 +00:00
Aaron Jorbin
af61bf819e Build/Test: update Props Bot to correct event type
The proper name is the plural `types`. This will cause the action to run only when necessary. Very Demure. Very mindful.

Ref: https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#issue_comment

Props jeherve.
Fixes #61883

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


git-svn-id: http://core.svn.wordpress.org/trunk@58299 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-08-15 17:48:16 +00:00
Sergey Biryukov
c6324a7388 Script Loader: Remove redundant check in wp_register_tinymce_scripts().
Since removing the build steps for a gzipped version of TinyMCE, the check whether gzip is supported on the server is superfluous. It may also result in the uncompressed files being used when the compressed files are available and could be used.

Follow-up to [44114], [44651].

Props MattyRob, hbhalodia.
Fixes #61862.
Built from https://develop.svn.wordpress.org/trunk@58902


git-svn-id: http://core.svn.wordpress.org/trunk@58298 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-08-15 14:58:16 +00:00
Peter Wilson
1b400d5c47 Build/test tools: Remove prompt for trac ticket referenced with Core- prefix.
Prevents the GitHub bot from posting a comment on pull requests requesting a trac ticket link if the ticket description includes a link via the Core- prefix, eg Core-61865.

The WordPress/WordPress-Develop repository is configured to automatically convert the text to a trac ticket link.

Props martinkrcho, peterwilsoncc.
Fixes #61865.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58297 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-08-15 04:58:16 +00:00
Peter Wilson
af6ec4afee Meta: Tidy up and update .mailmap.
Updates the name mappings to sort display names ascii-alphabetically and to ascribe commits to updated usernames.

Accounts without a seperate display name remain listed in the footer of the file.

Props dmsnell, jorbin.
See #61864.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58296 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-08-15 04:25:16 +00:00
dmsnell
8d8bd66d02 Meta: Add .mailmap to ascribe git commits to proper author.
From time to time a new commit will appear from an existing commit which has a different name or email address (or both) than an existing name or email address. This occurs because of changing names and changing emails and because of mistakes. Additionally, the `svg`-to-`git` process double-encodes names from `profiles.wordpress.org` causing corruption in names with non-US-ASCII characters.

This patch introduces a `.mailmap` file to alias committers so that:

 - All contributions for a given person are shown for that person.
 - Committers will be able to control or fix the display of their own name.

The `.mailmap` file is a standard `git` configuration.

Developed in https://github.com/wordpress/wordpress-develop/pull/7180
Discussed in https://core.trac.wordpress.org/ticket/61864

Fixes #61864.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58295 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-08-14 22:57:16 +00:00
dmsnell
5cd8048fc2 HTML API: Make "reset insertion mode appropriately" algorithm private.
The algorithm is described and referred to in the specification as
"reset the insertion mode appropriately." This patch renames it to
more accurately reflect the specification, and it turns the public
method private. As an internal algorithm from the HTML specification
it should not be open to extension.

Developed in https://github.com/wordpress/wordpress-develop/pull/7194
Discussed in https://core.trac.wordpress.org/ticket/61549

Follow-up to [28656].
Props jonsurrell.
See #61549.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58294 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-08-14 21:19:16 +00:00
dmsnell
edd34df6ea HTML API: Use strict in_array comparison for checking URI attributes.
This patch modifies the URL-escaping code in the HTML API to rely on strict comparisons. This prevents accidental matching via type-coercion.

Developed in https://github.com/wordpress/wordpress-develop/pull/7196

Follow-up to [58473].
Props jonsurrell.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58293 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-08-14 19:51:17 +00:00
hellofromTonya
713e76f16b Editor: Fix block custom CSS pseudo element selectors in global styles.
Fixes a regression introduced in [58241] where selectors with pseudo elements are wrapped within `:where()` causing malformed CSS and the CSS rule(s) not being applied.

When processing custom CSS for blocks, this changeset:

* Strips the pseudo-elements from the original nested selector, performs the required wrapping in `:root :where`, then re-appends the pseudo-element selector with its leading combinators if present.
* Removes empty CSS rules.

It includes the PHP changes.

Reference:
* PHP changes from [https://github.com/WordPress/gutenberg/pull/63980 Gutenberg PR 63980].

Follow-up to [58241], [56812], [55216].

Props aaronrobertshaw, wongjn, harlet7, dballari, ramonopoly, andrewserong, aristath, hellofromTonya.
Fixes #61769.
Built from https://develop.svn.wordpress.org/trunk@58896


git-svn-id: http://core.svn.wordpress.org/trunk@58292 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-08-14 18:57:19 +00:00
Sergey Biryukov
87ec4292ae Network Admin: Improve button alignment in Right Now dashboard widget.
Follow-up to [16237].

Props sabernhardt.
Fixes #61869.
Built from https://develop.svn.wordpress.org/trunk@58895


git-svn-id: http://core.svn.wordpress.org/trunk@58291 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-08-14 16:05:18 +00:00
Peter Wilson
c1af99e7e6 Bulk/Quick Edit: Remove duplicate HTML IDs from post list tables.
Removes duplicate IDs on the post list admin pages affecting various list items, selects and checkboxes:

* JavaScript duplication of the inline editing HTML for bulk editing renames various IDs to include the prefix `bulk-edit-`,
* IDs in the Category Checkbox Walker make use of `wp_unique_prefixed_id()` to avoid duplicates, resulting in a numeric suffix, and,
* the post parent dropdown for the bulk editor is given a custom ID `bulk_edit_post_parent`.

Props peterwilsoncc, sergeybiryukov, azaozz, joedolson, siliconforks, zodiac1978, rcreators.
Fixes #61014.


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


git-svn-id: http://core.svn.wordpress.org/trunk@58290 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-08-13 23:37:16 +00:00
dmsnell
f957219299 HTML API: Only stop on full matches for requested tag name.
An optimization pass on the HTML API left a bug in the `matches()`
method, whereby it would falsely detect a tag name match if the
found tag were a lexical subset of the requested tag. This occurred
because of the use of `substr_compare()` without checking that the
outer lengths matched.

This patch resolves the bug by adding the length check.

Developed in https://github.com/wordpress/wordpress-develop/pull/7189
Discussed in https://core.trac.wordpress.org/ticket/61545

Follow-up to [58613].
Props dmsnell, westonruter.
See #61545.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58289 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-08-13 22:14:16 +00:00
dmsnell
9aaf4b144a HTML API: Remove unnecessary skips in tests for unsupported markup.
The HTML API allowed tests to be skipped for unsupported HTML, for example tags that had not yet been implemented. This provided stability to the test suite while primary support was being added.

In many places, the tags are now fully supported and the test skips can be removed.

Developed in https://github.com/wordpress/wordpress-develop/pull/7186
Discussed in https://core.trac.wordpress.org/ticket/61646

Props jonsurrell.
See #61646.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58288 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-08-13 21:44:18 +00:00
hellofromTonya
30cd5e4ea0 Editor: Fix bumped specificity for layout styles in non-iframed editor.
Fixes a regression introduced in [58241] which inadvertently bumped the specificity in a non-iframed editor for `.editor-styles-wrapper .is-layout-flow > *` from (0,1,0) to (0,2,0). This fix restores theme.json spacing rules taking precedence over the implicit spacing rules in a non-iframed editor.

**The What**

When the block editor is not iframed (which can happen when Custom Fields are active, or blocks that use and older `apiVersion` are present), style rules are processed using post css to append the `.editor-styles-wrapper` class name. This has the effect of scoping the the style rules to ensure they don't affect the editor chrome or admin.

With [58241], one of the rules was changed to `.is-layout-flow > *`. In a iframed editor, the specificity of this rule is okay (0,1,0), but in a non-iframed editor it becomes `.editor-styles-wrapper .is-layout-flow > *`, a specificity of (0,2,0). Comparing this to before [58241], the same rule was `.editor-styles-wrapper :where(body .is-layout-flow) > *` (specificity 0,1,0). This is a regression in specificity that has caused some issues. Notably themes can no longer properly override the spacing for blocks using theme.json and have the results correctly shown in the non-iframed editor.

**The How**

This changeset modifies the selector to `:root :where(.is-layout-flow) > *` (still specificity 0,1,0). `transformStyles` handles 'root' selectors a little differently, it'll instead replace the `:root` part so it becomes `.editor-styles-wrapper where(.is-layout-flow) > *` (keeping the specificity at 0,1,0).

The other layout selector that this affects is the `:first-child` `:last-child` selectors that are responsible for resetting margin at the start and end of a block list. They traditionally have a 0,2,0 specificity so that they can override both the above rule and any rules in the theme.json. Those selectors are also maintained at 0,2,0 with this change, they become something like `:root :where(.is-layout-flow) > :first-child`.

**References:**
* PHP changes from [https://github.com/WordPress/gutenberg/pull/64076 Gutenberg PR 64076].

Follow-up to [58241], [58228], [55956], [54162].

Props talldanwp, aaronrobertshaw, andrewserong, markhowellsmead, ramonopoly, hellofromTonya.
Fixes #61829.
Built from https://develop.svn.wordpress.org/trunk@58890


git-svn-id: http://core.svn.wordpress.org/trunk@58286 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-08-13 17:45:18 +00:00
Sergey Biryukov
6eebb7cd54 Coding Standards: Replace an empty foreach loop in wp_replace_in_html_tags().
This aims to clarify the intention of the code and improve readability.

Follow-up to [33359].

Props jrf, TobiasBg, mi5t4n, dhruvang21, mayura8991, nadimcse, Presskopp, SergeyBiryukov.
Fixes #61860.
Built from https://develop.svn.wordpress.org/trunk@58889


git-svn-id: http://core.svn.wordpress.org/trunk@58285 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-08-13 16:29:18 +00:00
Sergey Biryukov
0058fa9195 Coding Standards: Bring some consistency to setting up comment moderation links.
Follow-up to [7082], [7175], [9103], [10102], [11749], [12008], [12286], [32516].

Props kebbet.
See #61607.
Built from https://develop.svn.wordpress.org/trunk@58888


git-svn-id: http://core.svn.wordpress.org/trunk@58284 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-08-12 21:28:13 +00:00
Tammie Lister
cda3a2e2b3 Twenty Twelve: Fixes navigation block submenus being cut off.
The navigation block submenus were being cut off. This is the simpler method proposed in patches.

Props poena, sabernhardt.
Fixes #61672.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58283 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-08-12 15:19:16 +00:00
Tammie Lister
95f6808e03 Twenty Seventeen: Fixes Pullquote block text color not changing on front.
The Pullquote block text color was not changing on the front. This overrides the inlined styles.

Props iamjaydip, laurelfulford, sabernhardt.
Fixes #46080.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58282 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-08-12 13:44:15 +00:00
Tammie Lister
4f8f6e9fa2 Twenty Twelve: Fixes Button block outline style having wrong text color on front.
The Button block has a different text color on the front to the editor when you apply text color. This resolves it without changing other styles.

Props pitamdey, ugyensupport, sabernhardt.
Fixes #61846.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58281 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-08-12 10:56:16 +00:00
Peter Wilson
8fa1b1d696 Site Health: Check if directories exist before checking size.
Prevents the Site Health Debug tab from stalling when reporting directory sizes if the directory does not exist.

Props clorith, aristath, narenin, kowsar89, hellofromTonya, ironprogrammer, shailu25.
Fixes #61638.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58280 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-08-12 04:54:15 +00:00
Sergey Biryukov
a596bd6848 Docs: Switch canonical location for the comment_row_actions filter.
This aims to bring consistency with the other `*_row_actions` filters.

Follow-up to [6705], [8217], [9103], [15491], [26138], [27669].

See #61608.
Built from https://develop.svn.wordpress.org/trunk@58883


git-svn-id: http://core.svn.wordpress.org/trunk@58279 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-08-11 21:10:13 +00:00
Tammie Lister
c057097377 Twenty Twelve: Fixes Code block font family difference in editors.
The Code block font family was different in the front-end and the editor. This resolves the overruling in the iframe editor.

Props pitamdey, sabernhardt.
Fixes #61808.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58278 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-08-11 14:26:17 +00:00
Tammie Lister
3b734c3e0b Twenty Nineteen: Fixes translatable strings with HTML code not appearing.
Only the translatable part not HTML, should appear for translators to avoid issues. This resolves one string that was not appearing. This only fixed for one theme although discussion on the ticket was for multiples. Other tickets should be open for those if desireable.

Props Presskopp, SergeyBiryukov, pratikkry, pento, mukesh27, laurelfulford, kjellr, desrosj, sabernhardt.
Fixes #45473.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58277 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-08-11 09:45:17 +00:00
Peter Wilson
d09e94165e External Libraries: Update the Underscore.js library to version 1.13.7.
This updates the Underscore library from version 1.13.6 to 1.13.7. This is a minor bug fix release.

The full list of changes can be found in the Underscore.js change log: https://underscorejs.org/#changelog.

Props hbhalodia, aristath, desrosj, mcrisp1972.
Fixes #61836.


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


git-svn-id: http://core.svn.wordpress.org/trunk@58276 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-08-10 23:57:16 +00:00
Sergey Biryukov
8a164c4d9c Administration: Replace contracted verb forms for better consistency.
Follow-up to [14951], [37221], [52979], [52978], [55977].

Props kebbet, sabernhardt.
Fixes #58639.
Built from https://develop.svn.wordpress.org/trunk@58879


git-svn-id: http://core.svn.wordpress.org/trunk@58275 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-08-10 23:02:06 +00:00
Peter Wilson
bf103e6621 Code Quality: Clarify variable names in dependency classes.
Renames several variables in the `WP_Scripts` and `WP_Styles` classes to clarify their purpose for developers reading the code.

Props peterwilsoncc, sergeybiryukov.
See #61607.


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


git-svn-id: http://core.svn.wordpress.org/trunk@58274 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-08-10 23:00:14 +00:00
dmsnell
98e51518b3 HTML API: Remove completed TODO comments.
This patch removes TODO comments indicating the need to verify certain behaviors and algorithms. Those verifications have taken place and the comments are no longer needed.

Developed in https://github.com/wordpress/wordpress-develop/pull/7174
Discussed in https://core.trac.wordpress.org/ticket/61646

Follow-up to [58867], [58870].

Props jonsurrell.
See #64646.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58273 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-08-10 05:00:14 +00:00
Felix Arntz
79e47b14ab Build/Test Tools: Avoid using wp_delete_user() in PHPUnit tests unless explicitly acknowledging or ignoring Multisite.
`wp_delete_user()` does not actually delete the entire user when using WordPress Multisite. Therefore tests should typically use the test helper method to fully delete the user, unless explicitly ignoring Multisite or testing the `wp_delete_user()` function while taking Multisite behavior into account.

Fixes #61851.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58272 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-08-09 18:31:13 +00:00
Felix Arntz
3fdbfb0f4a Comments: Add optional $context parameter to get_edit_comment_link() to get the URL without HTML entities.
This brings the function in line with the similar `get_edit_post_link()` parameter. The 'get_edit_comment_link' filter now additionally receives the `$comment_id` and `$context` as parameters.

Additionally, as a minor enhancement, the capability check is now more defensive, as it will no longer cause an error if the given comment ID is invalid.

As part of the changeset, comprehensive test coverage for the `get_edit_comment_link()` including the new behavior is added.

Props deepakrohilla.
Fixes #61727.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58271 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-08-09 18:01:19 +00:00
Sergey Biryukov
ddab80be2c Docs: Remove unsupported values in plugins_api() DocBlocks.
The `group` field and the `hot_categories` action were never actually implemented on the WordPress.org side.

Follow-up to [34596], [meta3227].

Props lopo, milana_cap.
See #55645.
Built from https://develop.svn.wordpress.org/trunk@58873


git-svn-id: http://core.svn.wordpress.org/trunk@58269 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-08-09 00:18:16 +00:00
desrosj
32bf860db4 External Libraries: Update the Backbone.js library to version 1.6.0.
This updates the `backbone` library from version `1.5.0` to `1.6.0`. This is a minor bug fix release.

The full list of changes can be found in the Backbone.js change log: https://backbonejs.org/#changelog.

Props manooweb mardroid.
Fixes #60512.
Built from https://develop.svn.wordpress.org/trunk@58872


git-svn-id: http://core.svn.wordpress.org/trunk@58268 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-08-08 19:37:19 +00:00
dmsnell
c834d20762 HTML API: Test and fix SVG script handling.
When support was added for foreign content, an ambiguity in the HTML specification led to code that followed the wrong path when encountering a self-closing SCRIPT element in the SVG namespace. Further, a fallthrough was discovered during manual testing.

This patch adds a new test to assert the proper behaviors and fixes these issues. In the case of the SCRIPT element, the outcome was the same with the wrong code path, making the defect benign. In the case of the fallthrough, the wrong behavior would occur.

The updates in this patch also resolves a todo relating to the spec ambiguity.

Developed in https://github.com/wordpress/wordpress-develop/pull/7164
Discussed in https://core.trac.wordpress.org/ticket/61576

Follow-up to [58868].

Props: dmsnell, jonsurrell.
See #61576.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58267 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-08-08 17:04:19 +00:00
dmsnell
7611ec9415 HTML API: expect_closer() should report false for self-closing foreign elements.
Previously, `WP_HTML_Processor::expects_closer()` would report `true` for self-closing foreign elements when called without supplying a node in question, but it should have been reporting `true` just as it does for HTML elements.

This patch adds a test case demonstrating the issue and a bugfix.

The `html5lib` test runner was relying on the incorrect behavior, accidentally working. This is also corrected and the `html5lib` test now relies on the correct behavior of `expects_closer()`.

Developed in https://github.com/wordpress/wordpress-develop/pull/7162
Discussed in https://core.trac.wordpress.org/ticket/61576

Follow-up to [58868].

Props: dmsnell.
See #61576.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58266 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-08-08 16:15:20 +00:00
dmsnell
ed0e5cff79 HTML API: Add support for SVG and MathML (Foreign content) (remove file)
As part of work to add more spec support to the HTML API, this patch adds support for SVG and MathML elements, or more generally, "foreign content."

The rules in foreign content are a mix of XML and HTML parsing rules and introduce additional complexity into the processor, but is important in order to avoid getting lost when inside these elements.

This patch follows the first by deleting the empty files, which were mistakenly left in during the initial merge.

Developed in https://github.com/wordpress/wordpress-develop/pull/6006
Discussed in https://core.trac.wordpress.org/ticket/61576

Follow-up to [58867].

Props: dmsnell, jonsurrell, westonruter.
See #61576.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58264 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-08-08 07:33:19 +00:00
dmsnell
1ffe7a456c HTML API: Add support for SVG and MathML (Foreign content)
As part of work to add more spec support to the HTML API, this patch adds
support for SVG and MathML elements, or more generally, "foreign content."

The rules in foreign content are a mix of XML and HTML parsing rules and
introduce additional complexity into the processor, but is important in
order to avoid getting lost when inside these elements.

Developed in https://github.com/wordpress/wordpress-develop/pull/6006
Discussed in https://core.trac.wordpress.org/ticket/61576

Props: dmsnell, jonsurrell, westonruter.
See #61576.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58263 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-08-08 07:25:15 +00:00
dmsnell
f200230d18 HTML API: Ensure that get_modifiable_text() reads enqueued updates.
When `set_modifiable_text()` was added to the Tag Processor, it was considered that the same information could be queried after setting its value and before proceeding to the next token, but unfortunately overlooked that if the starting modifiable text length was zero, then the read in `get_modifiable_text()` would ignore enqueued updates.

In this patch, `get_modifiable_text()` will read any enqueued values before reading from the input HTML document to ensure consistency.

Follow-up to [58829].
Props dmsnell, jonsurrell, ramonopoly.
Fixes #61617.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58262 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-08-08 04:26:13 +00:00
Sergey Biryukov
0fca569339 Docs: Correct alignment for rest_insert_attachment action DocBlock.
Follow-up to [39348].

Props krupalpanchal.
See #61608.
Built from https://develop.svn.wordpress.org/trunk@58865


git-svn-id: http://core.svn.wordpress.org/trunk@58261 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-08-08 02:27:18 +00:00
hellofromTonya
25cd14c509 Docs: Remove bugfix since annotations from WP_Theme_JSON::get_block_nodes().
Removes the `@since` bugfix annotations from `WP_Theme_JSON::get_block_nodes()` docblock. Bugfixes are not annotated in docblocks.

Follow-up to [58856].
See #61704.
Built from https://develop.svn.wordpress.org/trunk@58864


git-svn-id: http://core.svn.wordpress.org/trunk@58260 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-08-07 19:58:17 +00:00
desrosj
cb0f56f131 External Libraries: Update the whatwg-fetch polyfill library.
This updates the `whatwg-fetch` library from version `3.6.17` to `3.6.20`, the latest current version.

This library is included and registered within WordPress as the `wp-polyfill-fetch` script but is no longer used by WordPress itself. Updates are provided as a courtesy, and all projects using this polyfill should reevaluate usage.

Props manooweb.
Fixes #60514.
Built from https://develop.svn.wordpress.org/trunk@58860


git-svn-id: http://core.svn.wordpress.org/trunk@58256 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-08-07 15:52:22 +00:00
dmsnell
c4cd3c1c4b HTML API: Use full parser in html5lib tests.
Previously the `html5lib` tests have only run in the fragment parser mode,
assuming IN BODY context. This limited the number of tests which could run
and was a result of the HTML Processor only supporting the IN BODY fragment
parser. In [58836], however, a full parser was added to the HTML Processor.

In this patch the full parser is utilized in order to run more of the
previously-skipped tests, asserting more behaviors in the HTML parsing.

Developed in https://github.com/wordpress/wordpress-develop/pull/7117
Discussed in https://core.trac.wordpress.org/ticket/61646

Props: dmsnell, jonsurrell.
See #61646.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58255 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-08-06 22:07:19 +00:00
dmsnell
ac4ebc8d07 HTML API: Truncated funky comments should cause the Tag Processor to pause.
A state change was missing in the Tag Processor when the input is too short to
find a comment closer after an opened funky comment. This patch fixes a issue
where `</#` does not correctly report incomplete input, but `</# ` does.

Developed in https://github.com/wordpress/wordpress-develop/pull/7146
Discussed in https://core.trac.wordpress.org/ticket/61831

Props: jonsurrell.
Fixes #61831.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58254 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-08-06 20:43:18 +00:00
Sergey Biryukov
1396f6e30c Site Health: Clarify the description for max_file_uploads in Site Health Info.
Follow-up to [48535].

Props iflairwebtechnologies, hbhalodia, mukesh27, SergeyBiryukov.
Fixes #61814.
Built from https://develop.svn.wordpress.org/trunk@58857


git-svn-id: http://core.svn.wordpress.org/trunk@58253 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-08-06 13:22:11 +00:00
talldanwp
f2bf0373a5 Theme JSON: Ensure root selector (body) is not wrapped in :root :where().
Pre-WordPress 6.6, the `body` selector was used for styles associated with the body.

In 6.6, this was mistakenly changed to `:root :where(body)`, an increase in specificity, causing some issues for themes.

This change reverts the specificity increase, styles again use the `body` selector.

Syncs PHP changes from https://github.com/WordPress/gutenberg/pull/63726.

Props talldanwp, andrewserong, aaronrobertshaw, mukesh27, hellofromtonya.
Fixes #61704.


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


git-svn-id: http://core.svn.wordpress.org/trunk@58252 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-08-06 08:26:12 +00:00
dmsnell
dc84e3d2c2 WP_Debug_Data: Extract wp-constants data into separate method.
This is the part two in a larger modularization of the data in `WP_Debug_Data`.
Previously this was a single massive method drawing in debug data from various
groups of related data, where the groups were independent from each other.

This patch separates the second of twelve groups, the `wp-constants` info,
into a separate method focused on that data.

This work precedes changes to make the `WP_Debug_Data` class more extensible
for better use by plugin and theme code.

Developed in https://github.com/wordpress/wordpress-develop/pull/7106
Discussed in https://core.trac.wordpress.org/ticket/61648

Props: apermo, costdev, dmsnell.
See #61648.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58251 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-08-05 21:39:11 +00:00
Sergey Biryukov
1a2b5794da Menus: Check if taxonomy term exists in wp_update_nav_menu_item().
When inserting a term from a non-existing taxonomy as a nav item, the `post_title` property should be empty, and the function should not throw a fatal error for `wp_specialchars_decode()`.

Includes bringing some consistency to similar checks for post types and post type archives in the same code fragment.

Follow-up to [14283], [14450], [35382], [36095].

Props dd32, narenin, mukesh27, SergeyBiryukov.
Fixes #61799.
Built from https://develop.svn.wordpress.org/trunk@58854


git-svn-id: http://core.svn.wordpress.org/trunk@58250 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-08-05 19:00:19 +00:00
Tammie Lister
ae993cf8e2 Twenty Twenty-One: Fixes float clearing elements being visible in Row and Grid blocks.
The grid layout looks different between front and back end due to the float clearing elements being visible in Row and Grid blocks. This moves the hack rather than deletes it.

Props up1512001, sabernhardt, poena.
Fixes #61611.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58249 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-08-05 10:09:15 +00:00
Tammie Lister
c0d665f64e Twenty Sixteen: Fixes Code block not showing same line-height and padding on front and in editor.
The Code block had a difference in line-height and padding in the editor and front end. This does not fix font-family which has another ticket.

Props viralsampat, sabernhardt.
Fixes #61700.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58248 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-08-05 09:51:11 +00:00
Tammie Lister
76a44b13d4 Twenty Nineteen: Fixes Button block not changing appearance settings.
The Button block isn't reflecting appearance settings. This fix keeps the default as font-weight bold but also adds support for other weights.

Props pranitdugad, pitamdey, sabernhardt.
Fixes #61437.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58247 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-08-05 08:57:15 +00:00
talldanwp
2468ef9f8c Block Styles: Fix ordering of stylesheets when a style variation is applied.
Adjusts the dependency order to ensure stylesheets are output in the correct order.

Syncs the PHP changes from https://github.com/WordPress/gutenberg/pull/63918.

Props talldanwp, aaronrobertshaw, andrewserong, aristath, mukesh27, ramonopoly, ytfeldrawkcab.
Fixes #61748.


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


git-svn-id: http://core.svn.wordpress.org/trunk@58246 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-08-05 06:41:14 +00:00