Commit Graph

34075 Commits

Author SHA1 Message Date
Sergey Biryukov
2aac26becd Code Modernization: Rename parameters that use reserved keywords in wp-includes/load.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` parameter to `$input_object` in `wp_clone()`.

Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364], [53365], [54927], [54929], [54930], [54931], [54932], [54933], [54938], [54943].

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


git-svn-id: http://core.svn.wordpress.org/trunk@54496 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-12-06 21:33:17 +00:00
Sergey Biryukov
f296748b5b Code Modernization: Rename parameters that use reserved keywords in wp-includes/link-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 `$string` parameter to `$url` in `user_trailingslashit()`.
* Renames the `$echo` parameter to `$display` in:
 * `edit_term_link()`
 * `next_posts()`
 * `previous_posts()`
* Renames the `$class` parameter to `$css_class` in:
 * `edit_post_link()`
 * `_navigation_markup()`

Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364], [53365], [54927], [54929], [54930], [54931], [54932], [54933], [54938].

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


git-svn-id: http://core.svn.wordpress.org/trunk@54495 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-12-06 21:18:15 +00:00
spacedmonkey
3bcfbde4b4 Tests: Change the wp_cache_get_multiple function to get cache keys in a single request.
Follow up from [54423].

Change the `wp_cache_get_multiple` function to call the `getMulti` method in the object cache object, to get cache keys in a single call to memcache. This speeds up test by loading caches faster. 

Props spacedmonkey, SergeyBiryukov.
See #54864.
Built from https://develop.svn.wordpress.org/trunk@54942


git-svn-id: http://core.svn.wordpress.org/trunk@54494 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-12-06 20:01:11 +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
aec68c417e Users: Clear the user_meta cache when clean_user_cache function is called.
Unlike other clean cache functions like `clean_post_cache`, `clean_user_cache` did not also clear user meta caches. This is inconsistent and can result in some strange side effects. Update the `clean_user_cache` function to also clear user meta caches when called. 

Props dd32, spacedmonkey, peterwilsoncc.
Fixes #54316.
Built from https://develop.svn.wordpress.org/trunk@54940


git-svn-id: http://core.svn.wordpress.org/trunk@54492 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-12-06 13:54:15 +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
Sergey Biryukov
a6da3647c8 Code Modernization: Rename parameters that use reserved keywords in wp-includes/l10n.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 `before_last_bar()`.

Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364], [53365], [54927], [54929], [54930], [54931], [54932], [54933].

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


git-svn-id: http://core.svn.wordpress.org/trunk@54490 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-12-06 13:03:18 +00:00
Sergey Biryukov
e6f755adec External Libraries: Upgrade PHPMailer to version 6.7.
This is a bug fix release which also contains some PHP 8.1 related improvements.

References:
* [https://github.com/PHPMailer/PHPMailer/releases/tag/v6.7 PHPMailer 6.7 release notes]
* [https://github.com/PHPMailer/PHPMailer/compare/v6.6.5...v6.7 Full list of changes in PHPMailer 6.7]

Follow-up to [50628], [50799], [51169], [51634], [51635], [52252], [52749], [52811], [53500], [53535], [53917], [54427].

Props jrf, Synchro.
Fixes #57281.
Built from https://develop.svn.wordpress.org/trunk@54937


git-svn-id: http://core.svn.wordpress.org/trunk@54489 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-12-06 12:19:15 +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
0164f0a85f Customize: Fix a wrong condition on WP_Customize_Manager::has_published_pages().
The Homepage Settings section on the customizer uses `WP_Customize_Manager::has_published_pages()` as `active_callback`. [53057] introduced an error on the logical check when the queried page is not a top-level page, which leads `has_published_pages` to incorrectly return an empty array.

This changeset fixes the issue by adding `'hierarchical' => 0` to `get_pages()` arguments.

Follow-up to [53057].

Props felipelavinz, dlh, costdev.
Fixes #57198.


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


git-svn-id: http://core.svn.wordpress.org/trunk@54487 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-12-05 21:31:11 +00:00
audrasjb
b218a71d1c Security: Remove useless span tags from SECURITY.md.
Props TobiasBg, peterwilsoncc.
Fixes #57243.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54486 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-12-05 21:25:16 +00:00
Sergey Biryukov
613091bce5 Code Modernization: Rename parameters that use reserved keywords in wp-includes/kses.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 `$content` in:
 * `wp_kses()`
 * `wp_kses_hook()`
 * `wp_kses_split()`
 * `wp_kses_split2()`
 * `wp_kses_bad_protocol()`
 * `wp_kses_no_null()`
 * `wp_kses_stripslashes()`
 * `wp_kses_bad_protocol_once()`
 * `wp_kses_normalize_entities()`
 * `wp_kses_decode_entities()`
* Renames the `$string` parameter to `$attr` in:
 * `wp_kses_one_attr()`
 * `wp_kses_html_error()`
* Renames the `$match` parameter to `$matches` in:
 * `_wp_kses_split_callback()`
 * `_wp_kses_decode_entities_chr()`
 * `_wp_kses_decode_entities_chr_hexdec()`
* Renames the `$string` parameter to `$scheme` in `wp_kses_bad_protocol_once2()`.

Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364], [53365], [54927], [54929], [54930], [54931], [54932].

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


git-svn-id: http://core.svn.wordpress.org/trunk@54485 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-12-05 13:57:16 +00:00
Sergey Biryukov
19382aa5e4 Code Modernization: Rename parameters that use reserved keywords in wp-includes/general-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_loginout()`
 * `wp_register()`
 * `get_calendar()`
 * `the_date()`
 * `the_modified_date()`
 * `checked()`
 * `selected()`
 * `disabled()`
 * `wp_readonly()`
 * `__checked_selected_helper()`
