49796 Commits

Author SHA1 Message Date
Jonathan Desrosiers
22bebd7de6 Build/Test Tools: Update @playwright/test.
Some checks failed
End-to-end Tests / Test with SCRIPT_DEBUG enabled (push) Has been cancelled
JavaScript Tests / QUnit Tests (push) Has been cancelled
Performance Tests / Performance tests (push) Has been cancelled
Performance Tests / Performance tests (with memcached) (push) Has been cancelled
PHP Compatibility / Check PHP compatibility (push) Has been cancelled
PHPUnit Tests / PHP 7.2 (push) Has been cancelled
PHPUnit Tests / PHP 7.3 (push) Has been cancelled
PHPUnit Tests / PHP 7.4 (push) Has been cancelled
PHPUnit Tests / PHP 8.0 (push) Has been cancelled
PHPUnit Tests / PHP 8.1 (push) Has been cancelled
PHPUnit Tests / PHP 8.2 (push) Has been cancelled
PHPUnit Tests / PHP 8.3 (push) Has been cancelled
Test Build Processes / Core running from build (push) Has been cancelled
Test Build Processes / Core running from src (push) Has been cancelled
Test Build Processes / Gutenberg running from build (push) Has been cancelled
Test Build Processes / Gutenberg running from src (push) Has been cancelled
Coding Standards / Slack Notifications (push) Has been cancelled
Coding Standards / Failed workflow tasks (push) Has been cancelled
End-to-end Tests / Slack Notifications (push) Has been cancelled
End-to-end Tests / Failed workflow tasks (push) Has been cancelled
JavaScript Tests / Slack Notifications (push) Has been cancelled
JavaScript Tests / Failed workflow tasks (push) Has been cancelled
Performance Tests / Slack Notifications (push) Has been cancelled
Performance Tests / Failed workflow tasks (push) Has been cancelled
PHP Compatibility / Slack Notifications (push) Has been cancelled
PHP Compatibility / Failed workflow tasks (push) Has been cancelled
PHPUnit Tests / Slack Notifications (push) Has been cancelled
PHPUnit Tests / Failed workflow tasks (push) Has been cancelled
Test Build Processes / Slack Notifications (push) Has been cancelled
Test Build Processes / Failed workflow tasks (push) Has been cancelled
This updates `@playwright/test` to the latest version, currently `1.49.1`.

In older branches using Playwright, the E2E and Performance workflows have recently started failing. This is due to changes in the GitHub Actions runner images. Updating Playwright ensures more modern dependency trees are used when installing browsers for testing and fixes the issue.

Merges [59682] to the 6.6 branch.

Props swissspidy.
See #62843.

git-svn-id: https://develop.svn.wordpress.org/branches/6.6@59684 602fd350-edb4-49c9-b593-d223f7449a82
2025-01-22 17:53:49 +00:00
Peter Wilson
ee5bd5553f Tests: Use better domain for HTTP API invalid hostname test.
Some checks failed
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 11.2, false, true, ubuntu-latest, 8.2) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 11.2, false, true, ubuntu-latest, 8.3) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 11.2, true, false, ubuntu-latest, 7.4) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 11.2, true, true, ubuntu-latest, 7.4) (push) Has been cancelled
Test Build Processes / Core running from ${{ matrix.directory }} (build, ubuntu-latest, ${{ github.event_name == 'pull_request' && true || '' }}, true) (push) Has been cancelled
Test Build Processes / Core running from ${{ matrix.directory }} (build, windows-latest) (push) Has been cancelled
Test Build Processes / Core running from ${{ matrix.directory }} (src, ubuntu-latest) (push) Has been cancelled
Test Build Processes / Core running from ${{ matrix.directory }} (src, windows-latest) (push) Has been cancelled
Test Build Processes / Core running from ${{ matrix.directory }} (build, macos-latest) (push) Has been cancelled
Test Build Processes / Core running from ${{ matrix.directory }} (src, macos-latest) (push) Has been cancelled
Test Build Processes / Gutenberg running from ${{ matrix.directory }} (build, ubuntu-latest) (push) Has been cancelled
Test Build Processes / Gutenberg running from ${{ matrix.directory }} (build, windows-latest) (push) Has been cancelled
Test Build Processes / Gutenberg running from ${{ matrix.directory }} (src, ubuntu-latest) (push) Has been cancelled
Test Build Processes / Gutenberg running from ${{ matrix.directory }} (src, windows-latest) (push) Has been cancelled
Test Build Processes / Gutenberg running from ${{ matrix.directory }} (build, macos-latest) (push) Has been cancelled
Test Build Processes / Gutenberg running from ${{ matrix.directory }} (src, macos-latest) (push) Has been cancelled
Coding Standards / Slack Notifications (push) Has been cancelled
Coding Standards / Failed workflow tasks (push) Has been cancelled
End-to-end Tests / Slack Notifications (push) Has been cancelled
End-to-end Tests / Failed workflow tasks (push) Has been cancelled
JavaScript Tests / Slack Notifications (push) Has been cancelled
JavaScript Tests / Failed workflow tasks (push) Has been cancelled
Performance Tests / Slack Notifications (push) Has been cancelled
Performance Tests / Failed workflow tasks (push) Has been cancelled
PHP Compatibility / Slack Notifications (push) Has been cancelled
PHP Compatibility / Failed workflow tasks (push) Has been cancelled
PHPUnit Tests / Slack Notifications (push) Has been cancelled
PHPUnit Tests / Failed workflow tasks (push) Has been cancelled
Test Build Processes / Slack Notifications (push) Has been cancelled
Test Build Processes / Failed workflow tasks (push) Has been cancelled
The previous domain that was used to test for a host whose IPv4 address cannot be resolved, `exampleeeee.com`, got registered and has an A-record now, so it's not invalid anymore.

