In `register_block_type_from_metadata` function, skip calling `file_exists` on core blocks. Core blocks are part of the codebase and will never not exist. Not calling this function is better for performance, as the file lookup can be expensive.
Props spacedmonkey, joemcgill.
Fixes#58385.
Built from https://develop.svn.wordpress.org/trunk@55910
git-svn-id: http://core.svn.wordpress.org/trunk@55422 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Add a check in `wp_maybe_inline_styles` to check that style is registered before processing items in queue. It is possible that developers may have called `wp_deregister_style`, unregistering style but the style still be in the queue to be processed. Without this check, typing to access the `src` property would result in a notice error.
Follow on from [55888].
Props spacedmonkey, flixos90, dd32, kebbet.
See #58394.
Built from https://develop.svn.wordpress.org/trunk@55909
git-svn-id: http://core.svn.wordpress.org/trunk@55421 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Improve `append_to_selector` method in `WP_Theme_JSON` by checking to see if string contains a common before imploding / exploding string, which improves performance.
Originally developed and tested in [WordPress/gutenberg#47833 Gutenberg PR 47833].
Props spacedmonkey, flixos90, mukesh27, joemcgill, wildworks, oandregal, mamaduka.
Fixes#58231.
Built from https://develop.svn.wordpress.org/trunk@55907
git-svn-id: http://core.svn.wordpress.org/trunk@55419 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset adds a `pre` class to "Downloading update from…" user facing strings located in `Core_Upgrader`, `Language_Pack_Upgrader`, `Plugin_Upgrader` and
`Theme_Upgrader` classes.
Follow-up to [11295].
Props sumitsingh, costdev.
Fixes#58477.
Built from https://develop.svn.wordpress.org/trunk@55899
git-svn-id: http://core.svn.wordpress.org/trunk@55411 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Make focus outline fully visible at all media query breakpoints, prevent the date filter from becoming hidden, and match the heading styles to other screens.
Props sabernhardt, hareesh-pillai, alvitazwar052.
Fixes#54395.
Built from https://develop.svn.wordpress.org/trunk@55896
git-svn-id: http://core.svn.wordpress.org/trunk@55408 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The `$args` parameter of `apply_filters()` is optional. This changeset updates the related Docblock description accordingly so the parameter is not marked as
`required` on DevHub.
Props gaeldenysiak, audrasjb, gilles66.
Fixes#58481.
See #57840.
Built from https://develop.svn.wordpress.org/trunk@55893
git-svn-id: http://core.svn.wordpress.org/trunk@55405 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This hidden field added in [24552] to fix an issue with Chrome that was ignoring `autocomplete="off"` in `<input>`, by using a hidden, non-named, non-empty
input right before the password field. However this input was only hidden via CSS and didn't have any label, which is considered as an accessibility issue.
This changeset replaces `class="hidden"` with `type="hidden"` to properly indicate to user agents that it is an hidden field.
Follow-up to [24552].
Props smit08, audrasjb, sabernhardt, ryokuhi, tushar284, ashikurwp, siddhantwadhwani, pavanpatil1.
Fixes#56776.
--Cette ligne, et les suivantes
ci-dessous, seront ignorées--
M trunk/src/wp-admin/user-edit.php
M trunk/src/wp-admin/user-new.php
Built from https://develop.svn.wordpress.org/trunk@55892
git-svn-id: http://core.svn.wordpress.org/trunk@55404 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Updates `wp_get_active_and_valid_themes()` to return early when `wp_using_themes()` returns `false`. This prevents a theme's `functions.php` from being loaded erroneously when the site isn't using themes.
Also adds `define( 'WP_USE_THEMES', true );` to the test suite bootstrap. Some tests randomly break without it because they were dependent on the previous buggy behavior.
Props bpayton, costdev, danielbachhuber, hellofromtonya, sergeybiryukov, spacedmonkey.
Fixes#57928.
Built from https://develop.svn.wordpress.org/trunk@55890
git-svn-id: http://core.svn.wordpress.org/trunk@55402 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The `wp_maybe_inline_styles` function is called twice on the average page load. On it's second run however, it did not check to see if the style had already been processed on the first run. This resulted in calling `filesize` and `get_file_contents` unnecessarily, which was bad for performance. Now, the loop around the queued styles, checks to see if the source is set to false, meaning it has already been processed. This change also replaces calls to `filesize` with the core function `wp_filesize`, which improves extensibility.
Props spacedmonkey, flixos90, peterwilsoncc, joemcgill.
Fixes#58394.
Built from https://develop.svn.wordpress.org/trunk@55888
git-svn-id: http://core.svn.wordpress.org/trunk@55400 1a063a9b-81f0-0310-95a4-ce76da25c4cd
In `WP_Theme` class, replace two calls to `file_exists` with a call to the method `is_block_theme`. This method `is_block_theme` does the same file exists check, but it then caches the result for improved performance.
Props nihar007, spacedmonkey, mukesh27, costdev, juzar.
Fixes#58405.
Built from https://develop.svn.wordpress.org/trunk@55885
git-svn-id: http://core.svn.wordpress.org/trunk@55397 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset adds context to various strings:
- `'Background'` string when referring to Custom Background appearance screens
- `'Header'` string when referring to Custom Header appearance screens
- `'General'`, `'Header'` and `'Footer'` strings when referring to template part areas
Props gonzomir, SergeyBiryukov, mukesh27, costdev, ankitmaru.
Fixes#58424.
Built from https://develop.svn.wordpress.org/trunk@55881
git-svn-id: http://core.svn.wordpress.org/trunk@55393 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Use `register_block_type_from_metadata` in `register_core_block_types_from_metadata` function instead of `register_block_type`. This saves an unnecessary call to `file_exists` in `register_block_type` as core block files will always exist.
Props nihar007, spacedmonkey, mukesh27, gziolo, sudipatel007.
Fixes#58342.
Built from https://develop.svn.wordpress.org/trunk@55879
git-svn-id: http://core.svn.wordpress.org/trunk@55391 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The `sprintf()` is not being passed any values, and there is no placeholder to replace.
This originated in r52132 in which I erroneously included this `sprintf()` in
two places. I fixed one of the cases in r52151 but I missed the other.
Follow-up to [52132], [52151].
Fixes#58436.
See #44632.
Built from https://develop.svn.wordpress.org/trunk@55875
git-svn-id: http://core.svn.wordpress.org/trunk@55387 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Previously when the `mimes` element was not specified in the overrides array passed to `_wp_handle_upload()` it resulted in boolean false being passed to this parameter, which is incorrect. The fallback value should be `null`.
Props platonkristinin, pkbhatt
Fixes#58349
Built from https://develop.svn.wordpress.org/trunk@55872
git-svn-id: http://core.svn.wordpress.org/trunk@55384 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Since cron events often consume extra memory by nature, it makes sense to give them the full amount available by default. In practice this means the memory will be increased to `WP_MAX_MEMORY_LIMIT` (which is 256MB by default) during cron event processing if the default memory limit is lower than this value.
The new `cron_memory_limit` filter can be used to adjust this value if necessary.
Note that this change will not by default affect external means of processing cron events, such as the `wp cron` command in WP-CLI, server-level crontab events, or any other cron event processing mechanism that bypasses `wp-cron.php`.
Props iandunn, thakkarhardik
Fixes#56628
Built from https://develop.svn.wordpress.org/trunk@55871
git-svn-id: http://core.svn.wordpress.org/trunk@55383 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This moves the query for user ID of the new network's administrator closer to where the value is actually used.
Includes removing unnecessary `get_userdata()` call, as user ID is the only data needed here.
Follow-up to [12756], [35575], [43628].
Props nihar007, sakibmd, mukesh27, costdev, SergeyBiryukov.
Fixes#58423.
Built from https://develop.svn.wordpress.org/trunk@55869
git-svn-id: http://core.svn.wordpress.org/trunk@55381 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Fixes a performance issue where the JIT logic is invoked for every translation call if the there are no translations in the current locale. With this change, the information is cached by adding `Noop_Translations` instances to the global `$l10n` array. This way, `get_translations_for_domain()` returns earlier, thus avoiding subsequent `_load_textdomain_just_in_time()` calls.
Props swissspidy, johnbillion, ocean90.
Fixes#58321.
Built from https://develop.svn.wordpress.org/trunk@55865
git-svn-id: http://core.svn.wordpress.org/trunk@55377 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The Change button is supposed to perform the “Change role to...” action only, but could unintentionally be used for other bulk actions if the role was not selected.
This commit removes an extra check and ensures the correct error message is displayed in that case:
Sorry, you are not allowed to give users that role.
Follow-up to [6990], [8691], [9028], [15576], [15642], [34636], [49944].
Props haritpanchal, costdev, ankit-k-gupta, SergeyBiryukov.
Fixes#57952.
Built from https://develop.svn.wordpress.org/trunk@55864
git-svn-id: http://core.svn.wordpress.org/trunk@55376 1a063a9b-81f0-0310-95a4-ce76da25c4cd