Fixes the issue where `npm install` aborts on Apple Silicon due to Puppeteer not finding appropriate chromium binary. It works correctly with the latest versio of `grunt-contrib-qunit` package.
Props afragen, jorbin, SergeyBiryukov.
Fixes#52690.
Related #52356.
Built from https://develop.svn.wordpress.org/trunk@53069
git-svn-id: http://core.svn.wordpress.org/trunk@52658 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Prevent users from using the password reset form to set their password to whitespace alone (tabs, spaces). This matches the processing used during the authentication flow, ensuring users do not inadvertently get locked out of their account.
Props antonrinas, swissspidy, voldemortensen, hellofromTonya, henry.wright, costdev.
Fixes#35500.
Built from https://develop.svn.wordpress.org/trunk@53067
git-svn-id: http://core.svn.wordpress.org/trunk@52656 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Cache queries to the comments table in `WP_Query` for various comments feeds. Only comment IDs are stored for each feeds cache to avoid doubling up caching with each individual comment's cache.
Props spacedmonkey, boonebgorges, pbearne.
Fixes#36904.
Built from https://develop.svn.wordpress.org/trunk@53065
git-svn-id: http://core.svn.wordpress.org/trunk@52654 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Improve the translation of post type and taxonomy labels by caching the translations during runtime. To account for internationalisation plugins, the runtime cache is cleared as the post types/taxonomies are reinitiated on `change_local` hook.
The same property and methods are added to both `WP_Post_Type` and `WP_Taxonomy`:
* `$default_labels`: for storing the translated strings at runtime
* `get_default_labels()`: for getting the default labels, these are translated on the first run and stored in the new property.
* `reset_default_labels()`: to clear the runtime cache and force a re-translation of the default labels
Props Chouby, nacin, SergeyBiryukov, Rarst, chriscct7, ocean90, audrasjb, costdev.
Fixes#26746.
Built from https://develop.svn.wordpress.org/trunk@53058
git-svn-id: http://core.svn.wordpress.org/trunk@52647 1a063a9b-81f0-0310-95a4-ce76da25c4cd
`wp_list_pluck()` is used by WordPress to pluck items from a list. Of course, this requires a list. This validates the input of `wp_list_pluck()` to ensure it is a list.
This matches the behaviour of `wp_list_sort()` and `wp_filter_object_list()`.
Props marv2, davidbaumwald, mkox, SergeyBiryukov, dd32.
Fixes#54751.
Built from https://develop.svn.wordpress.org/trunk@53045
git-svn-id: http://core.svn.wordpress.org/trunk@52634 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Ensure the post cache is primed with raw sanitized data. This resolves an inconsistency between how posts retrieved via `get_post()` vs `WP_Query` are cached.
This prevents `sanitize_post( $post, 'raw' )` being run multiple times on a cached post. This can happen over 20 times per post on some page loads so avoiding this will provide a noticeable performance boost.
Props Cybr, SergeyBiryukov, peterwilsoncc, hellofromTonya, costdev.
Fixes#50567.
Built from https://develop.svn.wordpress.org/trunk@53042
git-svn-id: http://core.svn.wordpress.org/trunk@52631 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Set valid autocomplete attributes for registration and login fields for username, email, and current password. Autocomplete values are required in WCAG 2.1 at level AA for login forms.
Props johnjamesjacoby, dhanendran, rianrietveld, joedolson, peterwilsoncc.
Fixes#41136.
Built from https://develop.svn.wordpress.org/trunk@53041
git-svn-id: http://core.svn.wordpress.org/trunk@52630 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 `$default` parameter to `$default_value` in `WP_List_Table::get_items_per_page()`.
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #55327.
Built from https://develop.svn.wordpress.org/trunk@53039
git-svn-id: http://core.svn.wordpress.org/trunk@52628 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Add a limit to the number of terms requested in taxonomy queries. This improves the performance of the query and the likelihood of hitting an existing term query cache.
Props Spacedmonkey, peterwilsoncc, flixos90.
Fixes#55360.
Built from https://develop.svn.wordpress.org/trunk@53037
git-svn-id: http://core.svn.wordpress.org/trunk@52626 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Improve performance of the `wp_count_comments` function by replacing a complex query with multiple calls to the `get_comments` function. Passing the `count` parameter to the `get_comments` function results in a simple
count query that returns quickly. Using `get_comments` also means that query is cached and run through filters.
Props FolioVision, markjaquith, nacin, ryan, coffee2code, wonderboymusic, ComputerGuru, jb510, SergeyBiryukov, Znuff, Rahe, uday17035, spacedmonkey, peterwilsoncc.
Fixes#19901.
Built from https://develop.svn.wordpress.org/trunk@53036
git-svn-id: http://core.svn.wordpress.org/trunk@52625 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Expand documentation of the `wp_kses_allowed_html` hook to indicate that developers must add permitted HTML tags and attributes in lowercase for KSES to recognise they are permitted.
Props r-a-y, SergeyBiryukov, peterwilsoncc.
Fixes#55407.
See #53399.
Built from https://develop.svn.wordpress.org/trunk@53034
git-svn-id: http://core.svn.wordpress.org/trunk@52623 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 to `$text` in `WP_Importer::min_whitespace()`.
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #55327.
Built from https://develop.svn.wordpress.org/trunk@53029
git-svn-id: http://core.svn.wordpress.org/trunk@52618 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This filter allows modifying individual `img` tags within a blob of content that are by default processed by the `wp_filter_content_tags()` function. The addition of this filter facilitates plugins that tweak images to accomplish this goal without re-implementing duplicate content image parser logic, which furthermore can have a negative performance impact due to additional regular expressions.
In addition to the filterable `img` tag, the filter receives the context (typically the function or filter in which the content is parsed) and the attachment ID. The latter may be 0, in case the image is not an attachment (for example when it is an external image URL).
Props adamsilverstein, flixos90, pbearne, peterwilsoncc.
Fixes#55347.
Built from https://develop.svn.wordpress.org/trunk@53028
git-svn-id: http://core.svn.wordpress.org/trunk@52617 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Migrate the alternative text, title, description, and caption of an image over to the cropped copy of the image after cropping. Ensure that characteristics added to an image prior to cropping are not lost.
Props flixos90, Clorith, afercia, antonvlasenko, ironprogrammer, hellofromTonya.
Fixes#37750.
Built from https://develop.svn.wordpress.org/trunk@53027
git-svn-id: http://core.svn.wordpress.org/trunk@52616 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset fixes a few issues spotted after [53024].
- Remove target blank on HelpHub link
- Remove duplicate information in `aria-label`
- Small i18n fixes
Follow-up to [53024].
Props joedolson, audrasjb, pbiron.
Fixes#54939.
Built from https://develop.svn.wordpress.org/trunk@53025
git-svn-id: http://core.svn.wordpress.org/trunk@52614 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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