Commit Graph

8444 Commits

Author SHA1 Message Date
Sergey Biryukov
5d2e8afebd Code Modernization: Use the integer portion of an item position in add_submenu_page().
This fixes an `Implicit conversion from float to int loses precision` PHP 8.1 deprecation notice when adding a new admin menu item with a `float` value passed as the `$position` parameter.

This change is covered by existing unit tests and addresses 8 errors when running the test suite on PHP 8.1.

References:
* [https://php.watch/versions/8.1/deprecate-implicit-conversion-incompatible-float-string PHP 8.1: Implicit incompatible float to int conversion is deprecated]
* [https://wiki.php.net/rfc/implicit-float-int-deprecate PHP RFC: Deprecate implicit non-integer-compatible float to int conversions]

Follow-up to [52569], [53104].

Props jrf.
See #55656, #54798.
Built from https://develop.svn.wordpress.org/trunk@53555


git-svn-id: http://core.svn.wordpress.org/trunk@53144 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-22 14:55:11 +00:00
Sergey Biryukov
b8290da037 Docs: Improve documentation for WP_Image_Editor::save() and related functions.
Includes:
* Documenting the returned array using hash notation.
* Adding a `@since` note for the `$filesize` value being included in the returned array.

This affects:
 * `wp_generate_attachment_metadata()`
 * `wp_get_attachment_metadata()`
 * `WP_Image_Editor::save()`
 * `WP_Image_Editor_GD::save()` and `::_save()`
 * `WP_Image_Editor_Imagick::save()` and `::_save()`

Follow-up to [22094], [22619], [52837], [53546].

See #55646.
Built from https://develop.svn.wordpress.org/trunk@53547


git-svn-id: http://core.svn.wordpress.org/trunk@53136 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-21 11:18:17 +00:00
Sergey Biryukov
b352d32d8a Docs: Correct the return type for wp_save_image_file().
Since WordPress 3.5, `wp_save_image_file()` uses `WP_Image_Editor` classes under the hood to save the images.

While the `save()` method in those instances returns `array|WP_Error` and is documented as such, the return type of the `wp_save_image_file()` function was still left as `bool`.

A better solution would be to adjust the function to return the documented boolean type. However, doing that after 20+ major WP releases would be a backward compatibility break, so the documentation is now updated instead.

Includes:
* Documenting the returned array using hash notation.
* Adding a `@since` note for the `$image` parameter expecting a `WP_Image_Editor` instance.
* Adding a `@since` note for the `$filesize` value being included in the returned array.

Follow-up to [22094], [22619], [52837].

Props jrf, SergeyBiryukov.
See #55646.
Built from https://develop.svn.wordpress.org/trunk@53546


git-svn-id: http://core.svn.wordpress.org/trunk@53135 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-21 11:16:17 +00:00
audrasjb
bac638e610 Docs: Use third-person singular verbs for function descriptions in the Taxonomy Administration API.
See #55646.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53105 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-16 23:39:08 +00:00
audrasjb
8ea403e9bb Docs: Use third-person singular verbs for function descriptions in the WP_Screen API.
See #55646.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53103 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-16 23:10:10 +00:00
Sergey Biryukov
cacf46f12b Docs: Add a missing word in pre_months_dropdown_query filter description.
Follow-up to [50163].

See #55646.
Built from https://develop.svn.wordpress.org/trunk@53502


git-svn-id: http://core.svn.wordpress.org/trunk@53091 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-14 15:07:10 +00:00
Sergey Biryukov
3f74637dfe I18N: Use a translatable string for displaying a user's first name and last name.
That allows locales to switch the order of the first name and last name, should they prefer to do so.

The string was previously used in `wp_insert_user()` and is now reused in other places for consistency:

* `WP_MS_Users_List_Table::column_name()`​
* `WP_Users_List_Table::column_name()​`
* `wp_list_authors()`
* `wp_list_users()`

Note: This also removes the `wp_list_author_full_name` filter, introduced for the same purpose in `wp_list_authors()`, as redundant for now.

Follow-up to [53486].

See #17025.
Built from https://develop.svn.wordpress.org/trunk@53501


git-svn-id: http://core.svn.wordpress.org/trunk@53090 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-14 14:43:12 +00:00
audrasjb
bbe60d66c3 Text Changes: Improve consistency of admin error notices.
This changeset replaces `<strong>Error</strong>:` with `<strong>Error:</strong>`, for better consistency.

Props transl8or, mihaidumitrascu, audrasjb.
Fixes #50785.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53047 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-02 15:05:13 +00:00
Sergey Biryukov
01d172b581 General: Replace all esc_url_raw() calls in core with sanitize_url().
This aims to improve performance by calling `sanitize_url()` directly, instead of the `esc_url_raw()` wrapper. As of WordPress 6.1, `sanitize_url()` is the recommended function for sanitizing a URL for database or redirect usage.

Follow-up to [11383], [13096], [51597], [53452].

Props benjgrolleau, peterwilsoncc, SergeyBiryukov.
Fixes #55852.
Built from https://develop.svn.wordpress.org/trunk@53455


git-svn-id: http://core.svn.wordpress.org/trunk@53044 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-01 18:14:10 +00:00
Sergey Biryukov
9a2a423eb6 Quick/Bulk Edit: Check the show_in_quick_edit taxonomy property when processing the data for bulk edited posts.
Previously, setting the `show_in_quick_edit` property to `false` removed the taxonomy from the inline edit form, but several taxonomy-related database queries were still being performed in `bulk_edit_posts()` when building the arguments to pass to `wp_update_post()`, even though terms were not modified.

This commit improves performance by avoiding unnecessary database queries when `show_in_quick_edit` is `false`, and mirrors a similar check in the `get_inline_data()` function.

Follow-up to [13535], [14580], [31307], [52841], [53368].

Props Chouby, sabernhardt, costdev, nalininonstopnewsuk, webcommsat, marybaum, meher, wparslan, SergeyBiryukov.
Fixes #42474.
Built from https://develop.svn.wordpress.org/trunk@53449


git-svn-id: http://core.svn.wordpress.org/trunk@53038 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-27 15:51:12 +00:00
Sergey Biryukov
653a3af0d4 Upgrade/Install: Update $_old_files for 6.0.
Props hellofromTonya, JeffPaul, SergeyBiryukov.
Fixes #55794.
Built from https://develop.svn.wordpress.org/trunk@53439


git-svn-id: http://core.svn.wordpress.org/trunk@53028 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-23 17:02:16 +00:00
Sergey Biryukov
40fc19024f Code Modernization: Replace phpversion() function calls with PHP_VERSION constant.
`phpversion()` return value and `PHP_VERSION` constant value are identical, but the latter is several times faster because it is a direct constant value lookup compared to a function call.

Props ayeshrajans, jrf, mukesh27, costdev, hellofromTonya, SergeyBiryukov.
Fixes #55680.
Built from https://develop.svn.wordpress.org/trunk@53426


git-svn-id: http://core.svn.wordpress.org/trunk@53015 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-20 17:38:14 +00:00
Peter Wilson
ec3b0158d8 Themes: Accept valid block themes.
Updates theme validation to accept block themes. This replaces the requirement for an `index.php` with a requirement for either an `index.php`, `/templates/index.html` or the deprecated `/block-templates/index.html`.

Validation is updated for theme uploads, within `WP_Theme::__construct` and `validate_current_theme()`. 

A block theme using the deprecated file structure is now included in the unit tests.

Props peterwilsoncc, sergeybiryukov, hellofromtonya, costdev, azaozz, gziolo, FlorianBrinkmann, Boniu91, aristath, poena, audrasjb.
Fixes #55754.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53005 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-20 00:49:18 +00:00
Sergey Biryukov
4b46629139 Accessibility: List Tables: Hide the Comments column icon and title attribute from screen readers.
The element already has non-visual text, making the icon and the `title` attribute redundant for assistive technologies.

Follow-up to [22439], [27548], [31513], [32991], [50804].

Props sabernhardt, ryokuhi, afercia, karlgroves, SergeyBiryukov.
Fixes #55555. See #24766.
Built from https://develop.svn.wordpress.org/trunk@53414


git-svn-id: http://core.svn.wordpress.org/trunk@53003 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-19 15:54:15 +00:00
ryelle
e8c02840a7 Administration: Update design of the Dashboard welcome panel.
This updates the panel to match the 6.0 About page styles, with the 6.0 graphic changing color based on the selected admin color scheme.

Props fcoveram, critterverse, joedolson, SergeyBiryukov.
Fixes #55532.


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


git-svn-id: http://core.svn.wordpress.org/trunk@52972 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-10 16:45:08 +00:00
Sergey Biryukov
8c8b0a203a Code Modernization: Rename parameters that use reserved keywords in wp-admin/includes/template.php.
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_page` in `parent_dropdown()`.

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].

Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #55650.
Built from https://develop.svn.wordpress.org/trunk@53364


git-svn-id: http://core.svn.wordpress.org/trunk@52953 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-07 17:16:13 +00:00
Sergey Biryukov
7997df84a8 Site Health: Remove unused variables in WP_Site_Health::get_test_plugin_version().
Follow-up to [44986].

Props david.binda, mukesh27.
Fixes #55683.
Built from https://develop.svn.wordpress.org/trunk@53355


git-svn-id: http://core.svn.wordpress.org/trunk@52944 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-05 16:29:08 +00:00
Peter Wilson
a34abb93b7 Quick/Bulk Edit: Remove duplicate HTML IDs.
Rename `#inline-edit-legend` to avoid duplicate HTML IDs. These have been renamed `#quick-edit-legend` and `#bulk-edit-legend` for the quick and bulk editors respectively.

This HTML ID is not required by the quick editor duplicated via JavaScript so is removed as part of the duplication process.

Follow up to [53096].

Props azaozz, costdev, greglone, hellofromtonya, ironprogrammer, joedolson, sabernhardt.
Fixes #55575.
See #35483.


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


git-svn-id: http://core.svn.wordpress.org/trunk@52941 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-05 03:26:16 +00:00
audrasjb
4de4330b17 General: Add missing strong tag to some error messages.
This changeset adds missing `strong` tag to some error messages and updates some AJAX messages, for better consistency.

Follow-up to [53118].

Props NekoJonez, audrasjb, ocean90.
Fixes #54437.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52926 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-03 14:53:09 +00:00
Sergey Biryukov
056bbc95ea Docs: Improve plugin_install_action_links filter's docs.
Refer developers to `plugins_api()` for array of plugin data.

Follow-up to [53074], [53328].

Props afragen, pbiron.
See #55480.
Built from https://develop.svn.wordpress.org/trunk@53330


git-svn-id: http://core.svn.wordpress.org/trunk@52919 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-02 13:07:14 +00:00
Peter Wilson
0fcdd744c1 Plugins: Improve plugin_install_description filter's docs.
Refer developers to `plugins_api()` for array of plugin data.

Props afragen, pbiron, SergeyBiryukov, costdev.
Fixes #55480.


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


git-svn-id: http://core.svn.wordpress.org/trunk@52917 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-02 02:46:11 +00:00
John Blackbourn
bdaba2407c Docs: Improve documentation of the walker argument for various functions.
See #54729

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


git-svn-id: http://core.svn.wordpress.org/trunk@52907 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-29 19:28:09 +00:00
Peter Wilson
ef8a32f6b9 Media: Validate track number ID3 tags before use.
Validate current and total track ID3 tags as numeric before use.

Props mjkhajeh, SergeyBiryukov, costdev.
Fixes #55204.


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


git-svn-id: http://core.svn.wordpress.org/trunk@52896 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-29 04:50:12 +00:00
Sergey Biryukov
2334cea3e9 Bootstrap/Load: Move some more administration-related hooks to admin-filters.php.
Follow-up to [53266].

Fixes #54795.
Built from https://develop.svn.wordpress.org/trunk@53304


git-svn-id: http://core.svn.wordpress.org/trunk@52893 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-28 16:39:11 +00:00
Mike Schroder
d9266d5bfd Media: Ensure wp_read_image_metadata filter returns array for $iptc and $exif.
Makes the behavior of the filter lines up with its documentation.
Previously, both `$iptc` and `$exif` could return `false` when `exif_read_data()` or `iptcparse()` failed.

Now, if those functions do not return an array, the results are explicitly set to `array()`.

Props volodymyrkolesnykov, SergeyBiryukov, sabernhardt, sumitsingh, mikeschroder.
Fixes #54637.
Built from https://develop.svn.wordpress.org/trunk@53303


git-svn-id: http://core.svn.wordpress.org/trunk@52892 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-28 11:00:10 +00:00
John Blackbourn
c6dbcf8576 Docs: Various docblock corrections and improvements for changes introduced in 6.0.
See #54729

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


git-svn-id: http://core.svn.wordpress.org/trunk@52891 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-28 09:59:13 +00:00
John Blackbourn
6aa053dc01 Docs: Various docblock improvements.
See #54729

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


git-svn-id: http://core.svn.wordpress.org/trunk@52888 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-28 09:46:21 +00:00
Peter Wilson
da0ce4038f Media: Ensure wp_crop_image() returns correct file type.
Return the correct file path from `wp_crop_image()` when a developer modifies the file type with via the `image_editor_output_format` filter.

Previously the function would return a broken file reference containing the original file extension rather than the one specified via the filter.

Props mat-lipe, adamsilverstein.
Fixes #55403.


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


git-svn-id: http://core.svn.wordpress.org/trunk@52881 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-27 05:21:08 +00:00
audrasjb
813c4d604c Bootstrap/load: Move administration related hooks to admin-filters.php.
This change moves some administration related hooks from `default-filters.php` to `admin-filters.php`. It also updates the `default-filters.php` docblock to indicate that contextualized hooks should be located in the most appropriate place.

Props dlh, hellofromTonya, antonvlasenko, audrasjb, azaozz.
Fixes #54795.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52855 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-26 06:32:08 +00:00
Peter Wilson
e9610a5d20 Administration: Trigger a notice for incorrect add_menu_page() parameter.
Trigger a notice (via `_doing_it_wrong()`) for developers incorrectly setting the position when calling `add_menu_page()`.

Modify a similar message in `add_submenu_page()` to combine near identical strings and match the error description to the conditions in which it is called.

Follow up to [52569], [53104].

Fixes #40927.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52853 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-26 02:59:08 +00:00
Sergey Biryukov
91ad9dbb07 Code Modernization: Rename parameters that use reserved keywords in wp-admin/includes/upgrade.php.
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_install()`.

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].

Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #55327.
Built from https://develop.svn.wordpress.org/trunk@53230


git-svn-id: http://core.svn.wordpress.org/trunk@52819 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-20 10:46:09 +00:00
audrasjb
3d7603869b Docs: Misc fixes and improvements in the Administration Media API docblocks, as per documentation standards.
See #54729.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52818 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-20 08:29:08 +00:00
audrasjb
aab2815d58 Media: Remove attachment_fields_to_save filter and deprecate image_attachment_fields_to_save().
This filter prevented removing attachment titles. This changeset removes the filter and deprecates the related function since it is no longer used.

Props dromero20, desrosj, Junaidkbr, francina, antpb, audrasjb, aadilali, etaproducto, azouamauriac, Boniu91, SergeyBiryukov.
Fixes #39108.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52817 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-20 08:13:10 +00:00
Sergey Biryukov
eeb9f68181 Menus: Use correct parameter in _wp_nav_menu_meta_box_object().
Follow-up to [53220].

Props davidbaumwald.
See #55327.
Built from https://develop.svn.wordpress.org/trunk@53222


git-svn-id: http://core.svn.wordpress.org/trunk@52811 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-19 15:59:10 +00:00
Sergey Biryukov
9ce061ae8c Code Modernization: Rename parameters that use reserved keywords in wp-admin/includes/template.php.
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_popular_terms_checklist()`
 * `_post_states()`
 * `_media_states()`
* Renames the `$default` parameter to `$default_term` in `wp_popular_terms_checklist()`.
* Renames the `$default` parameter to `$default_template` in `page_template_dropdown()`.
* Renames the `$default` parameter to `$default_page` in `parent_dropdown()`.
* Renames the `$object` parameter to `$data_object` in:
 * `do_block_editor_incompatible_meta_box()`
 * `do_meta_boxes()`
 * `do_accordion_sections()`
* Amends the `$item_object` parameter in other functions for consistency:
 * `wp_nav_menu_item_post_type_meta_box()`
 * `wp_nav_menu_item_taxonomy_meta_box()`
 * `_wp_nav_menu_meta_box_object()`

Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216].

Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #55327.
Built from https://develop.svn.wordpress.org/trunk@53220


git-svn-id: http://core.svn.wordpress.org/trunk@52809 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-19 15:13:08 +00:00
Sergey Biryukov
05d12bfa4c Code Modernization: Rename parameters that use reserved keywords in wp-admin/includes/taxonomy.php.
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 `$category_parent` in `category_exists()` and `wp_create_category()`. This matches the category object property of the same name.
* Amends similar parameters in `dropdown_categories()` and `wp_dropdown_cats()` 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].

Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #55327.
Built from https://develop.svn.wordpress.org/trunk@53216


