This ensures that `wp_localize_script( 'jquery', ... )` continues to work as expected, since `WP_Scripts::localize()` rewrites the `jquery` handle to `jquery-core` internally.
Follow-up to [48323].
Props mukesh27, rajeshsingh520, johnbillion, TimothyBlynJacobs, TobiasBg.
Fixes#50919.
Built from https://develop.svn.wordpress.org/trunk@48890
git-svn-id: http://core.svn.wordpress.org/trunk@48652 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This adds an additional parameter to the `auto_plugin_update_send_email` and `auto_theme_update_send_email` filters to provide the additional context of which updates were attempted and their outcome. This will help plugin and theme auto-update emails to be better tailored to a site owner’s liking.
Props audrasjb, Paddy Landau, desrosj.
Fixes#50988.
Built from https://develop.svn.wordpress.org/trunk@48888
git-svn-id: http://core.svn.wordpress.org/trunk@48650 1a063a9b-81f0-0310-95a4-ce76da25c4cd
In [48306] support for multi-typed schemas was improved to first detect the data type of the value before applying further validation. The `integer` data type was detected using the new `rest_is_integer` function. This function used logic, however, that assumed that the value had already passed an `is_numeric` check. This meant that if `integer` and `string` were both acceptable types, the value would always be considered an `integer` causing the later accurate type validation to fail.
This commit fixes the `rest_is_integer` logic to include an `is_numeric` check.
Props rtagliento.
Fixes#51146.
Built from https://develop.svn.wordpress.org/trunk@48881
git-svn-id: http://core.svn.wordpress.org/trunk@48643 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Update `redirect_canonical()` to account for custom pagination and URL format used by sitemaps in order to follow standard practices.
Introduce the function `get_sitemap_url()` to simplify getting the index and provider URLs as needed.
Props jonathanstegall, pbiron, GamerZ, salvoaranzulla, peterwilsoncc.
Fixes#50910.
Built from https://develop.svn.wordpress.org/trunk@48872
git-svn-id: http://core.svn.wordpress.org/trunk@48634 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Color schemes should only affect colors, to avoid diverging from a consistent and predictable layout, especially if core CSS rules subsequently change.
Follow-up to [48277], [48286], [48345].
Props Joen, johnbillion, afercia, johnjamesjacoby.
Fixes#51127. See #50504.
Built from https://develop.svn.wordpress.org/trunk@48862
git-svn-id: http://core.svn.wordpress.org/trunk@48624 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This allows for better localization in languages where adjectives are translated differently depending on which noun they modify, or when a different translation is required for a noun vs. a verb.
Props dimadin, justinahinon.
Fixes#49797.
Built from https://develop.svn.wordpress.org/trunk@48861
git-svn-id: http://core.svn.wordpress.org/trunk@48623 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This gives developers a better control over their existing development workflow and ensures that `local` is not the exact same as `development` if it does not need to be.
Props claytoncollie, johnbillion, jeremyfelt, kreppar, dushakov, TimothyBlynJacobs, Ipstenu, khag7, knutsp, Clorith, markjaquith, joostdevalk, SergeyBiryukov.
Fixes#51064.
Built from https://develop.svn.wordpress.org/trunk@48856
git-svn-id: http://core.svn.wordpress.org/trunk@48618 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Any notices in that file happen before `WP_DEBUG` takes effect, and should not be displayed with the `error_reporting` level previously set in `wp-load.php`.
Adding the class when there is no notice displayed results in extra padding under the admin bar, which should be avoided.
Follow-up to [20102], [21025], [26620], [47745].
Props akissz, tw2113, laxman-prajapati, sabernhardt, johnbillion, SergeyBiryukov.
Fixes#51073.
Built from https://develop.svn.wordpress.org/trunk@48850
git-svn-id: http://core.svn.wordpress.org/trunk@48612 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This makes the configuration consistent with the `WP_RUN_CORE_TESTS` constant being set to `1` in the same config file.
Additionally, update the list to be in line with the current codebase, excluding the plugins and themes bundled with WordPress core from being considered for code coverage.
Note: If you have a local `phpunit.xml` file that changes the `WP_RUN_CORE_TESTS` constant to `0`, you should also - in the same file - change the code coverage setup to use the `src` directory.
Follow-up to [42665], [43311].
Props jrf, mmarco9.
See #50267.
Built from https://develop.svn.wordpress.org/trunk@48847
git-svn-id: http://core.svn.wordpress.org/trunk@48609 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This brings `wp_count_terms()` in line with other taxonomy functions such as `get_terms()` which technically no longer require a taxonomy. Similar to the previously modified functions, no deprecation warning is triggered when using the legacy signature.
Fixes#36399.
Built from https://develop.svn.wordpress.org/trunk@48840
git-svn-id: http://core.svn.wordpress.org/trunk@48602 1a063a9b-81f0-0310-95a4-ce76da25c4cd
As per the documentation of `call_user_func_array()`, the `$param_arr` should be a (numerically) indexed array, not a string-keyed array.
As we can use the spread operator in PHP 5.6+, there isn't really any need to use `call_user_func_array()` anyhow, we can call the `array_merge()` function directly.
The caveat to this is that the spread operator only works on numerically indexed arrays, so we need to wrap the `$sidebars_widgets` variable in a call to `array_values()` when using the spread operator.
Using `array_values()` in the existing `call_user_func_array()` call would also have solved this, but the solution now proposed, has the added benefit of getting rid of the overhead of `call_user_func_array()`.
Props jrf.
See #50913.
Built from https://develop.svn.wordpress.org/trunk@48839
git-svn-id: http://core.svn.wordpress.org/trunk@48601 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The WP native `get_comment()` function expects the first argument `$comment` to be passed by reference.
The PHP `array_map()` function, however, passes by value, not by reference, resulting in an "arguments must be passed by reference, value given" error.
The PHP native `array_walk()` function does pass by reference. Using this prevents the error on PHP 8 and maintains the existing behaviour on PHP < 8.
Props jrf.
See #50913.
Built from https://develop.svn.wordpress.org/trunk@48838
git-svn-id: http://core.svn.wordpress.org/trunk@48600 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Previously, the labels for the reusable block post type were just “block”. The document settings tab in the block editor has been changed to use the post type label specified instead to be more specific. Changing the reusable block post type labels to “reusable block” prevents two “Block” tabs from showing in the editor.
Props desaiuditd, peterwilsoncc.
Fixes#50755.
Built from https://develop.svn.wordpress.org/trunk@48829
git-svn-id: http://core.svn.wordpress.org/trunk@48591 1a063a9b-81f0-0310-95a4-ce76da25c4cd