This change adds an information notice to the customizer when a block theme is active and the customizer is also available (for example when a plugin activates it), to encourage people to use the Site Editor for the best full site customization experience.
Props ironprogrammer, antonvlasenko, Clorith, audrasjb, psmits1567, tobifjellner, costdev, webcommsat.
Fixes#54939.
Built from https://develop.svn.wordpress.org/trunk@53024
git-svn-id: http://core.svn.wordpress.org/trunk@52613 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Move the Submit and Cancel buttons in quick edit forms to be next to each other and change the order of the buttons. Improve accessibility for low vision and cognitive impairments for quick editing.
Props afercia, marybaum.
Fixes#55364.
Built from https://develop.svn.wordpress.org/trunk@53023
git-svn-id: http://core.svn.wordpress.org/trunk@52612 1a063a9b-81f0-0310-95a4-ce76da25c4cd
When using a block theme that declares Widgets support, it's better to not specify a menu order for the Widgets menu to avoid conflicts between menu items order.
Props Rufus87, ironprogrammer, audrasjb, hellofromTonya, davidbaumwald.
Fixes#54916.
Built from https://develop.svn.wordpress.org/trunk@53020
git-svn-id: http://core.svn.wordpress.org/trunk@52609 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The new location is next to the pre-existing `count_users()` function, along with other user-specific functions, and should be a more appropriate place in terms of consistency.
This affects:
* `get_user_count()`
* `wp_maybe_update_user_counts()`
* `wp_update_user_counts()`
* `wp_schedule_update_user_counts()`
* `wp_is_large_user_count()`
Follow-up to [53011], [53016].
See #38741.
Built from https://develop.svn.wordpress.org/trunk@53018
git-svn-id: http://core.svn.wordpress.org/trunk@52607 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 `$echo` parameter to `$verbose` in `WP_Filesystem_Base::find_base_dir()` and `::get_base_dir()`, and updates the documentation accordingly. This matches the class property of the same name.
Follow-up to [52946], [52996], [52997], [52998], [53003].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #55327.
Built from https://develop.svn.wordpress.org/trunk@53014
git-svn-id: http://core.svn.wordpress.org/trunk@52603 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Currently in WordPress multisite there is a concept of large networks. The function `wp_is_large_network` is used to determine if a network has a large number of sites or users. If a network is marked as large, then
expensive queries to calculate user counts are not run on page load but deferred to scheduled events. However there are a number of places in a single site installation where this functionality would also be useful, as
expensive calls to count users and roles can make screens in the admin extremely slow.
In this change, the `get_user_count` function and related functionality around it is ported to be available in a single site context. This means that expensive calls to the `count_users` function are replaced with
calls to `get_user_count`. This change also includes a new function called `wp_is_large_user_count` and a filter of the same name, to mark if a site is large.
Props johnbillion, Spacedmonkey, Mista-Flo, lumpysimon, tharsheblows, obenland, miss_jwo, jrchamp, flixos90, macbookandrew, pento, desrosj, johnjamesjacoby, jb510, davidbaumwald, costdev.
Fixes#38741.
Built from https://develop.svn.wordpress.org/trunk@53011
git-svn-id: http://core.svn.wordpress.org/trunk@52600 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Change the `wp_get_nav_menu_items` function to replace the call to `get_objects_in_term` with a simple taxonomy query. This change improves performance as it results in one fewer query to retrieve menu items from the
database.
Props Spacedmonkey, peterwilsoncc.
Fixes#55372.
Built from https://develop.svn.wordpress.org/trunk@53010
git-svn-id: http://core.svn.wordpress.org/trunk@52599 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This suppresses certain commits from Git blame views, notably in the GitHub UI as well as the command line. These commits are purely stylistic and excluding them from these views helps to reduce the noise when doing code archaeology.
Still to come: More coding standards commits as they are reviewed.
Props helen, costdev, peterwilsoncc.
See #55422
Built from https://develop.svn.wordpress.org/trunk@53007
git-svn-id: http://core.svn.wordpress.org/trunk@52596 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset decreases the chance of accidentally overwriting some variables located in `wp-settings.php`, as the chance of overriding a variable called `$_wp_plugin_file` would be lower than for `$plugin`, `$mu_plugin` or `$network_plugin`.
Props stevegrunwell, joyously, peterwilsoncc, ocean90, SergeyBiryukov, jrf, azouamauriac.
Fixes#55432.
Built from https://develop.svn.wordpress.org/trunk@53004
git-svn-id: http://core.svn.wordpress.org/trunk@52593 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 `$var` parameter to `$mysql_var` in `WP_Debug_Data::get_mysql_var()`.
Additionally, `$type` is renamed to `$data_type` in `WP_Debug_Data::format()` for clarity.
Follow-up to [51522], [52946], [52996], [52997], [52998].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #55327.
Built from https://develop.svn.wordpress.org/trunk@53003
git-svn-id: http://core.svn.wordpress.org/trunk@52592 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 `$return` variable in `Theme_Upgrader` class methods to `$response` and updates the documentation accordingly.
Follow-up to [47409], [52946], [52996], [52997].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #55327.
Built from https://develop.svn.wordpress.org/trunk@52998
git-svn-id: http://core.svn.wordpress.org/trunk@52587 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 `$return` variable in `Plugin_Upgrader` class methods to `$response` and updates the documentation accordingly.
Follow-up to [47409], [52946], [52996].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #55327.
Built from https://develop.svn.wordpress.org/trunk@52997
git-svn-id: http://core.svn.wordpress.org/trunk@52586 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 `$string` parameter of `ftp_base::glob_pattern_match()` to `$subject`.
Follow-up to [52946].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #55327.
Built from https://develop.svn.wordpress.org/trunk@52996
git-svn-id: http://core.svn.wordpress.org/trunk@52585 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This patch optimizes preload paths in post and site editors so that they match the real requests:
- Remove the `/` preload as the payload is very big and the response is not needed on any critical path.
- Modify the preloaded path for `/wp/v2/taxonomies` so that it corresponds to what `loadTaxonomyEntities` requests. After Gutenberg PR 37685 was merged to core, these preloads need to be modified to use `context=view` instead of `context=edit`.
- Modify the `/wp/v2/users/me path` so that it matches the real request (no query params).
- Add a preload of `/wp/v2/settings` because it is requested on critical path (editor boot). Site editor already preloads this, the changeset is only adding it to the post editor.
This is related to Gutenberg PR 39256 which introduces compatibility code to modify the preload paths with a filter, when the Gutenberg plugin is active.
See https://github.com/WordPress/gutenberg/pull/39256.
Props jsnajdr, noisysocks.
Fixes#55337.
Built from https://develop.svn.wordpress.org/trunk@52995
git-svn-id: http://core.svn.wordpress.org/trunk@52584 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This change updates Twenty Nineteen bundled theme to fix the DOM order in the comment form, and to add a new `.comment-form-wrapper` class to change `flex` display to `block` for this specific area.
Props garrett-eclipse, audrasjb, sabernhardt.
Fixes#46600.
Built from https://develop.svn.wordpress.org/trunk@52993
git-svn-id: http://core.svn.wordpress.org/trunk@52582 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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