git-svn-id: http://core.svn.wordpress.org/trunk@52805 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-19 13:51:08 +00:00
Sergey Biryukov
90cbd98c6b Code Modernization: Rename parameters that use reserved keywords in wp-admin/includes/plugin.php.
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_menu_page()`
 * `add_submenu_page()`
 * `add_management_page()`
 * `add_options_page()`
 * `add_theme_page()`
 * `add_plugins_page()`
 * `add_users_page()`
 * `add_dashboard_page()`
 * `add_posts_page()`
 * `add_media_page()`
 * `add_links_page()`
 * `add_pages_page()`
 * `add_comments_page()`
* Renames the `$echo` parameter to `$display` in `menu_page_url()`.
* Renames the `$parent` parameter to `$parent_page` in `get_admin_page_parent()`.

Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207].

Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #55327.
Built from https://develop.svn.wordpress.org/trunk@53215


git-svn-id: http://core.svn.wordpress.org/trunk@52804 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-19 12:48:08 +00:00
Sergey Biryukov
c4c4edccc0 Code Modernization: Rename parameters that use reserved keywords in wp-admin/includes/nav-menu.php.
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_nav_menu_disabled_check()`.
* Renames the `$object` parameter to `$item_object` in:
 * `wp_nav_menu_item_post_type_meta_box()`
 * `wp_nav_menu_item_taxonomy_meta_box()`
 * `_wp_nav_menu_meta_box_object()`

Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203].

Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #55327.
Built from https://develop.svn.wordpress.org/trunk@53207


