45652 Commits

Author SHA1 Message Date
Sergey Biryukov
c72ab8fa00 Docs: Remove double spaces in tests/phpunit/README.txt.
Props grandeljay.
Fixes #55637.

git-svn-id: https://develop.svn.wordpress.org/trunk@53310 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-29 13:31:48 +00:00
Jonny Harris
5866165adf Taxonomy: Increase cache hits in WP_Term_Query when using include and exclude parameters.
Ensure that empty values of include and exclude passed to the parameters of `WP_Term_Query`, reused existing caches by 
resetting values to an empty array. 

Props Spacedmonkey, peterwilsoncc, hellofromtonya.
Follow-up to [52970].
See #55352.



git-svn-id: https://develop.svn.wordpress.org/trunk@53309 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-29 12:34:35 +00:00
Peter Wilson
34ecbc808c Bundled Themes: Note visually hidden text for translators.
Indicate the use of screen reader only text in translator comments.

Props sabernhardt.
Fixes #55591.



git-svn-id: https://develop.svn.wordpress.org/trunk@53308 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-29 05:01:22 +00:00
Peter Wilson
a010239714 Media: Validate track number ID3 tags before use.
Validate current and total track ID3 tags as numeric before use.

Props mjkhajeh, SergeyBiryukov, costdev.
Fixes #55204.



git-svn-id: https://develop.svn.wordpress.org/trunk@53307 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-29 04:48:13 +00:00
Peter Wilson
c70c7ad811 Install: Prevent DB errors caused by web fonts API.
Bypass checking `theme.json` for web fonts during the installation of WordPress.

During installation the active theme is considered to be Twenty Twenty-Two (the default theme). As a block theme this prompts a database call when the web fonts API checks the `theme.json` settings, this triggers a database error during installation as the database tables do not exist.

Props chouby, costdev, peterwilsoncc, sergeybiryukov.
Fixes #55632.



git-svn-id: https://develop.svn.wordpress.org/trunk@53306 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-29 03:48:48 +00:00
Sergey Biryukov
613cac5a2d Docs: Make the @return tag for Translation_Entry::key() more precise.
Props manooweb.
Fixes #55640.

git-svn-id: https://develop.svn.wordpress.org/trunk@53305 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-28 16:51:12 +00:00
Sergey Biryukov
37c08a07f0 Bootstrap/Load: Move some more administration-related hooks to admin-filters.php.
Follow-up to [53266].

Fixes #54795.

git-svn-id: https://develop.svn.wordpress.org/trunk@53304 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-28 16:37:29 +00:00
Mike Schroder
ebc3417c2d Media: Ensure wp_read_image_metadata filter returns array for $iptc and $exif.
Makes the behavior of the filter lines up with its documentation.
Previously, both `$iptc` and `$exif` could return `false` when `exif_read_data()` or `iptcparse()` failed.

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

Props volodymyrkolesnykov, SergeyBiryukov, sabernhardt, sumitsingh, mikeschroder.
Fixes #54637.

git-svn-id: https://develop.svn.wordpress.org/trunk@53303 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-28 10:58:48 +00:00
John Blackbourn
1cffa3f82b Docs: Various docblock corrections and improvements for changes introduced in 6.0.
See #54729


git-svn-id: https://develop.svn.wordpress.org/trunk@53302 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-28 09:57:51 +00:00
John Blackbourn
bca354c96c Mail: Improve the docblocks for actions and functions related to the parsing of authentication cookies.
See #54729


git-svn-id: https://develop.svn.wordpress.org/trunk@53301 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-28 09:52:56 +00:00
John Blackbourn
81eb65fd9e Docs: Various docblock corrections.
See #54729


git-svn-id: https://develop.svn.wordpress.org/trunk@53300 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-28 09:47:19 +00:00
John Blackbourn
33c08f16d1 Docs: Various docblock improvements.
See #54729


git-svn-id: https://develop.svn.wordpress.org/trunk@53299 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-28 09:44:12 +00:00
Peter Wilson
832429e9b2 Editor: Show comment previews in the Comment Query Loop.
Update `build_comment_query_vars_from_block()` to show previews of unmoderated comments to the original author of the comment. This duplicates the existing logic in `wp_list_comments()`.

Props darerodz, bernhard-reiter, czapla.
Fixes #55634.



git-svn-id: https://develop.svn.wordpress.org/trunk@53298 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-28 01:16:18 +00:00
Jonathan Desrosiers
47e10bee2a Build/Test Tools: Update the NPM dependencies to the latest versions.
This updates the following development dependencies:

- `@wordpress/scripts` from `22.4.2` to `22.5.0`.
- `chalk` from `4.1.2` to `5.0.1`.
- `grunt` from `1.4.1` to `1.5.2`.
- `grunt-contrib-clean` from ``2.0.0` to `2.0.1`.
- `grunt-contrib-uglify` from `5.1.0` to `5.2.1`.
- `qunit` from `2.18.1` to `2.18.2`.
- `sass` from `1.50.0` to `1.51.0`.
- `sinon` from `13.0.1` to `13.0.2`.
- `uglify-js` from `3.15.3` to `3.15.4`.

Fixes #54727.

git-svn-id: https://develop.svn.wordpress.org/trunk@53297 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-27 17:19:38 +00:00
Jonathan Desrosiers
65a2a4fac7 External Libraries: Update the underscore library to version 1.13.3.
This is a minor bug fix release.

Fixes #55547.

git-svn-id: https://develop.svn.wordpress.org/trunk@53296 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-27 14:37:09 +00:00
Jonathan Desrosiers
731b6e18b8 Bundled Themes: Update NPM dependencies for default themes.
This updates all NPM dependencies for all default themes with a `package.json` file (Twenty Nineteen, Twenty Twenty, and Twenty Twenty-One) to their latest versions following the defined version constraints. `npm audit fix` has also been run for each theme.

These updates only resulted in minor changes within built files for Twenty Twenty-One.

See #54727.

git-svn-id: https://develop.svn.wordpress.org/trunk@53295 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-27 14:23:47 +00:00
Sergey Biryukov
37f91b71c6 Bootstrap/Load: Avoid a PHP warning when setting the $pagenow global in wp-includes/vars.php.
In some scenarios where `is_admin()` returns true but `$_SERVER['PHP_SELF']` does not match a `wp-admin/*` location, setting the `$pagenow` global could trigger a PHP warning: `Undefined array key 1`.

This commit avoids the warning by checking whether the matches array is not empty.

Props janh2, konradyoast, peterwilsoncc.
Fixes #54700.

git-svn-id: https://develop.svn.wordpress.org/trunk@53294 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-27 13:45:57 +00:00
Peter Wilson
d47a44ab68 Built tools: Reduce file size of About page texture.
Reduce the file size of the file `src/wp-admin/images/about-texture.png` by running it through the grunt precommit hook.

Other modified files are not included in this commit as there is no change in file size.

See #48703.



git-svn-id: https://develop.svn.wordpress.org/trunk@53293 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-27 05:35:14 +00:00
Peter Wilson
6ff649472b Media: Ensure wp_crop_image() returns correct file type.
Return the correct file path from `wp_crop_image()` when a developer modifies the file type with via the `image_editor_output_format` filter.

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

Props mat-lipe, adamsilverstein.
Fixes #55403.



git-svn-id: https://develop.svn.wordpress.org/trunk@53292 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-27 05:19:52 +00:00
Peter Wilson
2b16e7fc01 Comments: Avoid DB error in comment meta queries.
In `WP_Comment_Query` always include the table name when referencing `wp_comments.comment_ID`. This avoids ambiguity in when making meta queries as `wp_commentmeta` includes a column of the same name.

Follow up to [47887].

Props genosseeinhorn, azouamauriac, audrasjb, peterwilsoncc.
Fixes #55218.


git-svn-id: https://develop.svn.wordpress.org/trunk@53291 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-27 04:08:16 +00:00
Sergey Biryukov
4bc07ccb43 Post WordPress 6.0 Beta 3 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@53290 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-26 16:36:59 +00:00
Sergey Biryukov
c70f640e3a WordPress 6.0 Beta 3.
git-svn-id: https://develop.svn.wordpress.org/trunk@53289 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-26 16:14:15 +00:00
Tonya Mork
12d8066d39 Themes: Remove 'gutenberg' as translation context in _wp_theme_json_webfonts_handler().
Follow-up to [53282].

Props kebbet.

See #55567, #46370.

git-svn-id: https://develop.svn.wordpress.org/trunk@53288 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-26 15:35:13 +00:00
Sergey Biryukov
60e13f468c Code Modernization: Rename parameters that use reserved keywords in wp-includes/deprecated.php.
While using reserved PHP keywords as parameter name labels is allowed, in the context of function calls using named parameters in PHP 8.0+, this will easily lead to confusion. To avoid that, it is recommended not to use reserved keywords as function parameter names.

This commit:
* Renames the `$echo` parameter to `$display` in:
 * `the_category_ID()`
 * `get_author_link()`
 * `get_links()`
 * `get_category_rss_link()`
 * `get_author_rss_link()`
* Renames the `$string` parameter to `$text` in `wp_specialchars()`.
* Renames the `$string` parameter to `$message` in `debug_fwrite()`.
* Renames the `$string` parameter to `$content` in `wp_kses_js_entities()`.

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

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

git-svn-id: https://develop.svn.wordpress.org/trunk@53287 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-26 15:26:17 +00:00
Jeff Ong
f6bea00143 Twenty Twenty-Two: Add three style variations.
This commit adds three style variations to Twenty Twenty-Two, allowing users to quickly swap between different visual styles — "Blue", "Pink", and "Swiss" — for the default theme. The variations are previewed and selected from the Site Editor's global styles panel. 

For the implementation, each variation is defined by its own theme.json file within the "/styles" directory of the theme. All variations leverage the internal-only theme.json handler of the Webfonts API [53282] to load locally hosted fonts.

Props kjellr, hellofromtonya.
See #55433.


git-svn-id: https://develop.svn.wordpress.org/trunk@53286 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-26 15:25:01 +00:00
Sergey Biryukov
5aed8f3b5b Code Modernization: Rename parameters that use reserved keywords in wp-includes/comment-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 `$class` parameter to `$css_class` in `comment_class()` and `get_comment_class()`.
* Renames the `$echo` parameter to `$display` in `comment_class()`.

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

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

git-svn-id: https://develop.svn.wordpress.org/trunk@53285 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-26 15:06:32 +00:00
Sergey Biryukov
e86772db78 Code Modernization: Rename parameters that use reserved keywords in wp-includes/class.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 `$echo` parameter to `$display` in `WP_Styles` 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], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283].

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

git-svn-id: https://develop.svn.wordpress.org/trunk@53284 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-26 14:57:41 +00:00
Sergey Biryukov
09237efb34 Code Modernization: Rename parameters that use reserved keywords in wp-includes/class.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 `$echo` parameter to `$display` in `WP_Scripts` 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], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281].

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

git-svn-id: https://develop.svn.wordpress.org/trunk@53283 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-26 14:54:37 +00:00
Tonya Mork
02414638ce Themes: Add internal-only theme.json's webfonts handler (stopgap).
Adds `_wp_theme_json_webfonts_handler()` for handling `fontFace` declarations in a theme's `theme.json` file to generate the `@font-face` styles for both the editor and front-end.

Design notes:
* It is not a public API, but rather an internal, Core-only handler.
* It is a stopgap implementation that will be replaced when the public Webfonts API is introduced in Core.
* The code design is intentional, albeit funky, with the purpose of avoiding backwards-compatibility issues when the public Webfonts API is introduced in Core.
   * It hides the inter-workings.
   * Does not exposing API ins and outs for external consumption.
   * Only works for `theme.json`.
   * Does not provide registration or enqueuing access for plugins.

For more context on the decision to include this stopgap and the Webfonts API, see:
* Core's PR 40493 https://github.com/WordPress/gutenberg/pull/40493
* Gutenberg's tracking issue 40472 https://github.com/WordPress/gutenberg/issues/40472

Props aristath, hellofromTonya, peterwilsoncc, costdev, jffng, zieladam, gziolo, bph, jonoaldersonwp, desrosj.

See #55567, #46370.

git-svn-id: https://develop.svn.wordpress.org/trunk@53282 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-26 14:46:37 +00:00
Sergey Biryukov
60cb20c4cc Code Modernization: Rename parameters that use reserved keywords in wp-includes/class-wp-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 `$list` parameter to `$status` in `WP_Dependencies::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], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277].

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

git-svn-id: https://develop.svn.wordpress.org/trunk@53281 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-26 14:26:38 +00:00
Sergey Biryukov
47c2d0ff83 Docs: Add missing documentation for WP_*_Query::get_search_sql() method parameters.
Includes renaming the `$cols` parameter to `$columns` for consistency across the classes.

Follow-up to [42876], [53272-53276].

See #54729.

git-svn-id: https://develop.svn.wordpress.org/trunk@53280 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-26 14:02:14 +00:00
Sergey Biryukov
ffc17842c7 Docs: Correct alignment for the customize_nav_menu_available_items filter DocBlock.
Follow-up to [53245].

See #54729.

git-svn-id: https://develop.svn.wordpress.org/trunk@53279 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-26 13:42:55 +00:00
Greg Ziółkowski
26413556c9 Editor: Update WordPress packages for 6.0 Beta 3
Included cherry-picked commits from the Gutenberg plugin that fix bugs discovere after WordPress 6.0 Beta 2.

Props zieladam, ndiego.
See #55567.



git-svn-id: https://develop.svn.wordpress.org/trunk@53278 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-26 13:39:57 +00:00
Sergey Biryukov
c43014f87f Code Modernization: Rename parameters that use reserved keywords in wp-includes/class-wp-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 `$array` parameter to `$query_vars` in `WP_Query::fill_query_vars()`.
* Renames the `$default` parameter to `$default_value` in `WP_Query::get()`.

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

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

git-svn-id: https://develop.svn.wordpress.org/trunk@53277 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-26 13:30:47 +00:00
Sergey Biryukov
4fcfb40223 Code Modernization: Rename parameters that use reserved keywords in wp-includes/class-wp-user-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_User_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], [53275].

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

git-svn-id: https://develop.svn.wordpress.org/trunk@53276 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-26 11:44:23 +00:00
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