45629 Commits

Author SHA1 Message Date
Peter Wilson
d80d27b4cc Tests, Build Tools: Improve version compatibility tests.
Improve tests for `is_wp_version_compatible()` and `is_php_version_compatible()`.

Follow up to [53227].

Props costdev, SergeyBiryukov.
Fixes #54257.



git-svn-id: https://develop.svn.wordpress.org/trunk@53237 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-21 01:00:24 +00:00
Sergey Biryukov
e780f28357 Code Modernization: Rename parameters that use reserved keywords in bundled themes.
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:
 * `twentysixteen_excerpt()`
 * `twentynineteen_post_classes()`
* Renames the `$echo` parameter to `$display` in:
 * `twentythirteen_entry_date()`
 * `twentytwenty_generate_css()`
 * `twentytwenty_site_logo()`
 * `twentytwenty_site_description()`
 * `twenty_twenty_one_generate_css()`

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

Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #55327.

git-svn-id: https://develop.svn.wordpress.org/trunk@53236 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-20 14:22:21 +00:00
Jb Audras
c63de7818e Docs: Docs: Use third-person singular verbs for function descriptions in wp-includes/blocks.php and wp-includes/script-loader.php, per the documentation standards.
See #54729.


git-svn-id: https://develop.svn.wordpress.org/trunk@53235 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-20 14:07:53 +00:00
Jb Audras
84f3b34e2d Editor: Move wp_enqueue_block_style() to wp-includes/script-loader.php, for better consistency.
As a result of [52741] and [52743], `wp_enqueue_block_support_styles()` was moved to `wp-includes/script-loader.php`. However, `wp_enqueue_block_style()` was still defined in `wp-includes/blocks.php`. This changeset also moves `wp_enqueue_block_support_styles()` to `wp-includes/script-loader.php` for better consistency.

Follow-up to [52741], [52743].

Props SergeyBiryukov, mukesh27, audrasjb.
Fixes #55182.
See #55148.


git-svn-id: https://develop.svn.wordpress.org/trunk@53234 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-20 13:51:21 +00:00
Jb Audras
8cb291cbd0 Feeds: Use latest comment date for the Last-Modified header of comments feed.
Previously, the `Last-Modified` header of comments feed was using the date/time of the last comment. This behavior was breaking caching and causing feed readers to believe there is no new content even when there might be new posts.

This commit changes this behavior to use the newest date from both `get_lastcommentmodified()` and `get_lastpostmodified()` functions instead of only using the result from `get_lastcommentmodified()`.

Props xiven, mauteri, costdev, audrasjb.
Fixes #47968.


git-svn-id: https://develop.svn.wordpress.org/trunk@53233 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-20 12:46:01 +00:00
Sergey Biryukov
8ad5aec839 Code Modernization: Rename parameters that use reserved keywords in wp-admin/install-helper.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 `check_column()`.

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

Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #55327.

git-svn-id: https://develop.svn.wordpress.org/trunk@53232 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-20 11:17:05 +00:00
Sergey Biryukov
eb5612ddf7 Tests: Update the test for wp_install() signature.
Follow-up to [53230].

See #55327.

git-svn-id: https://develop.svn.wordpress.org/trunk@53231 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-20 11:04:23 +00:00
Sergey Biryukov
2fcc00815b 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@53230 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-20 10:44:46 +00:00
Jb Audras
6045bacda1 Docs: Misc fixes and improvements in the Administration Media API docblocks, as per documentation standards.
See #54729.


git-svn-id: https://develop.svn.wordpress.org/trunk@53229 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-20 08:28:00 +00:00
Jb Audras
e666adfaa4 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@53228 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-20 08:11:34 +00:00
Peter Wilson
c690f60df4 Build, Test Tools: Test PHP and WP compatibility functions.
Introduce tests for `is_php_version_compatible()` and `is_wp_version_compatible()`.

Props pbearne, hellofromTonya, mikeschroder, peterwilsoncc, toro_unit.
Fixes #54257.