git-svn-id: http://core.svn.wordpress.org/trunk@52796 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-18 15:22:08 +00:00
Sergey Biryukov
f53b215bfe Code Modernization: Rename parameters that use reserved keywords in wp-admin/includes/ms.php.
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_message` in `upload_is_user_over_quota()`.

Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198].

Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #55327.
Built from https://develop.svn.wordpress.org/trunk@53203


git-svn-id: http://core.svn.wordpress.org/trunk@52792 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-18 10:33:09 +00:00
Sergey Biryukov
99de4aea45 Docs: Use third-person singular verbs for function descriptions in wp-admin/includes/meta-boxes.php, per the documentation standards.
See #54729.
Built from https://develop.svn.wordpress.org/trunk@53201


git-svn-id: http://core.svn.wordpress.org/trunk@52790 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-17 17:57:09 +00:00
Sergey Biryukov
9043ef83ef Docs: Add missing descriptions for function parameters in wp-admin/includes/meta-boxes.php.
See #54729.
Built from https://develop.svn.wordpress.org/trunk@53200


git-svn-id: http://core.svn.wordpress.org/trunk@52789 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-17 17:47:13 +00:00
Sergey Biryukov
6c36a0867d Coding Standards: Simplify long conditions in xfn_check().
Add some comments for clarity.

Follow-up to [2051], [4990], [53198].

See #54728.
Built from https://develop.svn.wordpress.org/trunk@53199


git-svn-id: http://core.svn.wordpress.org/trunk@52788 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-17 17:26:08 +00:00
Sergey Biryukov
447bd92f5d Code Modernization: Rename parameters that use reserved keywords in wp-admin/includes/meta-boxes.php.
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 `$xfn_relationship` in `xfn_check()`.
* Renames the `$value` parameter to `$xfn_value` for clarity.
* Includes minor code layout changes for better readability.

Reference: [http://gmpg.org/xfn/join XFN: Getting Started].

Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193].

Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #55327.
Built from https://develop.svn.wordpress.org/trunk@53198


git-svn-id: http://core.svn.wordpress.org/trunk@52787 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-17 15:37:09 +00:00
Sergey Biryukov
8a6d7ea5ac Coding Standards: Correct the $items_count variable in add_menu_classes().
Follow-up to [53195].

See #54728.
Built from https://develop.svn.wordpress.org/trunk@53196


git-svn-id: http://core.svn.wordpress.org/trunk@52785 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-17 14:44:07 +00:00
Sergey Biryukov
b32080c332 Coding Standards: Use more descriptive variable names in add_menu_classes().
Follow-up to [9578], [53193], [53194].

See #54728.
Built from https://develop.svn.wordpress.org/trunk@53195


git-svn-id: http://core.svn.wordpress.org/trunk@52784 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-17 14:41:08 +00:00
Sergey Biryukov
a30a1efac4 Docs: Add missing documentation for add_cssclass() and add_menu_classes().
Follow-up to [9578], [53193].

See #54729.
Built from https://develop.svn.wordpress.org/trunk@53194


git-svn-id: http://core.svn.wordpress.org/trunk@52783 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-17 14:30:13 +00:00
Sergey Biryukov
f6b7a1fd7a Code Modernization: Rename parameters that use reserved keywords in wp-admin/includes/menu.php.
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 `$classes` in `add_cssclass()`.
* Renames the `$add` parameter to `$class_to_add` for clarity.
* Includes minor code layout changes for better readability. 

Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192].

Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #55327.
Built from https://develop.svn.wordpress.org/trunk@53193


git-svn-id: http://core.svn.wordpress.org/trunk@52782 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-17 14:10:07 +00:00
Sergey Biryukov
88cce3c705 Code Modernization: Rename parameters that use reserved keywords in wp-admin/includes/media.php.
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 `$return` parameter to `$return_type` in `media_sideload_image()`.

Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185].

Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #55327.
Built from https://develop.svn.wordpress.org/trunk@53192


git-svn-id: http://core.svn.wordpress.org/trunk@52781 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-17 10:51:10 +00:00
Sergey Biryukov
ad5deed830 Code Modernization: Rename parameters that use reserved keywords in wp-admin/includes/list-table.php.
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 `$class_name` in `_get_list_table()`.

Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184].

Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #55327.
Built from https://develop.svn.wordpress.org/trunk@53185


git-svn-id: http://core.svn.wordpress.org/trunk@52774 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-15 10:52:11 +00:00
Sergey Biryukov
e86b90cad6 Code Modernization: Rename parameters that use reserved keywords in wp-admin/includes/deprecated.php.
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` and `$parent` parameters to `$default_category` and `$parent_category` in `dropdown_categories()`.
* Renames the `$default` parameter to `$default_link_category` in `dropdown_link_categories()`.
* Renames the `$parent` parameter to `$parent_cat` and some other parameters for consistency in `wp_dropdown_cats()`.
* Renames the `$function` to `$callback` in `add_object_page()` and `add_utility_page()`.

Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174].

Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #55327.
Built from https://develop.svn.wordpress.org/trunk@53184


git-svn-id: http://core.svn.wordpress.org/trunk@52773 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-14 15:26:09 +00:00
Sergey Biryukov
9a9617ea72 Coding Standards: Rename the $object variable to $attachment in several files.
This brings some consistency with a similar fragment in `Custom_Image_Heade::step_2_manage_upload()`, `WP_Site_Icon::insert_attachment()`, `media_handle_upload()`, and clarifies the type of the data.

Follow-up to [52946], [53137].

See #55327, #54728.
Built from https://develop.svn.wordpress.org/trunk@53183


git-svn-id: http://core.svn.wordpress.org/trunk@52772 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-14 15:15:12 +00:00
audrasjb
80aea1734c Plugins: Avoid translating empty plugin headers.
This change aims to avoid unnecessarily translating empty strings from plugin headers, by removing empty fields from translation process in `_get_plugin_data_markup_translate()`.

Props Chouby, johnbillion, audrasjb.
Fixes #54586.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52770 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-14 13:26:12 +00:00
Sergey Biryukov
c6a5a33e54 Code Modernization: Rename parameters that use reserved keywords in wp-admin/includes/class-wp-terms-list-table.php.
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_term` in `WP_Terms_List_Table::_rows()`.

Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137].

Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #55327.
Built from https://develop.svn.wordpress.org/trunk@53174


git-svn-id: http://core.svn.wordpress.org/trunk@52763 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-13 16:14:10 +00:00
joedolson
1d29cb6632 Media: Enable edits to custom image sizes.
Add a filter `edit_custom_thumbnail_sizes` to allow users to enable editing individual custom image sizes.

Props silb3r, joedolson, costdev.
Fixes #28277.
Built from https://develop.svn.wordpress.org/trunk@53161


git-svn-id: http://core.svn.wordpress.org/trunk@52750 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-12 16:16:08 +00:00
audrasjb
fcb19b1c42 Docs: Misc. docblock fixes in wp-admin/includes/mic.php, as per documentation standards.
See #54729.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52735 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-11 21:48:09 +00:00
audrasjb
476e73194d Users: Improve wording of the "New Admin Email Address" email.
This changeset clarifies the email that the user gets when someone change the administration email address.

Props TwisterMc, Presskopp, audrasjb.
Fixes #45915.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52734 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-11 21:34:08 +00:00
Sergey Biryukov
3180ab2cef Code Modernization: Rename parameters that use reserved keywords in wp-admin/includes/class-wp-site-icon.php.
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` variable to `$attachment` in `WP_Site_Icon::insert_attachment()` and updates the documentation accordingly.

Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117].

Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #55327.
Built from https://develop.svn.wordpress.org/trunk@53137


git-svn-id: http://core.svn.wordpress.org/trunk@52726 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-11 14:21:09 +00:00
audrasjb
e0bb68d7cb Administration: Replace "can not" with "cannot" after [53131].
Follow-up to [53131], [52979].

See #46057, #38913

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


