Adds a new non-public `WP_REST_Block_Patterns_Controller::migrate_pattern_categories()` method to automatically migrate existing content's pattern categories to the new ones introduced in [55098].
Old to New
`'buttons'` to `'call-to-action'`
`'columns'` to `'text'`
`'query'` to `'posts'`
Reference:
* Part of [https://github.com/WordPress/gutenberg/pull/46144 Gutenberg PR 46144]
Follow-up to [55098], [53152].
Props ntsekouras, annezazu, jameskoster, joen, hellofromTonya, mcsf, paaljoachim, ryelle.
Fixes#57532.
Built from https://develop.svn.wordpress.org/trunk@55125
git-svn-id: http://core.svn.wordpress.org/trunk@54658 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset fixes a bug where clicking on an anchor link in the content changes the state of the button that opens and closes the responsive menu. It adds a conditional to check if the clicked anchor link is inside the primary navigation menu (`#site-navigation`), in order to prevent content anchor links from changing the state of the button.
Known limitations: The state of the button is not reset when the browser is resized. If a menu anchor link is first clicked while on desktop width, and the browser width is reduced, the menu button will show the text "Close" even though the menu is not opened.
Props andreaboe, sabernhardt, poena, afercia, chaion07, cu121, mukesh27.
Fixes#53331.
Built from https://develop.svn.wordpress.org/trunk@55124
git-svn-id: http://core.svn.wordpress.org/trunk@54657 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset removes color names from pattern names to make them less opinionated, and avoid mismatching when the user changes related colors. It does not update filenames for now, as they are not directly exposed to end users.
Props poena, mukesh27.
Fixes#56720.
Built from https://develop.svn.wordpress.org/trunk@55122
git-svn-id: http://core.svn.wordpress.org/trunk@54655 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset adds support for `:link` and `:any-link` in `theme.json`, using the `VALID_ELEMENT_PSEUDO_SELECTORS` array. `:link` can be used to style unvisited links and `:any-link` can be used to style any link containing an `href` attribute.
Props peterwilsoncc, whaze, audrasjb, costdev, mukesh27.
Fixes#57053.
Built from https://develop.svn.wordpress.org/trunk@55121
git-svn-id: http://core.svn.wordpress.org/trunk@54654 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 `$array` parameter to `$input_array` in `wp_recursive_ksort()`.
* Moves the function next to other array-related functions for consistency.
Follow-up to [53129], [54929].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #56788.
Built from https://develop.svn.wordpress.org/trunk@55117
git-svn-id: http://core.svn.wordpress.org/trunk@54650 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset fixes an issue with the "Dots" style of the Separator block on multiple bundled themes. It adds `max-width: 100%` to this style variation on the following themes: Twenty Eleven, Twenty Thirteen, Twenty Fourteen, Twenty Fifteen, and Twenty Sixteen.
Props umesh84, sabernhardt, audrasjb, amin7, esratpopy, multidots1896.
Fixes#56114.
Built from https://develop.svn.wordpress.org/trunk@55114
git-svn-id: http://core.svn.wordpress.org/trunk@54647 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset adds a `large-text` attribute and removes the `size` attribute of the text input field located in the Slug metabox. It improves its usability, at least for as long as the Slug metabox is available in the Classic Editor.
Props ABTOP, nacin, helen, sabernhardt, abitofmind, tyxla, audrasjb.
Fixes#16346.
Built from https://develop.svn.wordpress.org/trunk@55113
git-svn-id: http://core.svn.wordpress.org/trunk@54646 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset removes the "Remove selected item" from the classic Navigation Menus screen when no item is selected, and makes it non focusable from assistive technologies.
Plus, this changeset fixes a small unrelated coding standard issue in `nav-menus.css`.
Props kebbet, joedolson, audrasjb.
Fixes#56942.
Built from https://develop.svn.wordpress.org/trunk@55109
git-svn-id: http://core.svn.wordpress.org/trunk@54642 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset introduces the `bulk_edit_posts` action hook, triggered after processing the post data for bulk edit and before it returns its results. For example, it allows developers to save additional data without having to perform any `.ajax()` call.
Props helgatheviking, helen, Mte90, afercia, mrasharirfan, desrosj, itowhid06, pento, mensmaximus, audrasjb, costdev.
Fixes#28112.
Built from https://develop.svn.wordpress.org/trunk@55108
git-svn-id: http://core.svn.wordpress.org/trunk@54641 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Change the focus and hover state of the plugin modal close button to use `#f0f0f1` with visible outline to be visible against modal overlay.
Props dperonne, viralsampat, jeawhanlee, mukesh27, sabernhardt, joedolson.
Fixes#56604.
Built from https://develop.svn.wordpress.org/trunk@55107
git-svn-id: http://core.svn.wordpress.org/trunk@54640 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset introduces the `wp_ajax_save_attachment` action hook, triggered after an attachment has been updated and before the JSON response is sent. For example, it allows developers to update any additional attachment fields that have been rendered by extending the `media.view.Attachment.Details` subview.
Props griffinjt, bradyvercher, pputzer, antpb, sc0ttkclark, audrasjb, costdev, hellofromTonya.
Fixes#23148.
Built from https://develop.svn.wordpress.org/trunk@55106
git-svn-id: http://core.svn.wordpress.org/trunk@54639 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The `IXR_Message` class declares a property `_currentTag`, which is never assigned or used. It does assign to `currentTag` instead, which outside of that one assignment is never used either.
Since there are various other underscore-prefixed properties declared on the class, including one named `_currentTagContents` which is used in several places, it appears that the declared property is correct and the assignment is a typo.
This commit resolves a notice on PHP 8.2:
{{{
Deprecated: Creation of dynamic property IXR_Message::$currentTag is deprecated
}}}
Follow-up to [1346].
Props bjorsch, kraftbj, jrf, mukesh27, SergeyBiryukov.
See #56790.
Built from https://develop.svn.wordpress.org/trunk@55105
git-svn-id: http://core.svn.wordpress.org/trunk@54638 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The second parameter passed to `get_callback` in `WP_REST_Controller::add_additional_fields_to_object()` is the field name, not the request details.
Includes moving the `get_callback` and `update_callback` helper functions next to the tests they are used in.
Follow-up to [38832], [43768].
See #56793.
Built from https://develop.svn.wordpress.org/trunk@55102
git-svn-id: http://core.svn.wordpress.org/trunk@54635 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset removes some CSS custom properties that targets navigation menu items to avoid preventing the block from inheriting padding values set by the Global Styles system.
Props Joen, desrosj, poena, audrasjb, hellofromtonya, SergeyBiryukov.
Fixes#53220.
Built from https://develop.svn.wordpress.org/trunk@55101
git-svn-id: http://core.svn.wordpress.org/trunk@54634 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Up until now, new translations could only be installed via Settings -> General.
When editing the user profile, one could only select locales that were already installed.
This change allows also installing new translations if the editing user has the necessary capabilities.
Props barryceelen, johnbillion, ocean90, swissspidy.
Fixes#38664.
Built from https://develop.svn.wordpress.org/trunk@55099
git-svn-id: http://core.svn.wordpress.org/trunk@54632 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset adds `spellcheck="false"` attribute to various password fields.
The spellcheck global attribute defines whether the element may be checked for spelling errors. The `false` value indicates that the element should not be checked for spelling errors, which is relevant for a password field.
Furthermore, and as per MDN specs, using spellchecking can have consequences for users' security and privacy. The specification does not regulate how spellchecking is done and the content of the element may be sent to a third party for spellchecking results. Thus, it is recommended to set `spellcheck` attribute to `false` for elements that can contain sensitive information. Which is the case for password fields.
Props dziudek, audrasjb, gainesm, fosuahmed.
Fixes#56763.
Built from https://develop.svn.wordpress.org/trunk@55094
git-svn-id: http://core.svn.wordpress.org/trunk@54627 1a063a9b-81f0-0310-95a4-ce76da25c4cd
When lazy-loading images was introduced, in [52065] the check for `wp_lazy_loading_enabled()` was omitted by accident in the logic to set the attribute with its default value on `img` tags from `get_the_post_thumbnail()`. Without this check, it is impossible for third-party developers to modify the behavior for featured images.
This changeset fixes the problem by introducing the check.
Props flixos90, joemcgill, mukesh27.
Fixes#57490.
Built from https://develop.svn.wordpress.org/trunk@55093
git-svn-id: http://core.svn.wordpress.org/trunk@54626 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Calls to `wp-admin/load-styles.php` do not include the loading of `wp_cache_*()` functions. With [55086], this caused a fatal error:
{{{
Fatal error: Uncaught Error: Call to undefined function wp_cache_get() in /wp-includes/global-styles-and-settings.php on line 285
}}}
In some production and local environments running `trunk`, the admin area looked broken as the styling was not loaded as there were no HTTP requests.
This commit reverts the caching from [55086] to restore sites running `trunk` until a solution is found.
Follow-up to [55086].
Props Otto42, dmsnell, costdev.
See #56975.
Built from https://develop.svn.wordpress.org/trunk@55092
git-svn-id: http://core.svn.wordpress.org/trunk@54625 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 `$content` in:
* `Tests_Kses::test_wp_filter_post_kses_address()`
* `Tests_Kses::test_wp_filter_post_kses_a()`
* `Tests_Kses::test_wp_filter_post_kses_abbr()`
* Amends a few parameters and variables in other tests in the same file for consistency.
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364], [53365], [54927], [54929], [54930], [54931], [54932], [54933], [54938], [54943], [54944], [54945], [54946], [54947], [54948], [54950], [54951], [54952], [54956], [54959], [54960], [54961], [54962], [54964], [54965], [54969], [54970], [54971], [54972], [54996], [55000], [55011], [55013], [55014], [55015], [55016], [55017], [55020], [55021], [55023], [55027], [55028], [55034], [55036], [55037], [55038], [55039], [55049], [55050], [55060], [55062], [55064], [55065], [55076], [55077], [55078], [55081].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #56788.
Built from https://develop.svn.wordpress.org/trunk@55090
git-svn-id: http://core.svn.wordpress.org/trunk@54623 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Adds `wp_theme_has_theme_json()` for public consumption, to replace the private internal Core-only `WP_Theme_JSON_Resolver::theme_has_support()` method. This new global function checks if a theme or its parent has a `theme.json` file.
For performance, results are cached as an integer `1` or `0` in the `'theme_json'` group with `'wp_theme_has_theme_json'` key. This is a non-persistent cache. Why? To make the derived data from `theme.json` is always fresh from the potential modifications done via hooks that can use dynamic data (modify the stylesheet depending on some option, settings depending on user permissions, etc.).
Also adds a new public function `wp_clean_theme_json_cache()` to clear the cache on `'switch_theme'` and `start_previewing_theme'`.
References:
* [https://github.com/WordPress/gutenberg/pull/45168 Gutenberg PR 45168] Add `wp_theme_has_theme_json` as a public API to know whether a theme has a `theme.json`.
* [https://github.com/WordPress/gutenberg/pull/45380 Gutenberg PR 45380] Deprecate `WP_Theme_JSON_Resolver:theme_has_support()`.
* [https://github.com/WordPress/gutenberg/pull/46150 Gutenberg PR 46150] Make `theme.json` object caches non-persistent.
* [https://github.com/WordPress/gutenberg/pull/45979 Gutenberg PR 45979] Don't check if constants set by `wp_initial_constants()` are defined.
* [https://github.com/WordPress/gutenberg/pull/45950 Gutenberg PR 45950] Cleaner logic in `wp_theme_has_theme_json`.
Follow-up to [54493], [53282], [52744], [52049], [50959].
Props oandregal, afragen, alexstine, aristath, azaozz, costdev, flixos90, hellofromTonya, mamaduka, mcsf, ocean90, spacedmonkey.
Fixes#56975.
Built from https://develop.svn.wordpress.org/trunk@55086
git-svn-id: http://core.svn.wordpress.org/trunk@54619 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The function `get_adjacent_post` cached the results of database query in the cache group `counts`. This is a none persistent group and meant cache would not persist on the next request. Change cache to save to the `posts` cache group. Cache invalidation is done by using get last changed value of the `posts` and `terms` group as a salt for the cache key.
Props spacedmonkey, peterwilsoncc, johnbillion, boonebgorges, mukesh27, dd32.
Fixes#41131.
Built from https://develop.svn.wordpress.org/trunk@55085
git-svn-id: http://core.svn.wordpress.org/trunk@54618 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Remove escape placeholder from query cache key, as placeholders are on a based on a unique id on every request. This meant that it is impossible for a cache to be reused, making queries that use escape placeholders such as searches, meta queries or using the `description__like` / `name__like` parameters were unable to be cached.
Follow on from [54634].
Props spacedmonkey, peterwilsoncc.
Fixes#57298.
Built from https://develop.svn.wordpress.org/trunk@55083
git-svn-id: http://core.svn.wordpress.org/trunk@54616 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset fixes a few use case:
- When referring to the Privacy Policy page, "Privacy Policy" should use capitalization on "Privacy Policy", but "page" should remain lowercase;
- When referring to the fact that a website needs, let's say "a relevant privacy policy", "privacy policy" should stay lowercase.
This changeset also updates other small capitalization issues.
Props aravindajith, audrasjb, sarathar, nithi22, costdev.
Fixes#57226.
Built from https://develop.svn.wordpress.org/trunk@55082
git-svn-id: http://core.svn.wordpress.org/trunk@54615 1a063a9b-81f0-0310-95a4-ce76da25c4cd
When passed a `WP_Image_Editor` instance as the `$image` parameter, `wp_save_image_file()` returns an array on success, so we can specifically check for an array instead of any non-empty result.
Likewise, in PDF tests, when creating an attachment is expected to return an integer ID and not a `WP_Error` object, we can specifically check for that.
Follow-up to [1061/tests], [38949], [39617], [42792], [53529], [53530], [53531], [55019], [55066].
See #56793.
Built from https://develop.svn.wordpress.org/trunk@55070
git-svn-id: http://core.svn.wordpress.org/trunk@54603 1a063a9b-81f0-0310-95a4-ce76da25c4cd
When passed a GD resource as `$image`, `wp_save_image_file()` should throw a deprecated argument notice:
{{{
Function wp_save_image_file was called with an argument that is deprecated since version 3.5.0!
$image needs to be a WP_Image_Editor object.
}}}
The test verifies that the notice is thrown as expected.
Includes:
* Removing the `Tests_Functions_Deprecated` class. It appears to be initially intended for testing deprecated functions or arguments, but this was later superseded by the `@expectedDeprecated` annotation.
* Removing a redundant test for `wp_save_image_file()` **not** throwing a deprecation notice when passed a `WP_Image_Editor` instance. This is already covered by `test_wp_save_image_file()`, which would fail if there is an unexpected deprecation notice.
Follow-up to [1061/tests], [25408], [25409], [53529].
See #56793.
Built from https://develop.svn.wordpress.org/trunk@55066
git-svn-id: http://core.svn.wordpress.org/trunk@54599 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset adds the top 10 Mastodon domains by popularity to Twenty Twenty and Twenty Twenty-One Social icon feature.
Note: other Mastodon domains can be added to the array of domain mapping using `twentytwenty_social_icons_map` and `twenty_twenty_one_social_icons_map` filters.
Props triumvirate, sabernhardt, audrasjb, peterwilsoncc, rryyaanndd, ianbelanger.
Fixes#57293, #49099.
Built from https://develop.svn.wordpress.org/trunk@55061
git-svn-id: http://core.svn.wordpress.org/trunk@54594 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 `$case` parameter to `$filename` in `Tests_File::test_wp_tempnam()`.
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364], [53365], [54927], [54929], [54930], [54931], [54932], [54933], [54938], [54943], [54944], [54945], [54946], [54947], [54948], [54950], [54951], [54952], [54956], [54959], [54960], [54961], [54962], [54964], [54965], [54969], [54970], [54971], [54972], [54996], [55000], [55011], [55013], [55014], [55015], [55016], [55017], [55020], [55021], [55023], [55027], [55028], [55034], [55036], [55037], [55038], [55039], [55049], [55050].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #56788.
Built from https://develop.svn.wordpress.org/trunk@55060
git-svn-id: http://core.svn.wordpress.org/trunk@54593 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset introduces the `wp_set_password` action hook, triggered after a password is set for a given user. As several plugins are calling `wp_set_password()` directly, adding an action to the end of the function will help plugin authors to catch all instances of password setting.
Props tanner-m, audrasjb.
Fixes#57436.
Built from https://develop.svn.wordpress.org/trunk@55056
git-svn-id: http://core.svn.wordpress.org/trunk@54589 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The [https://make.wordpress.org/core/2021/02/19/feature-plugin-rollback-update-failure/ Rollback Update Failure feature project] has been split into two plugins for testing:
* [https://github.com/afragen/faster-updates Faster Updates] speeds up plugin or theme updates by moving files rather than copying them, thus decreasing the memory usage and reducing the chance of timeouts or running out of disk space during updates.
* [https://wordpress.org/plugins/rollback-update-failure/ Rollback Update Failure] creates a temporary backup of plugins and themes before updating. This aims to make the update process more reliable and ensure that if a plugin or theme update fails, the previous version can be safely restored.
The current priority of the feature project is to test the new `move_dir()` function, which offers better performance than `copy_dir()`. Instead of copying a directory in a recursive manner file by file from one location to another, `move_dir()` uses the `rename()` PHP function to speed up the process, which is instrumental in updating large plugins without a delay. If the renaming failed, it falls back to the `copy_dir()` WP function.
The `move_dir()` function is self-contained in the Faster Updates plugin and does not require any special hooks in core, so the conditional previously added to `WP_Upgrader::install_package()` to facilitate testing is no longer needed and can be removed.
Follow-up to [53578], [54484], [54643].
Props afragen, costdev, peterwilsoncc.
See #56057, #57375, #57386.
Built from https://develop.svn.wordpress.org/trunk@55055
git-svn-id: http://core.svn.wordpress.org/trunk@54588 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset moves typecasting to affect the `get_option` value, which ensures that when math is done it does not generate any error. In PHP 7.4 and earlier the previous implementation was dismissed as a warning, but in PHP 8+ it would have throw a fatal error.
Follow-up to [45856].
Props Nick_theGeek, SergeyBiryukov, johnbillion.
Fixes#57035.
Built from https://develop.svn.wordpress.org/trunk@55054
git-svn-id: http://core.svn.wordpress.org/trunk@54587 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset indirectly improves performance of the commonly used `esc_url()` function by optimizing the low-level function `wp_kses_bad_protocol()` for the by far most common scenarios, which are URLs using either the `http` or `https` protocol.
For this common scenario, the changeset now avoids the `do while` loop. While for a single call to the `esc_url()` function the performance wins are negligible, given that `esc_url()` is often called many times in one page load, they can add up, making this a worthwhile improvement.
Props mukesh27, schlessera, markjaquith, azaozz, spacedmonkey.
Fixes#22951.
Built from https://develop.svn.wordpress.org/trunk@55053
git-svn-id: http://core.svn.wordpress.org/trunk@54586 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 `$type` and `$object` parameters to `$object_type` and `$object_name` in `Test_WP_Customize_Nav_Menus::filter_items()`.
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364], [53365], [54927], [54929], [54930], [54931], [54932], [54933], [54938], [54943], [54944], [54945], [54946], [54947], [54948], [54950], [54951], [54952], [54956], [54959], [54960], [54961], [54962], [54964], [54965], [54969], [54970], [54971], [54972], [54996], [55000], [55011], [55013], [55014], [55015], [55016], [55017], [55020], [55021], [55023], [55027], [55028], [55034], [55036], [55037], [55038], [55039].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #56788.
Built from https://develop.svn.wordpress.org/trunk@55049
git-svn-id: http://core.svn.wordpress.org/trunk@54582 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Initializing the `WP_Locale` array properties to an empty array at the class definition point. Why?
* Ensure the properties initialize to an `array` data type at instantiation (rather than `null`).
This initialization is needed to ensure the properties are not `null` if another class inherits from `WP_Locale` but does not run `WP_Locale::init()` from the constructor. In this case, the initialization prevents
{{{
Warning: array_values() expects parameter 1 to be array, null given
}}}
when Core uses any of the properties.
* Good design practice.
The code and documentation are clearly expecting these properties to be an `array` data type. Setting each to a default `array()` state further helps to clearly communicate the code design.
Follow-up to [37889], [36292], [31078], [3676], [6589].
Props tyxla, SergeyBiryukov, azaozz, hellofromTonya, mukesh27.
See #57427.
Built from https://develop.svn.wordpress.org/trunk@55047
git-svn-id: http://core.svn.wordpress.org/trunk@54580 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Renaming the class was missed in [54997] when updating changes in `WP_Http::request()` for the Requests 2.0.0 external library upgrade. The `HTTP` class no longer exists and caused a fatal error:
{{{
PHP Fatal error: Class 'WpOrg\Requests\Proxy\HTTP' not found in wp-includes/class-wp-http.php on line 382
}}}
This commit renames the class to `Http` and resolves the fatal error.
Follow-up to [52244], [52315], [52327], [52328], [54997], [55007].
Props danielbachhuber, jrf.
See #54504.
Built from https://develop.svn.wordpress.org/trunk@55046
git-svn-id: http://core.svn.wordpress.org/trunk@54579 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset adds an anchor in Comments keyboard shortcut documentation links to direct the user to a more specific section of the HelpHub documentation. It also removes `target="_blank" from a link, since preventing data loss when clicking any on User Edit and Comment Edit screens is already handled by another existing ticket (#40493).
Props NekoJonez, SergeyBiryukov, sabernhardt, dennisatyoast, robinwpdeveloper.
Fixes#56920.
Built from https://develop.svn.wordpress.org/trunk@55042
git-svn-id: http://core.svn.wordpress.org/trunk@54575 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset removes two unwanted semicolons from the gradients declaration in `aubergine.json`, fixing two gradients that were showing a checkerboard pattern instead of the gradient, and a console error for each of them.
Props wildworks, sabernhardt.
Fixes#57245.
Built from https://develop.svn.wordpress.org/trunk@55041
git-svn-id: http://core.svn.wordpress.org/trunk@54574 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset removes a mention of the "Page" post type from the Discussion meta box as this is a generic meta box, used for multiple post types. It makes it more consistent with the other option available in the meta box ("Allow comments") and also with the corresponding option in the block editor.
Follow-up to [12323].
Props jeremyfelt, sabernhardt, audrasjb, virgar.
Fixes#57429.
See #11346.
Built from https://develop.svn.wordpress.org/trunk@55040
git-svn-id: http://core.svn.wordpress.org/trunk@54573 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 `$class` parameter to `$setting_class` in:
* `Tests_WP_Customize_Manager::return_dynamic_customize_setting_class()`
* `Tests_WP_Customize_Manager::return_dynamic_customize_setting_args()`
* Amends the `$args` and `$id` parameters in both methods for consistency.
* Corrects the DocBlock for `::return_dynamic_customize_setting_args()`.
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364], [53365], [54927], [54929], [54930], [54931], [54932], [54933], [54938], [54943], [54944], [54945], [54946], [54947], [54948], [54950], [54951], [54952], [54956], [54959], [54960], [54961], [54962], [54964], [54965], [54969], [54970], [54971], [54972], [54996], [55000], [55011], [55013], [55014], [55015], [55016], [55017], [55020], [55021], [55023], [55027], [55028], [55034], [55036], [55037], [55038].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #56788.
Built from https://develop.svn.wordpress.org/trunk@55039
git-svn-id: http://core.svn.wordpress.org/trunk@54572 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 `$null` parameter to `$result` in `Tests_Cron::filter_pre_schedule_event_filter()`.
* Amends the `$pre` parameter of the `pre_schedule_event` filter for consistency.
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364], [53365], [54927], [54929], [54930], [54931], [54932], [54933], [54938], [54943], [54944], [54945], [54946], [54947], [54948], [54950], [54951], [54952], [54956], [54959], [54960], [54961], [54962], [54964], [54965], [54969], [54970], [54971], [54972], [54996], [55000], [55011], [55013], [55014], [55015], [55016], [55017], [55020], [55021], [55023], [55027], [55028], [55034], [55036], [55037].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #56788.
Built from https://develop.svn.wordpress.org/trunk@55038
git-svn-id: http://core.svn.wordpress.org/trunk@54571 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 `$input_string` in the unit tests for `mb_substr()` polyfill.
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364], [53365], [54927], [54929], [54930], [54931], [54932], [54933], [54938], [54943], [54944], [54945], [54946], [54947], [54948], [54950], [54951], [54952], [54956], [54959], [54960], [54961], [54962], [54964], [54965], [54969], [54970], [54971], [54972], [54996], [55000], [55011], [55013], [55014], [55015], [55016], [55017], [55020], [55021], [55023], [55027], [55028], [55034], [55036].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #56788.
Built from https://develop.svn.wordpress.org/trunk@55037
git-svn-id: http://core.svn.wordpress.org/trunk@54570 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 `$input_string` in the unit tests for `mb_strlen()` polyfill.
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364], [53365], [54927], [54929], [54930], [54931], [54932], [54933], [54938], [54943], [54944], [54945], [54946], [54947], [54948], [54950], [54951], [54952], [54956], [54959], [54960], [54961], [54962], [54964], [54965], [54969], [54970], [54971], [54972], [54996], [55000], [55011], [55013], [55014], [55015], [55016], [55017], [55020], [55021], [55023], [55027], [55028], [55034].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #56788.
Built from https://develop.svn.wordpress.org/trunk@55036
git-svn-id: http://core.svn.wordpress.org/trunk@54569 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 `$block_content` in `Tests_Block_Supports_Elements::make_unique_id_one()`.
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364], [53365], [54927], [54929], [54930], [54931], [54932], [54933], [54938], [54943], [54944], [54945], [54946], [54947], [54948], [54950], [54951], [54952], [54956], [54959], [54960], [54961], [54962], [54964], [54965], [54969], [54970], [54971], [54972], [54996], [55000], [55011], [55013], [55014], [55015], [55016], [55017], [55020], [55021], [55023], [55027], [55028].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #56788.
Built from https://develop.svn.wordpress.org/trunk@55034
git-svn-id: http://core.svn.wordpress.org/trunk@54567 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This addresses a few errors along the lines of:
* Opening parenthesis of a multi-line function call must be the last content on the line
* Only one argument is allowed per line in a multi-line function call
* Each array item in a multi-line array declaration must end in a comma
* Closing parenthesis of a multi-line function call must be on a line by itself
Follow-up to [55030].
See #28407.
Built from https://develop.svn.wordpress.org/trunk@55032
git-svn-id: http://core.svn.wordpress.org/trunk@54565 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Previous to this change, attachment filenames in outgoing emails could only ever be derived from their paths (passed in as a numerically indexed array of `$attachments`).
This changeset adds support for passing an associative `$attachments` array, where the key strings will be used as filenames instead.
Includes 2 new unit tests to ensure both array formats continue to work as intended.
Props johnjamesjacoby, ritteshpatel, swissspidy, syntaxart.
Fixes#28407.
Built from https://develop.svn.wordpress.org/trunk@55030
git-svn-id: http://core.svn.wordpress.org/trunk@54563 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Includes:
* Renaming the `$preempt` parameter to `$response` in the `pre_http_request` filter to better match the context used in callbacks (returning the original value if the conditions are not met rather than preempting the request).
* Synchronizing parameter names and types in various `pre_http_request` callbacks in unit tests.
Follow-up to [34509], [37907], [40628], [40629], [45667], [46175], [48242], [48462], [49904], [51021], [51973], [52146], [52382], [54043], [54968].
See #56793, #56792.
Built from https://develop.svn.wordpress.org/trunk@55029
git-svn-id: http://core.svn.wordpress.org/trunk@54562 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 `$callable` parameter to `$callback` in `get_echo()`.
* Renames the `$array` parameter to `$expected_data` in `gen_tests_array()`.
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364], [53365], [54927], [54929], [54930], [54931], [54932], [54933], [54938], [54943], [54944], [54945], [54946], [54947], [54948], [54950], [54951], [54952], [54956], [54959], [54960], [54961], [54962], [54964], [54965], [54969], [54970], [54971], [54972], [54996], [55000], [55011], [55013], [55014], [55015], [55016], [55017], [55020], [55021], [55023], [55027].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #56788.
Built from https://develop.svn.wordpress.org/trunk@55028
git-svn-id: http://core.svn.wordpress.org/trunk@54561 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 `$namespace` parameter to `$route_namespace` in `Spy_REST_Server::register_route()`.
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364], [53365], [54927], [54929], [54930], [54931], [54932], [54933], [54938], [54943], [54944], [54945], [54946], [54947], [54948], [54950], [54951], [54952], [54956], [54959], [54960], [54961], [54962], [54964], [54965], [54969], [54970], [54971], [54972], [54996], [55000], [55011], [55013], [55014], [55015], [55016], [55017], [55020], [55021], [55023].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #56788.
Built from https://develop.svn.wordpress.org/trunk@55027
git-svn-id: http://core.svn.wordpress.org/trunk@54560 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset adds `required="required"` attributes to required form fields and uses `wp_required_field_message()` and `wp_required_field_indicator()` functions to improve the generated markup, and for better consistency with other required fields.
Props jackreichert, flixos90, afercia, sabernhardt.
Fixes#38460.
Built from https://develop.svn.wordpress.org/trunk@55026
git-svn-id: http://core.svn.wordpress.org/trunk@54559 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit renames the `$tag` and `$function_to_add` parameters to match the `add_filter()` function signature.
Includes:
* Renaming the `$tag` parameter to `$hook_name`.
* Renaming the `$function_to_add` parameter to `$callback`.
* Synchronizing documentation for:
* `tests_add_filter()` and `add_filter()`
* `_test_filter_build_unique_id()` and `_wp_filter_build_unique_id()`
Follow-up to [760/tests], [38582], [43555], [46801], [50807], [52300], [53804], [53805], [55023].
See #56793.
Built from https://develop.svn.wordpress.org/trunk@55025
git-svn-id: http://core.svn.wordpress.org/trunk@54558 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Update copyright year to 2023 in `license.txt` and bundled themes.
Follow-up to [18201], [23306], [28064], [36855], [36856], [39659], [40241], [42424], [46719], [46720], [47025], [47026], [49915], [52427].
Built from https://develop.svn.wordpress.org/trunk@55024
git-svn-id: http://core.svn.wordpress.org/trunk@54557 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 `$function` parameter to `$callback` in `_test_filter_build_unique_id()`.
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364], [53365], [54927], [54929], [54930], [54931], [54932], [54933], [54938], [54943], [54944], [54945], [54946], [54947], [54948], [54950], [54951], [54952], [54956], [54959], [54960], [54961], [54962], [54964], [54965], [54969], [54970], [54971], [54972], [54996], [55000], [55011], [55013], [55014], [55015], [55016], [55017], [55020], [55021].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #56788.
Built from https://develop.svn.wordpress.org/trunk@55023
git-svn-id: http://core.svn.wordpress.org/trunk@54556 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Adds a `public` visibility to a test where it was not explicitly specified. This continues the previous efforts to make sure visibility is declared on all methods.
Note: This will be enforced by WPCS 3.0.0.
Follow-up to [51919], [52009], [52010], [52338], [54889].
Props jrf.
See #56791.
Built from https://develop.svn.wordpress.org/trunk@55022
git-svn-id: http://core.svn.wordpress.org/trunk@54555 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 `$parent` parameter to `$parent_post_id` in `WP_UnitTest_Factory_For_Attachment::create_upload_object()`.
* Amends the `$parent_post` parameter in `wp_insert_attachment()` and `WP_REST_Revisions_Controller::get_parent()` for consistency.
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364], [53365], [54927], [54929], [54930], [54931], [54932], [54933], [54938], [54943], [54944], [54945], [54946], [54947], [54948], [54950], [54951], [54952], [54956], [54959], [54960], [54961], [54962], [54964], [54965], [54969], [54970], [54971], [54972], [54996], [55000], [55011], [55013], [55014], [55015], [55016], [55017], [55020].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #56788.
Built from https://develop.svn.wordpress.org/trunk@55021
git-svn-id: http://core.svn.wordpress.org/trunk@54554 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 `$function` parameter to `$callback` in `WP_UnitTest_Factory_For_Thing::callback()`.
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364], [53365], [54927], [54929], [54930], [54931], [54932], [54933], [54938], [54943], [54944], [54945], [54946], [54947], [54948], [54950], [54951], [54952], [54956], [54959], [54960], [54961], [54962], [54964], [54965], [54969], [54970], [54971], [54972], [54996], [55000], [55011], [55013], [55014], [55015], [55016], [55017].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #56788.
Built from https://develop.svn.wordpress.org/trunk@55020
git-svn-id: http://core.svn.wordpress.org/trunk@54553 1a063a9b-81f0-0310-95a4-ce76da25c4cd
In various unit test factory classes, some of the `create_object()` and `update_object()` methods returned a `WP_Error` object on failure, while a few others were documented to do so, but did not in practice, instead returning the value `0` or `false`, or not accounting for a failure at all.
This commit aims to handle this in a consistent way by updating the methods to always return the object ID on success and a `WP_Error` object on failure.
Includes:
* Updating and correcting the relevant documentation parts.
* Adding missing documentation and `@since` tags in some classes.
* Renaming some variables to clarify that it is the object ID which is passed around, not the object itself.
Follow-up to [760/tests], [838/tests], [922/tests], [948/tests], [985/tests], [27178], [32659], [34855], [37563], [40968], [44497], [46262].
See #56793.
Built from https://develop.svn.wordpress.org/trunk@55019
git-svn-id: http://core.svn.wordpress.org/trunk@54552 1a063a9b-81f0-0310-95a4-ce76da25c4cd
As of WordPress 4.5, taxonomies should be passed to `get_terms()` via the `taxonomy` argument in the `$args` array:
{{{
$terms = get_terms( array(
'taxonomy' => 'post_tag',
'hide_empty' => false,
) );
}}}
The legacy way of passing a taxonomy via the function's first parameter was still mentioned in the documentation, causing some confusion.
This commit updates the function documentation to better highlight the currently recommended approach.
Follow-up to [36614].
Props ramon-fincken, sabernhardt, SergeyBiryukov.
Fixes#57380.
Built from https://develop.svn.wordpress.org/trunk@55018
git-svn-id: http://core.svn.wordpress.org/trunk@54551 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 `$value` in `WP_Test_Stream::stream_metadata()`.
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364], [53365], [54927], [54929], [54930], [54931], [54932], [54933], [54938], [54943], [54944], [54945], [54946], [54947], [54948], [54950], [54951], [54952], [54956], [54959], [54960], [54961], [54962], [54964], [54965], [54969], [54970], [54971], [54972], [54996], [55000], [55011], [55013], [55014], [55015], [55016].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #56788.
Built from https://develop.svn.wordpress.org/trunk@55017
git-svn-id: http://core.svn.wordpress.org/trunk@54550 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 `$function` parameter to `$function_name` in:
* `WP_UnitTestCase_Base::deprecated_function_run()`
* `WP_UnitTestCase_Base::doing_it_wrong_run()`
* Renames the `$object` parameter to `$actual` in:
* `WP_UnitTestCase_Base::assertEqualFields()`
* `WP_UnitTestCase_Base::assertNonEmptyMultidimensionalArray()`
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364], [53365], [54927], [54929], [54930], [54931], [54932], [54933], [54938], [54943], [54944], [54945], [54946], [54947], [54948], [54950], [54951], [54952], [54956], [54959], [54960], [54961], [54962], [54964], [54965], [54969], [54970], [54971], [54972], [54996], [55000], [55011], [55013], [55014], [55015].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #56788.
Built from https://develop.svn.wordpress.org/trunk@55016
git-svn-id: http://core.svn.wordpress.org/trunk@54549 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 `$global` parameter to `$is_global` in:
* `update_user_option()`
* `delete_user_option()`
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364], [53365], [54927], [54929], [54930], [54931], [54932], [54933], [54938], [54943], [54944], [54945], [54946], [54947], [54948], [54950], [54951], [54952], [54956], [54959], [54960], [54961], [54962], [54964], [54965], [54969], [54970], [54971], [54972], [54996], [55000], [55011], [55013], [55014].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #56788.
Built from https://develop.svn.wordpress.org/trunk@55015
git-svn-id: http://core.svn.wordpress.org/trunk@54548 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 `get_theme_mod()`.
* Renames the `$include` parameter to `$file` in `require_if_theme_supports()`.
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364], [53365], [54927], [54929], [54930], [54931], [54932], [54933], [54938], [54943], [54944], [54945], [54946], [54947], [54948], [54950], [54951], [54952], [54956], [54959], [54960], [54961], [54962], [54964], [54965], [54969], [54970], [54971], [54972], [54996], [55000], [55011], [55013].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #56788.
Built from https://develop.svn.wordpress.org/trunk@55014
git-svn-id: http://core.svn.wordpress.org/trunk@54547 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 `$require_once` parameter to `$load_once` in:
* `locate_template()`
* `load_template()`
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364], [53365], [54927], [54929], [54930], [54931], [54932], [54933], [54938], [54943], [54944], [54945], [54946], [54947], [54948], [54950], [54951], [54952], [54956], [54959], [54960], [54961], [54962], [54964], [54965], [54969], [54970], [54971], [54972], [54996], [55000], [55011].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #56788.
Built from https://develop.svn.wordpress.org/trunk@55013
git-svn-id: http://core.svn.wordpress.org/trunk@54546 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` parameter to `$object_type` in `get_object_taxonomies()`.
* Renames the `$parent` parameter to `$parent_term` in:
* `term_exists()`
* `wp_check_term_hierarchy_for_loops()`
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364], [53365], [54927], [54929], [54930], [54931], [54932], [54933], [54938], [54943], [54944], [54945], [54946], [54947], [54948], [54950], [54951], [54952], [54956], [54959], [54960], [54961], [54962], [54964], [54965], [54969], [54970], [54971], [54972], [54996], [55000].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #56788.
Built from https://develop.svn.wordpress.org/trunk@55011
git-svn-id: http://core.svn.wordpress.org/trunk@54544 1a063a9b-81f0-0310-95a4-ce76da25c4cd
`WP_Textdomain_Registry` was introduced in [53874] and later adjusted in [54682] to store text domains and their language directory paths, addressing issues with just-in-time loading of textdomains when using locale switching and `load_*_textdomain()` functions.
This change improves how the class stores information about all existing MO files on the site, addressing an issue where translations are not loaded after calling `switch_to_locale()`.
Props johnbillion, ocean90, SergeyBiryukov.
Fixes#57116.
Built from https://develop.svn.wordpress.org/trunk@55010
git-svn-id: http://core.svn.wordpress.org/trunk@54543 1a063a9b-81f0-0310-95a4-ce76da25c4cd
When the Requests 2.0.0 [7ef0774f0b/src/Autoload.php (L141-L143) autoloader detects the older (deprecated) `Requests` class], it attempts to load [https://github.com/WordPress/Requests/blob/v2.0.0/library/Requests.php its `/library/Requests.php` file]. Prior to this commit, this file did not exist in Core. Thus, a fatal error happened.
Why not change Requests Autoloader?
Requests is an external dependency that Core consumes. It is also used by other projects outside of Core. Thus, Core needs a fix to guard itself to prevent a fatal error.
The fix:
* Adds the missing `wp-includes/Requests/library/Requests.php` file, which then loads the `wp-includes/class-requests.php` (which will throw a deprecation notice to alert developers to upgrade).
* Adds a test.
Follow-up to [54997].
Props bjorsch, costdev, jrf, mukesh27, peterwilsoncc, ironprogrammer, hellofromTonya.
Fixes#57341.
Built from https://develop.svn.wordpress.org/trunk@55007
git-svn-id: http://core.svn.wordpress.org/trunk@54540 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The test for `wp_nonce_field()` with a custom action name verifies that the nonce value matches the one returned by `wp_create_nonce()` with the same action name.
The created nonce, in turn, depends on `wp_nonce_tick()`, which returns a different result in the first and the second half of the nonce's lifespan, one day by default:
* 00:00:01 to 12:00:00 — First tick
* 12:00:01 to 00:00:00 — Second tick
In practice, due to a delay between initializing data providers and running the actual tests, it is possible for the nonce tick to change in the process, for example if the test suite run starts at 11:59:30, and the affected test runs at 12:00:30, causing a test failure.
This commit reduces the chance of a race condition by moving the `wp_create_nonce()` call from the data provider into the test itself.
Includes wrapping long lines with the expected results for better readability.
Follow-up to [54420].
Props NekoJonez, SergeyBiryukov.
See #56793.
Built from https://develop.svn.wordpress.org/trunk@55006
git-svn-id: http://core.svn.wordpress.org/trunk@54539 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Modify `wp_nav_menu_remove_menu_item_has_children_class()` to account for changes to the `nav_menu_css_class` filter since it's introduction.
The `$args` and `$depth` parameters were added after the filter's introduction so this protects against fatal errors in custom walkers applying the filter in a legacy format.
Without the `$args` or `$depth` parameters, `wp_nav_menu_remove_menu_item_has_children_class()` no longer attempts to remove the `menu-item-has-children` from the lowest level menu items as these are required to determine the current branch the walker is walking.
Follow up to [54999].
Props dd32, azaozz, peterwilsoncc.
See #56926, #28620.
Built from https://develop.svn.wordpress.org/trunk@55005
git-svn-id: http://core.svn.wordpress.org/trunk@54538 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The version reference was initially added to reduce confusion and make it clear that this is new WordPress functionality, with the website itself sending an automated notification of a fatal error, most likely in a plugin or theme.
Almost four years and several major releases later, it no longer adds any helpful information and can be removed.
Follow-up to [44973], [45181], [45268].
Props NekoJonez, jb510, peterwilsoncc, kebbet, mukesh27, mrwweb, johnbillion, SergeyBiryukov.
Fixes#57327. See #54961.
Built from https://develop.svn.wordpress.org/trunk@55001
git-svn-id: http://core.svn.wordpress.org/trunk@54534 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 `$public` parameter to `$is_public` in `WP_Sitemaps::add_robots()`.
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364], [53365], [54927], [54929], [54930], [54931], [54932], [54933], [54938], [54943], [54944], [54945], [54946], [54947], [54948], [54950], [54951], [54952], [54956], [54959], [54960], [54961], [54962], [54964], [54965], [54969], [54970], [54971], [54972], [54996].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #56788.
Built from https://develop.svn.wordpress.org/trunk@55000
git-svn-id: http://core.svn.wordpress.org/trunk@54533 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This modifies how the `menu-item-has-children` class is removed from bottom level menu items. Instead of removing the class within `wp_nav_menu()` a filter is applied to the `nav_menu_css_class` hook to remove the class as required.
Introduces `wp_nav_menu_remove_menu_item_has_children_class()` for removing the class.
Reverts source code changes in [54478,54801], the tests are retained.
Props davidbinda, SergeyBiryukov, mhkuu, JeffPaul, jmdodd, priethor, desrosj, hellofromTonya, azaozz, peterwilsoncc.
Fixes#56926.
See #28620.
Built from https://develop.svn.wordpress.org/trunk@54999
git-svn-id: http://core.svn.wordpress.org/trunk@54532 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Improve performance of `_add_block_template_part_area_info` and `_add_block_template_info` function by passing the `with_supports` parameter to the `WP_Theme_JSON_Resolver::get_theme_data` method. This results in hitting an existing cache and in many less calls to get_option.
Props spacedmonkey, flixos90, SergeyBiryukov, peterwilsoncc, desrosj.
Fixes#57077.
Built from https://develop.svn.wordpress.org/trunk@54998
git-svn-id: http://core.svn.wordpress.org/trunk@54531 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This is a major release and contains breaking changes.
Most important changes to be aware of for this release:
* All code is now namespaced. Though there is a full backward compatibility layer available and the old class names are still supported, using them will generate a deprecation notice (which can be silenced by plugins if they'd need to support multiple WP versions). See the [https://requests.ryanmccue.info/docs/upgrading.html upgrade guide] for more details.
* A lot of classes have been marked `final`. This should generally not affect userland code as care has been taken to not apply the `final` keyword to classes which are known to be extended in userland code.
* Extensive input validation has been added to Requests. When Requests is used as documented though, this will be unnoticable.
* A new `WpOrg\Requests\Requests::has_capabilities()` method has been introduced which can be used to address #37708.
* A new `WpOrg\Requests\Response::decode_body()` method has been introduced which may be usable to simplify some of the WP native wrapper code.
* Remaining PHP 8.0 compatibility fixed (support for named parameters).
* PHP 8.1 compatibility.
Release notes: https://github.com/WordPress/Requests/releases/tag/v2.0.0
For a full list of changes in this update, see the Requests GitHub:
https://github.com/WordPress/Requests/compare/v1.8.1...v2.0.0
This commit also resolves 2 blocking issues which previously caused the revert of [52244]:
* New Requests files are loaded into `wp-includes/Requests/src/`, matching the location of the library. In doing so, filesystems that are case-insensitive are not impacted (see #54582).
* Preload: During a Core update, the old Requests files are preloaded into memory before the update deletes the files. Preloading avoids fatal errors noted in #54562.
Follow-up to [50842], [51078], [52244], [52315], [52327], [52328].
Props jrf, schlessera, datagutten, wojsmol, dustinrue, soulseekah, szepeviktor. costdev, sergeybiryukov, peterwilsoncc, ironprogrammer, antonvlasenko, hellofromTonya, swissspidy, dd32, azaozz, TobiasBg, audrasjb.
Fixes#54504.
See #54582, #54562.
Built from https://develop.svn.wordpress.org/trunk@54997
git-svn-id: http://core.svn.wordpress.org/trunk@54530 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 `$function` parameter to `$callback` in `add_feed()`.
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364], [53365], [54927], [54929], [54930], [54931], [54932], [54933], [54938], [54943], [54944], [54945], [54946], [54947], [54948], [54950], [54951], [54952], [54956], [54959], [54960], [54961], [54962], [54964], [54965], [54969], [54970], [54971], [54972].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #56788.
Built from https://develop.svn.wordpress.org/trunk@54996
git-svn-id: http://core.svn.wordpress.org/trunk@54529 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 `$form_data` in a closure in `WP_REST_Widgets_Controller::get_item_schema()`.
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364], [53365], [54927], [54929], [54930], [54931], [54932], [54933], [54938], [54943], [54944], [54945], [54946], [54947], [54948], [54950], [54951], [54952], [54956], [54959], [54960], [54961], [54962], [54964], [54965], [54969], [54970], [54971].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #56788.
Built from https://develop.svn.wordpress.org/trunk@54972
git-svn-id: http://core.svn.wordpress.org/trunk@54524 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 `$form_data` in a closure in `WP_REST_Widget_Types_Controller::register_routes()`.
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364], [53365], [54927], [54929], [54930], [54931], [54932], [54933], [54938], [54943], [54944], [54945], [54946], [54947], [54948], [54950], [54951], [54952], [54956], [54959], [54960], [54961], [54962], [54964], [54965], [54969], [54970].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #56788.
Built from https://develop.svn.wordpress.org/trunk@54971
git-svn-id: http://core.svn.wordpress.org/trunk@54523 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 `$parent` to `$parent_post` in `WP_REST_Revisions_Controller::get_parent()`.
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364], [53365], [54927], [54929], [54930], [54931], [54932], [54933], [54938], [54943], [54944], [54945], [54946], [54947], [54948], [54950], [54951], [54952], [54956], [54959], [54960], [54961], [54962], [54964], [54965], [54969].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #56788.
Built from https://develop.svn.wordpress.org/trunk@54970
git-svn-id: http://core.svn.wordpress.org/trunk@54522 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 `$object` to `$data_object` in `WP_REST_Controller::update_additional_fields_for_object()`.
* Includes a minor code layout fix for better readability.
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364], [53365], [54927], [54929], [54930], [54931], [54932], [54933], [54938], [54943], [54944], [54945], [54946], [54947], [54948], [54950], [54951], [54952], [54956], [54959], [54960], [54961], [54962], [54964], [54965].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #56788.
Built from https://develop.svn.wordpress.org/trunk@54969
git-svn-id: http://core.svn.wordpress.org/trunk@54521 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Remove wordpress.org as an external dependency testing `WP_HTTP::handle_redirects()`.
This refactors and reenables an existing test to call the `WP_HTTP::handle_redirects()` method directly with a mocked array of HTTP headers containing multiple location headers.
The test is moved from the external-http group to the http test group as it no longer makes an HTTP request.
Follow up to [54955].
Props SergeyBiryukov, dd32, peterwilsoncc.
Fixes#57306.
See #56793.
Built from https://develop.svn.wordpress.org/trunk@54968
git-svn-id: http://core.svn.wordpress.org/trunk@54520 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 `$namespace` parameter to `$route_namespace` in:
* `WP_REST_Server::register_route()`
* `WP_REST_Server::get_routes()`
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364], [53365], [54927], [54929], [54930], [54931], [54932], [54933], [54938], [54943], [54944], [54945], [54946], [54947], [54948], [54950], [54951], [54952], [54956], [54959], [54960], [54961], [54962], [54964].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #56788.
Built from https://develop.svn.wordpress.org/trunk@54965
git-svn-id: http://core.svn.wordpress.org/trunk@54517 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 `$namespace` parameter to `$route_namespace` in `register_rest_route()`.
* Renames the `$function` parameter to `$function_name` in:
* `rest_handle_deprecated_function()`
* `rest_handle_deprecated_argument()`
* `rest_handle_doing_it_wrong()`
* Renames the `$array` parameter to `$input_array` in `rest_validate_array_contains_unique_items()`.
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364], [53365], [54927], [54929], [54930], [54931], [54932], [54933], [54938], [54943], [54944], [54945], [54946], [54947], [54948], [54950], [54951], [54952], [54956], [54959], [54960], [54961], [54962].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #56788.
Built from https://develop.svn.wordpress.org/trunk@54964
git-svn-id: http://core.svn.wordpress.org/trunk@54516 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` and `$default` parameters to `$query_var` and `$default_value` in `get_query_var()`.
* Renames the `$var` parameter to `$query_var` in `set_query_var()`.
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364], [53365], [54927], [54929], [54930], [54931], [54932], [54933], [54938], [54943], [54944], [54945], [54946], [54947], [54948], [54950], [54951], [54952], [54956], [54959], [54960], [54961].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #56788.
Built from https://develop.svn.wordpress.org/trunk@54962
git-svn-id: http://core.svn.wordpress.org/trunk@54514 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` parameter to `$data_object` in `_get_custom_object_labels()`.
* Renames the `$parent` parameter to `$parent_post` in `wp_insert_attachment()`.
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364], [53365], [54927], [54929], [54930], [54931], [54932], [54933], [54938], [54943], [54944], [54945], [54946], [54947], [54948], [54950], [54951], [54952], [54956], [54959], [54960].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #56788.
Built from https://develop.svn.wordpress.org/trunk@54961
git-svn-id: http://core.svn.wordpress.org/trunk@54513 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 `$input_string` in:
* `POMO_Reader::substr()`
* `POMO_Reader::strlen()`
* `POMO_Reader::str_split()`
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364], [53365], [54927], [54929], [54930], [54931], [54932], [54933], [54938], [54943], [54944], [54945], [54946], [54947], [54948], [54950], [54951], [54952], [54956], [54959].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #56788.
Built from https://develop.svn.wordpress.org/trunk@54960
git-svn-id: http://core.svn.wordpress.org/trunk@54512 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 `$input_string` in:
* `PO::poify()`
* `PO::unpoify()`
* `PO::prepend_each_line()`
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364], [53365], [54927], [54929], [54930], [54931], [54932], [54933], [54938], [54943], [54944], [54945], [54946], [54947], [54948], [54950], [54951], [54952], [54956].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #56788.
Built from https://develop.svn.wordpress.org/trunk@54959
git-svn-id: http://core.svn.wordpress.org/trunk@54511 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 `$display` in `the_title()`.
* Renames the `$class` parameter to `$css_class` in:
* `post_class()`
* `get_post_class()`
* `body_class()`
* `get_body_class()`
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364], [53365], [54927], [54929], [54930], [54931], [54932], [54933], [54938], [54943], [54944], [54945], [54946], [54947], [54948], [54950], [54951], [54952].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #56788.
Built from https://develop.svn.wordpress.org/trunk@54956
git-svn-id: http://core.svn.wordpress.org/trunk@54508 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The test verifies that `WP_Http::handle_redirects()` uses the last specified URL as the redirect location if multiple `Location` headers are specified in the response.
It appears that the redirection script on api.wordpress.org no longer sends the expected two `Location` headers, causing the test to fail.
While the exact cause is being investigated and confirmed, this commit disables the affected test for now, so that other commits and PRs are not blocked by these failures.
Follow-up to [342/tests], [874/tests], [1329/tests], [24846].
Props costdev, SergeyBiryukov.
See #57306.
Built from https://develop.svn.wordpress.org/trunk@54955
git-svn-id: http://core.svn.wordpress.org/trunk@54507 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 `$die` parameter to `$stop` in `check_ajax_referer()`.
* Renames the `$default` parameter to `$fallback_url` in `wp_validate_redirect()`.
* Renames the `$default` parameter to `$default_value` in `get_avatar()`.
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364], [53365], [54927], [54929], [54930], [54931], [54932], [54933], [54938], [54943], [54944], [54945], [54946], [54947], [54948], [54950], [54951].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #56788.
Built from https://develop.svn.wordpress.org/trunk@54952
git-svn-id: http://core.svn.wordpress.org/trunk@54504 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 `$readonly` and `$echo` parameters to `$readonly_value` and `$display` in `readonly()`.
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364], [53365], [54927], [54929], [54930], [54931], [54932], [54933], [54938], [54943], [54944], [54945], [54946], [54947], [54948], [54950].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #56788.
Built from https://develop.svn.wordpress.org/trunk@54951
git-svn-id: http://core.svn.wordpress.org/trunk@54503 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 `$data` in:
* `wpdb::_weak_escape()`
* `wpdb::_real_escape()`
* `wpdb::escape_by_ref()`
* Renames the `$string` parameter to `$input_string` in `wpdb::check_ascii()`.
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364], [53365], [54927], [54929], [54930], [54931], [54932], [54933], [54938], [54943], [54944], [54945], [54946], [54947], [54948].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #56788.
Built from https://develop.svn.wordpress.org/trunk@54950
git-svn-id: http://core.svn.wordpress.org/trunk@54502 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:
* `get_option()`
* `get_user_setting()`
* `get_site_option()`
* `get_network_option()`
* `filter_default_option()`
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364], [53365], [54927], [54929], [54930], [54931], [54932], [54933], [54938], [54943], [54944], [54945], [54946], [54947].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #56788.
Built from https://develop.svn.wordpress.org/trunk@54948
git-svn-id: http://core.svn.wordpress.org/trunk@54500 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 `$public` parameter to `$is_public` in `wp_update_blog_public_option_on_site_update()`.
* Amends the `$value` parameter of the `update_blog_public` filter for consistency.
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364], [53365], [54927], [54929], [54930], [54931], [54932], [54933], [54938], [54943], [54944], [54945], [54946].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #56788.
Built from https://develop.svn.wordpress.org/trunk@54947
git-svn-id: http://core.svn.wordpress.org/trunk@54499 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 `$email_or_login` in `get_user_id_from_string()`.
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364], [53365], [54927], [54929], [54930], [54931], [54932], [54933], [54938], [54943], [54944], [54945].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #56788.
Built from https://develop.svn.wordpress.org/trunk@54946
git-svn-id: http://core.svn.wordpress.org/trunk@54498 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 `get_blog_option()`.
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364], [53365], [54927], [54929], [54930], [54931], [54932], [54933], [54938], [54943], [54944].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #56788.
Built from https://develop.svn.wordpress.org/trunk@54945
git-svn-id: http://core.svn.wordpress.org/trunk@54497 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` parameter to `$input_object` in `wp_clone()`.
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364], [53365], [54927], [54929], [54930], [54931], [54932], [54933], [54938], [54943].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #56788.
Built from https://develop.svn.wordpress.org/trunk@54944
git-svn-id: http://core.svn.wordpress.org/trunk@54496 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 `$url` in `user_trailingslashit()`.
* Renames the `$echo` parameter to `$display` in:
* `edit_term_link()`
* `next_posts()`
* `previous_posts()`
* Renames the `$class` parameter to `$css_class` in:
* `edit_post_link()`
* `_navigation_markup()`
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364], [53365], [54927], [54929], [54930], [54931], [54932], [54933], [54938].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #56788.
Built from https://develop.svn.wordpress.org/trunk@54943
git-svn-id: http://core.svn.wordpress.org/trunk@54495 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Follow up from [54423].
Change the `wp_cache_get_multiple` function to call the `getMulti` method in the object cache object, to get cache keys in a single call to memcache. This speeds up test by loading caches faster.
Props spacedmonkey, SergeyBiryukov.
See #54864.
Built from https://develop.svn.wordpress.org/trunk@54942
git-svn-id: http://core.svn.wordpress.org/trunk@54494 1a063a9b-81f0-0310-95a4-ce76da25c4cd
When rendering a list of attachments in `WP_Media_List_Table` class, none image attachments, show a generic icon. However, attachment types like audio and video support adding a featured image. For attachments that have featured images, us this image instead of the icon. This featured image is a better preview than a generic icon.
Props spacedmonkey, samful, johnbillion, JavierCasares, seanchayes, antpb, cadic, JeffPaul.
Fixes#49852.
Built from https://develop.svn.wordpress.org/trunk@54941
git-svn-id: http://core.svn.wordpress.org/trunk@54493 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Unlike other clean cache functions like `clean_post_cache`, `clean_user_cache` did not also clear user meta caches. This is inconsistent and can result in some strange side effects. Update the `clean_user_cache` function to also clear user meta caches when called.
Props dd32, spacedmonkey, peterwilsoncc.
Fixes#54316.
Built from https://develop.svn.wordpress.org/trunk@54940
git-svn-id: http://core.svn.wordpress.org/trunk@54492 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 `before_last_bar()`.
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364], [53365], [54927], [54929], [54930], [54931], [54932], [54933].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #56788.
Built from https://develop.svn.wordpress.org/trunk@54938
git-svn-id: http://core.svn.wordpress.org/trunk@54490 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The Homepage Settings section on the customizer uses `WP_Customize_Manager::has_published_pages()` as `active_callback`. [53057] introduced an error on the logical check when the queried page is not a top-level page, which leads `has_published_pages` to incorrectly return an empty array.
This changeset fixes the issue by adding `'hierarchical' => 0` to `get_pages()` arguments.
Follow-up to [53057].
Props felipelavinz, dlh, costdev.
Fixes#57198.
Built from https://develop.svn.wordpress.org/trunk@54935
git-svn-id: http://core.svn.wordpress.org/trunk@54487 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 `$content` in:
* `wp_kses()`
* `wp_kses_hook()`
* `wp_kses_split()`
* `wp_kses_split2()`
* `wp_kses_bad_protocol()`
* `wp_kses_no_null()`
* `wp_kses_stripslashes()`
* `wp_kses_bad_protocol_once()`
* `wp_kses_normalize_entities()`
* `wp_kses_decode_entities()`
* Renames the `$string` parameter to `$attr` in:
* `wp_kses_one_attr()`
* `wp_kses_html_error()`
* Renames the `$match` parameter to `$matches` in:
* `_wp_kses_split_callback()`
* `_wp_kses_decode_entities_chr()`
* `_wp_kses_decode_entities_chr_hexdec()`
* Renames the `$string` parameter to `$scheme` in `wp_kses_bad_protocol_once2()`.
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364], [53365], [54927], [54929], [54930], [54931], [54932].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #56788.
Built from https://develop.svn.wordpress.org/trunk@54933
git-svn-id: http://core.svn.wordpress.org/trunk@54485 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 `$display` in:
* `wp_loginout()`
* `wp_register()`
* `get_calendar()`
* `the_date()`
* `the_modified_date()`
* `checked()`
* `selected()`
* `disabled()`
* `wp_readonly()`
* `__checked_selected_helper()`
* Renames the `$readonly` parameter to `$readonly_value` in `wp_readonly()`.
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364], [53365], [54927], [54929], [54930], [54931].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #56788.
Built from https://develop.svn.wordpress.org/trunk@54932
git-svn-id: http://core.svn.wordpress.org/trunk@54484 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 `$list` parameter to `$status` in `wp_style_is()`.
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364], [53365], [54927], [54929], [54930].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #56788.
Built from https://develop.svn.wordpress.org/trunk@54931
git-svn-id: http://core.svn.wordpress.org/trunk@54483 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 `$function` parameter to `$function_name` in `_wp_scripts_maybe_doing_it_wrong()`.
* Renames the `$list` parameter to `$status` in `wp_script_is()`.
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364], [53365], [54927], [54929].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #56788.
Built from https://develop.svn.wordpress.org/trunk@54930
git-svn-id: http://core.svn.wordpress.org/trunk@54482 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 `$display` in:
* `wp_nonce_field()`
* `wp_referer_field()`
* `wp_original_referer_field()`
* Renames the `$string` parameter to `$input_string` in
* `_wp_json_convert_string()`
* `_wp_to_kebab_case()`
* Renames the `$list` parameter to `$input_list` in:
* `wp_parse_list()`
* `wp_parse_id_list()`
* `wp_parse_slug_list()`
* `wp_filter_object_list()`
* `wp_list_filter()`
* `wp_list_pluck()`
* `wp_list_sort()`
* Renames the `$array` parameter to `$input_array` in:
* `add_magic_quotes()`
* `wp_array_slice_assoc()`
* `_wp_array_get()`
* `_wp_array_set()`
* Renames the `$function` parameter to `$function_name` in:
* `_deprecated_function()`
* `_deprecated_argument()`
* `_doing_it_wrong()`
* Renames the `$class` parameter to `$class_name` in `_deprecated_constructor()`.
* Renames the `$default` parameter to `$default_value` in `apache_mod_loaded()`.
* Renames the `$var` parameter to `$value` in `wp_validate_boolean()`.
* Amends the `$input` parameter in `wp_parse_str()` for consistency.
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364], [53365], [54927].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #56788.
Built from https://develop.svn.wordpress.org/trunk@54929
git-svn-id: http://core.svn.wordpress.org/trunk@54481 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_specialchars()`
* `wp_specialchars_decode()`
* `wp_check_invalid_utf8()`
* `remove_accents()`
* `_split_str_by_whitespace()`
* `wp_strip_all_tags()`
* Renames the `$string` parameter to `$value` in:
* `backslashit()`
* `trailingslashit()`
* `untrailingslashit()`
* Renames the `$string` parameter to `$subject` in `wp_iso_descrambler()`.
* Renames the `$match` parameter to `$matches` in `_wp_iso_convert()`.
* Renames the `$string` parameter to `$date_string` in:
* `get_gmt_from_date()`
* `get_date_from_gmt()`
* Renames the `$string` parameter to`$input` in `wp_parse_str()`.
* Renames the `$string` parameter to `$content` in `wp_pre_kses_block_attributes()`.
* Amends the `$text` parameter in `wp_pre_kses_less_than()` for consistency.
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364], [53365].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #56788.
Built from https://develop.svn.wordpress.org/trunk@54927
git-svn-id: http://core.svn.wordpress.org/trunk@54479 1a063a9b-81f0-0310-95a4-ce76da25c4cd
As the filter is only intended for a single test, it can be converted to a closure instead of being declared as a function in the global namespace. The `remove_filter()` part is redundant, as `WP_UnitTestCase_Base` saves the state of filter-related globals at `set_up()` and restores them on `tear_down()`.
Follow-up to [54175].
Props jrf, SergeyBiryukov.
See #56791.
Built from https://develop.svn.wordpress.org/trunk@54917
git-svn-id: http://core.svn.wordpress.org/trunk@54469 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Add some minimal e2e test coverage to install and activate the Gutenberg plugin.
This will catch naming collisions between Core and Gutenberg and help avoid crashing WordPress installations that run the stable version of the Gutenberg plugin on top of Core trunk.
Props costdev.
Fixes#57197.
Built from https://develop.svn.wordpress.org/trunk@54913
git-svn-id: http://core.svn.wordpress.org/trunk@54465 1a063a9b-81f0-0310-95a4-ce76da25c4cd