* Renames the `$readonly` parameter to `$readonly_value` in `wp_readonly()`.

Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364], [53365], [54927], [54929], [54930], [54931].

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


git-svn-id: http://core.svn.wordpress.org/trunk@54484 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-12-04 13:22:12 +00:00
Sergey Biryukov
25c78a1b2a Code Modernization: Rename parameters that use reserved keywords in wp-includes/functions.wp-styles.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 `$list` parameter to `$status` in `wp_style_is()`.

Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364], [53365], [54927], [54929], [54930].

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


git-svn-id: http://core.svn.wordpress.org/trunk@54483 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-12-04 12:48:11 +00:00
Sergey Biryukov
2e6eb58946 Code Modernization: Rename parameters that use reserved keywords in wp-includes/functions.wp-scripts.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 `$function_name` in `_wp_scripts_maybe_doing_it_wrong()`.
* Renames the `$list` parameter to `$status` in `wp_script_is()`.

Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364], [53365], [54927], [54929].

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


git-svn-id: http://core.svn.wordpress.org/trunk@54482 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-12-04 12:46:16 +00:00
Sergey Biryukov
a460de4e58 Code Modernization: Rename parameters that use reserved keywords in wp-includes/functions.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_nonce_field()`
 * `wp_referer_field()`
 * `wp_original_referer_field()`
* Renames the `$string` parameter to `$input_string` in
 * `_wp_json_convert_string()`
 * `_wp_to_kebab_case()`
* Renames the `$list` parameter to `$input_list` in:
 * `wp_parse_list()`
 * `wp_parse_id_list()`
 * `wp_parse_slug_list()`
 * `wp_filter_object_list()`
 * `wp_list_filter()`
 * `wp_list_pluck()`
 * `wp_list_sort()`
* Renames the `$array` parameter to `$input_array` in:
 * `add_magic_quotes()`
 * `wp_array_slice_assoc()`
 * `_wp_array_get()`
 * `_wp_array_set()`
* Renames the `$function` parameter to `$function_name` in:
 * `_deprecated_function()`
 * `_deprecated_argument()`
 * `_doing_it_wrong()`
* Renames the `$class` parameter to `$class_name` in `_deprecated_constructor()`.
* Renames the `$default` parameter to `$default_value` in `apache_mod_loaded()`.
* Renames the `$var` parameter to `$value` in `wp_validate_boolean()`.
* Amends the `$input` parameter in `wp_parse_str()` for consistency.

Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364], [53365], [54927].

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


git-svn-id: http://core.svn.wordpress.org/trunk@54481 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-12-03 15:07:14 +00:00
Andrew Ozz
ef3a00a869 Media: Fix the version string of imgAreaSelect to indicate when the second set of modifications were made.
Props SergeyBiryukov, ironprogrammer.
Fixes #54308.
Built from https://develop.svn.wordpress.org/trunk@54928


git-svn-id: http://core.svn.wordpress.org/trunk@54480 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-12-02 20:21:11 +00:00
Sergey Biryukov
868f939367 Code Modernization: Rename parameters that use reserved keywords in wp-includes/formatting.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_specialchars()`
 * `wp_specialchars_decode()`
 * `wp_check_invalid_utf8()`
 * `remove_accents()`
 * `_split_str_by_whitespace()`
 * `wp_strip_all_tags()`
* Renames the `$string` parameter to `$value` in:
 * `backslashit()`
 * `trailingslashit()`
 * `untrailingslashit()`
* Renames the `$string` parameter to `$subject` in `wp_iso_descrambler()`.
* Renames the `$match` parameter to `$matches` in `_wp_iso_convert()`.
* Renames the `$string` parameter to `$date_string` in:
 * `get_gmt_from_date()`
 * `get_date_from_gmt()`
* Renames the `$string` parameter to`$input` in `wp_parse_str()`.
* Renames the `$string` parameter to `$content` in `wp_pre_kses_block_attributes()`.
* Amends the `$text` parameter in `wp_pre_kses_less_than()` for consistency.

Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364], [53365].

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


git-svn-id: http://core.svn.wordpress.org/trunk@54479 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-12-02 18:53:19 +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
1e63fe0f2c Twenty Twenty: Remove unwanted title attributes.
This changeset removes `title` attributes from various links, as they add redundant information.

Follow-up to [53844].

Props sabernhardt, costdev, mukesh27.
See #57199, #24766, #24203.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54477 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-12-01 22:08:12 +00:00
audrasjb
74a83fd163 Twenty Twelve: Remove unwanted title attributes.
This changeset removes `title` attributes from various links, as they add redundant information.

Follow-up to [53844].

Props sabernhardt, costdev, mukesh27.
See #57199, #24766, #24203.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54476 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-12-01 22:06:13 +00:00
audrasjb
1073998752 Twenty Thirteen: Remove unwanted title attributes.
This changeset removes `title` attributes from various links, as they add redundant information.

Follow-up to [53844].

Props sabernhardt, costdev, mukesh27.
See #57199, #24766, #24203.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54475 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-12-01 21:56:11 +00:00
audrasjb
4b17b129dd Twenty Ten: Remove unwanted title attributes.
This changeset removes `title` attributes from various links, as they add redundant information.

Follow-up to [53844].

Props sabernhardt, costdev, mukesh27.
See #57199, #24766, #24203.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54474 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-12-01 21:53:13 +00:00
desrosj
c3bd352f28 Build/Test Tools: Improve caching for PHPCS.
This improves the speed of the PHPCS scans between workflow runs in GitHub Action by creating a scan cache file for each unique set of arguments passed to `phpcs`.

Props jrf.
Fixes #57148. See #53841.
Built from https://develop.svn.wordpress.org/trunk@54921


git-svn-id: http://core.svn.wordpress.org/trunk@54473 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-12-01 20:13:15 +00:00
Sergey Biryukov
5f30490527 Coding Standards: Remove a one-time $loading variable in get_avatar().
This aims to bring consistency between two similar code fragments.

