45617 Commits

Author SHA1 Message Date
Sergey Biryukov
911c65dec1 Code Modernization: Rename parameters that use reserved keywords in wp-includes/class-wp-term-query.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 `$search` in `WP_Term_Query::get_search_sql()`.

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

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

git-svn-id: https://develop.svn.wordpress.org/trunk@53275 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-26 11:42:37 +00:00
Sergey Biryukov
e9e06fa154 Code Modernization: Rename parameters that use reserved keywords in wp-includes/class-wp-site-query.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 `$search` in `WP_Site_Query::get_search_sql()`.

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

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

git-svn-id: https://develop.svn.wordpress.org/trunk@53274 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-26 11:41:27 +00:00
Sergey Biryukov
1de43d9035 Code Modernization: Rename parameters that use reserved keywords in wp-includes/class-wp-network-query.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 `$search` in `WP_Network_Query::get_search_sql()`.

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

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

git-svn-id: https://develop.svn.wordpress.org/trunk@53273 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-26 11:40:29 +00:00
Sergey Biryukov
fdd5d681c0 Code Modernization: Rename parameters that use reserved keywords in wp-includes/class-wp-comment-query.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 `$search` in `WP_Comment_Query::get_search_sql()`.

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

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

git-svn-id: https://develop.svn.wordpress.org/trunk@53272 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-26 11:39:17 +00:00
Sergey Biryukov
a32bf120f4 Code Modernization: Rename parameters that use reserved keywords in wp-includes/class-wp-image-editor.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 `WP_Image_Editor::make_image()`.

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

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

git-svn-id: https://develop.svn.wordpress.org/trunk@53271 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-26 11:29:49 +00:00
Sergey Biryukov
8ef9e78699 Code Modernization: Rename parameters that use reserved keywords in wp-includes/class-wp-image-editor-gd.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 `WP_Image_Editor_GD::make_image()`.

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

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

git-svn-id: https://develop.svn.wordpress.org/trunk@53270 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-26 11:23:59 +00:00
Sergey Biryukov
180bab6f43 Code Modernization: Rename parameters that use reserved keywords in wp-includes/class-wp-embed.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 `$match` parameter to `$matches` in `WP_Embed::autoembed_callback()`.

Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257].

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

git-svn-id: https://develop.svn.wordpress.org/trunk@53269 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-26 09:58:23 +00:00
Greg Ziółkowski
c88553d076 Editor: Register 'lock' attribute for every block on the server
Backports changes from https://github.com/WordPress/gutenberg/pull/40468.

The lock attribute needs to be supported by every block, but currently, it is only done on the client site. As a result, it was causing block rendered API requests to fail when blocks are locked.

Props mamaduka, peterwilsoncc.
See #55567.




git-svn-id: https://develop.svn.wordpress.org/trunk@53268 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-26 09:48:20 +00:00
Jb Audras
e53a3ea0c0 Widgets: Fix Classic Widgets screen toggle response on small screens.
This changeset updates the toogle logic to fix Widget's responsive behavior on Classic Widgets screen.

Props inc2734, kmix39, dlh, desrosj, costdev, Boniu91.
Fixes #48896.


git-svn-id: https://develop.svn.wordpress.org/trunk@53267 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-26 06:52:30 +00:00
Jb Audras
325d8bab0a 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@53266 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-26 06:30:24 +00:00
Jb Audras
f338d4dd56 Docs: Use third-person singular verbs for function descriptions in Core Comment API and Comment template functions.
See #54729.


git-svn-id: https://develop.svn.wordpress.org/trunk@53265 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-26 06:18:30 +00:00
Peter Wilson
79c8fbe3dc 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@53264 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-26 02:57:22 +00:00
David Baumwald
9eb6c11755 Twenty Twenty-One: Make translator comments referencing the post title consistent.
Follow-up to [53221].

Props SergeyBiryukov.
Fixes #55564.

git-svn-id: https://develop.svn.wordpress.org/trunk@53263 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-25 23:09:57 +00:00
Greg Ziółkowski
eb0d801267 Build: Update the constant used to remove experimental Gutenberg code
We missed the change for blocks that got applied to packages. `process.env.GUTENBERG_PHASE` got renamed to `process.env.IS_GUTENBERG_PLUGIN`.

See #55567.
Follow-up for [53157].