git-svn-id: http://core.svn.wordpress.org/trunk@52721 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-11 11:50:01 +00:00
audrasjb
12fc2d9146 Administration: Remove self-reference ("we") in WordPress Admin.
This changes updates many strings to remove self-references to an undefined "we" collective across the WordPress Administration.

The goal of this change is to better match the guidelines and recommendations set forth in the make/core handbook, specifically:

> the word "we" should be avoided (…) unless its made very clear which group is speaking.

Props johnbillion, shital-patel, audrasjb, marybaum, SergeyBiryukov, peterwilsoncc, johnjamesjacoby, kebbet, costdev, chaion07, davidbaumwald.
Fixes #46057.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52720 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-11 11:42:04 +00:00
Peter Wilson
ce1dd08c07 Administration: Remove term page check from ajax-response.js.
Replace hard coded check for the term creation page in `_enqueues/lib/ajax-response.js` with a check for a notification to display in the AJAX response data.

Follow up to  [52170], [52672].

Props SergeyBiryukov, ryokuhi, johnregan3, sabernhardt, joedolson.
Fixes #55078.
See #54955.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52712 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-11 04:37:00 +00:00
Sergey Biryukov
0c12438eed Code Modernization: Rename parameters that use reserved keywords in wp-admin/includes/class-wp-site-health.php.
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 `$class_name` in `WP_Site_Health::test_php_extension_availability()`.
* Renames some other parameters for consistency.

Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116].

Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #55327.
Built from https://develop.svn.wordpress.org/trunk@53117


git-svn-id: http://core.svn.wordpress.org/trunk@52706 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-10 14:29:04 +00:00
Sergey Biryukov
483a0e38e8 Code Modernization: Rename parameters that use reserved keywords in wp-admin/includes/class-wp-posts-list-table.php.
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 `$css_class` in `WP_Posts_List_Table::get_edit_link()`.
* Renames the `$parent` parameter to `$parent_page` in `WP_Posts_List_Table::_page_rows()`.

Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039].

Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #55327.
Built from https://develop.svn.wordpress.org/trunk@53116


git-svn-id: http://core.svn.wordpress.org/trunk@52705 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-09 20:38:04 +00:00
joedolson
bd9478d512 Quick/Bulk Edit: Fix padding in term quick edit.
Fix missing padding on quick edit for taxonomy terms following accessibility changes in [53096].

Props afercia.
Fixes #35483.
Built from https://develop.svn.wordpress.org/trunk@53109


git-svn-id: http://core.svn.wordpress.org/trunk@52698 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-08 17:05:03 +00:00
Peter Wilson
8c29f283d7 Users: Prevent author changes in bulk editor on large sites.
On large sites (with over 1000 users), include a hidden `post_author` field in the bulk editing interface to preven unexpected authorship changes.

Follow up to [53011], [53049].

Props georgestephanis, tobifjellner, peterwilsoncc, spacedmonkey, jb510.
Fixes #38741.


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


git-svn-id: http://core.svn.wordpress.org/trunk@52694 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-08 06:26:02 +00:00
Peter Wilson
5e885b798f Administration: Allow floats for menu positions.
Permit plugin authors to pass the menu position as a float in `add_menu_page()` and `add_submenu_page()`. This allows for a common practice within major plugins to avoid menu collisions by passing a float.

Follow up to [52569].

Props justinbusa, dd32, welcher, SergeyBiryukov, kirtan95, audrasjb, Cybr, chaion07, costdev, peterwilsoncc.
See #40927.


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


git-svn-id: http://core.svn.wordpress.org/trunk@52693 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-08 06:17:05 +00:00
joedolson
337e4a8d90 Quick/Bulk Edit: Fix initial focus and keyboard operability.
Fix the quick and bulk edit forms to set an appropriate initial focus, use native HTML controls for all interactions, and set appropriate labels for controls. Improve the semantics of HTML wrappers so lists are enumerable by screen readers.

Props afercia, azaozz.
Fixes #35483.
Built from https://develop.svn.wordpress.org/trunk@53096


git-svn-id: http://core.svn.wordpress.org/trunk@52685 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-07 16:44:05 +00:00
Peter Wilson
a334e05915 Editor: Limit display of tags on classic editor.
On the classic editor, limit the search of tags and non-hierarchical taxonomies to twenty results. This in turn prevents an unbounded database query via an AJAX request.

Props pikamander2, costdev, azouamauriac, audrasjb.
Fixes #55052.


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


git-svn-id: http://core.svn.wordpress.org/trunk@52678 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-07 04:06:05 +00:00
Peter Wilson
3d9bb812f1 Taxonomy: Show error message for terms without a name.
Display an error message to users if they attempt to create a term without a name via the admin-ajax `add-tag` action. This improves the accessibility of the screen by avoiding the use of color alone to indicate an error.

Props conner_bw, birgire, afercia.
Fixes #47018.


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


git-svn-id: http://core.svn.wordpress.org/trunk@52677 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-07 03:50:05 +00:00
gziolo
a9008e6cc5 Editor: Make block type aware of the ancestor field
The `ancestor` field was recently added to the `block.json` schema in Gutenberg. See: https://github.com/WordPress/gutenberg/pull/39894.

Props darerodz.
Fixes #55531.


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


git-svn-id: http://core.svn.wordpress.org/trunk@52673 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-06 09:47:09 +00:00
Peter Wilson
d7d9102b06 Networks and Sites: Remove duplicate cache entry.
Remove the `networks_have_paths, site-options` cache entry as it duplicates caching within the `WP_Network_Query` class.

Props uday17035, spacedmonkey, johnbillion, johnjamesjacoby.
Fixes #42070.


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


git-svn-id: http://core.svn.wordpress.org/trunk@52672 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-06 04:35:00 +00:00
Sergey Biryukov
74079f27a9 Plugins: Introduce the plugin_install_description filter.
This allows for modification of the plugin card description on the Add Plugins screen.

Use cases include displaying a list of dependencies for the [https://make.wordpress.org/core/2022/02/24/feature-project-plugin-dependencies/ Plugin Dependencies feature project] ([https://github.com/WordPress/wp-plugin-dependencies GitHub]).

Props afragen, davidbaumwald, peterwilsoncc, SergeyBiryukov.
Fixes #55480.
Built from https://develop.svn.wordpress.org/trunk@53074


git-svn-id: http://core.svn.wordpress.org/trunk@52663 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-05 11:02:01 +00:00
gziolo
1bb507149e Editor: Fix post lock data inconsistencies
Backporting fixes introduced in WordPress/gutenberg#37914.

Props Mamaduka.
Fixes #55238.


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


git-svn-id: http://core.svn.wordpress.org/trunk@52659 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-05 09:21:02 +00:00
audrasjb
2a7f0aabed Docs: Use third-person singular verbs for function descriptions in WP_Automatic_Updater class, per the documentation standards.
See #54729.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52653 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-04 20:53:01 +00:00
audrasjb
267ebcec09 Mail: Replace empty site title with domain name in email subjects.
This change replaces site title with domain name in email subjects when the `blogname` option is empty.

Props Presskopp, kebbet, audrasjb, azouamauriac.
Fixes #54760.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52652 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-04 20:21:00 +00:00
Sergey Biryukov
b8bc65042a Docs: Add missing description for $taxnow global in various functions.
Follow-up to [53060], [53061].

See #54729.
Built from https://develop.svn.wordpress.org/trunk@53062


git-svn-id: http://core.svn.wordpress.org/trunk@52651 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-04 18:43:02 +00:00
Sergey Biryukov
f2e14d4e5f Docs: Add missing description for $typenow global in various functions.
Follow-up to [53060].

See #54729.
Built from https://develop.svn.wordpress.org/trunk@53061


git-svn-id: http://core.svn.wordpress.org/trunk@52650 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-04 18:39:01 +00:00
Sergey Biryukov
9fb5112732 Docs: Add missing description for $pagenow global in various functions.
See #54729, #55499.
Built from https://develop.svn.wordpress.org/trunk@53060


git-svn-id: http://core.svn.wordpress.org/trunk@52649 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-04 18:26:06 +00:00
Sergey Biryukov
8ddb40d7a0 Docs: Use correct format for multi-line comments in the_block_editor_meta_boxes().
Follow-up to [44131], [44260].

See #54729.
Built from https://develop.svn.wordpress.org/trunk@53056


git-svn-id: http://core.svn.wordpress.org/trunk@52645 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-03 11:45:07 +00:00
joedolson
58fd134d63 General: Open change permalink structure links in same tab.
Remove `target="_blank"` from the link to change permalink structures and change link text to clarify link purpose. 

Props kebbet, sabernhardt.
Fixes #55252.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52641 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-01 20:10:09 +00:00
spacedmonkey
1c5733e796 Users: Fix notice error in WP_Posts_List_Table class.
Fix notice error introduced in [53011] as the variable `$authors_dropdown` is now conditionally loaded. 

Follow-up to [53011].

Props Spacedmonkey, dd32, johnbillion. 
See #38741. 


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


git-svn-id: http://core.svn.wordpress.org/trunk@52638 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-01 11:43:05 +00:00
Sergey Biryukov
18fd303a61 Docs: Add missing descriptions for WP_List_Table::get_items_per_page() parameters.
Follow-up to [53039].

Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #54729, #55327.
Built from https://develop.svn.wordpress.org/trunk@53040


git-svn-id: http://core.svn.wordpress.org/trunk@52629 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-03-31 15:25:03 +00:00
Sergey Biryukov
89a210a918 Code Modernization: Rename parameters that use reserved keywords in wp-admin/includes/class-wp-list-table.php.
While using reserved PHP keywords as parameter name labels is allowed, in the context of function calls using named parameters in PHP 8.0+, this will easily lead to confusion. To avoid that, it is recommended not to use reserved keywords as function parameter names.

This commit renames the `$default` parameter to `$default_value` in `WP_List_Table::get_items_per_page()`.

Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029].

Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #55327.
Built from https://develop.svn.wordpress.org/trunk@53039