Follow-up to [47554], [53480], [54895].

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


git-svn-id: http://core.svn.wordpress.org/trunk@54472 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-12-01 15:43:20 +00:00
Peter Wilson
767bdad516 Security: Improve accessibility of security policy.
Replace emoji indicators of support with "yes" and "no". This prevents "White Heavy Check Mark" indicating supported versions for screen-reader users.

Props audrasjb.
Fixes #57222.


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


git-svn-id: http://core.svn.wordpress.org/trunk@54471 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-30 22:54:12 +00:00
Peter Wilson
c0a3701246 Security: Update supported WordPress versions in security policy.
Removes WordPress versions 3.7.x-4.0.x from the list of supported versions in the security policy.

Props audrasjb, peterwilsoncc.
Fixes #57217.


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


git-svn-id: http://core.svn.wordpress.org/trunk@54470 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-30 22:33:14 +00:00
Sergey Biryukov
961a67cb88 Coding Standards: Fix a non-snake_case function name in WP_Block tests.
As the filter is only intended for a single test, it can be converted to a closure instead of being declared as a function in the global namespace. The `remove_filter()` part is redundant, as `WP_UnitTestCase_Base` saves the state of filter-related globals at `set_up()` and restores them on `tear_down()`.

Follow-up to [54175].

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


git-svn-id: http://core.svn.wordpress.org/trunk@54469 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-30 18:32:13 +00:00
Sergey Biryukov
a5c25ded41 Coding Standards: Remove redundant semicolon after get_template_hierarchy().
Follow-up to [54269].

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


git-svn-id: http://core.svn.wordpress.org/trunk@54468 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-30 17:36:13 +00:00
Sergey Biryukov
08fbc025c7 Coding Standards: Fix indentation of multi-line chained method call in test_json_error_with_status().
Follow-up to [34928], [42228].

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


git-svn-id: http://core.svn.wordpress.org/trunk@54467 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-30 16:35:12 +00:00
Bernhard Reiter
476c21de10 Build/Test Tools: Stylistic changes to Gutenberg e2e test.
Make some stylistic changes (multiline comment formatting, test description) that had been suggested during code review and that didn't make it into the previous commit.

Props costdev.
Follows [54913].
See #57197.
Built from https://develop.svn.wordpress.org/trunk@54914


git-svn-id: http://core.svn.wordpress.org/trunk@54466 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-30 14:07:14 +00:00
Bernhard Reiter
98399a3f9b Build/Test Tools: Add basic e2e coverage for Gutenberg.
Add some minimal e2e test coverage to install and activate the Gutenberg plugin.

This will catch naming collisions between Core and Gutenberg and help avoid crashing WordPress installations that run the stable version of the Gutenberg plugin on top of Core trunk.

Props costdev.
Fixes #57197.
Built from https://develop.svn.wordpress.org/trunk@54913


git-svn-id: http://core.svn.wordpress.org/trunk@54465 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-30 13:17:14 +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
Andrew Ozz
c31c7aa653 Media: Fix the initialization of imgAreaSelect when cropping a header image or a site icon or logo.
Props alshakero, arthur791004, nmutua, desrosj, audrasjb, ironprogrammer, obenland, costdev, ajmaurya.
Fixes #54308, #55377.
Built from https://develop.svn.wordpress.org/trunk@54903


git-svn-id: http://core.svn.wordpress.org/trunk@54455 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-29 22:14:12 +00:00
Sergey Biryukov
6436dd1fd4 Twenty Seventeen: Fix comment indentation in twentyseventeen_setup().
Follow-up to [38833], [42343]

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


git-svn-id: http://core.svn.wordpress.org/trunk@54454 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-29 22:12:12 +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
Sergey Biryukov
1750d30863 Coding Standards: Always use strict type check for in_array().
This fixes the currently flagged `WordPress.PHP.StrictInArray.MissingTrueStrict` issues:
* `Not using strict comparison for in_array; supply true for third argument.`

These all do comparisons with strings, so all the more reason why it is imperative that a strict comparison is used.

Follow-up to [47550], [47557], [54155], [53480].

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


git-svn-id: http://core.svn.wordpress.org/trunk@54447 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-29 21:00:14 +00:00
Dominik Schilling
15d01c9235 Query: Account for primed post caches without primed post meta/term caches.
In [54352] `update_post_caches()` was replaced by `_prime_post_caches()` to reduce excessive object cache calls. That's because `_prime_post_caches()` checks first if post IDs aren't already cached. Unfortunately this becomes an issue if a post itself is cached but not the meta/terms.
To fix this regression, `_prime_post_caches()` now always calls `update_postmeta_cache()` and `update_object_term_cache()` depending on the arguments passed to it. Both functions internally check whether IDs are already cached so the fix from [54352] remains in place.

Props peterwilsoncc, spacedmonkey, ocean90.
Fixes #57163.
Built from https://develop.svn.wordpress.org/trunk@54894


git-svn-id: http://core.svn.wordpress.org/trunk@54446 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-29 20:29:11 +00:00
Sergey Biryukov
3ba44120d0 Coding Standards: Always use parentheses when instantiating an object.
Note: This will be enforced by WPCS 3.0.0.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54443 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-29 15:51:14 +00:00
Sergey Biryukov
ab923804f4 Coding Standards: Add visibility to properties in tests/phpunit/tests/.
Adds a `private` visibility to some test class properties where it was not explicitly specified. This continues the previous efforts to make sure visibility is declared on all properties. 

Note: This will be enforced by WPCS 3.0.0.

Follow-up to [49184], [51919], [52009], [52010], [54889].

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


