45532 Commits

Author SHA1 Message Date
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
Jb Audras
565fa92c5d Users: Avoid warning on the_modified_author when get_userdata() returns false.
This change adds a check of the value returned by `get_userdata()` before using it in `get_the_modified_author()`. It avoids a warning when retrieving the last author who edited the current post.

Props juanlopez4691, mukesh27.
Fixes #55420.


git-svn-id: https://develop.svn.wordpress.org/trunk@53187 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-15 13:45:25 +00:00
Jb Audras
ede6f212af Text Changes: Fix various inconsistent capitalization issues.
Props Presskopp, arpitgshah, mukesh27, desrosj, audrasjb, marybaum.
Fixes #53028.


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

This commit renames the `$class` parameter to `$class_name` in `_get_list_table()`.

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

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

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

This commit:
* Renames the `$default` and `$parent` parameters to `$default_category` and `$parent_category` in `dropdown_categories()`.
* Renames the `$default` parameter to `$default_link_category` in `dropdown_link_categories()`.
* Renames the `$parent` parameter to `$parent_cat` and some other parameters for consistency in `wp_dropdown_cats()`.
* Renames the `$function` to `$callback` in `add_object_page()` and `add_utility_page()`.

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

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

git-svn-id: https://develop.svn.wordpress.org/trunk@53184 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-14 15:24:09 +00:00
Sergey Biryukov
c79cc90ad0 Coding Standards: Rename the $object variable to $attachment in several files.
This brings some consistency with a similar fragment in `Custom_Image_Heade::step_2_manage_upload()`, `WP_Site_Icon::insert_attachment()`, `media_handle_upload()`, and clarifies the type of the data.

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

See #55327, #54728.

git-svn-id: https://develop.svn.wordpress.org/trunk@53183 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-14 15:13:45 +00:00
Jb Audras
ef821da26b Help/about: Improve text in help tabs of the Personal Data Exporter/Eraser.
This change clarifies the purpose of the personal data exporter/eraser tool in the related help tab.

Props dimadin, peterwilsoncc, audrasjb, marybaum, webcommsat, azaozz, paapst, desrosj.
Fixes #52970.


git-svn-id: https://develop.svn.wordpress.org/trunk@53182 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-14 14:44:42 +00:00
Jb Audras
ffa8a414fe Plugins: Avoid translating empty plugin headers.
This change aims to avoid unnecessarily translating empty strings from plugin headers, by removing empty fields from translation process in `_get_plugin_data_markup_translate()`.

Props Chouby, johnbillion, audrasjb.
Fixes #54586.


git-svn-id: https://develop.svn.wordpress.org/trunk@53181 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-14 13:24:59 +00:00
Jb Audras
1b05b62500 Docs: Removes an irrelevant @link mention in Translation_Entry Class.
See #54729.


git-svn-id: https://develop.svn.wordpress.org/trunk@53180 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-14 09:16:35 +00:00
Jb Audras
2c77b6d891 Docs: Misc. Docblocks improvements in the Core User API.
See #54729.


git-svn-id: https://develop.svn.wordpress.org/trunk@53179 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-14 07:06:12 +00:00
Jb Audras
b8370ff5f6 Users: Update parameters passed to the new send_retrieve_password_email and retrieve_password_notification_email filters.
For consistency with some similar filters like `send_password_change_email` or `send_email_change_email`, and for more flexibility, pass `$user_login` and `$user_data` parameters directly to the new `send_retrieve_password_email` and `retrieve_password_notification_email` filters.

Follow-up to [52604], [52605], [52606], [52607].

Props SergeyBiryukov, costdev, peterwilsoncc.
Fixes #54690.


git-svn-id: https://develop.svn.wordpress.org/trunk@53178 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-14 06:22:37 +00:00
Jb Audras
21eeedfc64 Docs: Small fixes in WP_Theme_JSON_Resolver docblocks, as per documentation standards.
See #54729.


git-svn-id: https://develop.svn.wordpress.org/trunk@53177 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-14 06:13:40 +00:00
Jb Audras
374bd99fb4 Docs: Fix @link URLs in get_merged_data() Docblock.
This addresses some 404s found on Helphub links by replacing the related `@link` sources.

See #54729.


git-svn-id: https://develop.svn.wordpress.org/trunk@53176 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-14 06:03:24 +00:00
Sergey Biryukov
9c208b19c9 Query: Restore late compact() call for SQL clauses in wp-includes/class-wp-*-query.php.
This addresses a backward compatibility break where `posts_groupby` and other filters were applied, but their results were subsequently discarded and earlier values were used instead.

Follow-up to [52974].