`.invalid` is intended for use in online construction of domain names that are sure to be invalid and which it is obvious at a glance are invalid.

Reference: [https://datatracker.ietf.org/doc/html/rfc2606#section-2 Reserved Top Level DNS Names: TLDs for Testing, & Documentation Examples].

Follow-up to [52084], [58384], [58388].

Reviewed by peterwilsoncc.
Merges [59293] to the 6.6 branch.

Props sippis, johnbillion, MattyRob, swissspidy, SergeyBiryukov.
Fixes #62303.




git-svn-id: https://develop.svn.wordpress.org/branches/6.6@59298 602fd350-edb4-49c9-b593-d223f7449a82
2024-10-27 22:32:58 +00:00
Jb Audras
126e3bcc2b Post WordPress 6.6.2 version bump.
The 6.6 branch is now 6.6.3-alpha.

git-svn-id: https://develop.svn.wordpress.org/branches/6.6@59007 602fd350-edb4-49c9-b593-d223f7449a82
2024-09-10 16:17:47 +00:00
Jb Audras
158dcffe9e Help/About: Fix number of bugs without raising the number of bugs.
git-svn-id: https://develop.svn.wordpress.org/branches/6.6@59005 602fd350-edb4-49c9-b593-d223f7449a82
2024-09-10 15:14:45 +00:00
Jb Audras
83a6214168 WordPress 6.6.2.
git-svn-id: https://develop.svn.wordpress.org/branches/6.6@59004 602fd350-edb4-49c9-b593-d223f7449a82
2024-09-10 15:06:27 +00:00
Aaron Jorbin
8e89a9856e Post WordPress 6.6.2 RC1 version bump.
git-svn-id: https://develop.svn.wordpress.org/branches/6.6@58991 602fd350-edb4-49c9-b593-d223f7449a82
2024-09-04 18:32:06 +00:00
Aaron Jorbin
0135e0628f WordPress 6.6.2 RC1
git-svn-id: https://develop.svn.wordpress.org/branches/6.6@58990 602fd350-edb4-49c9-b593-d223f7449a82
2024-09-04 18:12:02 +00:00
Aaron Jorbin
1c8f96146c Editor: Update packages for 6.6.2 RC1.
Updates the versions from the [a74a70ed20 released packages] for the following bugfixes:

- [https://github.com/WordPress/gutenberg/pull/63980 Global Styles: Fix block custom CSS pseudo element selectors]
- [https://github.com/WordPress/gutenberg/pull/64463 Featured Image Block: Reduce CSS specificity]
- [https://github.com/WordPress/gutenberg/pull/64076 Fix bumped specificity for layout styles in non-iframed editor]
- [https://github.com/WordPress/gutenberg/pull/64379 Don't allow duplicating template parts in non-block-based themes]
- [https://github.com/WordPress/gutenberg/pull/64250 Data Views: Don't render action modal when there are no eligible items]
- [https://github.com/WordPress/gutenberg/pull/63724 Fix canvas issues by removing VisualEditor’s height]
- [https://github.com/WordPress/gutenberg/pull/64992 Post Editor: fix click space after post content to append]
- [https://github.com/WordPress/gutenberg/pull/63939 Post Editor: Prevent popover from being hidden by metabox]
- [https://github.com/WordPress/gutenberg/pull/64639 Post editor: apply space below content using a pseudo-element instead of padding-bottom]
- [https://github.com/WordPress/gutenberg/pull/64015 Avoid errors for post types without a 'menu_icon']
- [https://github.com/WordPress/gutenberg/pull/64458 Update postcss-prefixwrap dependency to 1.51.0 to fix prefixing in :where selectors]

Reviewed by jorbin, hellofromTonya.
Merges [58988] to the 6.6 branch.

Props vcanales.
Fixes #61982.
See #61704, #61769, #61829.


git-svn-id: https://develop.svn.wordpress.org/branches/6.6@58989 602fd350-edb4-49c9-b593-d223f7449a82
2024-09-04 16:47:11 +00:00
Tonya Mork
1a4b00b3d7 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].

Reviewed by andrewserong.
Merges [58896] to the 6.6 branch.

Props aaronrobertshaw, wongjn, harlet7, dballari, ramonopoly, andrewserong, aristath, hellofromTonya.
Fixes #61769.

git-svn-id: https://develop.svn.wordpress.org/branches/6.6@58987 602fd350-edb4-49c9-b593-d223f7449a82
2024-09-04 14:22:16 +00:00
Tonya Mork
0596548f4d 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].

Reviewed by andrewserong.
Merges [58890] to the 6.6 branch.

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

Props talldanwp, aaronrobertshaw, andrewserong, markhowellsmead, ramonopoly, hellofromTonya, munyagu, apmeyer.
Fixes #61829.

git-svn-id: https://develop.svn.wordpress.org/branches/6.6@58986 602fd350-edb4-49c9-b593-d223f7449a82
2024-09-04 14:00:19 +00:00
Joe Dolson
1bad0f2a34 Docs: Add changing existing items recommendations to 'admin_bar_menu' action.
Improves the `'admin_bar_menu'` docblock by adding recommendations for customizing / changing existing items.

It also improves the `wp_admin_bar_render()` function's docblock by removing the "most optimal point" sentence.

The [58748] changeset moved the user menu to a higher priority level (of `9991`) to achieve:

> so nodes added with higher priorities will still be shown visually before the user and recovery menu items, as they were prior to [58215].

When hooking into `'admin_bar_menu'` with a priority level less than 9991 and attempting to get the `'my-account'` node, `null` is returned. While the preferred approach is to hook into `'wp_before_admin_bar_render'`, the documentation of the `'admin_bar_menu'` action was previously misleading.

Follow-up to [58748], [58759].

Reviewed by joedolson.
Merges [58978] to the 6.6 branch.

Props michaelwp85, narenin, sabernhardt, joedolson, costdev, jorbin, hellofromTonya, mukesh27, pbiron.
Fixes #61738.

git-svn-id: https://develop.svn.wordpress.org/branches/6.6@58982 602fd350-edb4-49c9-b593-d223f7449a82
2024-09-03 20:43:09 +00:00
Tonya Mork
07a16de6f0 HTML API: Indicate when WordPress rejects attribute updates.
When setting an an attribute value in the HTML API, WordPress may reject
an update based on rules in `kses`. In these cases, the return value from
an escaping function will be an empty string, and the HTML API should
reject the update. Unfortunately, it currently reports that it updates the
attribute but sets an empty string value, which is misleading.

In this changeset, the HTML API will refuse the attribute update and return
false to indicate as much when WordPress rejects the updates.

Reviewed by jorbin, hellofromTonya.
Merges [58844] to the 6.6 branch.

Follow-up to [58472].

Props amitraj2203, dmsnell, mukesh27.
Fixes #61719.

git-svn-id: https://develop.svn.wordpress.org/branches/6.6@58980 602fd350-edb4-49c9-b593-d223f7449a82
2024-09-03 20:13:38 +00:00
Tonya Mork
73c80f759a Help/About: Fix text wrapping on non-English locales.
In [57715], headings on the About pages were given `text-wrap: balance`. This rule causes unexpected breaks in non-latin langauges, e.g., Japanese, Korean. This fix sets the text-wrap to `pretty` for browsers that support it, and uses `balance` for English-only.

Reviewed by hellofromTonya.
Merges [58976] to the 6.6 branch.

Props akshat2802, wildworks, ryelle, sabernhardt, hellofromTonya.
Fixes #60892.

git-svn-id: https://develop.svn.wordpress.org/branches/6.6@58979 602fd350-edb4-49c9-b593-d223f7449a82
2024-09-03 20:04:59 +00:00
Joe Dolson
9697631310 Customize: Sanitize autofocus URL parameter as an array.
[58069] introduced calling sanitize_text_field() with $_REQUEST['autofocus'] (which is an array) and setting its default to a string. This fix restores the array data type for autofocus.

The fix also relocates the unslash for url, return, and autofocus before sanitizing.

Follow-up to [58069], [34269], [29026], [21028].

Reviewed by joedolson.
Merges [58804] to the 6.6 branch.

Props jamesros161, swissspidy, dlh, audrasjb, hellofromTonya, ironprogrammer, debarghyabanerjee.
Fixes #61561.

git-svn-id: https://develop.svn.wordpress.org/branches/6.6@58973 602fd350-edb4-49c9-b593-d223f7449a82
2024-09-03 16:39:29 +00:00
Tonya Mork
3b1e57752d Themes: Fix themes search event not firing on enter.
Attach the submit event to the parent search form in the installed and add new theme screen. Following [58405], the submit event was no longer attached to an object that was able to handle form submissions.

Reviewed by hellofromTonya.
Merges [58914] to the 6.6 branch.

Follow-up to [58405].

Props nithi22, nithins53, josklever, the-ank, debarghyabanerjee, sabernhardt, jeherve, hellofromTonya.
Fixes #61578.

git-svn-id: https://develop.svn.wordpress.org/branches/6.6@58916 602fd350-edb4-49c9-b593-d223f7449a82
2024-08-20 14:07:28 +00:00
Tonya Mork
0ac1eb312a 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.

Reviewed by hellofromTonya.
Merges [58884] to the 6.6 branch.

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

git-svn-id: https://develop.svn.wordpress.org/branches/6.6@58891 602fd350-edb4-49c9-b593-d223f7449a82
2024-08-13 18:39:34 +00:00
Tonya Mork
9424ca0746 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.

Reviewed by hellofromTonya.
Merges [58856] and [58861] to the 6.6 branch.

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

git-svn-id: https://develop.svn.wordpress.org/branches/6.6@58874 602fd350-edb4-49c9-b593-d223f7449a82
2024-08-09 15:38:13 +00:00
luisherranz
5655cdf203 Interactivity API: Allow server derived state to appear in non-final position
In some cases, derived state returns an associative array. Directives may wish to continue to access properties of the associative array, when using the syntax `state.arrayReturnedByClosure.property`. This patch continues evaluating the path after the associative array has been returned by the Closure.

Reviewed by adamsilverstein and gziolo.
Merges [58825] to the 6.6 branch.

Props jonsurrell, luisherranz, adamsilverstein, gziolo.

Fixes #61741.

git-svn-id: https://develop.svn.wordpress.org/branches/6.6@58869 602fd350-edb4-49c9-b593-d223f7449a82
2024-08-08 11:28:30 +00:00
Tonya Mork
726c782733 General: Cast $max_depth and $depth to an integer in the Walker class.
This ensures that the arguments are correctly interpreted when passed as a query string, i.e. when `wp_parse_args()` is involved. For example, `wp_list_pages( 'depth=0' )` should display a list of all pages to the maximum depth.

Follow-up to [57848].

Reviewed by peterwilsoncc.
Merges [58812] to the 6.6 branch.

Props freibergergarcia, peterwilsoncc, ahortin.
Fixes #61749.

git-svn-id: https://develop.svn.wordpress.org/branches/6.6@58863 602fd350-edb4-49c9-b593-d223f7449a82
2024-08-07 19:45:55 +00:00
Tonya Mork
fde5376750 Media: Check if content URL includes a hostname in wp_calculate_image_srcset().
This resolves an `Undefined array key "host"` PHP warning if `WP_CONTENT_URL` is set to a relative URL.

Follow-up to [58097].

Reviewed by hellofromTonya.
Merges [58773] to the 6.6 branch.

Props mattraines, narenin, pamprn, SergeyBiryukov.
Fixes #61690.

git-svn-id: https://develop.svn.wordpress.org/branches/6.6@58862 602fd350-edb4-49c9-b593-d223f7449a82
2024-08-07 19:41:14 +00:00
Tonya Mork
3f8f23654f 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.

Reviewed by hellofromTonya.
Merges [58850] to the 6.6 branch.

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

git-svn-id: https://develop.svn.wordpress.org/branches/6.6@58861 602fd350-edb4-49c9-b593-d223f7449a82
2024-08-07 19:36:35 +00:00
Tonya Mork
50af37a908 I18N: Correctly output the None translatable strings.
Includes updating the context to match the pre-existing block editor translations.

Follow-up to [58284].

Reviewed by hellofromTonya.
Merges [58774] to the 6.6 branch.

Props sabernhardt, Marius84.
Fixes #61714.

git-svn-id: https://develop.svn.wordpress.org/branches/6.6@58805 602fd350-edb4-49c9-b593-d223f7449a82
2024-07-24 17:30:22 +00:00
bernhard-reiter
b66bdaec4a Block Hooks: Don't erase post content if it isn't changed by client.
The `inject_ignored_hooked_blocks_metadata_attributes` filter that is attached to both the `rest_pre_insert_wp_template` and `rest_pre_insert_wp_template_part` hooks receives a `stdClass` object from the Templates REST API controller that contains all fields that the client would like to modify when making a `POST` request (plus the `id` to identify the relevant template or template part, respectively).

There are cases when the `post_content` field is not set, e.g. when the client would like to rename an existing template (in which case it would only set the `title` field).

Prior to this changeset, the filter would erroneously apply the Block Hooks algorithm to the non-existent `post_content` field regardless, which would result in it being set to the empty string `''`. As a consequence, renaming a template would have the unwanted side effect of wiping its contents.

This changeset fixes the issue by returning early from the filter if the `post_content` field is not set.

Reviewed by gziolo.
Merges [58785] to the 6.6 branch.

Props alshakero, bernhard-reiter.
Fixes #61550.

git-svn-id: https://develop.svn.wordpress.org/branches/6.6@58802 602fd350-edb4-49c9-b593-d223f7449a82
2024-07-24 14:38:24 +00:00
Aaron Jorbin
e87f42252b Post WordPress 6.6.1 version bump.
git-svn-id: https://develop.svn.wordpress.org/branches/6.6@58788 602fd350-edb4-49c9-b593-d223f7449a82
2024-07-23 15:59:09 +00:00
Aaron Jorbin
c4bdf68f58 WordPress 6.6.1
git-svn-id: https://develop.svn.wordpress.org/branches/6.6@58786 602fd350-edb4-49c9-b593-d223f7449a82
2024-07-23 15:09:57 +00:00
Aaron Jorbin
7ecd9590f3 Post WordPress 6.6.1 RC1 version bump.
git-svn-id: https://develop.svn.wordpress.org/branches/6.6@58766 602fd350-edb4-49c9-b593-d223f7449a82
2024-07-18 19:32:54 +00:00
Aaron Jorbin
e84ffa6838 WordPress 6.6.1 RC1
git-svn-id: https://develop.svn.wordpress.org/branches/6.6@58765 602fd350-edb4-49c9-b593-d223f7449a82
2024-07-18 19:14:30 +00:00
Aaron Jorbin
b8e43971ac General: Provide _is_utf8_charset() in compat.php for early use
#61182 introduced is_utf8_charset() as a way of standardizing checks for charset slugs referring to UTF-8. This is called by _mb_strlen() inside of compat.php, but is_utf8_charset() is defined in functions.php, which isn't loaded early on. Code calling mb_strlen() early on before functions.php loads in hosts without the multibyte extension therefore may crash.

Reviewed by hellofromTonya.
Merges [58763] to the 6.6 branch.

Props dmsnell, jonsurrell, joemcgill, jorbin.
Fixes #61680.


git-svn-id: https://develop.svn.wordpress.org/branches/6.6@58764 602fd350-edb4-49c9-b593-d223f7449a82
2024-07-18 18:20:39 +00:00
Tonya Mork
79cf601b80 Comments: Fix fatal error when get_comment_author() receives an object with no comment_id.
[58335] introduced `(string)` type casting of the passed in `$comment_id` value. If `$comment_id` is a scalar, it works as expected. But if it's an `object`, the following fatal error is thrown:

{{{
Object of class WP_Comment could not be converted to string
}}}

This fatal error happens when the incoming `$comment_id` is an instance of `WP_Comment` (or any object) without a `comment_ID` (empty). 

This changeset adds tests to demonstrate the fatal error and validate the fix.

It fixes the fatal error by restructuring the ternary checks into an `if/elseif/else` structure for the 3 paths:

- When `$comment->comment_ID` is not empty, then it uses the property.
- When `$comment_id` is scalar, then it type casts it to a `string`.
- Else, the default is an empty `string`.

Follow-up to [58335], [41127], [52818].

Reviewed by SergeyBiryukov, jorbin.
Merges [58755,58756] to the 6.6 branch.

Props ambrosiawt, hellofromTonya, jorbin, mukesh27, SergeyBiryukov.
Fixes #61681.

git-svn-id: https://develop.svn.wordpress.org/branches/6.6@58762 602fd350-edb4-49c9-b593-d223f7449a82
2024-07-18 17:56:35 +00:00
Tonya Mork
f148dd442c Block Themes: Fix invalid css for nested fullwidth layouts with zero padding applied
In the Layout block support, handle 0 values for padding as 0px in calc() rules. This resolves a bug for nested fullwidth layouts when zero padding is applied. Due to how calc() works, without supplying the unit, the rule will not
work, resulting in a horizontal scrollbar.

Ref: PHP changes from https://github.com/WordPress/gutenberg/pull/63436.

Reviewed by hellofromTonya.
Merges [58750]  to the 6.6 branch.

Fixes #61656.
Props andrewserong, mukesh27, aaronrobertshaw.

git-svn-id: https://develop.svn.wordpress.org/branches/6.6@58761 602fd350-edb4-49c9-b593-d223f7449a82
2024-07-18 17:02:31 +00:00
Tonya Mork
7189988173 Editor: Update packages for 6.6.1.
Bugfixes included:

* [https://github.com/WordPress/gutenberg/pull/63637 Elements: Avoid specificity bump for top-level element-only selectors].
* [https://github.com/WordPress/gutenberg/pull/63406 Navigation block: Allow themes to override block library text-decoration rule].
* [https://github.com/WordPress/gutenberg/pull/63436 Fix invalid css for nested fullwidth layouts with zero padding applied].
* [https://github.com/WordPress/gutenberg/pull/63397 Prevent empty void at the bottom of editor when block directory results are present].
* [https://github.com/WordPress/gutenberg/pull/63291 Pattern overrides: Ensure "Reset" button always shows as last item and with border].
* [https://github.com/WordPress/gutenberg/pull/63562 Global Styles: Disable "Reset styles" button when there are no changes].
* [https://github.com/WordPress/gutenberg/pull/63093 Fix: Removed shuffle button when only 1 pattern is present].
* [https://github.com/WordPress/gutenberg/pull/62675 fix: wp icon focus issue].
* [https://github.com/WordPress/gutenberg/pull/63565 useBlockElement: return null until ref callback has time to clean up the old element].

Reviewed by spacedmonkey.
Merges [58757] to the 6.6 branch.

Props ellatrix.
Fixes #61692.
See #61660, #61630, #61656.

git-svn-id: https://develop.svn.wordpress.org/branches/6.6@58760 602fd350-edb4-49c9-b593-d223f7449a82
2024-07-18 16:52:33 +00:00
Tonya Mork
fc71dae8db Toolbar: Move user and recovery menus to a higher priority.
Following [58215], admin bar items in the top-secondary group have a changed visual order. Increase the priority of the user and recovery menu items so nodes added with higher priorities will still be shown visually before the user and recovery menu items, as they were prior to 58215.

The items will appear in the reverse of the previous order, but the new order now matches their priority order, rather than being the opposite.

Reviewed by hellofromTonya.
Merges [58748] to the 6.6 branch.

Props sabernhardt, joemcgill, pbiron, joedolson.
Fixes #61615.

git-svn-id: https://develop.svn.wordpress.org/branches/6.6@58759 602fd350-edb4-49c9-b593-d223f7449a82
2024-07-18 16:43:15 +00:00
Tonya Mork
2a0d775f13 Editor: Limit scope of resizable menu container CSS.
The CSS to make menu item containers resizable in the admin menu editor was too broadly scoped, and caused classic editor metaboxes to have unconstrained height. Limit the scope of the CSS changes to only impact menu item containers.

Reviewed by jorbin.
Merges [58747] to the 6.6 branch.

Props neotrope, sabernhardt, joedolson.
Fixes #61662.

git-svn-id: https://develop.svn.wordpress.org/branches/6.6@58758 602fd350-edb4-49c9-b593-d223f7449a82
2024-07-18 16:13:53 +00:00
Tonya Mork
87a074b1f3 Block Themes: Avoid specificity bump for top-level element-only selectors.
Prevent issues (e.g. links being underlined) caused by a bump in CSS specificity for top-level element-only global element styles.

Ref: PHP changes from https://github.com/WordPress/gutenberg/pull/63403.

Reviewed by hellofromTonya.
Merges [58749] to the 6.6 branch.

Props aaronrobertshaw, andrewserong, noisysocks, annubis, butterflymedia, clarktbt, hellofromTonya, jorbin, joedolson, swissspidy, courane01, raquelandefeld, talldanwp, markhowellsmead, youknowriad, poena, cbirdsong.
Fixes #61630, #61660.

git-svn-id: https://develop.svn.wordpress.org/branches/6.6@58751 602fd350-edb4-49c9-b593-d223f7449a82
2024-07-18 11:58:22 +00:00
Tonya Mork
d54fd28266 Upgrade/Install: Update the $_old_files array for 6.6.
Reviewed by hellofromTonya.
Merges [58744] to the 6.6 branch.

Props dd32, audrasjb, hellofromTonya.
Fixes #61665.

git-svn-id: https://develop.svn.wordpress.org/branches/6.6@58746 602fd350-edb4-49c9-b593-d223f7449a82
2024-07-17 23:18:46 +00:00
Jb Audras
8fd6b4825f Post WordPress 6.6 version bump.
The 6.6 branch is now 6.6.1-alpha.



git-svn-id: https://develop.svn.wordpress.org/branches/6.6@58737 602fd350-edb4-49c9-b593-d223f7449a82
2024-07-16 17:07:20 +00:00
Jb Audras
47abb06433 WordPress 6.6.
git-svn-id: https://develop.svn.wordpress.org/branches/6.6@58735 602fd350-edb4-49c9-b593-d223f7449a82
2024-07-16 16:16:45 +00:00
Jb Audras
fda71c6adf Post WordPress 6.6 RC4 version bump.
git-svn-id: https://develop.svn.wordpress.org/branches/6.6@58723 602fd350-edb4-49c9-b593-d223f7449a82
2024-07-15 15:13:26 +00:00
Jb Audras
5fba0133ec WordPress 6.6 RC4.
git-svn-id: https://develop.svn.wordpress.org/branches/6.6@58722 602fd350-edb4-49c9-b593-d223f7449a82
2024-07-15 14:57:06 +00:00
David Baumwald
11d69d138f Bundled Themes: Bump default theme versions for release with 6.6.
This updates the version of each default theme to the following versions:

- Twenty Ten: 4.2
- Twenty Eleven: 4.7
- Twenty Twelve: 4.3
- Twenty Thirteen: 4.2
- Twenty Fourteen: 4.0
- Twenty Fifteen: 3.8
- Twenty Sixteen: 3.3
- Twenty Seventeen: 3.7
- Twenty Nineteen: 2.9
- Twenty Twenty: 2.7
- Twenty Twenty-One: 2.3
- Twenty Twenty-Two: 1.8
- Twenty Twenty-Three: 1.5
- Twenty Twenty-Four: 1.2

These versions will released in coordination with WordPress 6.6.

Reviewed by hellofromTonya.
Merges [58718] to the 6.6 branch.

Props sabernhardt, shailu25, rudlinkon, kapilpaul.
Fixes #60701.

git-svn-id: https://develop.svn.wordpress.org/branches/6.6@58721 602fd350-edb4-49c9-b593-d223f7449a82
2024-07-15 14:30:47 +00:00
Jb Audras
03e60a8382 Editor: Update packages for 6.6 RC 4.
This package update includes only one revert PR:
https://github.com/WordPress/gutenberg/pull/63412

You can confirm the changes in this package update here:
https://github.com/WordPress/gutenberg/commits/wp/6.6/

Reviewed by ellatrix, audrasjb.
Merges [58719] to the 6.6 branch.

Fixes #61654.
Props santosguillamot.



git-svn-id: https://develop.svn.wordpress.org/branches/6.6@58720 602fd350-edb4-49c9-b593-d223f7449a82
2024-07-15 14:22:47 +00:00
Joe McGill
d59a886f75 Editor: Revert caching of global styles for blocks.
This reverts [58334] to fix a bug where edits to block styles made in the site editor were not showing in the front end.

Reviewed by hellofromtonya.
Merges [58710] to the 6.6 branch.

Props joemcgill, spacedmonkey, andrewserong, hellofromtonya, audrasjb.
See #59595.


git-svn-id: https://develop.svn.wordpress.org/branches/6.6@58711 602fd350-edb4-49c9-b593-d223f7449a82
2024-07-12 19:59:34 +00:00
Jb Audras
c001dce748 Post WordPress 6.6 RC3 version bump.
git-svn-id: https://develop.svn.wordpress.org/branches/6.6@58701 602fd350-edb4-49c9-b593-d223f7449a82
2024-07-09 17:34:36 +00:00
Jb Audras
f7445c4af5 WordPress 6.6 RC3.
git-svn-id: https://develop.svn.wordpress.org/branches/6.6@58700 602fd350-edb4-49c9-b593-d223f7449a82
2024-07-09 17:17:07 +00:00
Tonya Mork
6dbbf70f15 Editor: Fix ref values within block style variations.
Fixes an issue where block style variations that use `ref` values to reference styles elsewhere in theme.json weren't working.

Retrieves reference values when generating styles for block style variations. How? When retrieving variation data, to generate styles from, also retrieve any referenced values.

Reviewed by audrasjb.
Merges [58691] to the 6.6 branch.

Props aaronrobertshaw, andrewserong, ramonopoly.
Fixes #61589.

git-svn-id: https://develop.svn.wordpress.org/branches/6.6@58699 602fd350-edb4-49c9-b593-d223f7449a82
2024-07-09 16:06:20 +00:00
David Baumwald
7bbecdb876 Editor: Prevent flash of block style variation styling in post editor.
These changes prevent a flash of style updates for applied block style variations when the global styles data is loaded into the block editor. This is done by preloading the global styles REST API paths which also brings the post and site editors further into line.

Reviewed by audrasjb.
Merges [58690] to the 6.6 branch.

Props aaronrobertshaw, andrewserong, ramonopoly, ellatrix, hellofromTonya.
Fixes #61553.

git-svn-id: https://develop.svn.wordpress.org/branches/6.6@58698 602fd350-edb4-49c9-b593-d223f7449a82
2024-07-09 15:58:01 +00:00
Jb Audras
115656a1b2 Docs: Update AJAX in Plugins HelpHub link to avoid unnecessary redirection.
Follow-up to [17045], [20713], [41065], [45674], [55412], [57854], [58131], [58132].

Reviewed by desrosj, davidbaumwald.
Merges [58672] to the 6.6 branch.

Props shailu25.
Fixes #60732.
See #60699.



git-svn-id: https://develop.svn.wordpress.org/branches/6.6@58697 602fd350-edb4-49c9-b593-d223f7449a82
2024-07-09 15:41:06 +00:00
David Baumwald
75ca8a68e3 Editor: Fix root padding for alignwide blocks.
Updates the root padding CSS selectors so wide width container blocks with constrained layout don’t receive padding.

Reviewed by audrasjb.
Merges [58685] to the 6.6 branch.

Props isabel_brison, mukesh27, aaronrobertshaw, hellofromTonya.
Fixes #61587.

git-svn-id: https://develop.svn.wordpress.org/branches/6.6@58696 602fd350-edb4-49c9-b593-d223f7449a82
2024-07-09 15:31:50 +00:00
David Baumwald
71d1ccd951 Editor: Update packages for 6.6 RC 3.
Reviewed by hellofromTonya.
Merges [58693] to the 6.6 branch.

Props ellatrix, youknowriad.
Fixes #61603.

git-svn-id: https://develop.svn.wordpress.org/branches/6.6@58695 602fd350-edb4-49c9-b593-d223f7449a82
2024-07-09 14:40:15 +00:00
David Baumwald
2abdeaccfa REST API: Correct image cropping tools in the block editor.
As of [58457], the width and height cropping values are cast to an integer before the comparison to see if the target width and height differ from the original width and height.
Since they are now integers, it exposes a bug where the && of the if conditional meant that if you were only cropping in one dimension, the check wouldn't pass, and cropping would not occur.
In the block editor, the cropping tools are aspect ratio based, so one of the dimensions will always match that of the source image. Therefore, now that the values are cast as integers, the condition that allows a cropping to occur needs to be updated. If either width or height is different from the source image, then a crop should be allowed.

Follow-up to [50124], [58457].

Reviewed by davidbaumwald.
Merges [58612] to the 6.6 branch.

Props andrewserong, jrf, kevin940726.
Fixes #61514. See #59782.

git-svn-id: https://develop.svn.wordpress.org/branches/6.6@58692 602fd350-edb4-49c9-b593-d223f7449a82
2024-07-09 13:05:25 +00:00