In [52921] `term_exists` was converted to use `get_terms`. This change adds a filter called `term_exists_default_query_args`
to the `term_exists` function to allow developers to modify the arguments passed to `get_terms` before the query is run.
Props Chouby, Spacedmonkey, peterwilsoncc.
Fixes#55439.
Built from https://develop.svn.wordpress.org/trunk@52987
git-svn-id: http://core.svn.wordpress.org/trunk@52576 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The current docblock for `WP_Upgrader::run` indicates the default value for the `clear_working` key of the `$options` argument is `false`. However, in the code directly below, the default is shown to be `true. This change updates the docblock to correct the default.
This commit also reorders the `$defaults` to match the order they appear in the docblock.
Props paulkevan.
Fixes#55450.
Built from https://develop.svn.wordpress.org/trunk@52986
git-svn-id: http://core.svn.wordpress.org/trunk@52575 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Ensure that the parameters `update_post_meta_cache`, `update_post_term_cache`, `cache_results`, `suppress_filters` and
`lazy_load_term_meta` that are passed to WP_Query, are also passed down to the secondary query used to get sticky
posts.
Props Spacedmonkey, peterwilsoncc, rehanali, uday17035.
Fixes#36907.
Built from https://develop.svn.wordpress.org/trunk@52982
git-svn-id: http://core.svn.wordpress.org/trunk@52571 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset replaces contracted verb forms like `doesn't`, `can't`, or `isn't` with non-contracted forms like `does not`, `cannot`, or `is not`, for better consistency across the WordPress administration. It also updates some corresponding unit tests strings.
Follow-up to [52978].
See #38913.
Built from https://develop.svn.wordpress.org/trunk@52979
git-svn-id: http://core.svn.wordpress.org/trunk@52568 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset replaces contracted verb forms like `doesn't`, `can't`, or `isn't` with non-contracted forms like `does not`, `cannot`, or `is not`, for better consistency across the WordPress administration. It also updates some corresponding unit tests strings.
Props Presskopp, socalchristina, aandrewdixon, francina, SergeyBiryukov, JeffPaul, audrasjb, hellofromTonya.
Fixes#38913.
See #39176.
Built from https://develop.svn.wordpress.org/trunk@52978
git-svn-id: http://core.svn.wordpress.org/trunk@52567 1a063a9b-81f0-0310-95a4-ce76da25c4cd
In `wp_get_nav_menu_items` multiple function calls to `get_terms` and `get_posts` were being used to load post/term objects into
memory. This change replaces calls to `get_terms` and `get_posts` with calls to `_prime_post_caches` and
`_prime_term_caches`. These functions are designed to prime object caches and do not have the overhead of a query object. This
change also replaces multiple queries with a single query, saving many SQL queries per page load.
Props Spacedmonkey, peterwilsoncc.
Fixes#55428.
--This line, and those below,
will be ignored--
M src/wp-includes/nav-menu.php
Built from https://develop.svn.wordpress.org/trunk@52975
git-svn-id: http://core.svn.wordpress.org/trunk@52564 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Increase the number of cache hits in `WP_Term_Query` by normalizing data included in the cache key.
Arguments that do not affect the SQL query, eg `update_term_meta_cache`, are removed from cache key generation. Arguments that are accepted in multiple formats, eg a string and an array, are normalized for both the cache key and the SQL query.
Props spacedmonkey.
Fixes#55352.
Built from https://develop.svn.wordpress.org/trunk@52970
git-svn-id: http://core.svn.wordpress.org/trunk@52559 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This fixes a `Variable "$theBody" is not in valid snake_case format` WPCS warning.
Follow-up to [8516], [51825], [51929], [51931], [51940], [52025], [52960], [52961], [52962], [52963], [52964].
Props azouamauriac.
See #54728.
Built from https://develop.svn.wordpress.org/trunk@52965
git-svn-id: http://core.svn.wordpress.org/trunk@52554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This fixes a `Variable "$strResponse" is not in valid snake_case format` WPCS warning.
For consistency, this commit also renames the `WP_Http::processResponse()` argument to `$response`.
Follow-up to [8516], [51825], [51929], [51940], [52025], [52960], [52961], [52962], [52963].
Props azouamauriac.
See #54728.
Built from https://develop.svn.wordpress.org/trunk@52964
git-svn-id: http://core.svn.wordpress.org/trunk@52553 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Similar to other checks on `user_login` and `user_url`, this change moves the maximum length check on `user_nicename` after the `pre_user_nicename` filter has been applied, to account for any changes to the value prior to saving.
Props SergeyBiryukov, ravipatel, muhammadfaizanhaidar, mukesh27, csesumonpro, azouamauriac.
Fixes#54987.
Built from https://develop.svn.wordpress.org/trunk@52954
git-svn-id: http://core.svn.wordpress.org/trunk@52543 1a063a9b-81f0-0310-95a4-ce76da25c4cd
When adding a new tag, the form is reset by clearing values for `input[type=text]` and `textarea`s. However, the reset doesn't account for any HTML5 input types, like `number` or `url`, that may be added by plugins or themes.
This change updates the form resetting jQuery to clear any values from `input` types that are not hidden and neither a `checkbox` nor `radio` type.
Props stevegrunwell.
Fixes#48030.
Built from https://develop.svn.wordpress.org/trunk@52953
git-svn-id: http://core.svn.wordpress.org/trunk@52542 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This makes its signature more correct by implementing the spread operator, and adjusts the internal logic correspondingly without affecting performance.
Props jrf, SergeyBiryukov, davidbaumwald, mauriac, johnbillion
Fixes#53218
Built from https://develop.svn.wordpress.org/trunk@52952
git-svn-id: http://core.svn.wordpress.org/trunk@52541 1a063a9b-81f0-0310-95a4-ce76da25c4cd
When using an Input Method Editor(IME), pressing escape to perform actions in the IME is common. However, if this was done while replying to a comment, the "close on escape" feature was also triggered which cleared the current textarea and closed it.
This change checks if an IME is in use by binding the `compositionstart` event to the reply text box and setting a flag if it's triggered. The "close on escape" feature will now only be triggered if this new flag is not set after typing a reply.
Props BettyJJ, sabernhardt, alexstine, konradyoast, audrasjb, rafiahmedd, afercia.
Fixes#54548.
Built from https://develop.svn.wordpress.org/trunk@52951
git-svn-id: http://core.svn.wordpress.org/trunk@52540 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This change appends the theme version number to the URL of screenshots that appear in various place of the WordPress Admin. As a result, browsers will be able to refresh the screenshot as needed when the theme is updated.
Props codente, desrosj, audrasjb, SergeyBiryukov.
Fixes#53370.
Built from https://develop.svn.wordpress.org/trunk@52947
git-svn-id: http://core.svn.wordpress.org/trunk@52536 1a063a9b-81f0-0310-95a4-ce76da25c4cd
While using reserved PHP keywords as parameter name labels is allowed, in the context of function calls using named parameters in PHP 8.0+, this will easily lead to confusion. To avoid that, it is recommended not to use reserved keywords as function parameter names.
This commit renames the `$object` variable in `Custom_Image_Header` class methods to `$attachment` for clarity and consistency, as the variable type is actually an array, and updates the documentation accordingly.
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #55327.
Built from https://develop.svn.wordpress.org/trunk@52946
git-svn-id: http://core.svn.wordpress.org/trunk@52535 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Use the pointer cursor when hovering over the theme details button for consistency with the theme card. Clicking in either area performs the same action.
Props multidots1896, rehanali, ravipatel, sabernhardt, ryokuhi.
Fixes#54971.
Built from https://develop.svn.wordpress.org/trunk@52944
git-svn-id: http://core.svn.wordpress.org/trunk@52533 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Adds a new `WP_Block_Editor_Context::$name` and field. This allows plugin
developers to tell which block editor is being loaded when using filters such as
`allowed_block_types_all` and `block_editor_rest_api_preload_paths`.
Fixes#55301.
Props talldanwp, gziolo, andraganescu.
Built from https://develop.svn.wordpress.org/trunk@52942
git-svn-id: http://core.svn.wordpress.org/trunk@52531 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This removes the requirement for block themes to have an unused `index.php` template just for activation, as they use a `templates/index.html` file instead.
The updated requirements are as follows:
* Standalone themes need to have a `templates/index.html` or `index.php` template file.
* Child themes need to have a `Template` header in the `style.css` stylesheet.
Follow-up to [52069], [52247].
Props poena, sabbirshouvo, scruffian, manfcarlo, overclokk, andraganescu, SergeyBiryukov.
Fixes#54272.
Built from https://develop.svn.wordpress.org/trunk@52940
git-svn-id: http://core.svn.wordpress.org/trunk@52529 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Both CSS and JS URLs were totally broken for some of the newer blocks (e.g. the navigation block in the 2022 theme) when WP core is outside of the current directory using a different prefix.
Props pgpagely, Mamaduka.
Fixes#55311.
Built from https://develop.svn.wordpress.org/trunk@52939
git-svn-id: http://core.svn.wordpress.org/trunk@52528 1a063a9b-81f0-0310-95a4-ce76da25c4cd