Props nextend_ramona.
See #54728, #meta6273.

git-svn-id: https://develop.svn.wordpress.org/trunk@53175 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-14 00:02:31 +00:00
Sergey Biryukov
5bef987457 Code Modernization: Rename parameters that use reserved keywords in wp-admin/includes/class-wp-terms-list-table.php.
While using reserved PHP keywords as parameter name labels is allowed, in the context of function calls using named parameters in PHP 8.0+, this will easily lead to confusion. To avoid that, it is recommended not to use reserved keywords as function parameter names.

This commit renames the `$parent` parameter to `$parent_term` in `WP_Terms_List_Table::_rows()`.

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

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

git-svn-id: https://develop.svn.wordpress.org/trunk@53174 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-13 16:12:51 +00:00
Jonathan Desrosiers
ea239d33e7 Script Loader: Specify the version of the clipboard library included when registering.
For external libraries, the current version included with WordPress should be specified when registering scripts.

Props elifvish.
Fixes #55565.

git-svn-id: https://develop.svn.wordpress.org/trunk@53173 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-13 15:56:23 +00:00
Greg Ziółkowski
34dcf862de Tests: Add unit tests for rendering in Comment Template block
Follow-up [53138].

Props darerodz.
See #55505.



git-svn-id: https://develop.svn.wordpress.org/trunk@53172 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-13 07:47:15 +00:00
Greg Ziółkowski
55cbbcd636 REST API: Fix incorrect casing of patterns endpoint schema properties
Follow-up [53154].

Props talldanwp.
See #55505.



git-svn-id: https://develop.svn.wordpress.org/trunk@53171 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-13 07:04:45 +00:00
Peter Wilson
b1b59d27a0 Docs: Improve doc blocks for hooks added in [53126].
Fix a variable name and provide examples of the hook names.

Follow up to [53126].

Props dlh, pbiron.
Fixes #53212.


git-svn-id: https://develop.svn.wordpress.org/trunk@53170 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-13 03:02:43 +00:00
Peter Wilson
487347fa54 Cache API: Improve cache key generation in WP_Comment_Query.
Discard the parameters `update_comment_meta_cache` and `update_comment_post_cache` when generating the cache key as neither have an effect on the database query generated.

Props uday17035, spacedmonkey.
Fixes #55460.



git-svn-id: https://develop.svn.wordpress.org/trunk@53169 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-13 02:55:34 +00:00
David Baumwald
2e4661c6c9 Taxonomy: Only reset non-button form field values after adding a tag.
[52953] added HTML5 input types to the form reset after a tag is created.  The selector was a bit too greedy, causing `button` types to have their values reset also.  

This change updates the jQuery selector to exclude `button`, `submit`, and `reset` input types from the form reset.

Follow-up to [52953].

Props peterwilsoncc.
Fixes #48030.

git-svn-id: https://develop.svn.wordpress.org/trunk@53168 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-12 19:35:26 +00:00
Sergey Biryukov
51fb7887e3 Post WordPress 6.0 Beta 1 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@53167 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-12 19:03:42 +00:00
Sergey Biryukov
b039058669 WordPress 6.0 Beta 1.
git-svn-id: https://develop.svn.wordpress.org/trunk@53166 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-12 18:13:18 +00:00
Jonathan Desrosiers
81f603ea4f External Libraries: Update polyfill libraries.
This updates two polyfill libraries to their latest versions.

- `polyfill-library` from `3.105.0` to `4.0.0`.
- `formdata-polyfill` from `4.0.0` to `4.0.10`.

This will affect the following script handles:
- `wp-polyfill-formdata`
- `wp-polyfill-node-contains`
- `wp-polyfill-dom-rect`

These polyfills are no longer used by WordPress Core, but are kept up to date as a courtesy for any plugins or themes still requiring them.

See #55547.

git-svn-id: https://develop.svn.wordpress.org/trunk@53165 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-12 17:33:54 +00:00
Jonathan Desrosiers
7bb55a033f External Libraries: Update some external libraries.
This updates three external libraries to their latest versions:

- `backbone` from `1.4.0` to `1.4.1`.
- `underscore` from `1.13.1` to `1.13.2`.
- `clipboard` from `2.0.8` to `2.0.10`.

These are all minor updates containing bug fixes and documentation improvements.

See #55547.

git-svn-id: https://develop.svn.wordpress.org/trunk@53164 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-12 17:15:15 +00:00
Jonathan Desrosiers
8bb8bc92a4 External Libraries: Update moment to version 2.29.2.
See #55547.