git-svn-id: http://core.svn.wordpress.org/trunk@54442 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-29 12:42:12 +00:00
Sergey Biryukov
6c1f6ba92e Coding Standards: Add visibility to methods in tests/phpunit/tests/.
Adds a `public` visibility to test fixtures, tests, data providers, and callbacks methods. This continues the previous efforts to make sure visibility is declared on all methods. 

Note: This will be enforced by WPCS 3.0.0.

Follow-up to [51919], [52009], [52010].

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


git-svn-id: http://core.svn.wordpress.org/trunk@54441 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-29 12:34:20 +00:00
Sergey Biryukov
b105e59c23 Comments: Make moderated or disallowed key check case-insensitive for non-Latin words.
The `check_comment()` and `wp_check_comment_disallowed_list()` functions are expected to be case-insensitive, but that only worked for words using Latin script and consisting of ASCII characters.

This commit adds the Unicode flag to the regular expression used for the check in these functions, so that both pattern and subject can be treated as UTF-8 strings.

Reference: [https://www.php.net/manual/en/reference.pcre.pattern.modifiers.php PHP Manual: Pattern Modifiers].

Follow-up to [984], [2075], [48121], [48575].

Props bonjour52, SergeyBiryukov.
Fixes #57207.
Built from https://develop.svn.wordpress.org/trunk@54888


git-svn-id: http://core.svn.wordpress.org/trunk@54440 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-28 19:44:17 +00:00
Bernhard Reiter
3884bd3c6e Twenty Twenty-Three: In page template, make post titles links.
In the "Blog (alternative)" page template, turn post titles into links. This is to better align with user expectations that individual post titles in a blog-like list of recent posts will be links to the corresponding blog posts.

Props scruffian.
Fixes #57175.
Built from https://develop.svn.wordpress.org/trunk@54887


git-svn-id: http://core.svn.wordpress.org/trunk@54439 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-28 15:13:18 +00:00
Sergey Biryukov
5d08331c21 Twenty Twenty-One: Add a comment for the closing h2 tag in author info template.
This brings consistency with the `.comments-title` heading in the `comments.php` template.

Follow-up to [49216], [50234].

Props haritpanchal, sabernhardt, mukesh27.
Fixes #56476.
Built from https://develop.svn.wordpress.org/trunk@54886


git-svn-id: http://core.svn.wordpress.org/trunk@54438 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-27 10:34:13 +00:00
audrasjb
8c1d559c27 Twenty Nineteen: Remove useless title attributes.
This changeset removes `title` attributes from links, as they are adding redundant information.

Props sabernhardt.
See #57199, #24766, #24203.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54437 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-26 22:43:12 +00:00
audrasjb
ca5bf74221 Twenty Eleven: Remove useless title attributes.
This changeset removes `title` attributes from various links, as they are adding redundant information.

Props sabernhardt.
See #57199, #24766, #24203.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54436 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-26 22:39:10 +00:00
audrasjb
9666402c47 Docs: Add missing parameter descriptions in wp-admin/includes/template.php.
Props mahekkalola, costdev, audrasjb, riccardodicurti.
Fixes #57208.
See #56792.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54435 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-26 22:18:10 +00:00
audrasjb
30e6820f0e Twenty Ten: Fixes brace indentation in loop-attachment template.
Props mukesh27.
See #57210, #56791.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54434 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-26 22:03:11 +00:00
audrasjb
a73fc6c084 Coding Standards: Various brace indentation corrections.
Props mukesh27.
Fixes #57210.
See #56791.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54433 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-26 21:01:17 +00:00
Sergey Biryukov
00c3bea83b Coding Standards: Correct the deprecation version for _filter_query_attachment_filenames().
Follow-up to [54524].

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


git-svn-id: http://core.svn.wordpress.org/trunk@54430 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-26 16:12:11 +00:00
audrasjb
114fc4cf69 Docs: Improve various globals documentation, as per documentation standards.
Props upadalavipul.
See #57069, #56792.


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


git-svn-id: http://core.svn.wordpress.org/trunk@54429 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-26 09:39:13 +00:00
audrasjb
b4888708bb Coding Standards: Fix brace indentation in wp-align/includes/noop.php.
Props alberuni-azad.
Fixes #57209.
See #56792.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54428 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-26 09:12:17 +00:00
Sergey Biryukov
6025b41a5c Docs: Correct the type for _WP_Dependency::$src property.
The handle source can be set to `false`, which means the item is an alias of other items it depends on.

Follow-up to [7970], [25518], [43661], [47170], [48462], [54470].

Props mehulkaklotar, swissspidy, costdev.
Fixes #57206.
Built from https://develop.svn.wordpress.org/trunk@54875


git-svn-id: http://core.svn.wordpress.org/trunk@54427 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-25 15:12:16 +00:00
audrasjb
e2ed8d0650 Docs: Various docblock fixes in Block Supports related functions.
See #56792.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54426 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-24 22:52:11 +00:00
audrasjb
532cd00f46 Docs: Use third-person singular verbs for Block Supports related function descriptions, as per docblocks standards.
See #56792.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54425 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-24 22:36:11 +00:00
audrasjb
64a713db2b Coding Standards: Remove extra slashes when concatenating ABSPATH with a path.
Since `ABSPATH` is defined and documented to end with a forward slash `/`, this changeset removes the first `/` from strings appended to `ABSPATH` in various files, leading to `//` in the resulting path.

Props TobiasBg, audrasjb, SergeyBiryukov, emanuelx.
Fixes #57074.
See #57071.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54424 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-24 22:11:14 +00:00
audrasjb
5fd77cda7f Plugins: Improve "No plugin found" message alignement in Plugins screen.
This changeset centers the "No plugin found" message in plugin search results.

Follow-up to [54149].

Props sruthi90, aparnajl, krupalpanchal, audrasjb, anantajitjg.
Fixes #57194.
See #55721, #55272.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54423 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-24 15:38:15 +00:00
Sergey Biryukov
34b6ab69b8 Coding Standards: Use HOUR_IN_SECONDS where appropriate.
This aims to clarify the time units for some time offset values.

Follow-up to [21996], [23823], [40108], [41626].

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


git-svn-id: http://core.svn.wordpress.org/trunk@54422 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-24 14:18:15 +00:00
audrasjb
c1dd534ec8 Twenty Nineteen: Remove the incorrect "flexible-header" tag.
This changeset removes the "flexible-header" tag from Twenty Nineteen, since the requirements for using this tag is that the theme includes support for a custom header with the flex-height and/or flex-width parameters, and Twenty Nineteen does not have support for header image.

Props poena, mukesh27, laurelfulford, audrasjb.
Fixes #46213.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54421 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-23 22:23:09 +00:00
audrasjb
753fff78e3 Docs: Improve various globals documentation, as per documentation standards.
Props upadalavipul.
See #57069, #56792.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54420 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-23 21:36:12 +00:00
audrasjb
349e9ac8d4 Docs: Improve various globals documentation, as per documentation standards.
Props upadalavipul, mukesh27, krupalpanchal, jigar-bhanushali.
See #57069, #56792.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54419 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-23 21:30:13 +00:00
Sergey Biryukov
665719b9de Docs: Revise comments using “we” in WordPress root directory files.
This updates some inline comments to better match the guidelines and recommendations set forth in the make/core and make/docs handbooks:

> In general, use second person in your documentation. Second person depicts a friendly tone, with a perfect focus on the reader. In addition to this, directly addressing the reader helps avoid passive voice; thereby preventing unwanted confusion.
> ...
> the word “we” should be avoided (...) unless its made very clear which group is speaking.

Includes:
* Replacing first-person usage of "we" with second person point of view.
* Making small clarification adjustments where the voice is much too casual or lacks clear context, especially for non-native English speakers.

References:
* [https://make.wordpress.org/docs/style-guide/language-grammar/grammatical-person/ Style Guide: Grammatical person]
* [https://make.wordpress.org/docs/handbook/documentation-team-handbook/handbooks-style-and-formatting-guide/ Handbooks & HelpHub Style and Formatting Guide]
* [https://make.wordpress.org/core/handbook/best-practices/post-comment-guidelines/#style-and-substance Post & Comment Guidelines: Style and Substance]

Follow-up to [2176], [3430], [4676], [6009], [7991], [12688], [12762], [26008], [28978], [44488], [44962], [51979], [53131], [53132], [53156], [53131], [54200].

Props ironprogrammer, costdev, jorbin, SergeyBiryukov.
See #57052.
Built from https://develop.svn.wordpress.org/trunk@54866


git-svn-id: http://core.svn.wordpress.org/trunk@54418 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-23 15:43:13 +00:00
Sergey Biryukov
abe134c209 Tests: Correct references to set_up() and tear_down() in various DocBlocks.
The `setUp()` and `tearDown()` methods were renamed to `set_up()` and `tear_down()`, respectively, as part of implementing the `void` return type solution for PHPUnit 8.0.

Follow-up to [29120], [29251], [30277], [32173], [32806], [38829], [42379], [50450], [51276], [51568].

See #56793.
Built from https://develop.svn.wordpress.org/trunk@54865


git-svn-id: http://core.svn.wordpress.org/trunk@54417 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-22 21:27:16 +00:00
Sergey Biryukov
17588baef8 Tests: Clean up test file in wpmu_delete_blog() tests.
This makes sure there are no leftover files after the tests from the `multisite` directory are run separately.

Follow-up to [30404].

See #56793.
Built from https://develop.svn.wordpress.org/trunk@54864


git-svn-id: http://core.svn.wordpress.org/trunk@54416 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-22 20:19:11 +00:00
Sergey Biryukov
e489c69dcc Tests: Add unit tests for attachment’s file size being included in metadata.
These tests ensure that `wp_generate_attachment_metadata()` stores the file size of all newly uploaded attachments under the `filesize` array key. The tests were initially supposed to be committed with [52837].

Follow-up to [52837], [52932], [54861].

Props spacedmonkey, johnwatkins0, mitogh, adamsilverstein, pbearne, SergeyBiryukov.
Fixes #57171.
Built from https://develop.svn.wordpress.org/trunk@54863


git-svn-id: http://core.svn.wordpress.org/trunk@54415 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-22 19:45:11 +00:00
Sergey Biryukov
1a3a3ee250 Tests: Add a public visibility to wp_filesize() tests.
Follow-up to [52010], [52837], [52932], [54861].

See #57171.
Built from https://develop.svn.wordpress.org/trunk@54862


git-svn-id: http://core.svn.wordpress.org/trunk@54414 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-22 15:11:14 +00:00
Sergey Biryukov
e2ba63091d Tests: Move wp_filesize() tests to their own file.
This aims to make the tests more discoverable and easier to expand.

Includes splitting the `wp_filesize` and `pre_wp_filesize` filter tests into a separate test case.

Follow-up to [52837], [52932], [54402].

Props pbearne, spacedmonkey, SergeyBiryukov.
See #57171.
Built from https://develop.svn.wordpress.org/trunk@54861


git-svn-id: http://core.svn.wordpress.org/trunk@54413 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-22 15:04:14 +00:00
Sergey Biryukov
c7457d772e Site Editor: Show correct theme per template or template part.
Child themes inherit templates and template parts from the parent theme. In Site Editor, the "Added by" column for a template defaults to displaying the child theme, even though it is inherited from the parent, creating confusion as to where the actual templates are located.

This commit ensures that the parent theme is correctly displayed in that scenario.

Follow-up to [51003], [52062].

Props ptahdunbar, WoutPitje, petaryoast, costdev, poena, audrasjb, SergeyBiryukov.
Fixes #55437.
Built from https://develop.svn.wordpress.org/trunk@54860


git-svn-id: http://core.svn.wordpress.org/trunk@54412 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-21 16:50:17 +00:00
Sergey Biryukov
f3b087164d Docs: Fix typo and improve DocBlock formatting in wp-admin/install-helper.php.
Follow-up to [236], [265], [8645], [30542].

See #56792.
Built from https://develop.svn.wordpress.org/trunk@54859


git-svn-id: http://core.svn.wordpress.org/trunk@54411 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-20 14:10:15 +00:00
Sergey Biryukov
f299e3c83a Coding Standards: Fix WPCS issues in wp-admin/install-helper.php.
This commit adds inline comments instructing PHPCS to ignore some lines for database queries. An explanation is provided with each instruction.

This resolves a few WPCS warnings along the lines of:
{{{
Use placeholders and $wpdb->prepare(); found interpolated variable $table_name at "DESC $table_name"
}}}

Follow-up to [236], [265], [5778].

Props jipmoors, costdev, jrf, SergeyBiryukov.
Fixes #43761.
Built from https://develop.svn.wordpress.org/trunk@54858


git-svn-id: http://core.svn.wordpress.org/trunk@54410 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-19 15:42:16 +00:00
Sergey Biryukov
513a8dc17f Users: Add missing escaping on the Add New User screen.
While the `$type` and `$label` variables are set to values that do not currently require escaping, this may change in the future, so it is preferable to add the escaping as a defensive coding measure.

Follow-up to [16294], [29030].

Props monzuralam, rudlinkon, hztyfoon, peterwilsoncc.
Fixes #57133.
Built from https://develop.svn.wordpress.org/trunk@54857


git-svn-id: http://core.svn.wordpress.org/trunk@54409 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-18 15:21:15 +00:00
desrosj
95828a9077 Build/Test Tools: Improve how Composer dependencies are installed.
To improve how Composer dependencies are installed and managed within GitHub Actions, the `ramsey/composer-install` third-party action is now used consistently throughout all workflows.

Previously, some workflows manually ran `composer` commands while others already used `ramsey/composer-install`.

The `ramsey/composer-install` action manages caching dependencies across workflow runs internally, which is something that was manually handled before this change.

Props jrf, desrosj.
Fixes #53841.
Built from https://develop.svn.wordpress.org/trunk@54856


git-svn-id: http://core.svn.wordpress.org/trunk@54408 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-18 14:52:14 +00:00
Sergey Biryukov
25ea9680ae Docs: Update various DocBlocks and inline comments per the documentation standards.
Includes minor formatting edits for consistency.

Follow-up to [53/tests], [12179], [12946], [35288], [37884], [38810], [38928], [46596], [48131], [52955], [53548], [53813], [53873], [54118], [54316], [54420], [54421], [54803].

See #56792.
Built from https://develop.svn.wordpress.org/trunk@54855


git-svn-id: http://core.svn.wordpress.org/trunk@54407 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-17 18:15:19 +00:00
Sergey Biryukov
260276583c Docs: Update wp_count_posts and wp_count_attachments filter descriptions.
This aims to match the wording generally used for other filters as per the documentation standards.

Follow-up to [25554], [25578], [25579], [53456].

See #56792.
Built from https://develop.svn.wordpress.org/trunk@54854


git-svn-id: http://core.svn.wordpress.org/trunk@54406 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-17 17:07:15 +00:00
Sergey Biryukov
cede832fb1 Docs: Fix typo in the WP_Theme_JSON::PRESETS_METADATA constant description.
Follow-up to [53129].

Props kebbet, mukesh27.
See #56792.
Built from https://develop.svn.wordpress.org/trunk@54853


git-svn-id: http://core.svn.wordpress.org/trunk@54405 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-17 16:58:20 +00:00
desrosj
44bd7a8471 Build/Test Tools: Add additional details why MacOS jobs are separate.
This adds additional inline context as to why the MacOS job is separate from the Windows and Ubuntu ones in the Test npm workflow.

While it is preferable to combine all of these to avoid repeated code, there is currently no way to determine the runner’s OS within the `if` workflow key.

MacOS jobs use GitHub Action minutes at by a multiple of 10. Being more strict about when to run these jobs ensures minutes are not unintentionally consumed within private forks and mirrors.

See https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability for more details.

See #56793.
Built from https://develop.svn.wordpress.org/trunk@54852


git-svn-id: http://core.svn.wordpress.org/trunk@54404 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-16 20:57:13 +00:00
desrosj
a64c2964f1 Build/Test Tools: Various minor GitHub Action improvements.
This applies several types of improvements to GitHub Action workflows:
- Updates to inline documentation to ensure accuracy.
- Removal of repetitive or unnecessary debug logging.
- Reorganization of some steps to have configuration steps towards the beginning of jobs.
- Step name updates for consistency across workflows.

Props desrosj, jrf.
See #56793.
Built from https://develop.svn.wordpress.org/trunk@54851


git-svn-id: http://core.svn.wordpress.org/trunk@54403 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-16 19:34:14 +00:00
jorgefilipecosta
5a0499a3df Add: Documentation for postTypes pattern property.
This commit documents the postTypes property part of the block pattern registration added in WordPress/gutenberg#41791, and meanwhile backported into core.

Props mcsf, ntsekouras.
Built from https://develop.svn.wordpress.org/trunk@54850


git-svn-id: http://core.svn.wordpress.org/trunk@54402 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-16 16:36:14 +00:00
desrosj
9940af48e3 Upgrade/Install: Remove bundled theme files from $_old_files.
Because themes are updated independently of Core updates, any deleted files from bundled themes should not be included in the `$_old_files` list.

Any file included in this list is deleted on update, which could cause problems for sites with a given theme active if the removed files were required in earlier versions of that theme and that theme is not updated at the same time.

Props desrosj, costdev, SergeyBiryukov.
Fixes #56936.
Built from https://develop.svn.wordpress.org/trunk@54849


git-svn-id: http://core.svn.wordpress.org/trunk@54401 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-16 15:43:10 +00:00
Sergey Biryukov
5e58ab8b2a Docs: Split the "main part" comment in wp-login.php into two lines.
This aims to better match the multi-line comment format of the documentation standards.

Follow-up to [6643], [52945], [53313].

Props sabernhardt, NekoJonez.
Fixes #56843.
Built from https://develop.svn.wordpress.org/trunk@54848


git-svn-id: http://core.svn.wordpress.org/trunk@54400 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-16 13:51:13 +00:00
Sergey Biryukov
42c1f97aaa Docs: Minor DocBlock edits for get_adjacent_post() and related functions.
This aims to better match the line wrapping recommendations of the documentation standards.

Follow-up to [16951], [28111], [32606], [37254].

See #56792.
Built from https://develop.svn.wordpress.org/trunk@54842


git-svn-id: http://core.svn.wordpress.org/trunk@54394 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-15 00:34:12 +00:00
Sergey Biryukov
8a3426bf8b Docs: Correct type for the $post parameter of the {$adjacent}_post_link filter.
The parameter was documented as `WP_Post`, but it contains the value of `get_adjacent_post()`, which returns an empty string if there is no corresponding post, so the correct type is `WP_Post|string`.

Follow-up to [11243], [16951], [28111], [32606].

Props apermo, audrasjb.
Fixes #57047.
Built from https://develop.svn.wordpress.org/trunk@54841


git-svn-id: http://core.svn.wordpress.org/trunk@54393 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-15 00:19:13 +00:00
audrasjb
9b53ca0fd2 Text Changes: Improve the wording of the email sent to confirm site deletion.
Props NekoJonez, SergeyBiryukov, mukesh27, audrasjb.
See #56921.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54392 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-14 21:57:10 +00:00
audrasjb
7d6e977293 Help/About: Fix inconsistency in auto-updates help tabs.
This changeset ensures the wording of auto-updates related help tabs is consistent with other help tabs.

Props NekoJonez, SergeyBiryukov, mukesh27, audrasjb.
Fixes #56921.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54391 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-14 21:53:11 +00:00
audrasjb
5f2083cb7b Twenty Seventeen: Improve letter-spacing reset for non-latin alphabets.
This changeset resets `letter-spacing` for Persian and Urdu, and changes the related CSS selector to include any Persian locale.

Props amirrezatm, itpathsolutions, sabernhardt, mukesh27.
Fixes #56994.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54390 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-14 21:32:17 +00:00
desrosj
5fc5af9722 Upgrade/Install: Delete the comments-query-loop folder in wp-includes/blocks.
This properly deletes the now empty `src/wp-includes/blocks/comments-query-loop` directory and adds that directory to the `$_old_files` array.

The files in this directory were removed in [54257], but the directory was not marked as deleted in SVN.

Props azaozz, jorbin, SergeyBiryukov.
Fixes #57080.
Built from https://develop.svn.wordpress.org/trunk@54836


git-svn-id: http://core.svn.wordpress.org/trunk@54388 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-14 18:24:12 +00:00
audrasjb
cf77d178a0 Docs: Typo correction in get_registered_nav_menus() docblock.
Props nithins53.
Fixes #57101.
See #56792.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54387 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-14 14:24:12 +00:00
Sergey Biryukov
948a260e80 Administration: Add missing escaping for a few strings used as HTML attributes.
Follow-up to [47209], [50997], [51006].

Props kowsar89, riccardodicurti, audrasjb, krupalpanchal, SergeyBiryukov.
Fixes #57093.
Built from https://develop.svn.wordpress.org/trunk@54834


git-svn-id: http://core.svn.wordpress.org/trunk@54386 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-14 11:50:15 +00:00
audrasjb
4e4016f61f Docs: Various docblock fixes in Multisite administration functions.
See #56792.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54385 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-13 23:19:12 +00:00
audrasjb
ca35d65075 Networks and Sites: Replace "N/A" with "Not applicable" in choose_primary_blog()
This changeset replaces "N/A" with "Not applicable" in the `choose_primary_blog()` function. It also makes the text string translatable.

Props kowsar89, SergeyBiryukov, audrasjb, mukesh27.
Fixes #57040.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54384 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-13 22:31:14 +00:00
Sergey Biryukov
7836738bd9 Docs: Document the usage of globals in some functions.
This affects:
* `the_block_editor_meta_boxes()`
* `wp_generate_block_templates_export_file()`
* `WP_oEmbed_Controller::get_proxy_item()`

Follow-up to [44131], [48135], [51151], [53129].

Props krunal265.
Fixes #57082.
Built from https://develop.svn.wordpress.org/trunk@54831


git-svn-id: http://core.svn.wordpress.org/trunk@54383 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-13 13:51:20 +00:00
Sergey Biryukov
243fdb8da2 Tests: Resolve WP_Query test failures on MariaDB due to indeterminate sort order.
[54768] added a few tests to verify that caching within `WP_Query` is bypassed when the `SELECT` clause has been modified via a filter, to avoid cache key collisions and the returning of incomplete or unexpected results.

However, creating several posts with the same date/time fields can result in inconsistent sort ordering between MySQL and MariaDB, as each engine refines the order further using a different index.

This commit aims to stabilize the tests by using `assertEqualSets()` instead of `assertEquals()`, since testing the order is out of their scope. Includes removing `array_unshift()` and `array_reverse()` calls as no longer needed.

This resolves a few test failures on MariaDB along the lines of:
{{{
Tests_Query_FieldsClause::test_should_limit_fields_to_id_and_parent_subset
Posts property for first query is not of expected form.
Failed asserting that two arrays are equal.
--- Expected
+++ Actual
@@ @@
 Array (
     0 => stdClass Object (
-        'ID' => 36019
+        'ID' => 36015
         'post_parent' => 0
     )
     1 => stdClass Object (
-        'ID' => 36018
+        'ID' => 36016
         'post_parent' => 0
     )
     2 => stdClass Object (...)
     3 => stdClass Object (
-        'ID' => 36016
+        'ID' => 36018
         'post_parent' => 0
     )
     4 => stdClass Object (
-        'ID' => 36015
+        'ID' => 36019
         'post_parent' => 0
     )
 )

/tmp/wp-test-runner/tests/phpunit/tests/query/fieldsClause.php:67
/tmp/wp-test-runner/phpunit-5.7.phar:598
}}}

Follow-up to [54768].

Props peterwilsoncc, SergeyBiryukov.
See #57012.
Built from https://develop.svn.wordpress.org/trunk@54829


git-svn-id: http://core.svn.wordpress.org/trunk@54381 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-12 14:51:15 +00:00
desrosj
a2a3187437 Coding Standards: Apply spacing changes after composer format.
Follow up to [54817].
See #57057.
Built from https://develop.svn.wordpress.org/trunk@54824


git-svn-id: http://core.svn.wordpress.org/trunk@54376 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-11 17:51:12 +00:00
desrosj
face84c028 Editor: Improve how min/max font sizes are calculated for fluid typography.
- Where no fluid max values are set (e.g., single or custom font size values), the "size" value will act as the maximum value in a `clamp()` function.
- In the absence of any fluid `min`/`max` values, the lower bound rule of `>16px` will be enforced. This applies to custom values from the editor or single-value `theme.json` styles. Font sizes below this will not be clamped.
- In a preset, if a `fluid.min` value has been specified, the lower bound rule of `>16px` won't be enforced on this value. Presets with a fluid object therefore, give precedence to theme author's values.
- In a preset, if there is NOT a `fluid.max` but there is `fluid.min`, use the incoming "size" value as the `max`.
- In a preset, if there is NOT a `fluid.min` but there is a `fluid.max`, use `size * min_size_factor` as the `min`. The lower bound rule of `>16px` is enforced here, because the block editor is computing the `min` value. This is consistent with the way minimum sizes are calculated for single or custom values.


Props ramonopoly, mamaduka, andrewserong, aristath, joen, desrosj.
Fixes #57075.
Built from https://develop.svn.wordpress.org/trunk@54823


git-svn-id: http://core.svn.wordpress.org/trunk@54375 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-11 17:48:12 +00:00
desrosj
39f1141e78 Editor: Correctly style separator blocks when only a background-color is defined.
When separator blocks are configured using only a `background-color`, they are shown correctly within the editor but not on the front end.

This changes `WP_Theme_JSON` to detect this scenario and move the `background-color` value to just `color` when both `color` and `border-color` are missing.

Props cbravobernal, flixos90, davidbaumwald, hellofromTonya, desrosj, andrewserong, czapla, glendaviesnz, wildworks.
Fixes #56903.
Built from https://develop.svn.wordpress.org/trunk@54821


git-svn-id: http://core.svn.wordpress.org/trunk@54373 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-11 17:11:10 +00:00
desrosj
3b86eee81b Themes: Revert one instance of wp_get_theme() from [54817].
Since this specific call to `wp_get_theme()` is found within `wp-includes/blocks`, this change will need to be made upstream in the Gutenberg repository.

See #57057.
Built from https://develop.svn.wordpress.org/trunk@54819


git-svn-id: http://core.svn.wordpress.org/trunk@54371 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-11 16:34:12 +00:00
spacedmonkey
8ea348f6db Themes: Reduce usage of wp_get_theme function.
Calling the `wp_get_theme` function creates a instance of the `WP_Theme` class. This can be a performance issue, if all you need is one property of the class instance. This change replaces the usage of `wp_get_theme()->get_stylesheet()` with `get_stylesheet()` to improve performance.

Props spacedmonkey, flixos90, peterwilsoncc, desrosj.
Fixes #57057.
Built from https://develop.svn.wordpress.org/trunk@54817


git-svn-id: http://core.svn.wordpress.org/trunk@54369 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-11 16:26:12 +00:00
desrosj
4e492ffe61 Filesystem: Return FTP/FTP Sockets exists() methods to a previous state.
This partially reverts [53860] and [53862], which refactored the `exists()` method to rely on `ftp_rawlist()` instead of `ftp_nlist()`.

[53860] makes a similar attempt to the ones made in [33648] and [34733] (which were also reverted in [35944]). Being compliant with the specifications while continuing to work without issue for all FTP servers continues seem impossible. These little ghosts are the ones we’re scared of the most.

Props jsh4, afragen, costdev, pkolenbr, SergeyBiryukov, dd32, peterwilsoncc, gamecreature, desrosj.
Fixes #56966.
See #51170, #28013.
Built from https://develop.svn.wordpress.org/trunk@54815


git-svn-id: http://core.svn.wordpress.org/trunk@54367 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-11 15:55:13 +00:00
Sergey Biryukov
43addd9e1e Formatting: Check that both normalizer_* functions exist in remove_accents().
This applies to:
* `normalizer_is_normalized()`
* `normalizer_normalize()`

Includes removing the `Normalizer::FORM_C` constant as a parameter, since it is the default value for both functions and does not need to be explicitly passed. This avoids a fatal error if a plugin includes polyfill for any of the functions but the `Normalizer` class has a different namespace, for example when using the Symfony polyfill.

Follow-up to [53754].

Props hellofromTonya, costdev, desrosj, mukesh27, zodiac1978, jchambo, gisgeo, SergeyBiryukov.
Fixes #56980.
Built from https://develop.svn.wordpress.org/trunk@54813


git-svn-id: http://core.svn.wordpress.org/trunk@54365 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-11 15:28:12 +00:00