Commit Graph

51330 Commits

Author SHA1 Message Date
gziolo
f7652f9cd8 Tests: Update rendering test cases for Block Bindings
Refactoring covered:

- Use the newly introduced `block_bindings_supported_attributes_{$block_name}` filter to register a `test/block`'s attribute as supported by Block Bindings, rather than using an actual block (Paragraph) for most tests.
- Merge three test cases that check if `get_value_callback` works correctly (accepts arguments; correctly includes symbols and numbers; return value is sanitized when rendered) into one, by using a `dataProvider`.
- Merge two test cases that check if block context is correctly evaluated, and that access is only given to context included in a source's `uses_context` property.

Follow-up to [60684].

Props bernhard-reiter, gziolo.
See #63840.

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


git-svn-id: http://core.svn.wordpress.org/trunk@60056 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-09-08 11:29:22 +00:00
jonsurrell
ec862f5d99 Script Loader: Add sourceURL to inline scripts and styles.
Improve the source locations referenced by developer tooling in supporting browsers. Inline source locations are named like inline:handle-js-after and appear in the developer tools "sources" panel.

This is the second attempt to add sourceURL comments. The first attempt in [60685] was reverted due to an issue with script concatenation that has been addressed.

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

Follow-up to [60685], [60690].

Props jonsurrell, westonruter, wildworks, peterwilsoncc, johnbillion, tobiasbg.
Fixes #63887.

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


git-svn-id: http://core.svn.wordpress.org/trunk@60055 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-09-08 11:27:31 +00:00
Sergey Biryukov
a2cceecbdd Database: Update $wp_db_version to point to the correct commit number.
Follow-up to [60717].

See #50161.
Built from https://develop.svn.wordpress.org/trunk@60718


git-svn-id: http://core.svn.wordpress.org/trunk@60054 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-09-07 20:39:20 +00:00
Sergey Biryukov
d54706b43c Database: Add type_status_author index for the posts table.
This aims to improve performance of some queries on installations with a large number of posts.

Follow-up to [3678], [3690], [9290], [13576].

Props josephscott, LucasMS, Otto42, flixos90, matt, johnjamesjacoby, siliconforks, mukesh27,  jonsurrell, SirLouen, SergeyBiryukov.
Fixes #50161.
Built from https://develop.svn.wordpress.org/trunk@60717


git-svn-id: http://core.svn.wordpress.org/trunk@60053 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-09-07 20:36:20 +00:00
Sergey Biryukov
ff865046b7 Coding Standards: Move upgrade_690() to the correct place, after upgrade_682().
Follow-up to [60666].

See #53323.
Built from https://develop.svn.wordpress.org/trunk@60716


git-svn-id: http://core.svn.wordpress.org/trunk@60052 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-09-07 20:34:35 +00:00
joedolson
ff7cfc9145 Customizer: Accessible errors when adding new pages.
When setting the home page settings or dynamically adding new pages in the menu manager, the error messages didn't meet accessibility standards.

Add a screen reader announcement, a visible notification, and standardize the error styles.

Props dilipbheda, dlh, celloexpressions, joedolson, jeremiahbratton, shailu25.
Fixes #50696.
Built from https://develop.svn.wordpress.org/trunk@60715


git-svn-id: http://core.svn.wordpress.org/trunk@60051 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-09-07 02:47:36 +00:00
Sergey Biryukov
51ee5c3a5d Docs: Add @param and @return description for sanitize_hex_color_no_hash().
Follow-up to [20936], [21354], [37283], [60709].

Props rollybueno, SergeyBiryukov.
See #63166.
Built from https://develop.svn.wordpress.org/trunk@60714


git-svn-id: http://core.svn.wordpress.org/trunk@60050 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-09-06 21:58:30 +00:00
Weston Ruter
275127f8b3 Posts, Post Types: Use relevant HTTP status codes for wp_die() calls in wp-admin/post.php.
The status code is now explicitly set in each `wp_die()` call so that the default 500 status code is not sent unless it is the most appropriate.

Props callumbw95, kkmuffme, mindctrl, westonruter.
Fixes #63836.

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