git-svn-id: https://develop.svn.wordpress.org/trunk@53227 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-20 05:59:45 +00:00
Peter Wilson
059cab0e71 Autosave: Compare heartbeat intervals in same unit.
Move the conversion of `minimalInterval` to milliseconds to be grouped with the other time conversions from seconds to milliseconds.

This fixes a bug in which the minimal and main intervals were compared after the former had been converted to milliseconds but the latter had not. This could cause the heatbeat interval to blow out to unexpectedly high values if the minimal interval was set.

Props tabrisrp, sabernhardt, SergeyBiryukov, audrasjb.
Fixes #54825.



git-svn-id: https://develop.svn.wordpress.org/trunk@53226 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-20 05:53:25 +00:00
Peter Wilson
dec48ad77a Comments: Improve accuracy of get_comment_count() docblock.
Remove reference to uncached database query now `get_comment_count()` uses `WP_Comment_Query` which contains caching. Remove reference to `$wpdb` global, it is no longer used.

Follow up to [53036].

Fixes #19901.


git-svn-id: https://develop.svn.wordpress.org/trunk@53225 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-20 05:51:21 +00:00
Sergey Biryukov
419e8248d6 Post WordPress 6.0 Beta 2 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@53224 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-19 16:39:38 +00:00
Sergey Biryukov
e467197f4f WordPress 6.0 Beta 2.
git-svn-id: https://develop.svn.wordpress.org/trunk@53223 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-19 16:12:34 +00:00
Sergey Biryukov
027f723d80 Menus: Use correct parameter in _wp_nav_menu_meta_box_object().
Follow-up to [53220].

Props davidbaumwald.
See #55327.

git-svn-id: https://develop.svn.wordpress.org/trunk@53222 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-19 15:57:57 +00:00
David Baumwald
e31128ecb7 Twenty Twenty-One: Correct translator comment in twenty_twenty_one_continue_reading_text.
This commit updates the translator comment in `twenty_twenty_one_continue_reading_text` to indicate that the text is visually hidden.  This change also corrects the comment above the `the_content_more_link` filter to reference the content, not the excerpt.

Props sabernhardt, costdev.
Fixes #55564.

git-svn-id: https://develop.svn.wordpress.org/trunk@53221 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-19 15:21:43 +00:00
Sergey Biryukov
48e5ac7bd5 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@53220 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-19 15:11:22 +00:00
Greg Ziółkowski
5d3a78bbd8 Editor: Update WordPress packages for 6.0 Beta 2
Included cherry-picked commits from the Gutenberg plugin that fix bugs discovered after WordPress 6.0 Beta 1.

Props zieladam, ndiego.
See #55567.



git-svn-id: https://develop.svn.wordpress.org/trunk@53219 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-19 15:08:48 +00:00
Greg Ziółkowski
32f1bdeec6 REST API: Add array argument to getItems for Pattern Directory endopoint
Since http://api.wordpress.org/patterns API supports array parameters, there is no need to implode slug values inside the _register_remote_theme_patterns function.
Both WP_REST_Pattern_Directory_Controller and _register_remote_theme_patternsmust be updated to support array request arguments.

Props antonvlasenko.
Fixes #55574.
Follow-up #55505, [53152].




git-svn-id: https://develop.svn.wordpress.org/trunk@53218 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-19 14:56:40 +00:00
Greg Ziółkowski
5ae266fdc4 REST API: Respect _fields query arg in preloaded requests
Ensures that preloaded request can include a `_fields` query param that asks that only selected response fields are returned.

Props jsnajdr, timothyblynjacobs. 
Fixes #55213.
See #55567.



git-svn-id: https://develop.svn.wordpress.org/trunk@53217 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-19 14:38:16 +00:00
Sergey Biryukov
abaee6aefb 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@53216 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-19 13:49:19 +00:00
Sergey Biryukov
8c1abdcf8a 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@53215 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-19 12:46:24 +00:00
Greg Ziółkowski
c755258903 Editor: Fix Comment Query block isn't lazy loading meta data
Related GitHub issue: https://github.com/WordPress/gutenberg/issues/40241.
Primes comment meta data cache within calls to WP_Comment_Query.

