This commit:
* Moves the call to `upgrade_690()` to the correct place so it actually gets called.
* Wraps Hello Dolly upgrade code in a version check per standard practice.
* Removes the `$wpdb->query()` call to avoid attempting to create the new index twice, once in the upgrade and once in `dbDelta()`.
Follow-up to [60666], [60716], [60717].
Props peterwilsoncc, mukesh27.
See #50161, #53323.
Built from https://develop.svn.wordpress.org/trunk@60721
git-svn-id: http://core.svn.wordpress.org/trunk@60057 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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
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
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
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
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
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
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
* 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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