git-svn-id: http://core.svn.wordpress.org/trunk@52628 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-03-31 15:21:04 +00:00
Sergey Biryukov
f99c38efd5 Code Modernization: Rename parameters that use reserved keywords in wp-admin/includes/class-wp-importer.php.
While using reserved PHP keywords as parameter name labels is allowed, in the context of function calls using named parameters in PHP 8.0+, this will easily lead to confusion. To avoid that, it is recommended not to use reserved keywords as function parameter names.

This commit renames the `$string` parameter to `$text` in `WP_Importer::min_whitespace()`.

Follow-up to [52946], [52996], [52997], [52998], [53003], [53014].

Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #55327.
Built from https://develop.svn.wordpress.org/trunk@53029


git-svn-id: http://core.svn.wordpress.org/trunk@52618 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-03-30 10:45:06 +00:00
joedolson
34e9346967 Media: Preserve attachment properties on cropping custom logo.
Migrate the alternative text, title, description, and caption of an image over to the cropped copy of the image after cropping. Ensure that characteristics added to an image prior to cropping are not lost.

Props flixos90, Clorith, afercia, antonvlasenko, ironprogrammer, hellofromTonya.
Fixes #37750.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52616 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-03-29 21:48:14 +00:00
joedolson
6732d37abf Quick/Bulk Edit: Position action buttons in close proximity.
Move the Submit and Cancel buttons in quick edit forms to be next to each other and change the order of the buttons. Improve accessibility for low vision and cognitive impairments for quick editing. 

Props afercia, marybaum.
Fixes #55364.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52612 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-03-29 19:08:19 +00:00
Sergey Biryukov
1aaf68db85 Code Modernization: Rename parameters that use reserved keywords in wp-admin/includes/class-wp-filesystem-base.php.
While using reserved PHP keywords as parameter name labels is allowed, in the context of function calls using named parameters in PHP 8.0+, this will easily lead to confusion. To avoid that, it is recommended not to use reserved keywords as function parameter names.

This commit renames the `$echo` parameter to `$verbose` in `WP_Filesystem_Base::find_base_dir()` and `::get_base_dir()`, and updates the documentation accordingly. This matches the class property of the same name.

Follow-up to [52946], [52996], [52997], [52998], [53003].

Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #55327.
Built from https://develop.svn.wordpress.org/trunk@53014


git-svn-id: http://core.svn.wordpress.org/trunk@52603 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-03-29 13:21:08 +00:00
spacedmonkey
e2e15f1876 Users: Introduce the concept of a large site to single site installations.
Currently in WordPress multisite there is a concept of large networks. The function `wp_is_large_network` is used to determine if a network has a large number of sites or users. If a network is marked as large, then 
expensive queries to calculate user counts are not run on page load but deferred to scheduled events. However there are a number of places in a single site installation where this functionality would also be useful, as 
expensive calls to count users and roles can make screens in the admin extremely slow.

In this change, the `get_user_count` function and related functionality around it is ported to be available in a single site context. This means that expensive calls to the `count_users` function are replaced with 
calls to `get_user_count`. This change also includes a new function called `wp_is_large_user_count` and a filter of the same name, to mark if a site is large.

Props johnbillion, Spacedmonkey, Mista-Flo, lumpysimon, tharsheblows, obenland, miss_jwo, jrchamp, flixos90, macbookandrew, pento, desrosj, johnjamesjacoby, jb510, davidbaumwald, costdev. 
Fixes #38741.


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


git-svn-id: http://core.svn.wordpress.org/trunk@52600 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-03-29 12:42:13 +00:00
Sergey Biryukov
8761c4cefd Code Modernization: Rename parameters that use reserved keywords in wp-admin/includes/class-wp-debug-data.php.
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 `$mysql_var` in `WP_Debug_Data::get_mysql_var()`.

Additionally, `$type` is renamed to `$data_type` in `WP_Debug_Data::format()` for clarity.

Follow-up to [51522], [52946], [52996], [52997], [52998].

Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #55327.
Built from https://develop.svn.wordpress.org/trunk@53003


git-svn-id: http://core.svn.wordpress.org/trunk@52592 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-03-28 13:24:01 +00:00
audrasjb
c3a76d012d Docs: Use third-person singular verbs for function descriptions in wp-admin/includes/theme.php and wp-admin/includes/theme-install.php, per the documentation standards.
See #54729.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52591 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-03-28 13:17:05 +00:00
audrasjb
1abfa45554 Docs: Use third-person singular verbs for function descriptions in wp-includes/template.php, per the documentation standards.
See #54729.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52588 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-03-28 09:45:06 +00:00
Sergey Biryukov
407a9bebe4 Code Modernization: Rename parameters that use reserved keywords in wp-admin/includes/class-theme-upgrader.php.
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 `$return` variable in `Theme_Upgrader` class methods to `$response` and updates the documentation accordingly.

Follow-up to [47409], [52946], [52996], [52997].

Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #55327.
Built from https://develop.svn.wordpress.org/trunk@52998


git-svn-id: http://core.svn.wordpress.org/trunk@52587 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-03-27 14:55:02 +00:00
Sergey Biryukov
0cde19b503 Code Modernization: Rename parameters that use reserved keywords in wp-admin/includes/class-plugin-upgrader.php.
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 `$return` variable in `Plugin_Upgrader` class methods to `$response` and updates the documentation accordingly.

Follow-up to [47409], [52946], [52996].

Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #55327.
Built from https://develop.svn.wordpress.org/trunk@52997


git-svn-id: http://core.svn.wordpress.org/trunk@52586 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-03-27 14:45:04 +00:00
Sergey Biryukov
6ada28a47b Code Modernization: Rename parameters that use reserved keywords in wp-admin/includes/class-ftp.php.
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 of `ftp_base::glob_pattern_match()` to `$subject`.

Follow-up to [52946].

Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #55327.
Built from https://develop.svn.wordpress.org/trunk@52996


git-svn-id: http://core.svn.wordpress.org/trunk@52585 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-03-26 15:28:08 +00:00
davidbaumwald
fabc5db7fe Upgrade/Install: Fix the docs for the default value of $clear_working in WP_Upgrader::run.
The current docblock for `WP_Upgrader::run` indicates the default value for the `clear_working` key of the `$options` argument is `false`.  However, in the code directly below, the default is shown to be `true.  This change updates the docblock to correct the default.

This commit also reorders the `$defaults` to match the order they appear in the docblock.

Props paulkevan.
Fixes #55450.
Built from https://develop.svn.wordpress.org/trunk@52986


git-svn-id: http://core.svn.wordpress.org/trunk@52575 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-03-23 18:04:05 +00:00
audrasjb
108af2ee64 Administration: Rephrase some sentences after [52978].
Follow-up to [52978], [52979].

Props SergeyBiryukov.
Fixes #38913.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52569 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-03-22 21:07:01 +00:00
audrasjb
6f39380c34 Administration: Replace contracted verb forms for better consistency.
This changeset replaces contracted verb forms like `doesn't`, `can't`, or `isn't` with non-contracted forms like `does not`, `cannot`, or `is not`, for better consistency across the WordPress administration. It also updates some corresponding unit tests strings.

Follow-up to [52978].

See #38913.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52568 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-03-22 19:59:04 +00:00
audrasjb
223cda987f Administration: Replace contracted verb forms for better consistency.
This changeset replaces contracted verb forms like `doesn't`, `can't`, or `isn't` with non-contracted forms like `does not`, `cannot`, or `is not`, for better consistency across the WordPress administration. It also updates some corresponding unit tests strings.

Props Presskopp, socalchristina, aandrewdixon, francina, SergeyBiryukov, JeffPaul, audrasjb, hellofromTonya.
Fixes #38913.
See #39176.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52567 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-03-22 16:25:03 +00:00
Sergey Biryukov
799d6d616c Coding Standards: Escape the comment post URL in _wp_dashboard_recent_comments_row().
Follow-up to [6705].