git-svn-id: https://develop.svn.wordpress.org/trunk@53163 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-12 16:50:07 +00:00
Joe Dolson
d65dc545c5 Media: Fix editing controls covering image edit region.
Move the editing control sidebar for mobile image editing below the image edit region so image is not obscured.

Props mor10, HristoK, certainstrings, joedolson.
Fixes #30154.

git-svn-id: https://develop.svn.wordpress.org/trunk@53162 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-12 16:48:49 +00:00
Joe Dolson
2dca5e0bb3 Media: Enable edits to custom image sizes.
Add a filter `edit_custom_thumbnail_sizes` to allow users to enable editing individual custom image sizes.

Props silb3r, joedolson, costdev.
Fixes #28277.

git-svn-id: https://develop.svn.wordpress.org/trunk@53161 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-12 16:14:01 +00:00
Greg Ziółkowski
1d086c57d5 Editor: Use block settings to pass assets for the iframed editor
Backports changes applied in Gutenberg in https://github.com/WordPress/gutenberg/pull/37193.

Props zieladam.
See #55505.
Follow-up for [53157].



git-svn-id: https://develop.svn.wordpress.org/trunk@53160 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-12 15:59:47 +00:00
Joe Dolson
51d2b2924a Administration: Add unit test for term supplementary notice.
Adds a new test assertion to handle the supplemental data array passed in `ajax-response.js`. 

Follow up to [53123].

Props SergeyBiryukov, peterwilsoncc.
Fixes #55078.

git-svn-id: https://develop.svn.wordpress.org/trunk@53159 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-12 15:59:45 +00:00
Jb Audras
676f418c30 Widgets: Avoid 27 duplicate translations in Media Widgets constructor.
This changeset rationalizes the declaration of translation strings in the Media Widgets constructor.

Props Chouby, audrasjb, peterwilsoncc, costdev.
Fixes #54561.


git-svn-id: https://develop.svn.wordpress.org/trunk@53158 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-12 15:38:42 +00:00
Greg Ziółkowski
bab610091d Editor: Update WordPress packages based based on Gutenberg v13.0 RC3
This is the last step of backports from the Gutenberg plugin for WordPress 6.0 Beta 1 release. It includes all updates WordPress packages published to npm based on the Gutenberg plugin v13.0 RC3 release. This patch also includes all the necessary changes applied to core blocks. New blocks included:

- Avatar
- Comment Author Name
- Comment Content
- Comment Date
- Comment Edit Link
- Comment Rely Link
- Comment Template
- Comments Pagination
- Comments Pagination Next
- Comments Pagination Previous
- Comments Query Loop
- Home Link
- Post Author Biography
- Query No Results
- Read More
See more details in https://github.com/WordPress/wordpress-develop/pull/2564.

Props zieladam, ramonopoly, ocean90.
Fixes #55505.



git-svn-id: https://develop.svn.wordpress.org/trunk@53157 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-12 15:10:30 +00:00
Jb Audras
ebb9aa01dc Administration: Clarify some sentences after [53131].
Props SergeyBiryukov, costdev, audrasjb.
Fixes #46057.


git-svn-id: https://develop.svn.wordpress.org/trunk@53156 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-12 13:41:44 +00:00
Greg Ziółkowski
31c2639b80 Editor: Remove block patterns from server-generated settings
Backport of https://github.com/WordPress/gutenberg/pull/39185 from the Gutenberg plugin. Namely the part where the `gutenberg_remove_block_patterns_settings` filter function removes the block patterns fields from settings.

Props jsnajdr, zieladam.
See #55505.
Follow-up for [53152].



git-svn-id: https://develop.svn.wordpress.org/trunk@53155 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-12 12:58:03 +00:00
Greg Ziółkowski
bca9b6d940 REST API: Use snake case convention for field names in Block Patterns
Backports the same changes applied in Gutenberg: https://github.com/WordPress/gutenberg/pull/40254.

Follow-up for [53152].

Props jsnajdr, timothyblynjacobs.
See #55505.



git-svn-id: https://develop.svn.wordpress.org/trunk@53154 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-12 12:46:08 +00:00
Greg Ziółkowski
731a120463 Tests: Improve test cleanup for block supports
Let's unregister the block in the tear_down method. The block will be unregistered even if the test fails.

Props ramonopoly, antonvlasenko.
See #55505.
Follow-up [53085], [53076].



git-svn-id: https://develop.svn.wordpress.org/trunk@53153 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-12 09:38:18 +00:00
Greg Ziółkowski
a807e86391 REST API: Bring new endpoints for Block Patterns from Gutenberg plugin
Related Gutenberg issue: https://github.com/WordPress/gutenberg/issues/39889.

