Commit Graph

19874 Commits

Author SHA1 Message Date
desrosj
ae378d5095 Build/Test Tools: Update npm dependencies.
This updates the following npm dependencies to their latest versions:

- `chalk` from `5.1.0` to `5.2.0`.
- `dotenv-expand` from `9.0.0` to `10.0.0`.
- `grunt-contrib-qunit` from `6.2.0` to `6.2.1`.
- `prettier` from `2.0.5` to `2.6.2`.
- `qunit` from `2.19.1` to `2.19.4`.
- `sass` from `1.55.0` to `1.58.0`.
- `sinon` from `14.0.1` to `15.0.1`.
- `sinon-test` from `3.1.4` to `3.1.5`.
- `source-map-loader` from `4.0.0` to `4.0.1`.
- `uglify-js` from `3.17.3` to `3.17.4`.
- `wait-on` from `6.0.1` to `7.0.1`.
- `webpack` from `5.74.0` to `5.75.0`.

Additionally, `npm audit fix` has been run to further update packages that may contain vulnerabilities.

Props naeemhaque, mukesh27, desrosj.
See #57535.
Built from https://develop.svn.wordpress.org/trunk@55191


git-svn-id: http://core.svn.wordpress.org/trunk@54724 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-02 16:36:32 +00:00
Sergey Biryukov
12aba159d9 Coding Standards: Rename the $cat_ID variable to $cat_id in wp_update_category().
This resolves a few WPCS warnings:
{{{
Variable "$cat_ID" is not in valid snake_case format, try "$cat_i_d"
}}}

Follow-up to [2695], [4490], [52958].

Props hilayt24, viralsampat, desrosj, robinwpdeveloper, tanazmasaba, costdev, SergeyBiryukov.
See #56754.
Built from https://develop.svn.wordpress.org/trunk@55190


git-svn-id: http://core.svn.wordpress.org/trunk@54723 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-02 13:59:18 +00:00
audrasjb
7e3b08c8af Themes: Increase HTTP timeout for Theme API requests.
This changeset modifies the HTTP request in `themes_api()` to use the same HTTP request timeout as in `plugins_api()`, which is 15 seconds, instead of a default value of 5 seconds.

Props ahortin, peterwilsoncc, dd32, costdev.
Fixes #57315.

Built from https://develop.svn.wordpress.org/trunk@55188


git-svn-id: http://core.svn.wordpress.org/trunk@54721 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-02 09:14:17 +00:00
joedolson
01236f5948 Media: Fix inconsistent font weight in media detail views.
Make font weight consistent between different screens and different parts of media views.
 
Props szaqal21, sabernhardt.
Fixes #54509.
Built from https://develop.svn.wordpress.org/trunk@55187


git-svn-id: http://core.svn.wordpress.org/trunk@54720 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-02 02:16:12 +00:00
joedolson
379bec8ea6 Media: Ensure media IDs are type int in bulk editing.
Cast all array values to integers using `array_map` so functions like `wp_delete_attachment` receiving the expected variable type.
 
Props eherman24, joedolson.
Fixes #56170.
Built from https://develop.svn.wordpress.org/trunk@55183


git-svn-id: http://core.svn.wordpress.org/trunk@54716 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-01 22:17:15 +00:00
joedolson
237cb1da8f Media: Remove meta data after restoring w/IMAGE_EDIT_OVERWRITE.
When IMAGE_EDIT_OVERWRITE is defined as true the meta field `_wp_attachment_backup_sizes` is deleted after an image is restored.
 
Props mitogh, jeawhanlee, robinwpdeveloper, iapial.
Fixes #55150.
Built from https://develop.svn.wordpress.org/trunk@55180


git-svn-id: http://core.svn.wordpress.org/trunk@54713 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-01 20:31:14 +00:00
joedolson
7334d79f5c Media: Fix upload not visible if added after deleting media.
Unset GET parameters in the media library so they don't suppress error notifications and messages. Fix an issue where uploading an image after being redirected from deleting media did not show the new upload in the gallery.
 
Props rnitinb, Mista-Flo, desrosj, zebaafiashama, joedolson, antpb.
Fixes #49178.
Built from https://develop.svn.wordpress.org/trunk@55178


git-svn-id: http://core.svn.wordpress.org/trunk@54711 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-01 19:47:12 +00:00
Pascal Birchler
5edb22187d I18N: Introduce switch_to_user_locale().
This new function makes it easier to switch to a specific user’s locale by reducing duplicate code and storing the user’s ID as additional context for plugins to consume. Existing usage of `switch_to_locale()` in core has been replaced with `switch_to_user_locale()` where appropriate.

Also, this change ensures `WP_Locale_Switcher` properly filters `determine_locale` so that anyyone using the `determine_locale()` function will get the correct locale information when switching is in effect.