git-svn-id: http://core.svn.wordpress.org/trunk@60049 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-09-06 06:49:31 +00:00
davidbaumwald
cd68f370e9 Users: Pass WP_User object to wp_set_password action in during new user creation.
After [60634], `wp_set_password` is now fired during new user creation and existing user updates when a password is changed.  `wp_set_password` expects the third argument to be a `WP_User` object of the user's data prior to the update.  This change simply passes the newly created `WP_User` object.

Follow-up to [60634].

Props dd32.
See #22114.
Built from https://develop.svn.wordpress.org/trunk@60712


git-svn-id: http://core.svn.wordpress.org/trunk@60048 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-09-05 18:06:49 +00:00
Sergey Biryukov
1b4c99fd92 Taxonomy: Add update_term_count action that fires when term counts are updated.
This allows plugins to run custom queries only when a term count is actually updated and not on every update of terms or posts.

Follow-up to [60365], [60510].

Props leonidasmilossis, peterwilsoncc, mukesh27, rollybueno, SergeyBiryukov.
Fixes #63904.
Built from https://develop.svn.wordpress.org/trunk@60711


git-svn-id: http://core.svn.wordpress.org/trunk@60047 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-09-05 13:30:39 +00:00
joedolson
cb59d63c60 Administration: Remove unused CSS in forms.css.
Remove some CSS that doesn't appear to have ever been used. See [42967].

Props joedolson, peterwilsoncc, mukesh27.
Fixes #63907.
Built from https://develop.svn.wordpress.org/trunk@60710


git-svn-id: http://core.svn.wordpress.org/trunk@60046 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-09-05 04:03:29 +00:00
Sergey Biryukov
501ef81f28 Docs: Add @param and @return description for maybe_hash_hex_color().
Follow-up to [20936], [21354], [37283].

Props rollybueno, SergeyBiryukov.
See #63166.
Built from https://develop.svn.wordpress.org/trunk@60709