Props kebbet.
See #54728.
Built from https://develop.svn.wordpress.org/trunk@52967


git-svn-id: http://core.svn.wordpress.org/trunk@52556 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-03-20 17:39:01 +00:00
Sergey Biryukov
8cdec43675 Coding Standards: Use esc_url() instead of esc_attr() for some URLs.
Follow-up to [2063], [2182], [4656], [6952], [9098], [11109], [11204], [17887], [22505], 

Props kebbet.
See #54728.
Built from https://develop.svn.wordpress.org/trunk@52957


git-svn-id: http://core.svn.wordpress.org/trunk@52546 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-03-19 20:31:12 +00:00
davidbaumwald
df3dae33cc Administration: Add a media_date_column_time filter to the media list table date column.
Similar to the existing `post_date_column_time` filter in the posts list table, this change adds a new hook to filter the "Date" column output in the media list view.

Props ivanlutrov, lopo, audrasjb.
Fixes #42942.
Built from https://develop.svn.wordpress.org/trunk@52950


git-svn-id: http://core.svn.wordpress.org/trunk@52539 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-03-18 16:39:02 +00:00
audrasjb
775ae0b5f6 Themes: Add version to theme screenshot URL in WP_Themes_List_Table.
Follow-up to [52947].

See #53370.


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


git-svn-id: http://core.svn.wordpress.org/trunk@52537 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-03-18 12:44:04 +00:00
audrasjb
a32545f854 Themes: Add version to theme screenshot URL for better browser cache handling.
This change appends the theme version number to the URL of screenshots that appear in various place of the WordPress Admin. As a result, browsers will be able to refresh the screenshot as needed when the theme is updated.

Props codente, desrosj, audrasjb, SergeyBiryukov.
Fixes #53370.


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