Props costdev.
Fixes #57123.
See #26511.
Built from https://develop.svn.wordpress.org/trunk@55161


git-svn-id: http://core.svn.wordpress.org/trunk@54694 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-01-30 10:27:16 +00:00
audrasjb
9c04271f60 Media: Deprecate unused method WP_Media_List_Table::column_desc().
This changeset formally deprecates the `column_desc()` method from `WP_Media_List_Table`, as it was never used anywhere in core.

Props iandunn, JeffMatson, antpb, costdev, audrasjb.
Fixes #39710.

Built from https://develop.svn.wordpress.org/trunk@55159


git-svn-id: http://core.svn.wordpress.org/trunk@54692 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-01-28 22:17:16 +00:00
joedolson
ac0cb7a37b Media: Add download link to media modal and attachment details.
Make it easier for users to download their uploaded media by providing a download link on the attachment details screen and in the media modal.

Props countrymusicchicago, joedolson, amin7
Fixes #41474.
Built from https://develop.svn.wordpress.org/trunk@55156


git-svn-id: http://core.svn.wordpress.org/trunk@54689 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-01-27 23:07:13 +00:00
desrosj
d4085bc90d Build/Test Tools: Update PostCSS to version 8.
This updates PostCSS related dependencies for the main Core build process to versions that use the latest major version of PostCSS, 8.x.

There were no changes to any versioned CSS files as a result of this update directly. However, two occurrences of `-o-tab-size` have been removed due to the version of `caniuse-lite` used being updated in the process.

See #57554, #57555.
Built from https://develop.svn.wordpress.org/trunk@55150


git-svn-id: http://core.svn.wordpress.org/trunk@54683 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-01-27 15:56:28 +00:00
Sergey Biryukov
a61dc175a8 Themes: Add "Style Variations" to the list of WordPress theme features.
Follow-up to [meta12372].

Props poena, mukesh27, costdev.
Fixes #56869. See #meta6545.
Built from https://develop.svn.wordpress.org/trunk@55149


git-svn-id: http://core.svn.wordpress.org/trunk@54682 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-01-27 15:54:19 +00:00
Sergey Biryukov
89706afd21 Coding Standards: Bring some consistency to the order of attributes in password fields.
Follow-up to [11359], [13592], [13696], [33023], [33246], [33353], [41556], [46256], [49248], [53111], [55094].

See #56791.
Built from https://develop.svn.wordpress.org/trunk@55145


git-svn-id: http://core.svn.wordpress.org/trunk@54678 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-01-26 18:12:11 +00:00
desrosj
adbfbb6bfb Build/Test Tools: Revert [55137].
This changeset resulted in some unexpected JavaScript validation failures.

See #57555.
Built from https://develop.svn.wordpress.org/trunk@55139


git-svn-id: http://core.svn.wordpress.org/trunk@54672 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-01-25 20:22:12 +00:00
desrosj
9fe4e0b6f4 Build/Test Tools: Update caniuse-lite to the latest version.
This updates the `caniuse-lite` database from `1.0.30001407` to `1.0.30001448` and applies the resulting changes to generated WP Admin CSS.

This removes two occurrences of `-o-tab-size`, which was required for partial support of the `tab-size` property in Opera Mini. Usage has dropped below 1%, hence this vendor prefix being removed.

See #57555.
Built from https://develop.svn.wordpress.org/trunk@55137


git-svn-id: http://core.svn.wordpress.org/trunk@54670 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-01-25 19:15:15 +00:00
audrasjb
a0b0f4560b Menus: Add missing escaping function in Admin Menu walker.
Props aniketpatel, mukesh27, costdev.
Fixes #57541.

Built from https://develop.svn.wordpress.org/trunk@55135


git-svn-id: http://core.svn.wordpress.org/trunk@54668 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-01-24 21:32:14 +00:00
audrasjb
524bd7ba46 Posts, Post Types: Increase the input field's width in the Slug metabox.
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
2023-01-22 11:11:12 +00:00
Sergey Biryukov
4568b1fb32 Docs: Further clarify the wp_ajax_save_attachment filter parameters description.
Follow-up to [55106].

See #23148.
Built from https://develop.svn.wordpress.org/trunk@55111


git-svn-id: http://core.svn.wordpress.org/trunk@54644 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-01-21 15:58:10 +00:00
audrasjb
89f144ea9e Upgrade/Install: Disable spellcheck for password field on Setup screen.
This changeset adds `spellcheck="false"` attribute to Database Password field on the Database Setup screen.

Follow-up to [55094], [55095], [55096].

See #56763.

Built from https://develop.svn.wordpress.org/trunk@55110


