Commit Graph

51317 Commits

Author SHA1 Message Date
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
whyisjake
72e3ea8ed9 Upgrade/Install: Actually move Hello Dolly plugin to directory structure.
This fixes an issue from [60666] where I neglected to `svn move` the files. 

Follow-up to [60666].

Reviewed by jeremyfelt.

Props swissspidy.

See #53323.



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


git-svn-id: http://core.svn.wordpress.org/trunk@60006 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-08-26 21:06:56 +00:00
Adam Silverstein
c0bb2a41c3 Media: improve doc blocks for PNG handling in Imagick.
These changes were inadvertently omitted from [60667].

Props adamsilverstein.


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


git-svn-id: http://core.svn.wordpress.org/trunk@60005 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-08-26 21:05:30 +00:00
TimothyBlynJacobs
cd6b5eb48f Customize: Update input_attrs docs for the textarea control.
Props sabenhardt.
See [60662].

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


git-svn-id: http://core.svn.wordpress.org/trunk@60004 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-08-26 20:59:22 +00:00
Adam Silverstein
08ef43f295 Media: improve Imagick handling of indexed PNG images with transparency.
Fix an issue where certain transparent PNG images experienced noticeable quality degradation when resized by Imagick. 

Follow up to [60246].

Props elvismdev, SirLouen, siliconforks, nosilver4u, iamshashank.

Fixes #63448.


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


git-svn-id: http://core.svn.wordpress.org/trunk@60003 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-08-26 20:57:34 +00:00
whyisjake
f8f84a4173 Upgrade/Install: Move Hello Dolly plugin to directory structure.
Changes the Hello Dolly plugin from a single file structure to a proper plugin directory structure, moving from `hello.php` to `hello-dolly/hello.php` to align with Plugin Handbook Best Practices.

- Adds proper `Text Domain: hello-dolly` header to Hello Dolly plugin
- Updates core files to remove special case handling for `hello.php`
- Updates plugin dependency system to handle new directory structure
- Adds upgrade routine to migrate active plugin references and keep plugin active
- Updates all tests to use new plugin path format `hello-dolly/hello.php`
- Updates build configuration and .gitignore for new directory structure
- Adds `hello.php` to old files list for cleanup during core updates
- Adds `plugins/hello-dolly/` to new bundled directories list

Props afragen, SergeyBiryukov, peterwilsoncc, SirLouen, matt, davidbaumwald, desrosj, hellofromtonya, justinahinon,audrasjb, oglekler, whyisjake.
Fixes #53323.


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


git-svn-id: http://core.svn.wordpress.org/trunk@60002 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-08-26 18:41:31 +00:00
nerrad
6096e1d2e5 HTML API: Reliably parse HTML in get_url_in_content()
As part of a larger effort in #63694, this utlizes `WP_HTML_Tag_Processor` instead of regex to parse the string passed into `get_url_in_content`.

As a benefit this also decodes the URL whereas the previous code didn’t, so strings like `http&#x3A;//` will be properly decoded as `http://`.

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

Props dmsnell, jonsurrell, nerrad.
Fixes #63694.
Built from https://develop.svn.wordpress.org/trunk@60665


git-svn-id: http://core.svn.wordpress.org/trunk@60001 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-08-26 18:22:32 +00:00
TimothyBlynJacobs
025eab7b5a Coding Standards: Fix spacing in Customize Control.
Props dmsnell.
See [60662].

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


git-svn-id: http://core.svn.wordpress.org/trunk@60000 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-08-26 18:18:25 +00:00
Jeremy Felt
634bfa325c Coding Standards: Properly align variable assignment in WP_Block
Removes a new line added as part of [60611] which impacted alignment of variable assignments in `process_block_bindings()`.

See #63168.

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


git-svn-id: http://core.svn.wordpress.org/trunk@59999 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-08-26 18:16:32 +00:00
TimothyBlynJacobs
8bd447bc3f Customize: Allow specifying the number of rows for <textarea> inputs.
Previously, the textarea control was forced to use 5 rows. This commit instead applies a default value of 5, but allows for a developer to specify a different number of rows using the input_attrs arg.

Props sirlouen, timhavinga, celloexpressions, sainathpoojary. 
Fixes #47445.

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


git-svn-id: http://core.svn.wordpress.org/trunk@59998 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-08-26 17:49:29 +00:00
Sergey Biryukov
1448dc5aa8 Taxonomy: Check the result of get_term() in WP_Term_Query::get_terms().
`get_term()` can return `WP_Error` or `null` on failure, so the result should be verified as a `WP_Term` instance before accessing the `count` property.

This commit prevents a PHP warning if `get_term()` returns `null` for a child term:
{{{
Warning: Attempt to read property "count" on null
}}}

Follow-up to [27458], [37572].

Props josephscott, coleatkinson1, kebbet, jakariaistauk, sabernhardt, westonruter, SergeyBiryukov.
Fixes #63877.
Built from https://develop.svn.wordpress.org/trunk@60661


git-svn-id: http://core.svn.wordpress.org/trunk@59997 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-08-26 17:26:29 +00:00
John Blackbourn
ce1c229570 Build/Test Tools: Temporarily pin the PHP 8.3 and 8.4 container images to an earlier digest to work around issues with the newer images.
This pins the images to PHP 8.3.10 and 8.4.11 on Debian Bullseye pending further investigation into the root cause of the certificate verification failure affecting the connection to the database containers.

This also removes memcached from the test matrix pending further investigation into the missing Memcached executable.

Props desrosj, bernhard-reiter, SirLouen, johnbillion.

See #63876
Built from https://develop.svn.wordpress.org/trunk@60660


git-svn-id: http://core.svn.wordpress.org/trunk@59996 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-08-26 16:55:31 +00:00
Sergey Biryukov
26312ee9a9 Code Modernization: Replace non-canonical scalar type casts with canonical versions.
PHP 8.5 deprecates four alternative scalar type names in favor of their canonical names:

* `boolean` → `bool`
* `double` → `float`
* `integer` → `int`
* `binary` → `string`

References:
* [https://php.watch/versions/8.5/boolean-double-integer-binary-casts-deprecated PHP.Watch: PHP 8.5: Non-canonical scalar type casts (boolean|double|integer|binary) deprecated]
* [https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_non-standard_cast_names PHP RFC: Deprecations for PHP 8.5: Deprecate non-standard cast names]

Follow-up to [1346], [11875].

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


git-svn-id: http://core.svn.wordpress.org/trunk@59995 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-08-25 13:10:29 +00:00
Sergey Biryukov
58aee83106 Docs: Correct the order of @since and @global tags in some files.
Follow-up to [32642], [32643], [60416].

Props shailu25, mukesh27.
See #63166.
Built from https://develop.svn.wordpress.org/trunk@60658


git-svn-id: http://core.svn.wordpress.org/trunk@59994 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-08-24 13:44:32 +00:00