git-svn-id: http://core.svn.wordpress.org/trunk@52536 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-03-17 22:21:07 +00:00
Sergey Biryukov
d6589948ca Code Modernization: Rename parameters that use reserved keywords in wp-admin/includes/class-custom-image-header.php.
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` variable in `Custom_Image_Header` class methods to `$attachment` for clarity and consistency, as the variable type is actually an array, and updates the documentation accordingly.

Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #55327.
Built from https://develop.svn.wordpress.org/trunk@52946


git-svn-id: http://core.svn.wordpress.org/trunk@52535 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-03-17 20:19:10 +00:00
Sergey Biryukov
0e95737d10 Plugins: Move the introduction text from install_dashboard() to display_plugins_table().
This brings some consistency to how the introduction is displayed for the Beta Testing, Featured, and Recommended tabs of the Add Plugins screen.

This commit also reorders the `switch` cases for the text in the same order as they are displayed.

Follow-up to [9141], [30889], [36297].

Props sabbir1991, kapilpaul.
Fixes #55389.
Built from https://develop.svn.wordpress.org/trunk@52936


git-svn-id: http://core.svn.wordpress.org/trunk@52525 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-03-15 15:58:02 +00:00
Sergey Biryukov
3d5b1eac13 Docs: Further clarify the description for install_dashboard().
Follow-up to [52931].

See #54729.
Built from https://develop.svn.wordpress.org/trunk@52934


git-svn-id: http://core.svn.wordpress.org/trunk@52523 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-03-14 18:14:00 +00:00
hellofromTonya
316aa2544f Media: Relocate wp_filesize() function for use in frontend and backend.
A new function `wp_filesize()` was added with [52837]. The function lived in the `wp-admin/includes/file.php` file. However, this admin specific function is not loaded into memory when hitting `media/edit` endpoint. The result was a `500` Internal Server Error. Why? The function is invoked with that endpoint, but the function does not exist in memory.

This commit relocates the new function to the `wp-includes/functions.php` file. In doing so, the function is available for both the frontend and backend.

Follow-up to [52837].

Props talldanwp, spacedmonkey, costdev, antonvlasenko.
Fixes #55367.
Built from https://develop.svn.wordpress.org/trunk@52932


git-svn-id: http://core.svn.wordpress.org/trunk@52521 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-03-14 16:32:06 +00:00
audrasjb
d1fe2eec5c Docs: Miscellaneous fixes in wp-admin/includes/plugin-install.php and wp-admin/includes/plugin.php.
See #54729.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52520 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-03-13 21:56:01 +00:00
audrasjb
30a77d5fa4 i18n: Define List item separator as a WP_Locale property.
The list item separator is a locale property, and it doesn't make much sense to translate it separately in multiple projects. This changeset implements the following modifications:

- Define list item separator as a new WP_Locale property
- Add `wp_get_list_item_separator()` as a wrapper for `WP_Locale::get_list_item_separator`
- Replace `$wp_locale->get_list_item_separator()` calls with `wp_get_list_item_separator()`
- Added a compatibility layer for bundled themes

Props SergeyBiryukov, swissspidy, rsiddharth, johnbillion, audrasjb.
Fixes #39733.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52518 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-03-13 20:03:01 +00:00
davidbaumwald
8cda35ebd3 Privacy: Fix "Retry" action after a personal data export failure.
When exporting personal data for a user request, if the export fails for any reason, a "Retry" link is displayed inline.  However, up to this point, clicking this link performed no action.  This change adds the `export-personal-data-handle` CSS class to the link to make sure it's picked up by the same delegated listener as the initial action.  Clicking this link will now retry the export.

Props hellofromTonya, nomnom99, rafiahmedd, SergeyBiryukov, hasanuzzamanshamim.
Fixes #53032.
Built from https://develop.svn.wordpress.org/trunk@52846


git-svn-id: http://core.svn.wordpress.org/trunk@52435 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-03-10 19:22:01 +00:00
davidbaumwald
658f4e9367 Media: Add a "Copy URL to clipboard" function to the list table view.
Previously, a button was added to the modal view for a single media item in the "grid" view to copy the file URL to the user's clipboard.  This change adds a similar function to the "list" view for each media item.

Follow-up to [48232].

Props pbiron, ravipatel, alexstine, afercia.
Fixes #54426.
Built from https://develop.svn.wordpress.org/trunk@52842


git-svn-id: http://core.svn.wordpress.org/trunk@52431 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-03-10 18:24:03 +00:00
Sergey Biryukov
c771c6a79d Quick/Bulk Edit: Check the show_in_quick_edit taxonomy property when populating the data for the posts list table.
Previously, setting the `show_in_quick_edit` property to `false` removed the taxonomy from the inline edit form, but the terms were still being populated in the data for each table row via the `get_inline_data()` function, which only checked the `$taxonomy->show_ui` property.

This commit:
* Improves performance by ensuring that taxonomy terms are not unnecessarily populated for each table row when `show_in_quick_edit` is `false`.
* Properly populates the taxonomy terms when `show_in_quick_edit` is `true` and `show_ui` is `false`.

Follow-up to [31307].

Props jazbek, figureone, sabernhardt, ovidiul, webcommsat, SergeyBiryukov.
Fixes #42916, #49701.
Built from https://develop.svn.wordpress.org/trunk@52841


git-svn-id: http://core.svn.wordpress.org/trunk@52430 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-03-10 18:22:01 +00:00
davidbaumwald
12134c3435 Coding Standards: Fix minor alignment issue in wp_ajax_install_theme().
Follow-up to [52819].

See #54728.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52429 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-03-10 17:32:03 +00:00
spacedmonkey
bbf017e550 Media: Store attachment’s file size in metadata.
Store the file size of all newly uploaded attachments, as part of the metadata stored in post meta. Storing file size means, developers will not have to resort to doing `filesize` function calls, that can be time consuming on assets on offloaded to services like Amazon’s S3. 

This change also introduces a new helper function called, `wp_filesize`. This is a wrapper around the `filesize` php function, that adds some helpful filters and ensures the return value is an integer.

Props Cybr, Spacedmonkey, SergeyBiryukov, johnwatkins0, swissspidy, desrosj, joemcgill, azaozz, antpb, adamsilverstein, uday17035. 
Fixes #49412. 


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


git-svn-id: http://core.svn.wordpress.org/trunk@52426 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-03-10 13:10:02 +00:00
Peter Wilson
8db01b9c6b Themes: Hide block themes' live preview link following installation.
Prevent the Customizer/Live Preview button from showing for installed block themes when on the theme installation page.

Props antonvlasenko, costdev, ironprogrammer.
Fixes #54878.


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


git-svn-id: http://core.svn.wordpress.org/trunk@52408 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-03-04 02:39:03 +00:00
Sergey Biryukov
01d22d18e6 Filesystem API: Include the ssh-ed25519 public key signature algorithm as an alternative to ssh-rsa.
The `ssh-rsa` signature algorithm is disabled by default as of OpenSSH 8.8, which breaks SSH2 uploads in WordPress on modern systems. `ssh-ed25519` is one of the suggested alternatives, supported since OpenSSH 6.5.

References:
* [https://www.openssh.com/txt/release-8.2 OpenSSH 8.2 release notes]
* [https://www.openssh.com/txt/release-8.7 OpenSSH 8.7 release notes]
* [https://www.openssh.com/txt/release-8.8 OpenSSH 8.8 release notes]

Follow-up to [8865].

Props richybkreckel, dd32.
Fixes #52409.
Built from https://develop.svn.wordpress.org/trunk@52807


git-svn-id: http://core.svn.wordpress.org/trunk@52396 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-02-27 15:02:04 +00:00
audrasjb
e89229886b Themes: Remove the Live Preview link when installing a block theme from a zip archive.
This changeset removes the Live Preview link for block-based themes when installing for a zip archive, since the customizer is disabled by default for block themes.

Follow-up to [52353].

Props alanjacobmathew, hellofromTonya, antonvlasenko, ironprogrammer.
Fixes #54578.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52391 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-02-26 08:16:02 +00:00
Clorith
c3ff2a1cc6 Filesystem API: Use a temp folder for Content-Disposition files.
#38231 added support for files fetched remotely to have their filename defined by the host using the `Content-Disposition` header. This would then take priority over the existing temporary file name created with `wp_tempnam()` earlier in the process.

The change unintentionally omitted the temporary directory path used during uploads, since the `wp_tempnam()` function would have added it previously, so that files with this header ended up being stored in the WordPress root folder, or wp-admin folder, when triggered by WP_Cron or user interactions respectively.

This change makes sure the file path includes the temporary directory location when the header is used.

Follow-up to [51939].

Props antonynz, azouamauriac.
Fixes #55109.
Built from https://develop.svn.wordpress.org/trunk@52734


git-svn-id: http://core.svn.wordpress.org/trunk@52323 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-02-15 17:49:00 +00:00
Sergey Biryukov
fc26a05498 Coding Standards: Rename some variables in iis7_add_rewrite_rule() for consistency.
Follow-up to [52721].

Props azouamauriac.
See #54728.
Built from https://develop.svn.wordpress.org/trunk@52732


git-svn-id: http://core.svn.wordpress.org/trunk@52321 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-02-15 13:49:04 +00:00
Sergey Biryukov
556d42ac71 Coding Standards: Fix WPCS issues in wp-admin/includes/misc.php.
* Use strict comparison in various conditions.
* Fix a `Variable "$system_webServer_node" is not in valid snake_case format` WPCS warning.

Includes minor code layout fixes for better readability.

Follow-up to [10607], [11350], [22253], [26137].

Props azouamauriac, SergeyBiryukov.
See #54728.
Built from https://develop.svn.wordpress.org/trunk@52721


git-svn-id: http://core.svn.wordpress.org/trunk@52310 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-02-13 17:09:05 +00:00
Peter Wilson
69e9e78cf4 Upgrade: Add follow up ticket ID to upgrade_590() comment.
Follow up to [52656].

Props audrasjb.
See #54906.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52251 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-02-02 23:22:06 +00:00
Sergey Biryukov
fefd1930c5 General: Remove inaccurate reference to the link_updated field from the wp_insert_link() DocBlock.
The `link_updated` field is unused as of WordPress 3.0 and was never updated via `wp_insert_link()`, only via the `wp-admin/update-links.php` file removed in [13744].

Follow-up to [13744], [49487].

Props dshanske, dharm1025, SergeyBiryukov.
Fixes #54880.
Built from https://develop.svn.wordpress.org/trunk@52659


git-svn-id: http://core.svn.wordpress.org/trunk@52248 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-02-01 12:30:02 +00:00
Peter Wilson
1ee362004f Upgrade: Prevent warnings upgrading cron array.
An unvisited site may have an undefined cron array, resulting in `_get_cron_array()` returning the value `false`. Previously this would trigger warning in `upgrade_590()` as the function assumed `_get_cron_array()` would alway return an array.

No database version change is required as the upgrade routine was successful on sites with a cron array during 5.9.0. On sites without a cron array, the error has already been thrown if they are running db version 51917. This fix is only required for new sites or those upgrading that have skipped 5.9.0.

Follow up to [51917].

Props chrisvanpatten, kapilpaul, SergeyBiryukov.
Fixes #54906.
See #53940.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52245 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-02-01 00:14:06 +00:00
audrasjb
b3d3adaa2b Docs: Fix incorrect type in translations_api and translations_api_result docblocks.
Before this changeset, `translation_api` and `translation_api_result` filters were incorrectly marked as taking object as their first argument. The correct type is an array as `json_decode()` is asked to return an associative array.

Props volodymyrkolesnykov.
Fixes #54959.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52234 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-27 21:15:03 +00:00
Sergey Biryukov
2eaeae58ff Docs: Update spelling for inline comments in a few files.
Per the [https://make.wordpress.org/core/handbook/best-practices/spelling/ spelling] and [https://make.wordpress.org/docs/style-guide/language-grammar/word-choice/ word choice] documentation guidelines, American (US) spelling should be preferred.

Props mohadeseghasemi, subrataemfluence, rehanali, SergeyBiryukov.
Fixes #46837.
Built from https://develop.svn.wordpress.org/trunk@52640


git-svn-id: http://core.svn.wordpress.org/trunk@52229 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-25 13:55:05 +00:00
davidbaumwald
fe7d62fe13 Upgrade/Install: Update $_old_files for 5.9.
Props SergeyBiryukov, davidbaumwald.
Fixes #54894.
Built from https://develop.svn.wordpress.org/trunk@52637


git-svn-id: http://core.svn.wordpress.org/trunk@52225 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-24 18:24:02 +00:00
Sergey Biryukov
997f8b9921 Coding Standards: Use a more appropriate variable name in link_advanced_meta_box().
Follow-up to [45667].

Props mkox, SergeyBiryukov.
Fixes #54856.
Built from https://develop.svn.wordpress.org/trunk@52620


git-svn-id: http://core.svn.wordpress.org/trunk@52208 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-23 09:03:05 +00:00
audrasjb
99bac7e17c Docs: Replace "Current theme" with "Active theme" in various DocBlocks.
This change replaces "Current theme" with "Active theme" in various DocBlocks for better consistency with user-facing strings.

Follow-up to [52580].

Props Presskopp, audrasjb, costdev.
Fixes #54831.
See #54770.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52198 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-20 23:53:05 +00:00
audrasjb
d4306e8d8a Administration: Properly handle HTML entities in the News & Events dashboard widget.
This change adds support for various HTML entities in the News & Events dashboard widget.

Props nickciske, kpegoraro, iandunn, shedonist, sayedulsayem, sabernhardt, audrasjb, SergeyBiryukov, ocean90.
Fixes #41208.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52196 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-20 09:19:07 +00:00
Sergey Biryukov
ab263f93e5 Upgrade/Install: Check if the disk_free_space() function exists before calling it.
In PHP 8+, `@` no longer suppresses fatal errors:
> The `@` operator will no longer silence fatal errors (`E_ERROR`, `E_CORE_ERROR`, `E_COMPILE_ERROR`, `E_USER_ERROR`, `E_RECOVERABLE_ERROR`, `E_PARSE`).

Reference: [https://www.php.net/manual/en/migration80.incompatible.php PHP 8: Backward Incompatible Changes].

`disk_free_space()` may be disabled by hosts, which will throw a fatal error on a call to undefined function.

This change prevents the fatal error, and falls back to `false` when `disk_free_space()` is unavailable.

Follow-up to [25540], [25774], [25776], [25831], [25869].

Props costdev, jrf, swb1192, SergeyBiryukov.
Fixes #54826. See #54730.
Built from https://develop.svn.wordpress.org/trunk@52585


git-svn-id: http://core.svn.wordpress.org/trunk@52175 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-17 11:41:03 +00:00
Sergey Biryukov
c6829b3afc Coding Standards: Rename the $val variable to $site for clarity in WP_MS_Users_List_Table::column_blogs().
Follow-up to [12603], [13918], [16607], [32757], [52583].

See #54728.
Built from https://develop.svn.wordpress.org/trunk@52584


git-svn-id: http://core.svn.wordpress.org/trunk@52174 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-16 08:40:00 +00:00
Sergey Biryukov
81a1fc33cb Coding Standards: Use strict comparison in wp-admin/includes/class-wp-ms-users-list-table.php.
Follow-up to [16607], [32630], [32757], [47219].

See #54728.
Built from https://develop.svn.wordpress.org/trunk@52583


git-svn-id: http://core.svn.wordpress.org/trunk@52173 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-16 08:16:04 +00:00
Sergey Biryukov
0bc24dd81f Coding Standards: Use strict comparison in wp-admin/includes/class-wp-users-list-table.php.
This mirrors a similar check a few lines below and includes minor code layout fixes for better readability.

Follow-up to [9955], [13931], [14176], [15315], [45407], [50129].

See #54728.
Built from https://develop.svn.wordpress.org/trunk@52581


git-svn-id: http://core.svn.wordpress.org/trunk@52171 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-15 20:49:06 +00:00
audrasjb
e05557e222 Administration: Replace "Current theme" with "Active theme" in user facing strings.
This change replaces "Current theme" with "Active theme" in user-facing strings. It brings better consistency across the Administration.

Props Presskopp, audrasjb, costdev.
Fixes #54770.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52170 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-15 08:44:03 +00:00
audrasjb
d73a6bcc64 Upgrade/Install: Typo correction in a Core_Upgrader class inline comment.
Follow-up to [45046].

Props kebbet.
Fixes #54821.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52166 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-14 15:14:00 +00:00
audrasjb
b14d7a8149 Administration: Fix an erroneous translators comment after changeset [52569].
This change also fixes the indentation of the translators comment.

Fixes #54798.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52161 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-12 23:45:01 +00:00
audrasjb
725e1d02af Administration: Ensure an integer is used for menu priority in add_menu_page().
This change adds a verification of the `$position` parameter in `add_menu_page()` to ensure an integer is used. If not, the function informs developers of the wrong parameter type via a `_doing_it_wrong` message. This brings consistency with a similar check used in `add_submenu_page()`.

This change also typecasts any floating number to string to ensure that in case a float value was passed, at least it doesn't override existing menus.

Follow-up to [46570].

Props kirtan95.
Fixes #54798. See #48249.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52159 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-12 23:25:08 +00:00
davidbaumwald
aeb5d2ef17 Upgrade/Install: Fix parameter count in error call when an automatic core upgrade fails.
During automatic core upgrades, if installation results in a `WP_Error`, the `error` method is called on the skin with the details.  However, in this case, two parameters are passed to `$skin->error`, but only one is accepted.  This change passes only the running `WP_Error` instance as the sole parameter to `$skin->error`.

Also, this change adds an additional error to `$upgrade_result` before finally being passed to `$skin->error`, indicating that the installation failed.  This adds additional context to the failure.

Props desrosj, sainthkh, devutpol, SergeyBiryukov.
Fixes #53284.
Built from https://develop.svn.wordpress.org/trunk@52539


git-svn-id: http://core.svn.wordpress.org/trunk@52129 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-07 17:55:01 +00:00
desrosj
638ef7815e Upgrade/Install: Avoid using unserialize() unnecessarily.
Props vortfu, xknown, dd32.
Built from https://develop.svn.wordpress.org/trunk@52456


git-svn-id: http://core.svn.wordpress.org/trunk@52048 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-06 17:07:03 +00:00
Sergey Biryukov
c9cf90786c Upgrade/Install: Make first comment URLs translatable.
This allows translators to localize the `https://wordpress.org/` and `https://gravatar.com/` URLs in the first comment on a new installation.