Props peterwilsoncc, cbravobernal.
See #55567.
Follow-up [53138].




git-svn-id: https://develop.svn.wordpress.org/trunk@53214 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-19 12:37:53 +00:00
Greg Ziółkowski
7e65fcbbef Editor: Include the PHP file for the Cover block
This file is copied by the build process but it also needs to be versioned so unit tests can run without issues.

Follow-up [53212].
See #55580.



git-svn-id: https://develop.svn.wordpress.org/trunk@53213 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-19 11:49:22 +00:00
Greg Ziółkowski
8fafc11932 Editor: Correctly register the dynamic Cover block
The new "Featured Image" enhancement is handled dynamically, so we need to update how the Cover block is handled in the build processa and registered in the code.

Props ironprogrammer, costdev, Mamaduka, chaion07.
Fixes #55580.



git-svn-id: https://develop.svn.wordpress.org/trunk@53212 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-19 11:35:50 +00:00
Greg Ziółkowski
87dc304715 Code Quality: Fix reported undefined $script_uri variable notice
The code editor reported this issue while mamduka was browsing the blocks.php file. PHP considers variables undefined until a value is assigned (or the global keyword is used).

Follow-up for [53091].
Props mamaduka, peterwilsoncc.
See 55567.



git-svn-id: https://develop.svn.wordpress.org/trunk@53211 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-19 09:56:02 +00:00
Greg Ziółkowski
e8df37e341 REST API: Add inserter field to the schema of Patterns endpoint
Backports changes from https://github.com/WordPress/gutenberg/pull/40416. Adds the missing `inserter` field to the Patterns item schema. This field was omitted from the response, and patterns that should be hidden in the inserter were visible.

Props mamaduka, ndiego.
See #55567.
Follow-up [53152].




git-svn-id: https://develop.svn.wordpress.org/trunk@53210 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-19 09:39:42 +00:00
Greg Ziółkowski
699853bbc4 REST API: Don't load remote patterns twice in the controller
This PR aims to fix an issue with fetching remote patterns multiple times inside the WP_REST_Block_Patterns_Controller::get_items method.

Follow-up [53152].

Props antonvlasenko.
See #55567.




git-svn-id: https://develop.svn.wordpress.org/trunk@53209 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-19 09:26:20 +00:00
Jorge Costa
2c2b5d0cfd Block editor: Prevent styles from being added in the site editor.
The site editor, unlike other editors, generates the styles coming from global styles (presets, styles) dynamically in the client. This is because the user can modify any value that we need to consolidate (merge core, theme, and user style preferences). We don't want to have the global styles twice, as it introduces subtle bugs.

Props oandregal, youknowriad.
See #55567.

git-svn-id: https://develop.svn.wordpress.org/trunk@53208 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-18 17:10:17 +00:00
Sergey Biryukov
a7b2e1b565 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@53207 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-18 15:20:16 +00:00
Jb Audras
658906b3ba Docs: Replace Codex links with the corresponding page on DevHub.
The Codex page for `WP_Object_Cache` already redirects to the corresponding DevHub page.

See #54729.


git-svn-id: https://develop.svn.wordpress.org/trunk@53206 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-18 15:06:24 +00:00
Jb Audras
685a843614 Docs: Update a link to the Custom Elements spec in unsupported_valid_tag_names() unit test docblock.
This changeset replaces a link to the outdated W3C specs on Custom Elements with a link to the corresponding WhatWG specification.

Follow-up to [53204].

See #54729.


git-svn-id: https://develop.svn.wordpress.org/trunk@53205 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-18 14:41:17 +00:00
Jb Audras
9e0b155a73 Docs: Update a link to the Custom Elements spec in force_balance_tags() docblock.
This changeset replaces a link to the outdated W3C specs on Custom Elements with a link to the corresponding WhatWG specification.

See #54729.