git-svn-id: https://develop.svn.wordpress.org/trunk@53262 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-25 17:01:40 +00:00
Greg Ziółkowski
3cc94be23b Tests: Update Gallery block unit tests to new gallery format
The Gallery block unit tests still use the old format, so this updates it to the new format that uses nested Image blocks.

Props glendaviesnz.
Fixes #55571.



git-svn-id: https://develop.svn.wordpress.org/trunk@53261 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-25 16:55:45 +00:00
Greg Ziółkowski
0cb3193616 Editor: Fix styles for nested elements (link color)
This fixes an issue by which link color behaves differently in the editor and front end.

Related Gutenberg PR: https://github.com/WordPress/gutenberg/pull/37728.

Props oandregal.
See #55567.



git-svn-id: https://develop.svn.wordpress.org/trunk@53260 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-25 16:35:16 +00:00
Greg Ziółkowski
dea44459da Editor: Add default comment status to discussion settings
This is a backport that exposes the default_comments_status option in the Editor, under the discussion settings, which then is then used by the Post Comments and Post Comments Form blocks.

Related change in Gutenberg: https://github.com/WordPress/gutenberg/pull/40484.

Props luisherranz.
See #55567.



git-svn-id: https://develop.svn.wordpress.org/trunk@53259 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-25 16:14:46 +00:00
Greg Ziółkowski
dbda79e341 Tests: Add missing unit tests to Comment Template block
Follow-up for [53138], [53172].
Props darerodz.
See #55567.