git-svn-id: http://core.svn.wordpress.org/trunk@54643 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-01-21 09:07:15 +00:00
audrasjb
c58a08d9df Menus: Hide the "Remove selected item" from Menus screen when no item is selected.
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
2023-01-20 22:06:13 +00:00
audrasjb
73f6748ea4 Quick/Bulk Edit: Add an action hook on bulk_edit_posts().
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
2023-01-20 21:43:11 +00:00
joedolson
c0b3839620 Plugins: Add visible focus on plugin modal close button.
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
2023-01-20 21:28:14 +00:00
audrasjb
fe3e932421 Media: Add an action hook on wp_ajax_save_attachment().
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
2023-01-20 14:17:16 +00:00
audrasjb
26d9268e3c Permalinks: Remove floating on Permalinks settings screen.
This changeset replaces floating elements with `flex` CSS positioning, while the markup stays the same to keep the elements' semantic value.

Follow-up to [53706].

Props sabernhardt, kebbet, audrasjb.
Fixes #56673.
See #55498.

Built from https://develop.svn.wordpress.org/trunk@55103


git-svn-id: http://core.svn.wordpress.org/trunk@54636 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-01-19 22:57:14 +00:00
Pascal Birchler
58545bacce I18N: Allow installing new translations when changing the user locale on the profile page.
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
2023-01-19 14:13:13 +00:00
audrasjb
f92b90116a Application Passwords: Disable spellcheck for password field.
This changeset adds `spellcheck="false"` attribute to application password field.

Follow-up to [55094], [55095].

Props Spaceshipone.
Fixes #56763.

Built from https://develop.svn.wordpress.org/trunk@55096


git-svn-id: http://core.svn.wordpress.org/trunk@54629 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-01-19 11:48:12 +00:00
audrasjb
0f28fc7aed Login and Registration: Disable spellcheck for password fields.
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
2023-01-19 08:53:13 +00:00
joedolson
8c310381f2 Media: Prevent hidden overflow on uploaded image names.
Allow the image upload notification to expand height and display the full image name when uploaded. Primarily effects mobile devices, where the available space for image names is narrow.

Props sumitsingh.
Fixes #54812.
Built from https://develop.svn.wordpress.org/trunk@55091


git-svn-id: http://core.svn.wordpress.org/trunk@54624 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-01-18 18:51:11 +00:00
hellofromTonya
8ddb28368a Themes: Introduce wp_theme_has_theme_json() for public consumption.
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
2023-01-18 11:40:10 +00:00
audrasjb
5bda5f22dc Administration: Use a consistent capitalization in Privacy Policy related strings.
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
2023-01-17 21:34:12 +00:00
Sergey Biryukov
2c0a6fefae Upgrade/Install: Revert a temporary conditional for testing the Rollbacks feature project.
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
2023-01-12 00:19:12 +00:00
audrasjb
c5409cd17b General: revert [55045].
This changeset reverts [55045] to maintain backward compatibility for developers using the function in their SCSS.

Follow-up to [55045].

Unprops audrasjb.
Props peterwilsoncc, kebbet.
See #56811.

Built from https://develop.svn.wordpress.org/trunk@55048


git-svn-id: http://core.svn.wordpress.org/trunk@54581 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-01-11 09:17:21 +00:00
audrasjb
668b8c55b3 General: Align spelling with American English.
This changeset renames `url-friendly-colour` to `url-friendly-color` in `_admin.scss`.

Follow-up to [54663], [54664], [55043], [55044].

Props kebbet.
See #56811.

Built from https://develop.svn.wordpress.org/trunk@55045


git-svn-id: http://core.svn.wordpress.org/trunk@54578 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-01-10 11:06:21 +00:00
audrasjb
b6760ea0ce Docs: Align spelling with American English.
This changeset updates the use of "-ise" suffix to American English "-ize" and replaces "behaviour" with "behavior" in various docblocks.

Follow-up to [54663], [54664], [55043].

Props kebbet.
See #56811, #56792.

Built from https://develop.svn.wordpress.org/trunk@55044


git-svn-id: http://core.svn.wordpress.org/trunk@54577 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-01-10 09:30:13 +00:00
audrasjb
2058cdd91f Help/About: Improve comments keyboard shortcuts HelpHub links.
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
2023-01-10 09:01:13 +00:00
audrasjb
e7765cb5e2 Pings/Trackbacks: Remove a mention of the "Page" post type from the Discussion meta box.
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
2023-01-09 21:32:16 +00:00
audrasjb
1e82763d99 Networks and Sites: Mark required fields as such in New User Form.
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
2023-01-02 22:50:15 +00:00
audrasjb
9c1d82dd17 Docs: Update docs for image_sideload_extensions filter to include webp in the list of allowed extensions.
Follow-up to [50810].