git-svn-id: https://develop.svn.wordpress.org/trunk@53204 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-18 14:33:16 +00:00
Sergey Biryukov
a67c03172a 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@53203 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-18 10:31:40 +00:00
Jb Audras
24d9f5a568 Docs: Update MDN link in send_frame_options_header() docblock.
The X-Frame-Options MDN documentation has been moved to `/docs/Web/HTTP/Headers/X-Frame-Options`. This changeset updates the link accordingly.

See #54729.


git-svn-id: https://develop.svn.wordpress.org/trunk@53202 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-18 10:16:20 +00:00
Sergey Biryukov
7184c2affa Docs: Use third-person singular verbs for function descriptions in wp-admin/includes/meta-boxes.php, per the documentation standards.
See #54729.

git-svn-id: https://develop.svn.wordpress.org/trunk@53201 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-17 17:55:05 +00:00
Sergey Biryukov
ac2e1b125d Docs: Add missing descriptions for function parameters in wp-admin/includes/meta-boxes.php.
See #54729.

git-svn-id: https://develop.svn.wordpress.org/trunk@53200 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-17 17:45:05 +00:00
Sergey Biryukov
8c9af98160 Coding Standards: Simplify long conditions in xfn_check().
Add some comments for clarity.

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

See #54728.

git-svn-id: https://develop.svn.wordpress.org/trunk@53199 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-17 17:24:27 +00:00
Sergey Biryukov
bad03f0c8c 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@53198 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-17 15:35:34 +00:00
Sergey Biryukov
dd06c4767f Coding Standards: Correct alignment in various files.
This fixes an `Array double arrow not aligned correctly` WPCS warning.

Follow-up to [53075], [53084], [53091], [53094], [53155], [53129].

See #54728.

git-svn-id: https://develop.svn.wordpress.org/trunk@53197 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-17 15:05:10 +00:00
Sergey Biryukov
47cd48db7f Coding Standards: Correct the $items_count variable in add_menu_classes().
Follow-up to [53195].

See #54728.

git-svn-id: https://develop.svn.wordpress.org/trunk@53196 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-17 14:42:35 +00:00
Sergey Biryukov
51ee457d95 Coding Standards: Use more descriptive variable names in add_menu_classes().
Follow-up to [9578], [53193], [53194].

See #54728.

git-svn-id: https://develop.svn.wordpress.org/trunk@53195 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-17 14:39:15 +00:00
Sergey Biryukov
2a9ca0d823 Docs: Add missing documentation for add_cssclass() and add_menu_classes().
Follow-up to [9578], [53193].

See #54729.

git-svn-id: https://develop.svn.wordpress.org/trunk@53194 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-17 14:28:24 +00:00
Sergey Biryukov
9846e1aefc 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@53193 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-17 14:08:54 +00:00
Sergey Biryukov
37f2e311a4 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@53192 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-17 10:49:10 +00:00
Jb Audras
dbb0e6345e Themes: Use consistent thumbnail sizes in Customizer preview screen.
This ensures displaying theme thumbnails in consistent sizes in Customizer theme preview.

Props poena, karpstrucking, costdev, audrasjb.
Fixes #54188.


git-svn-id: https://develop.svn.wordpress.org/trunk@53191 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-16 06:13:11 +00:00
Sergey Biryukov
23aa7715b0 I18N: Move code out of a translatable string in WP_Theme::__construct().
Props kapilpaul, azouamauriac, SergeyBiryukov.
Fixes #55405.

git-svn-id: https://develop.svn.wordpress.org/trunk@53190 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-16 00:28:17 +00:00
Jb Audras
0626da2976 Docs: Use third-person singular verbs for function descriptions in author-template.php, as per documentation standards.
See #54729.


git-svn-id: https://develop.svn.wordpress.org/trunk@53189 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-15 15:12:11 +00:00
Jb Audras
feb1c78687 Docs: Fix a docblock typo in get_the_modified_author.
Follow-up to [53187].

See #55420.


git-svn-id: https://develop.svn.wordpress.org/trunk@53188 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-15 13:53:33 +00:00