git-svn-id: https://develop.svn.wordpress.org/trunk@53258 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-25 16:10:54 +00:00
Sergey Biryukov
0378bddc1a Code Modernization: Rename parameters that use reserved keywords in wp-includes/class-wp-customize-widgets.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_Customize_Widgets` class methods.

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

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

git-svn-id: https://develop.svn.wordpress.org/trunk@53257 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-25 13:27:44 +00:00
Jb Audras
8b488cb1ce Docs: Use third-person singular verbs for function descriptions in WP_User_Query Class, as per docs standards.
See #54729.


git-svn-id: https://develop.svn.wordpress.org/trunk@53256 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-25 13:03:15 +00:00
Jb Audras
bb76c79a44 Users: Make sure WP_User_Query can be filtered using the fields parameter.
This change ensures the `fields` parameter is taken into account when running `WP_User_Query` by fixing the conditional statement used to process the `fields` param.

Props rilwis, peterwilsoncc, NomNom99, hellofromTonya, audrasjb, rilwis, Boniu91.
Fixes #53177.


git-svn-id: https://develop.svn.wordpress.org/trunk@53255 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-25 12:55:35 +00:00
Jb Audras
3dcdd4b799 Docs: Use third-person singular verbs for function descriptions in WP_Theme Class, as per docs standards.
See #54729.


git-svn-id: https://develop.svn.wordpress.org/trunk@53254 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-25 09:52:18 +00:00
Jb Audras
6189d64f31 Themes: Ensure WP_Theme::get_files() doesn't return unexpected values.
This change filters out empty entries from `WP_Theme::get_files()` before returning the array of files. This avoid returning an entry with `false` value when the directory of the theme does not exist.

Props dd32, opurockey, Rahmohn, audrasjb.
Fixes #53599.


git-svn-id: https://develop.svn.wordpress.org/trunk@53253 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-25 09:45:00 +00:00
Jb Audras
94c0fb7628 Docs: Use third-person singular verbs for function descriptions in wp-includes/nav-menu.php, as per docs standards.
See #54729.


git-svn-id: https://develop.svn.wordpress.org/trunk@53252 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-25 09:30:34 +00:00
Jb Audras
074aaf152f Docs: Typo correction in wp-includes/ms-functions.php docblock.
See #54729.


git-svn-id: https://develop.svn.wordpress.org/trunk@53251 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-25 09:23:22 +00:00
Jb Audras
1d39994ba6 Docs: Use third-person singular verbs for function descriptions in wp-includes/ms-load.php, as per docs standards.
See #54729.


git-svn-id: https://develop.svn.wordpress.org/trunk@53250 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-25 09:20:55 +00:00
Jb Audras
071d971d16 Docs: Use third-person singular verbs for function descriptions in wp-includes/capabilities.php, as per docs standards.
Props azouamauriac.
See #54729.



git-svn-id: https://develop.svn.wordpress.org/trunk@53249 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-24 21:30:21 +00:00
Jb Audras
47aa11c5a6 Docs: Use third-person singular verbs for function descriptions in Multisite WordPress API, as per docs standards.
See #54729.


git-svn-id: https://develop.svn.wordpress.org/trunk@53248 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-24 21:26:51 +00:00
Jb Audras
f1235f2cba Twenty Fifteen: Use #page height instead of body height in sidebar scroll calculation.
This changeset replaces `bodyHeight = $body.height();` with `bodyHeight = $('#page).height();`. It fixes a JS issue in some specific context, when there is content generated right before the closing `body` tag. For example, this happens when the HTML content is added using the `wp_footer` filter.

Props stephenharris, sabernhardt, audrasjb.
Fixes #40492.


git-svn-id: https://develop.svn.wordpress.org/trunk@53247 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-24 21:01:09 +00:00
Sergey Biryukov
b1a1bdd88c Code Modernization: Rename parameters that use reserved keywords in swp-includes/class-wp-customize-setting.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_Customize_Setting` class methods.

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

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

git-svn-id: https://develop.svn.wordpress.org/trunk@53246 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-24 00:26:03 +00:00
Sergey Biryukov
2d852f93b1 Code Modernization: Rename parameters that use reserved keywords in wp-includes/class-wp-customize-nav-menus.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 `$type` and `$object` parameters to `$object_type` and `$object_name` in `WP_Customize_Nav_Menus::load_available_items_query()`.

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

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

git-svn-id: https://develop.svn.wordpress.org/trunk@53245 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-23 20:57:06 +00:00
Sergey Biryukov
9a8d52395c Docs: Correct the expected parameter type for WP_Customize_Manager::remove_preview_signature().
Before the method was deprecated, the parameter contained the value passed through for the `wp_die_handler` filter, which expects a callable function. 

Follow-up to [20926], [32535], [34320], [38810], [53242], [53243].

See #54729.

git-svn-id: https://develop.svn.wordpress.org/trunk@53244 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-22 10:54:07 +00:00
Sergey Biryukov
07e5c662c3 Code Modernization: Rename parameters that use reserved keywords in wp_die_*_handler filters.
While using reserved PHP keywords as parameter name labels is allowed, in the context of function calls using named parameters in PHP 8.0+, this will easily lead to confusion. To avoid that, it is recommended not to use reserved keywords as function parameter names.

This commit renames the `$function` parameter to `$callback` in `wp_die_*_handler` filters, which aims to make it easier to use a non-reserved parameter name for anyone utilizing these filters.

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

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

git-svn-id: https://develop.svn.wordpress.org/trunk@53243 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-22 10:41:59 +00:00
Sergey Biryukov
09406cb537 Code Modernization: Rename parameters that use reserved keywords in wp-includes/class-wp-customize-manager.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_Customize_Manager::post_value()`.
* Renames the `$return` parameter to `$callback` in `WP_Customize_Manager::remove_preview_signature()`.

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

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

git-svn-id: https://develop.svn.wordpress.org/trunk@53242 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-22 10:29:45 +00:00
Jb Audras
6d23d07e80 Build/Test Tools: Typo correction in rss2 unit tests.
Follow-up to [53233].

Props SergeyBiryukov.
Fixes #47968.


git-svn-id: https://develop.svn.wordpress.org/trunk@53241 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-21 23:11:10 +00:00
Sergey Biryukov
509b159eec Code Modernization: Rename parameters that use reserved keywords in wp-includes/block-supports/border.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_has_border_feature_support()`.

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

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

git-svn-id: https://develop.svn.wordpress.org/trunk@53240 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-21 21:03:05 +00:00
Sergey Biryukov
14d9ca8da6 Code Modernization: Rename parameters that use reserved keywords in wp-includes/atomlib.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 `AtomParser::xml_escape()`.

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

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

git-svn-id: https://develop.svn.wordpress.org/trunk@53239 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-21 11:22:45 +00:00
Peter Wilson
f341d73ad9 Posts, Post Types: Fix option validation in stick_post().
Normalize an invalid `sticky_posts` option to an empty array within `stick_post()`. This fixes a bug in which an unexpected option value would prevent new posts from being made sticky.

Follow up to [50380].

Props azouamauriac, denishua, kajalgohel, sergeybiryukov, costdev.
Fixes #55176.



git-svn-id: https://develop.svn.wordpress.org/trunk@53238 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-21 06:02:21 +00:00
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