Props dimadin.
Fixes #57346.
See #56792.

Built from https://develop.svn.wordpress.org/trunk@55002


git-svn-id: http://core.svn.wordpress.org/trunk@54535 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-12-17 23:07:16 +00:00
hellofromTonya
645e753a51 External Libraries: Update Requests library to version 2.0.0.
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
2022-12-15 21:32:17 +00:00
Andrew Ozz
599201eca7 Menus: Reset menu_item_parent to 0 when the parent is set to the item itself.
Props: peterwilsoncc, SergeyBiryukov, azaozz.
Fixes #57169.
Built from https://develop.svn.wordpress.org/trunk@54973


git-svn-id: http://core.svn.wordpress.org/trunk@54525 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-12-14 22:54:14 +00:00
John Blackbourn
0d5910247a Options, Meta APIs: Correct the documented return type for get_settings_errors().
This function returns an array of settings errors arrays.

Props mcaskill, costdev

Fixes #57323

Built from https://develop.svn.wordpress.org/trunk@54963


git-svn-id: http://core.svn.wordpress.org/trunk@54515 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-12-13 16:39:11 +00:00
Sergey Biryukov
2043081e9e Docs: Add missing type for $_wp_theme_features in WP_Debug_Data::debug_data().
Includes moving the global declaration to the top of the method for consistency.

Follow-up to [44986], [54953].

See #57069, #56792.
Built from https://develop.svn.wordpress.org/trunk@54954


git-svn-id: http://core.svn.wordpress.org/trunk@54506 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-12-09 12:25:14 +00:00
audrasjb
01102b3d6e Docs: Improve various globals documentation, as per documentation standards.
Props upadalavipul.
See #57069, #56792.

Built from https://develop.svn.wordpress.org/trunk@54953


git-svn-id: http://core.svn.wordpress.org/trunk@54505 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-12-09 11:54:13 +00:00
spacedmonkey
a5ed225499 Media: Use featured image if available for attachment as preview instead of icon.
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
2022-12-06 19:24:19 +00:00
spacedmonkey
03fc3cde8e Revisions: Use update_post_author_caches in wp_prepare_revisions_for_js function.
The `update_post_author_caches` function was added in [53482]. Replace call to `cache_users` function with `update_post_author_caches`, for consistency and code quality.  

Props benjgrolleau, spacedmonkey.
Fixes #56978.
Built from https://develop.svn.wordpress.org/trunk@54939


git-svn-id: http://core.svn.wordpress.org/trunk@54491 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-12-06 13:42:13 +00:00
Andrew Ozz
867203db05 Quick edit: Fix cases where the author field is empty when the user no longer has edit capabilities.
Props: OllieJones, sabernhardt, iamjaydip, costdev.
Fixes: #56819.
Built from https://develop.svn.wordpress.org/trunk@54936


git-svn-id: http://core.svn.wordpress.org/trunk@54488 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-12-06 02:30:15 +00:00
audrasjb
73bd837100 Options, Meta APIs: Improve error messages in Options Management Administration Screen.
Props NekoJonez, costdev.
Fixes #57230.

Built from https://develop.svn.wordpress.org/trunk@54926


git-svn-id: http://core.svn.wordpress.org/trunk@54478 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-12-01 22:20:12 +00:00
audrasjb
4b5996cd13 Plugins: Correctly display spaces in installed plugins search results.
This changeset improves searched terms URL decoding in installed plugins search results.

Follow-up to [53844].

Props 254volkan, dilipbheda, audrasjb, adhun, syamraj24.
Fixes #57174.

Built from https://develop.svn.wordpress.org/trunk@54904


git-svn-id: http://core.svn.wordpress.org/trunk@54456 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-29 23:46:11 +00:00
audrasjb
96134499ff Coding Standards: Use consistent markup for line break tags on update-core.php.
This changeset replaces <br/> with <br /> on various places, as per WordPress Coding Standards.
See https://developer.wordpress.org/coding-standards/wordpress-coding-standards/html/#self-closing-elements

Follow-up to [54062].

Props rajanpanchal2028, alberuni-azad, sabernhardt.
Fixes #57226.
See #56791.

Built from https://develop.svn.wordpress.org/trunk@54897


git-svn-id: http://core.svn.wordpress.org/trunk@54449 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-29 21:30:11 +00:00
Sergey Biryukov
653c410859 Coding Standards: Fix spacing for incrementors and decrementors in various files.
Note: This will be enforced by WPCS 3.0.0.

Props jrf.
See #56791.
Built from https://develop.svn.wordpress.org/trunk@54896


git-svn-id: http://core.svn.wordpress.org/trunk@54448 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-29 21:13:16 +00:00