git-svn-id: http://core.svn.wordpress.org/trunk@60045 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-09-04 20:06:38 +00:00
jonsurrell
0c8242eb68 Editor: Use Unicode escape encoding for "\" characters in block attributes.
Corrects an issue with block attribute encoding where JSON strings ending in the `\` character would be misencoded and cause block attributes to be lost.

Client-side block serialization was updated with matching logic in 10453ab3a4.

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

Props jonsurrell, westonruter, mamaduka, dmsnell, shailu25.
Fixes #63917.

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


git-svn-id: http://core.svn.wordpress.org/trunk@60044 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-09-04 18:32:39 +00:00
jonsurrell
725a319a88 Build/Test Tools: Ensure assertEqualHTML fallback render can be reached.
`assertEqualHTML` catches `Exception`s and attempts to re-parse the HTML with the `Dom\HtmlDocument` class. Ensure that the fallback render is reachable by throwing `Exception` instead of `Error` in the tree builder function.

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

Follow-up to [60295].

Props jonsurrell, bernhard-reiter, dmsnell.
Fixes #63527.

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


git-svn-id: http://core.svn.wordpress.org/trunk@60043 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-09-04 14:50:21 +00:00
jonsurrell
d4a1644618 HTML API: Prevent adding dangerous double-escape SCRIPT contents.
Prevent WP_Tag_Processor::set_modifiable_text() from allowing SCRIPT contents with "<script" like it does with "</script". Either of these sequences may affect the script element's close.

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

Props jonsurrell, westonruter, dmsnell.
See #63738.

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


git-svn-id: http://core.svn.wordpress.org/trunk@60042 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-09-04 14:40:27 +00:00
joedolson
e30a48d6b0 Administration: Fix sizing of page header links on mobile.
Page title actions were modified to match the global button styles in #41986, but these styles were not applied to mobile viewports at the time. 

Fix padding, height, line-height, and alignment to match these links to global styles. 

Props joedolson, rollybueno, sumitbagthariya16, circlecube, shailu25.
Fixes #63831.
Built from https://develop.svn.wordpress.org/trunk@60705


git-svn-id: http://core.svn.wordpress.org/trunk@60041 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-09-04 03:53:36 +00:00
Weston Ruter
c97bb4a4bd Script Loader: Introduce fetchpriority for Scripts and Script Modules.
* Allow scripts and script modules to be registered with a `fetchpriority` of `auto` (default), `high`, `low`:
  * When registering a script, add a `fetchpriority` arg to go alongside the `strategy` arg which was added for loading scripts with the `defer` and `async` loading strategies. See #12009. 
  * For script modules, introduce an `$args` array parameter with a `fetchpriority` key to the `wp_register_script_module()`, and `wp_enqueue_script_module()` functions (and their respective underlying `WP_Script_Modules::register()` and `WP_Script_Modules::enqueue()` methods). This `$args` parameter corresponds with the same parameter used when registering non-module scripts.
  * Also for script modules, introduce `WP_Script_Modules::set_fetchpriority()` to override the `fetchpriority` for what was previously registered.
  * Emit a `_doing_it_wrong()` warning when an invalid `fetchpriority` value is used, and when `fetchpriority` is added to a script alias.
  * Include `fetchpriority` as an attribute on printed `SCRIPT` tags as well as on preload `LINK` tags for static script module dependencies.
* Use a `fetchpriority` of `low` by default for:
  * Script modules used with the Interactivity API. For overriding this default in blocks, see [https://github.com/WordPress/gutenberg/issues/71366 Gutenberg#71366].
  * The `comment-reply` script.
* Improve type checks and type hints.

Developed in [https://github.com/WordPress/wordpress-develop/pull/8815 GitHub PR], with [https://github.com/WordPress/gutenberg/pull/70173 companion for Gutenberg].

Props westonruter, jonsurrell, swissspidy, luisherranz, kraftbj, audrasjb, dennysdionigi.
Fixes #61734.

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


git-svn-id: http://core.svn.wordpress.org/trunk@60040 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-09-03 22:17:39 +00:00
Sergey Biryukov
126fc3b4ca Code Modernization: Address no-op function deprecations in PHP 8.5.
Several PHP functions that have not been doing anything since PHP 8.0/8.1, specifically:

* `finfo_close()` since the `ext/fileinfo` migration in PHP 8.1
* `xml_parser_free()` since the `ext/xml` migration in PHP 8.0
* `curl_close()` since the `ext/curl` migration in PHP 8.0
* `curl_share_close()` since the `ext/curl` migration in PHP 8.0
* `imagedestroy()` since the `ext/gd` migration in PHP 8.0

will be deprecated in PHP 8.5 and will thus be throwing warnings.

This commit adds conditional checks to only call these functions on the relevant PHP versions.

Reference: [https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_no-op_functions_from_the_resource_to_object_conversion PHP RFC: Deprecations for PHP 8.5: Deprecate no-op functions from the resource to object conversion].

Props TobiasBg, SergeyBiryukov.
See #63061.
Built from https://develop.svn.wordpress.org/trunk@60703


git-svn-id: http://core.svn.wordpress.org/trunk@60039 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-09-03 12:18:31 +00:00
dmsnell
1ee96aa7df Charset: Add explanatory note about what consitutes “valid” UTF-8.
This patch adds a clarifying note about what constitutes a valid UTF-8 byte stream. This was brought up in review as a potentially ambiguous term, so a link to the spec has been provided to fix the behavior to the standard.

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

Follow-up to [60630].

Props dmsnell, agulbra.
See #38044.

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


git-svn-id: http://core.svn.wordpress.org/trunk@60038 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-09-02 23:53:30 +00:00
Sergey Biryukov
501fa4bd4e Posts, Post Types: Check the result of creating a draft in get_default_post_to_edit().
As `wp_insert_post()` can return an error for various reasons, this commit ensures that this scenario is properly handled and an error message is displayed.

Follow-up to [12987].

Props rishabhwp, tfrommen, SirLouen, siliconforks, SergeyBiryukov.
Fixes #37441.
Built from https://develop.svn.wordpress.org/trunk@60701


git-svn-id: http://core.svn.wordpress.org/trunk@60037 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-09-02 16:50:32 +00:00
joedolson
cc73b8b920 Accessibility: Feedback & focus on deleting terms via AJAX.
When deleting a term using AJAX, notify screen reader users of the deletion using `wp.a11y.speak()`, set the active row to be unfocusable, then explicitly set new focus after the deletion is completed.

Props jeremyfelt, afercia, wido, nikunj8866, SirLouen, pmbaldha, joedolson.
Fixes #47101.
Built from https://develop.svn.wordpress.org/trunk@60700


git-svn-id: http://core.svn.wordpress.org/trunk@60036 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-09-01 21:22:31 +00:00
Sergey Biryukov
b96550533f Tests: Remove redundant @covers tags in wp_mail() tests.
`@covers` has already been added at the class level, so there is no need to add it to individual unit tests.

Follow-up to [54702], [60698].

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


git-svn-id: http://core.svn.wordpress.org/trunk@60035 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-09-01 18:05:28 +00:00
TimothyBlynJacobs
6fc14a44cf Mail: Support inline attachments.
MIME allows for referencing included attachments by their `Content-ID` header using the `cid` URL scheme. This can be used to embed images inline to the HTML message. For example, `<img src="cid:logo">`, will display the contents of message part with the `Content-Id: <logo>` header.

The `wp_mail()` function now supports including inline attachments through a new `$embeds` parameter. It accepts a map of `Content-ID` values to file paths. The `wp_mail_embed_args` filter can be used to customize the resulting `PHPMailer::addEmbeddedImage` method call.

Props jesin, swissspidy, chrisvendiadvertisingcom, SirLouen, mukesh27, yashjawale, iamadisingh.
Fixes #28059.

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


git-svn-id: http://core.svn.wordpress.org/trunk@60034 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-09-01 04:04:29 +00:00
spacedmonkey
6c7025eeb5 Caching API: Use consistent cache keys for query groups.
Query-based caches are now improved by reusing cache keys. Previously, cache keys for query caches were generated using the `last_changed` value as part of the key. This meant that whenever `last_changed` was updated, all the previously cached values for the group became unreachable.

The new approach allows WordPress to replace previously cached results that are known to be stale. The previous approach relied on the object cache backend evicting stale keys which is done at various levels of efficiency.

To address this, the following new helper functions have been introduced:

* wp_cache_get_salted
* wp_cache_set_salted
* wp_cache_get_multiple_salted
* wp_cache_set_multiple_salted 

These functions provide a consistent way to get/set query caches. Instead of using the last_changed value as part of the cache key, it is now stored inside the cache value as a "salt". This allows cache keys to be reused, with values updated in place rather than relying on eviction of outdated entries.

Props spacedmonkey, peterwilsoncc, flixos90, sanchothefat, tillkruess, rmccue, mukesh27, adamsilverstein, owi, nickchomey.
Built from https://develop.svn.wordpress.org/trunk@60697


git-svn-id: http://core.svn.wordpress.org/trunk@60033 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-08-31 21:43:30 +00:00
Sergey Biryukov
57f78b73af Docs: Clarify return value for wp_get_default_extension_for_mime_type().
Follow-up to [51653].

Props rollybueno, SergeyBiryukov.
See #63166.
Built from https://develop.svn.wordpress.org/trunk@60696


git-svn-id: http://core.svn.wordpress.org/trunk@60032 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-08-31 18:55:26 +00:00
dmsnell
a9661d650c Formatting: Rely on _wp_can_use_pcre_u() to detect UTF-8 PCRE support.
The `sanitize_file_name()` function attempts to detect UTF-8 PCRE support, but WordPress already provides a more robust method. It then caches its check in a static var, which WordPress already does in the canonical function `_wp_can_use_pcre_u()`.

This patch refactors `sanitize_file_name()` to call `_wp_can_use_pcre_u()` directly instead of (mostly) recreating and recaching Core’s detection algorithm.

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

Follow-up to [60694].

Props dmsnell.
See #63863.

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


git-svn-id: http://core.svn.wordpress.org/trunk@60031 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-08-31 06:05:30 +00:00
dmsnell
5fa2d232eb Compat: Replace warning-suppression in _wp_can_use_pcre_u()
This patch replaces the use of the problematic error-suppresssion operator with a specific error-handler to catch and report Unicode PCRE support without raising the related issues of error-suppression: notably conflating errors and failing to prevent completely the logging of the warnings.

In this case, the WPCS rule against using error-suppression was actually helpful in pointing out the risk, but the code was left in place with an “ignore” comment to silence the violation; this patch addresses the risk and removes the need for the comment.

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

Follow-up to: [45611].

Props dmsnell.
Fixes #63865.

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


git-svn-id: http://core.svn.wordpress.org/trunk@60030 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-08-30 20:53:31 +00:00
Sergey Biryukov
a1ff962773 Build/Test Tools: Check if PHPUnit classes exist before calling class_alias().
This resolves `Class not found` warnings when running the tests in PHPUnit 10 or later.

Follow-up to [40536], [51570].

Props danielmorell, devasheeshkaul, SergeyBiryukov.
Fixes #63833.
Built from https://develop.svn.wordpress.org/trunk@60693


git-svn-id: http://core.svn.wordpress.org/trunk@60029 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-08-30 14:01:29 +00:00
desrosj
3ba0c58c13 Build/Test Tools: Update third-party GitHub Actions.
This updates the following third-party actions to their latest versions:
`actions/checkout` from `4.2.2` to `5.0.0`
`shivammathur/setup-php` from `2.32.0` to `2.35.3`
`actions/setup-node` from `4.3.0` to `4.4.0`
`ramsey/composer-install` from `3.1.0` to `3.1.1`
`actions/cache` from `4.2.3` to `4.2.4`
`actions/download-artifact` from `4.2.1` to `5.0.0`
`codecov/codecov-action` from `5.4.0` to `5.4.3`
`slackapi/slack-github-action` from `2.0.0` to `2.1.1`

See #63170.
Built from https://develop.svn.wordpress.org/trunk@60692


git-svn-id: http://core.svn.wordpress.org/trunk@60028 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-08-30 00:13:29 +00:00
desrosj
4a58a4c6fd Security: Update composer/ca-bundle to version 1.5.8.
See #63165.
Built from https://develop.svn.wordpress.org/trunk@60691


git-svn-id: http://core.svn.wordpress.org/trunk@60027 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-08-29 23:59:30 +00:00
jonsurrell
2c4aab7e8c Script Loader: Revert sourceURL addition.
It was discovered that these changes cause some issues in the customizer when `SCRIPT_DEBUG` is `false`.

Reverts [60685] and [60686].

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

Props jonsurrell, wildworks, tyxla.
See #63887.

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


git-svn-id: http://core.svn.wordpress.org/trunk@60026 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-08-29 17:18:28 +00:00
Sergey Biryukov
7b891912c7 Tests: Correct @covers tags for term_exists() tests.
Includes moving the tag to the class DocBlock, as this test class covers a single function.

Follow-up to [52921], [60676].

See #63167.
Built from https://develop.svn.wordpress.org/trunk@60689


git-svn-id: http://core.svn.wordpress.org/trunk@60025 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-08-29 12:52:27 +00:00
Bernhard Reiter
c90da2b673 Block Hooks: Apply block hooks to plugin-registered templates.
As of WordPress 6.7.0, it is possible -- e.g. for plugins -- to register block templates via a new API, `register_block_template()`. Unlike block templates loaded from theme files or from the database, however, those block templates didn't have Block Hooks applied. This changeset rectifies this inconsistency.

Props iamadisingh, aljullu, bernhard-reiter.
Fixes #63808.
Built from https://develop.svn.wordpress.org/trunk@60688


git-svn-id: http://core.svn.wordpress.org/trunk@60024 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-08-28 19:10:33 +00:00
Sergey Biryukov
1de88be2d6 Docs: Improve grammar in some DocBlocks for more clarity and consistency.
Follow-up to [8215], [8598].

Props prab18hat, dhruvang21, swissspidy, SergeyBiryukov.
Fixes #63892.
Built from https://develop.svn.wordpress.org/trunk@60687


git-svn-id: http://core.svn.wordpress.org/trunk@60023 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-08-28 15:08:28 +00:00
jonsurrell
0213b11319 Script Loader: Remove "inline:" prefix from sourceURL.
The prefix may negatively impact some APIs such as the Long Animation Frames API.

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

Follow-up to [60685].

Props jonsurrell, swissspidy.
Fixes #63887.

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


git-svn-id: http://core.svn.wordpress.org/trunk@60022 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-08-28 14:46:37 +00:00
jonsurrell
3b163e81c7 Script Loader: Add sourceURL to inline scripts and styles.
Improve the source locations referenced by developer tooling in supporting browsers. Inline source locations are named like `inline:handle-js-after` and appear in the developer tools "sources" panel.

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

Props jonsurrell, swissspidy, alshakero, westonruter.
Fixes #63887.

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


git-svn-id: http://core.svn.wordpress.org/trunk@60021 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-08-28 07:56:30 +00:00
Bernhard Reiter
4f0cadf745 Block Bindings: Allow generically setting rich-text block attributes.
Replace the existing block-specific, hard-coded, logic in the `WP_Block` class with more generic code that is able to locate and replace a `rich-text` sourced attribute based on the `selector` definition in its `block.json`.

This should make it easier to add block bindings support for more block attributes.

Props bernhard-reiter, jonsurrell, gziolo, cbravobernal, dmsnell.
Fixes #63840.
Built from https://develop.svn.wordpress.org/trunk@60684


git-svn-id: http://core.svn.wordpress.org/trunk@60020 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-08-27 15:43:27 +00:00
Helen Hou-Sandí
3ffbc9770f Updates: Ensure theme screenshots are positioned correctly.
Underlying problem: the updates list tables inherit styles from classes named for plugins. This makes the intention much more explicit so we can actually maintain and make changes sanely going forward.

Fixes #63120.

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


git-svn-id: http://core.svn.wordpress.org/trunk@60019 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-08-27 15:15:30 +00:00
Sergey Biryukov
1dc6a28e04 Docs: Correct the order of @since and @global tags in some files.
Follow-up to [9053], [13177], [16660], [32642], [37226], [54953], [59865], [60658].

Props viralsampat, shailu25, sandipsinh007.
Fixes #63879. See #63166.
Built from https://develop.svn.wordpress.org/trunk@60682


git-svn-id: http://core.svn.wordpress.org/trunk@60018 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-08-27 13:42:30 +00:00
jonsurrell
a8d180e55e Scripts: Use appropriate JSON encoding flags for script tags.
`wp_json_encode()` with default arguments is insufficient to safely escape JSON for script tags. Use `JSON_HEX_TAG | JSON_UNESCAPED_SLASHES` flags.

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

Props devasheeshkaul, jonsurrell, siliconforks.
Fixes #63851.

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


git-svn-id: http://core.svn.wordpress.org/trunk@60017 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-08-27 10:34:28 +00:00
Helen Hou-Sandí
698f5c3589 Plugins: Ensure only plugin icons are floated.
There's no reason not to add a semantic class to the plugin icons on the update screen instead of making our CSS more complex, so let's do that and ensure that the existing `.plugin-icon` styles are scoped to `.plugin-card` on the install screen.

Partially reverts [60673].
Fixes #63120.


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


git-svn-id: http://core.svn.wordpress.org/trunk@60016 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-08-27 00:03:30 +00:00
Jeremy Felt
f0331ea047 Users: Improve documentation for edit_user_profile and show_user_profile actions.
This clarifies when and in which context these actions fire.

Props akshat2802.
Fixes #62062.

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


git-svn-id: http://core.svn.wordpress.org/trunk@60015 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-08-26 23:55:31 +00:00
TimothyBlynJacobs
6e4a64047e Media: Fix playlist shortcodes not rendering correctly if the first playlist is broken.
The playlist shortcode has a base set of JavaScript that should only be loaded once. Previously, this JS was only loaded the first time a playlist shortcode was processed. If the first playlist was broken, because the media file was missing for instance, this would break all other playlists on the page.

This commit introduces a new static variable to keep track of whether the necessary JavaScript has been loaded instead.

Props iamadisingh, abcd95, justlevine, jorbin, rollybueno, Guido07111975.
Fixes #63583.

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


git-svn-id: http://core.svn.wordpress.org/trunk@60014 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-08-26 23:21:32 +00:00
whyisjake
16212b44f5 Tests: Move Hello Dolly test data to match new plugin directory structure.
Moves the Hello Dolly test plugin file from `tests/phpunit/data/plugins/hello.php` to  `tests/phpunit/data/plugins/hello-dolly/hello.php` to match the updated plugin structure in the main codebase.

Fixes failing tests in Tests_Admin_IncludesPlugin that expect the plugin to be located in a hello-dolly directory.

Props jorbin, davidb, afragen.


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


git-svn-id: http://core.svn.wordpress.org/trunk@60013 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-08-26 23:00:29 +00:00
davidbaumwald
fedf2c68a1 Taxonomy: Ensure term_exists respects $parent_term when $term is an integer.
This change updates `term_exists` by ensuring that any numeric value passed as the `$parent_term` argument is passed to the subsequent `get_terms` call when the `$term` argument is an integer.  This change includes unit tests to validate the fix.

Props spacedmonkey, lopo, lgadzhev, hugod, thehercules, nickbrazilian, audrasjb, vijendrajat, sachinrajcp123, bobbyleenoblestudios.
Fixes #55358.

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


git-svn-id: http://core.svn.wordpress.org/trunk@60012 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-08-26 22:24:27 +00:00
whyisjake
69d09a70f0 Build/Test Tools: Revert svn:ignore property changes from [60666].
The svn:ignore property reorganization introduced in [60666] needs to be reverted to restore the  previous ignore pattern structure.

Brought the changes that were in: https://core.trac.wordpress.org/browser/trunk?rev=60665

Reviewed  by desrosj, jorbin.


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


git-svn-id: http://core.svn.wordpress.org/trunk@60011 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-08-26 22:20:36 +00:00
Aaron Jorbin
f0fb60d28b Build/Test Tools: Update in-repo PHPUnit documentation to point to a single source of truth.
Props q0rban, ironprogrammer, desrosj, peterwilsoncc, juampick.
Fixes #62065.

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


git-svn-id: http://core.svn.wordpress.org/trunk@60010 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-08-26 21:54:29 +00:00
whyisjake
9bc78e7a7a Plugins: Fix emoji positioning in plugin titles on plugins list table.
Prevents emojis in plugin titles from floating to the front of text when
WordPress uses emoji fallback rendering. When emoji feature detection fails,
WordPress replaces emoji characters with `<img>` elements that were incorrectly
affected by CSS float rules intended for plugin icons.

Updates CSS selectors to target specific icon types (dashicons, icon classes,
and data URI images) rather than all images, ensuring emoji images remain
inline with plugin title text while preserving proper layout for actual
plugin icons.

- Consolidates `.plugins .plugin-title img` and `.plugins .plugin-title .dashicons` rules
- Adds support for `img.dashicons`, `img[class*="icon"]`, and `img[src*="data:image"]` selectors
- Maintains 64px sizing and left float for legitimate plugin icons
- Fixes visual issue where "myplugin❤️wordpress" displayed as "❤️mypluginwordpress"

Props slimndap, ankitkumarshah, sandeepdahiya, sabernhardt, tomdevisser,
debarghyabanerjee, nusrat21, SirLouen, wpfy, hmbashar, klevismiho,
rollybueno, jamesgiroux, jorbin, whyisjake.

Fixes #63120.

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


git-svn-id: http://core.svn.wordpress.org/trunk@60009 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-08-26 21:35:26 +00:00
Aaron Jorbin
783dd4b4f4 General: Add polyfills for new PHP 8.5 array functions: array_first and array_last.
This power couple of function is coming in PHP 8.5: array_first and array_last.

For more information on these functions, check out the PHP RFC at https://wiki.php.net/rfc/array_first_last.

Props tusharbharti, jorbin, peterwilsoncc, mukesh27, johnbillion.
Fixes #63853. See #63061.


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


git-svn-id: http://core.svn.wordpress.org/trunk@60008 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-08-26 21:31:28 +00:00
TimothyBlynJacobs
d58780fc7d Formatting: Add 'white-space' as an allowed KSES CSS attribute.
The 'white-space' attribute is safe, has wide browser support, and is useful.

Props sukhendu2002, mukesh27, whyisjake..
Fixes #51707.

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


git-svn-id: http://core.svn.wordpress.org/trunk@60007 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-08-26 21:08:17 +00:00