Follow-up to [2409], [37888], [37921].

Props kebbet, desrosj.
Fixes #54535.
Built from https://develop.svn.wordpress.org/trunk@52451


git-svn-id: http://core.svn.wordpress.org/trunk@52043 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-05 21:07:00 +00:00
ryelle
6868a257c1 Administration: Refresh the Dashboard Welcome panel.
With its last major update in 3.5, the welcome panel was feeling stale. This bright new design showcases links to recent features, including patterns, the site editor, and styles, depending on whether you have a block theme active.

Props jameskoster, desrosj, noisysocks, critterverse, karmatosed, hellofromtonya, smit08, melchoyce, poena, audrasjb, webcommsat, marybaum.
See #54489.


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


git-svn-id: http://core.svn.wordpress.org/trunk@52034 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-04 19:13:02 +00:00
audrasjb
c8050da1d3 Users: Use the "Posts" post type general name to contextualize the string used in Users posts count column label.
Since some locales may differentiate "Posts" generic post type name (works for both posts, pages, and custom post types) and "Posts" when speaking about blogposts, this change aims to contextualize the use of the "Posts" string in the "Users" admin screen. This change reuses the string used for the "Posts" post type registration, to avoid introducing any new string to translate.

Props audrasjb, jdy68, SergeyBiryukov.
Fixes #54712.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52018 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-31 15:30:01 +00:00
Sergey Biryukov
3ec2d2fcfa Build/Test Tools: Update PHPCompatibilityWP to version 2.1.3.
The latest release takes the new polyfills added in WordPress 5.9 into account.

This commit also removes redundant inline ignore comments for WP-polyfilled functionality. The PHPCompatibilityWP ruleset explicitly excludes those polyfills, so they don't need to be annotated as ignored.

Release notes:
https://github.com/PHPCompatibility/PHPCompatibilityWP/releases/tag/2.1.3

For a full list of changes in this update, see the PHPCompatibilityWP GitHub:
https://github.com/PHPCompatibility/PHPCompatibilityWP/compare/2.1.2...2.1.3

Follow-up to [46290], [51543].

Props jrf.
Fixes #54711.
Built from https://develop.svn.wordpress.org/trunk@52425


git-svn-id: http://core.svn.wordpress.org/trunk@52017 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-31 13:55:03 +00:00
John Blackbourn
678f2ceb0d Docs: Miscellaneous inline documentation improvements.
See #53399

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


git-svn-id: http://core.svn.wordpress.org/trunk@52014 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-29 17:28:00 +00:00
Sergey Biryukov
05a3e19924 Plugins: Escape the WordPress.org plugin page URL in the Plugin Installation modal.
Follow-up to [8540], [38953].

Props chintan1896, Presskopp, dimadin, henry.wright, aezazshekh, SergeyBiryukov.
Fixes #54362.
Built from https://develop.svn.wordpress.org/trunk@52419


git-svn-id: http://core.svn.wordpress.org/trunk@52011 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-27 16:06:02 +00:00
hellofromTonya
673ab8a677 Administration: Add "File" to Theme/Plugin Editor menu names and relocate "Plugin File Editor" to Tools for block themes.
[52232] relocated the Theme Editor menu item from Appearance to Tools for block themes. This commit relocates the Plugin  Editor menu item from Plugins to Tools for block themes for a consistent workflow.

Both the Theme Editor and Plugin Editor menu items are renamed to "Theme File Editor" and "Plugin File Editor" respectively. Why? To better identify their purpose, i.e. to directly edit the code in the theme or plugin files. The rename is not limited to only block themes. 

Follow-up to [52232].

Props poena, annezazu, audrasjb, clorith, courane01, costdev, dryanpress, desrosj, hellofromTonya, ipstenu, jameskoster, joen, johnbillion, joyously, manfcarlo, marybaum, pbiron, SergeyBiryukov, walbo, youknowriad.
Fixes #54382.
Built from https://develop.svn.wordpress.org/trunk@52406


git-svn-id: http://core.svn.wordpress.org/trunk@51998 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-21 20:06:02 +00:00
hellofromTonya
edf755823b Customize: Overlay incompatible banner for block themes.
Starting in 5.9, block themes are not compatible with (do not support) Customizer; rather, they use the Site Editor. Viewing installed themes in Customizer, this commit adds an overlay message to alert users and give them a way to activate the block theme. Clicking on the "Activate" button activates the block theme and redirects back to the Appearance > Themes interface, where the user can then enter the Site Editor for customization.

Non-block themes are not affected by this change and continue to work in Customizer.

Follow-up to [41648], [41893], [52279].

Props antonvlasenko, costdev, hellofromTonya, jffng, joyously, noisysocks, poena, shaunandrews.
Fixes #54549.
Built from https://develop.svn.wordpress.org/trunk@52371


git-svn-id: http://core.svn.wordpress.org/trunk@51963 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-14 15:33:01 +00:00
Sergey Biryukov
d09d194f12 Docs: Capitalize "ID", when referring to a widget ID or sidebar ID, in a more consistent way.
Follow-up to [48104], [52357], [52361].

See #53399.
Built from https://develop.svn.wordpress.org/trunk@52362


git-svn-id: http://core.svn.wordpress.org/trunk@51954 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-13 10:21:07 +00:00
audrasjb
f4683efbc9 Docs: Document the global used in upgrade_590() function.
Follow-up to [51917].

See #53399.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51952 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-12 17:57:00 +00:00
Sergey Biryukov
6cb050d878 Docs: Capitalize "ID", when referring to a post ID, term ID, etc. in a more consistent way.
Follow-up to [48104].

See #53399.
Built from https://develop.svn.wordpress.org/trunk@52357


git-svn-id: http://core.svn.wordpress.org/trunk@51949 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-12 14:54:00 +00:00
Sergey Biryukov
3beb1d25ab Docs: Correct the format of some comments per the documentation standards.
Follow-up to [10357], [10939], [43309], [51003], [51266], [51653], [51738], [52110].

See #53399.
Built from https://develop.svn.wordpress.org/trunk@52352


git-svn-id: http://core.svn.wordpress.org/trunk@51944 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-10 20:30:05 +00:00