Backporting changes from the Gutenberg plugin:
- new Block Patterns REST API endpoint
- new Block Pattern Categories REST API endpoint
- updates to Query Loop related patterns
- support for custom taxonomies in Query Loop block

Props hellofromtonya, peterwilsoncc, ntsekouras, zieladam, ironprogrammer, spacedmonkey, timothyblynjacobs, antonvlasenko, jsnajdr.
See #55505.




git-svn-id: https://develop.svn.wordpress.org/trunk@53152 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-12 09:24:51 +00:00
Peter Wilson
25d8ed9027 Options: Show error when updating all options exceeds max_input_vars.
On sites with a large number of options, the number of inputs when saving all options via the /wp-admin/options.php page may exceed PHP's `max_input_vars` setting, this will prevent saving.

An error is now shown if this is the case.

Props ishitaka, jorbin, maguijo, pento, sergeybiryukov. 
Fixes #45438.


git-svn-id: https://develop.svn.wordpress.org/trunk@53151 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-12 06:05:45 +00:00
Peter Wilson
e3ead9f54c Emoji: Update the Twemoji to version 14.0.2.
This version introduces support for the latest Emoji added in Emoji 14. 

"Insert witty comment newly supported emoji."

Props kraftbj, desrosj, dd32, milana_cap.
Fixes #55395.




git-svn-id: https://develop.svn.wordpress.org/trunk@53150 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-12 05:54:29 +00:00
Peter Wilson
a2b13439ea Media: Run the wp_content_img_tag filter once per image.
Prevent multiple identical `img` tags in a block of content causing the `wp_content_img_tag` filter to fire multiple times for that image.

Follow up to [53028].

Props superpoincare, flixos90, pbearne, peterwilsoncc.
Fixes #55510.
See #55347.


git-svn-id: https://develop.svn.wordpress.org/trunk@53149 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-12 05:16:46 +00:00
Sergey Biryukov
b9556e457f I18N: Remove wp-config.php file name from translatable strings.
Follow-up to [35547], [35557], [53131].

See #46057.

git-svn-id: https://develop.svn.wordpress.org/trunk@53148 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-12 01:45:18 +00:00
David Baumwald
0ce91f72d9 Formatting: Make get_the_author_link pluggable.
Adds a new filter to alter the output of `get_the_author_link`.  This change also adds unit tests for the new filter.

Props dshanske, donmhico, audrasjb, peterwilsoncc, SergeyBiryukov.
Fixes #51859.

git-svn-id: https://develop.svn.wordpress.org/trunk@53147 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-11 23:36:56 +00:00
Jb Audras
4b898c119b Docs: Misc. docblock fixes in wp-admin/includes/mic.php, as per documentation standards.
See #54729.


git-svn-id: https://develop.svn.wordpress.org/trunk@53146 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-11 21:46:11 +00:00
Jb Audras
a879d2f855 Users: Improve wording of the "New Admin Email Address" email.
This changeset clarifies the email that the user gets when someone change the administration email address.

Props TwisterMc, Presskopp, audrasjb.
Fixes #45915.


git-svn-id: https://develop.svn.wordpress.org/trunk@53145 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-11 21:32:24 +00:00
Jb Audras
4ee40e3ff1 Formatting: Avoid escaping valid XML values in esc_xml().
This change improves the `esc_xml()` function by replacing two `empty()` checks with `isset()` to cover values that are not equal to `''` but still returning `true` when checked with `empty()`, like `'0'`, `0` or `false`. It also updates the related unit tests accordingly.

Props rumpel2116, pbiron.
Fixes #55399.


git-svn-id: https://develop.svn.wordpress.org/trunk@53144 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-11 19:58:04 +00:00
Jonathan Desrosiers
0453d1bc0d Build/Test Tools: Update generated CSS files after [53141].
This removes 2 instances of `-moz-tab-size`, which has not been required for Firefox to support the `tab-size` property since version 90 (current version is 99.

See #55559.

git-svn-id: https://develop.svn.wordpress.org/trunk@53143 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-11 19:08:19 +00:00
Greg Ziółkowski
cab6fec683 Editor: Update build_comment_query_vars_from_block from Gutenberg
Follow-up for [53138].
See #55505.



git-svn-id: https://develop.svn.wordpress.org/trunk@53142 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-11 16:33:51 +00:00
Greg Ziółkowski
65e8a87320 Build: Bring caniuse-lite to the latest version
This ensures that build tools target the most recent version of browsers supported by WordPress.

Follow-up [53135].
See #51750, #55505.



git-svn-id: https://develop.svn.wordpress.org/trunk@53141 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-11 16:23:21 +00:00