Commit Graph

19770 Commits

Author SHA1 Message Date
audrasjb
6996204bab Docs: Various docblock fixes in wp-admin/includes/image.php class, as per docs standards.
See #55646.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53402 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-08-05 14:07:09 +00:00
Sergey Biryukov
5e6acb229d Revisions: Use wp_get_latest_revision_id_and_total_count() where appropriate.
The function executes an optimized query to get the last revision ID and total count. It was originally introduced for `WP_REST_Posts_Controller::prepare_links()`, and is now used in a few more places in core:

* `register_and_do_post_meta_boxes()`
* `wp_get_post_revisions_url()`
* `wp_update_custom_css_post()`

Follow-up to [53759], [53769], [53778], [53779], [53841].

Props peterwilsoncc, mukesh27, SergeyBiryukov.
Fixes #56279.
Built from https://develop.svn.wordpress.org/trunk@53842


git-svn-id: http://core.svn.wordpress.org/trunk@53401 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-08-05 13:39:11 +00:00
audrasjb
233089c138 Coding standards: Properly escape URLs returned by self_admin_url() calls.
This address some other echoed instances missed by [53839].

Fixes #56329.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53399 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-08-05 06:12:10 +00:00
audrasjb
b79e2df684 Coding standards: Properly escape URLs returned by self_admin_url() calls.
Props krishaweb, audrasjb, SergeyBiryukov.
Fixes #56329.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53398 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-08-05 06:00:09 +00:00
John Blackbourn
79db573265 Docs: Various corrections and improvements to inline documentation.
See #55646

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


git-svn-id: http://core.svn.wordpress.org/trunk@53386 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-08-04 14:52:11 +00:00
Sergey Biryukov
de97f21367 Coding Standards: Remove extra space in two conditionals.
This fixes WPCS errors in `WP_Site_Health::get_test_plugin_version()` and `::get_test_theme_version()`:

* `Expected exactly one space between closing parenthesis and opening control structure; " " found.`
* `Expected 1 space(s) after closing parenthesis; found 2`

Follow-up to [53816].

See #56134.
Built from https://develop.svn.wordpress.org/trunk@53817


git-svn-id: http://core.svn.wordpress.org/trunk@53376 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-08-03 14:32:12 +00:00
Sergey Biryukov
1f39318123 Site Health: Improve the wording in plugin and theme version tests.
This displays a more appropriate message in case the site does not have any active plugins or installed themes.

Follow-up to [44986], [45099], [45336].

Props Presskopp, costdev, martin.krcho, Clorith, SergeyBiryukov.
Fixes #56134.
Built from https://develop.svn.wordpress.org/trunk@53816


git-svn-id: http://core.svn.wordpress.org/trunk@53375 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-08-03 13:09:09 +00:00
audrasjb
66d425d86a Administration: Change default site tagline to an empty string.
This changeset replaces the default "Just another WordPress site" tagline with an empty string for new installations. The reasoning is:

1. Not all themes display the tagline;
2. Not everyone changes the default tagline;
3. When people don't see the tagline in their theme, they may not realize it is still visible in some places, like feeds.

The string "Just another WordPress site" and the related multisite string: "Just another {NETWORK} site" are now only used as a placeholder for the tagline admin option.

Props markjaquith, Denis-de-Bernardy, westi, RyanMurphy, kovshenin, SergeyBiryukov, chriscct7, tyxla, hyperbrand, karmatosed, lukecavanagh, melchoyce, boemedia, khag7, sabernhardt, audrasjb, peterwilsoncc, costdev, martinkrcho, rafiahmedd.
Fixes #6479.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53374 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-08-03 12:20:16 +00:00
Sergey Biryukov
d7d371b840 Database: Suppress errors when checking the validity of table prefix during installation.
There are some table prefixes (for example, `7e1_`), which the database will try and parse as values unless they are quoted in backticks. Because not everyone remembers to quote their table names, WordPress discourages use of such prefixes during setup.

To test if the table prefix is valid, WordPress executes a query deliberately trying to generate an error:
> `Unknown column 'wp_' in 'field list'`
which means the prefix is safe to use, as the database was not able to parse it as a value.

Previously, this error would not be displayed to the user in a typical configuration, but would be logged on the server via `wpdb::print_error()`, and in some cases could block the installation.

This commit makes sure the error is still checked to display a proper message in case the prefix needs to be edited, but otherwise is silently discarded instead of being logged.

Follow-up to [37581], [41631], [51582].

Props pento, lazam786, Velochicdunord, irecinius, mikemanzo, dd32, blackawxs, codewhy, psykro, burgiuk, mdrago, maythamalsudany, peterwilsoncc, sumitsingh, deksar, SergeyBiryukov.
Fixes #42362.
Built from https://develop.svn.wordpress.org/trunk@53812


git-svn-id: http://core.svn.wordpress.org/trunk@53371 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-08-02 16:34:13 +00:00
Sergey Biryukov
f53c815b6e Coding Standards: Use more meaningful variables names in some Ajax functions.
This renames `$tax` to `$taxonomy_object` and `$s` to `$search` for clarity. The latter is only renamed when used as an internal variable and not referring to the `$s` global.

The list of affected functions:
* `wp_ajax_ajax_tag_search()`
* `wp_ajax_add_link_category`
* `wp_ajax_add_tag()`
* `wp_ajax_get_tagcloud()`
* `wp_ajax_inline_save_tax()`
* `wp_ajax_find_posts()`

Follow-up to [6542], [8901], [10222], [12833], [16771], [16992], [22723], [38698].

Props azouamauriac.
Fixes #55098.
Built from https://develop.svn.wordpress.org/trunk@53801


git-svn-id: http://core.svn.wordpress.org/trunk@53360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-30 15:16:08 +00:00
audrasjb
9a517ac7ae Docs: Various docblock improvements in Importer Administration API, as per docs standards.
See #55646.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53353 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-29 09:22:10 +00:00
audrasjb
d853d1ece2 Docs: Various docblock improvements in Export Administration API, as per docs standards.
See #55646.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53351 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-29 08:14:12 +00:00
gziolo
db37be017f Site Editor: Pass correct context into get_block_categories
Site Editor passed incorrectly global $post as a context when setting up block categories. Instead, it should pass $block_editor_context, since global $post is null in this file.

Props Mamaduka.
Fixes #56284.


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


git-svn-id: http://core.svn.wordpress.org/trunk@53343 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-27 12:27:16 +00:00
audrasjb
49ace608dc Taxonomy: Allow filtering Ajax term search results in quick edit.
This changeset introduces the `ajax_term_search_results` hook which can be used to filter the term search results returned by the AJAX term query.

Props grandeljay, costdev, ironprogrammer, audrasjb, SergeyBiryukov.
Fixes #55606.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53340 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-26 13:23:14 +00:00
Sergey Biryukov
87464289c3 Revisions: Update the "last revision" wording to "latest revision" in various files.
This aims to reduce ambiguity about what exactly is the "first" or "last" revision, and bring more consistency with similar wording elsewhere in core, e.g. latest posts, latest comments, etc.

This affects:
* `wp_save_post_revision()`
* `wp_prepare_revisions_for_js()`
* `WP_Customize_Manager::filter_revision_post_has_changed()`

Follow-up to [53759], [53769], [53778].

Props peterwilsoncc.
Fixes #55857.
Built from https://develop.svn.wordpress.org/trunk@53779


git-svn-id: http://core.svn.wordpress.org/trunk@53338 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-25 19:30:09 +00:00
audrasjb
a85bde79df Media: Prevent URLs from overflowing their container in the media editor.
This changeset also introduces the `.word-wrap-break-word` class which can be used to apply `word-wrap: break-word` to admin elements when needed.

Props mitogh, costdev, kapilpaul, alamgircsebd, sabernhardt, anantajitjg, afercia, circlecube, SergeyBiryukov, rafiahmedd, audrasjb.
Fixes #55393.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53336 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-25 18:11:08 +00:00
Sergey Biryukov
729ab2c971 Docs: Document that the $file_format parameter of metadata filters can be null.
This affects the `wp_read_video_metadata` and `wp_read_audio_metadata` filters.

Follow-up to [41746], [53764].

See #55646, #55828.
Built from https://develop.svn.wordpress.org/trunk@53768


git-svn-id: http://core.svn.wordpress.org/trunk@53327 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-23 15:06:10 +00:00
audrasjb
85e2d1df55 Docs: Add function description and @since mention for get_upload_iframe_src().
Follow-up to [14015].

See #55646.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53325 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-23 09:00:11 +00:00
audrasjb
007726602e Docs: Fix indentation issues in wp_read_video_metadata and wp_read_audio_metadata docblocks.
Follow-up to [53764].

See #55646.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53324 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-23 08:19:11 +00:00
audrasjb
32cc05a7c0 Media: Allow filtering audio file metadata in wp_read_audio_metadata().
This changeset introduces the `wp_read_audio_metadata` hook which allows to filter metadata extracted from an uploaded audio file.

This brings consistency with corresponding filters available for image and video file types:

- `wp_read_image_metadata` added in [6313] / #5162.
- `wp_read_video_metadata` added in [41746] / #35218.

Props luigipulcini, SergeyBiryukov, mukesh27.
Fixes #55828.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53323 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-23 08:13:11 +00:00
Sergey Biryukov
acbd857a4c Administration: Correct the escaping in documentation lookup for plugin and theme editor.
This brings consistency to similar code fragments that evolved in slightly different ways over the years:

* A check that the list of functions is not empty now exists in both editors.
* "Function Name..." is an option label, not an attribute, so `esc_html__()` is the correct function here.
* `esc_attr( urlencode( $function ) )` in the theme editor is replaced with `esc_attr( $function )`.
* `htmlspecialchars( $function )` in the theme editor is replaced with `esc_html( $function )`.

Follow-up to [10607], [10879], [11110], [11173], [11204], [11671], [14989].

Props aristath, justinahinon, poena, audrasjb, pratiweb, SergeyBiryukov.
Fixes #56007.
Built from https://develop.svn.wordpress.org/trunk@53758


git-svn-id: http://core.svn.wordpress.org/trunk@53317 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-22 11:33:10 +00:00
audrasjb
6b06b2cc25 Application Passwords: Link a more accurate documentation page in User profile edit screen.
This changeset replaces a HelpHub link with more accurate DevHub link about environment types in User profile edit screen.

Props greg24, whaze.
Fixes #56267.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53311 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-21 19:32:12 +00:00
Adam Silverstein
71ca314193 Media: enable generating multiple mime types for image uploads; specifically WebP versions for JPEG images by default.
This changeset adds the capability for core media uploads to generate sub sized images in more than a single mime type. The output formats for each mime type can be controlled through a filter. WebP is used as an additional output format for JPEG images by default to improve front end performance.

When generating additional mime types, only images which are smaller than the respective original are retained. By default, additional mime type images are only generated for the built-in core image sizes and any custom sizes that have opted in.

Image meta is updated with a new 'sources' array containing file details for each mime type. Each image size in the 'sizes' array also gets a new 'sources' array that contains the image file details for each mime type.

This change also increases image upload retries to accommodate additional image sizes. It also adds a `$mime_type` parameter to the `wp_get_missing_image_subsizes` function and filter.

This change adds three new filters to enable full control of secondary mime image generation and output:

* A new filter `wp_image_sizes_with_additional_mime_type_support` that filters the sizes that support secondary mime type output. Developers can use this to control the output of additional mime type sub-sized images on a per size basis.
* A new filter `wp_upload_image_mime_transforms` that filters the output mime types for a given input mime type. Developers can use this to control generation of additional mime types for a given input mime type or even override the original mime type.
* A new filter `wp_content_image_mimes` which controls image mime type output selection and order for frontend content. Developers can use this to control the mime type output preference order for content images. Content images inserted from the media library will use the available image versions based on the order from this filter.

Thanks to the many contributors who helped develop, test and give feedback on this feature.

A haiku to summarize:

Upload a JPEG
Images of all sizes
Output as WebPs

Props flixos90, MatthiasReinholz, studiolxv, markhowellsmead, eatingrules, pbiron, mukesh27, joegrainger, mehulkaklotar, tweetythierry, akshitsethi, peterwilsoncc, eugenemanuilov, mitogh, shetheliving, clarkeemily, codekraft, mikeschroder, clorith, kasparsd, spacedmonkey, trevorpfromsandee, jb510, scofennellgmailcom, seedsca, cagsmith, karinclimber, dainemawer, baxbridge, grapplerulrich, sobatkras, chynnabenton, tonylocalword, barneydavey, kwillmorth, garymatthews919, olliejones, imarkinteractive, jeffpaul, feastdesignco, webbeetle, masteradhoc.

See #55443.


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


git-svn-id: http://core.svn.wordpress.org/trunk@53310 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-21 18:03:13 +00:00
Sergey Biryukov
8484c7babb Coding Standards: Move wp-includes/wp-db.php to wp-includes/class-wpdb.php.
This renames the file containing the `wpdb` class to conform to the coding standards.

This commit also includes:
* A new `wp-db.php` that loads the new file, for anyone that may have been including the file directly.
* Replacing references to the old filename with the new filename.

Fixes #56268. See #55647.
Built from https://develop.svn.wordpress.org/trunk@53749


git-svn-id: http://core.svn.wordpress.org/trunk@53308 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-21 16:00:15 +00:00
Sergey Biryukov
ee4f7d7415 Coding Standards: Adjust the logic slightly in wp_ajax_replyto_comment().
This aims to bring more consistency to the function logic by separating the comment content and type checks from the user existence check.

Follow-up to [8720], [9098], [29758].

See #55647.
Built from https://develop.svn.wordpress.org/trunk@53747


git-svn-id: http://core.svn.wordpress.org/trunk@53306 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-21 10:59:10 +00:00
audrasjb
49dd15fb6b Docs: Add missing function description in wp-admin/includes/template.php.
This changeset also includes a few docblock standards fixes in the same file.

See #55646.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53305 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-21 09:24:10 +00:00
audrasjb
70f9851fda Administration: Add labels to read-only form fields.
This changeset improves admin forms accessibility by adding labels to the following read-only form fields:

- Network setup screen: new visible label to the four textareas for code users need to paste into their wp-config file and the server configuration file (web.config or .htaccess).
- `setup-config.php`: new visible label to one textarea for code to include in the `wp-config` file manually.
- Admin toolbar: adds an `arial-label` attribute to the old "shortlink" feature (not used anymore but still activable by plugins).

Props sabernhardt, audrasjb, ryokuhi, joedolson.
Fixes #54302.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53304 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-21 09:04:14 +00:00
audrasjb
4770e926ab Docs: Use third-person singular verbs for function descriptions in wp-admin/includes/comment.php, as per docblocks standards.
See #55646.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53302 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-20 22:15:10 +00:00
audrasjb
0df025d2bd Docs: Add missing function description in wp-admin/includes/comment.php.
See #55646.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53301 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-20 22:12:09 +00:00
desrosj
04cea1d615 Administration: Remove unused CSS selectors related to old format menu icons.
This removes all CSS definitions related to the `.icon16` class. Research shows that current ecosystem usage of this class is extremely minimal.

This selector was used for the Welcome Panel and Welcome Screen in WordPress 3.3 (see [19163] and [19197]. The icons were removed for WordPress 3.5 in [22018], but the related CSS remained, and were also included when the MP6 admin re-skinning was merged in [26072].

Props afercia, mmaumio, isabel_brison, sabernhardt, audrasjb, desrosj.
Fixes #35717.
Built from https://develop.svn.wordpress.org/trunk@53731


git-svn-id: http://core.svn.wordpress.org/trunk@53290 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-20 14:39:09 +00:00
Sergey Biryukov
e2a5b8684e Coding Standards: Standardize on user_id when passing data to comment functions.
The `wp_new_comment()`, `wp_update_comment()`, and `wp_filter_comment()` functions already normalize the `user_ID` parameter internally to `user_id`, which matches the database field name.

This commit aims to bring some consistency when passing the parameter in core.

The corresponding `$user_ID` variable is also renamed to `$user_id` to match the other variables when not referring to the `$user_ID` global, which has an exception in the WordPress coding standards.

Follow-up to [8543], [8720], [12267], [12300], [26491], [28915], [28922], [34799], [49303].

See #55647, #56244.
Built from https://develop.svn.wordpress.org/trunk@53729


git-svn-id: http://core.svn.wordpress.org/trunk@53288 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-20 14:14:09 +00:00
audrasjb
79c4babf39 Plugins: Improve color contrast on plugins screen when recovery mode is activated.
This changeset replaces `#d63638` (contrast ratio: 4.40) with `#b32d2e` (contrast ratio: 5.87) in Plugins screen row action links when the site is in recovery mode.

Props kebbet, mukesh27, joedolson, audrasjb.
Fixes #56190.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53285 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-20 11:37:15 +00:00
Sergey Biryukov
69a8ecce33 Coding Standards: Rename $comment_post_ID and $comment_author_IP variables in various files.
This fixes two WPCS warnings:
* `Variable "$comment_post_ID" is not in valid snake_case format`
* `Variable "$comment_author_IP" is not in valid snake_case format`

While matching the database fields of the same name, these variables did not follow the WordPress coding standards, and are now renamed to address that.

Note: The name change only affects internal variables and parameters for a few actions receiving a comment post ID:

* `edit_comment`
* `comment_id_not_found`
* `comment_closed`
* `comment_on_trash`
* `comment_on_draft`
* `comment_on_password_protected`
* `pre_comment_on_post`

The change does not affect parameters for functions receiving an array of comment data:

* `wp_insert_comment()`
* `wp_new_comment()`
* `wp_update_comment()`
* `wp_handle_comment_submission()`

The associated array keys still match the database fields: `comment_post_ID` and `comment_author_IP`.

Follow-up to [1706], [2894], [8720], [28427], [28437], [28457], [34799], [53720],

See #55647, #56244.
Built from https://develop.svn.wordpress.org/trunk@53723


git-svn-id: http://core.svn.wordpress.org/trunk@53282 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-19 16:19:11 +00:00
audrasjb
31a5eaf174 Upgrade/Install: Improve plugin update icon alignment.
This changeset improves the vertical alignment of the plugin update button in the Plugins screen.

Props Presskopp, sabernhardt, costdev, eherman24.
Fixes #56123.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53276 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-19 09:25:13 +00:00
Sergey Biryukov
1069ac4afd Posts, Post Types: Standardize on $post parameter name where appropriate.
This renames the `$post_id` or `$id` parameters to `$post` for functions that accept a post ID or post object:

* `get_sample_permalink()`
* `get_sample_permalink_html()`
* `wp_check_post_lock()`
* `wp_set_post_lock()`
* `get_the_tags()`
* `comment_class()`
* `get_comment_class()`
* `get_comments_link()`
* `get_comments_number()`
* `comments_number()`
* `get_comments_number_text()`
* `comments_open()`
* `pings_open()`
* `comment_form()`
* `do_trackbacks()`
* `pingback()`
* `post_permalink()`
* `get_post_permalink()`
* `get_edit_post_link()`
* `edit_post_link()`
* `get_delete_post_link()`
* `post_class()`
* `get_post_class()`
* `the_attachment_link()`
* `wp_get_attachment_link()`
* `wp_list_post_revisions()`
* `check_and_publish_future_post()`
* `add_ping()`
* `get_pung()`
* `get_to_ping()`
* `wp_get_post_revisions()`
* `wp_get_post_revisions_url()`

Additionally, `$revision_id` is renamed to `$revision` in:

* `wp_restore_post_revision()`
* `wp_delete_post_revision()`

Includes minor documentation improvements for consistency and code layout fixes for better readability.

Follow-up to [1599], [1794], [2881], [3303], [3851], [5302], [6633], [6716], [6985], [7103], [7149], [7747], [8011], [8638], [8643], [8695], [9138], [9273], [11425], [11922], [11956], [12284], [12810], [12923], [13023], [13171], [25567], [27156], [27473], [28558], [28602], [33659], [38852], [47276], [47366], [48622], [49544], [49597], [52095].

See #56243, #55647.
Built from https://develop.svn.wordpress.org/trunk@53715


git-svn-id: http://core.svn.wordpress.org/trunk@53274 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-18 17:37:17 +00:00
Sergey Biryukov
4e0b801910 Coding Standards: Use MINUTE_IN_SECONDS where appropriate.
This aims to clarify the time units for some timeout or expiration values.

Follow-up to [11823], [13177], [21996], [37747].

See #55647.
Built from https://develop.svn.wordpress.org/trunk@53714


git-svn-id: http://core.svn.wordpress.org/trunk@53273 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-17 02:18:09 +00:00
Sergey Biryukov
0eff79af37 Coding Standards: Use a single input array on Permalink Settings screen.
This reduces the amount of code to edit in case of any changes to the default permalink structures.

Follow-up to [53706], [53710].

See #55647, #55498.
Built from https://develop.svn.wordpress.org/trunk@53713


git-svn-id: http://core.svn.wordpress.org/trunk@53272 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-17 01:38:08 +00:00
Sergey Biryukov
74b2659ce4 Permalinks: Use home_url() to set the URL base on Permalink Settings screen.
This brings more consistency with how the home URL is retrieved elsewhere in the admin.

Follow-up to [1567], [1664], [2746], [3029], [4144], [53710].

Props sabernhardt.
Fixes #56235.
Built from https://develop.svn.wordpress.org/trunk@53712


git-svn-id: http://core.svn.wordpress.org/trunk@53271 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-17 01:06:13 +00:00
Sergey Biryukov
82ee734e8b Permalinks: Add a guiding paragraph on the Permalink Settings screen.
This is intended as an introduction to permalink structure selection.

Props kebbet, costdev, hasanuzzamanshamim, mukesh27.
Fixes #55947.
Built from https://develop.svn.wordpress.org/trunk@53711


git-svn-id: http://core.svn.wordpress.org/trunk@53270 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-16 20:13:10 +00:00
Sergey Biryukov
033728a0b7 Coding Standards: Improve readability of wp-admin/options-permalink.php.
Includes: 
* Wrapping longer lines and reducing alignment levels to fit more data on the screen.
* Restoring `esc_attr()` for input values, which may include translatable parts.
* Adding comments to closing `</div>` tags and PHP `endif` statements.
* Reducing the context switching between HTML and PHP.
* Balancing PHP conditionals to better reflect the structure.
* Removing repeated function calls to improve performance.
* Renaming some variables for clarity and consistency.

Follow-up to [470], [601], [963], [1227], [1664], [2746], [3029], [6976], [7230], [11350], [14051], [14553], [21891], [34691], [34749], [37747], [38066], [41182], [41986], [42343], [43571], [48710], [50830], [51892], [53706].

See #55647.
Built from https://develop.svn.wordpress.org/trunk@53710


git-svn-id: http://core.svn.wordpress.org/trunk@53269 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-16 16:20:10 +00:00
joedolson
1d101bada0 Permalinks: Label and describe permalink settings fields.
Restructure the permalink settings fields so URL formats are communicated to screen readers through `aria-describedby` relationships, avoid the usage of implicitly labeled input fields, labeling the custom permalink format correctly, and clarifying values. Make settings `table` element presentational.

Props rishishah, sabernhardt, kebbet.
Fixes #55498.
Built from https://develop.svn.wordpress.org/trunk@53706


git-svn-id: http://core.svn.wordpress.org/trunk@53265 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-15 22:42:10 +00:00
Sergey Biryukov
749720d897 Text Changes: Improve consistency of punctuation in some strings.
* Move the colon inside the `<strong>` tags in some `Error:` prefixes, to match other strings.
* Move the full stop at the end of some sentences outside of the `<strong>` tags used for individual phrases.

Follow-up to [11669], [23844], [53118], [53458], [53476].

Props NekoJonez, Presskopp.
Fixes #56027.
Built from https://develop.svn.wordpress.org/trunk@53700


git-svn-id: http://core.svn.wordpress.org/trunk@53259 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-14 14:10:11 +00:00
Sergey Biryukov
2cc9f73523 Editor: Include user's name in the wp_refresh_post_lock() response.
This ensures that the post lock data returned by the Heartbeat API is consistent.

Previously, `wp_check_locked_posts()` was updated to return the name of the user currently editing the post, but the `wp_refresh_post_lock()` response did not get a similar change.

Follow-up to [53070].

Props nathan.noom.
Fixes #56197.
Built from https://develop.svn.wordpress.org/trunk@53692


git-svn-id: http://core.svn.wordpress.org/trunk@53251 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-11 18:18:13 +00:00
Sergey Biryukov
9177df1ee7 Docs: Improve description for wp_plugin_update_rows() and wp_theme_update_rows().
Follow-up to [53689].

See #55646.
Built from https://develop.svn.wordpress.org/trunk@53690


git-svn-id: http://core.svn.wordpress.org/trunk@53249 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-09 12:59:11 +00:00
audrasjb
4f41d38512 Docs: Add missing function descriptions in wp-admin/includes/update.php.
See #55646.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53248 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-08 20:13:12 +00:00
desrosj
b5a14f47bb Themes: Properly escape home_url() when changing and updating themes.
Props obayedmamur, hurayraiit, costdev, shraboni, msnewas.
Fixes #56145.
Built from https://develop.svn.wordpress.org/trunk@53677


git-svn-id: http://core.svn.wordpress.org/trunk@53236 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-06 19:46:10 +00:00
Sergey Biryukov
3d05e52827 Themes: Revert the change of theme preview width on Add Themes screen.
The intention was for the preview ratio to remain accurate for the user's screen size when the sidebar is open, but this appears to have caused unintended side effects to the preview alignment.

Follow-up to [52647].

Props superbthemescom, Presskopp.
Fixes #56097. See #54764.
Built from https://develop.svn.wordpress.org/trunk@53663


git-svn-id: http://core.svn.wordpress.org/trunk@53222 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-05 15:36:12 +00:00
audrasjb
0f3b3218c2 Menus: Use more appropriate escaping functions in class Walker_Nav_Menu_Edit.
This changeset replaces `esc_attr` escaping function with `esc_url` as it is more appropriate in the context of a link's `href` attribute.

Props audrasjb, aniketpatel.
Fixes #56108.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53213 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-05 08:06:17 +00:00
Sergey Biryukov
0ea522b7a8 Help/About: Add help tab info for the "Send password reset" row action on Users screen.
This adds a description in the "Available Actions" help tab for the "Send password reset" quick action when hovering over a username in the user list.

Follow-up to [50129].

Props kebbet, costdev.
Fixes #55801.
Built from https://develop.svn.wordpress.org/trunk@53651


git-svn-id: http://core.svn.wordpress.org/trunk@53210 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-05 00:25:13 +00:00
Sergey Biryukov
e70ac7004c Coding Standards: Escape the home URL in the "Background updated. Visit your site" message.
This affects `Custom_Background::admin_page()`.

Follow-up to [13041], [45662], [53642].

Props robinwpdeveloper, sajjad67, rudlinkon, hztyfoon, costdev.
Fixes #56133.
Built from https://develop.svn.wordpress.org/trunk@53643


git-svn-id: http://core.svn.wordpress.org/trunk@53202 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-04 10:14:14 +00:00
Sergey Biryukov
eb08ad9160 Coding Standards: Escape the home URL in the "Header updated. Visit your site" message.
This affects `Custom_Image_Header::step_1()`.

Follow-up to [12890], [45654].

Props jakariaistauk, rudlinkon, hztyfoon, costdev.
Fixes #56132.
Built from https://develop.svn.wordpress.org/trunk@53642


git-svn-id: http://core.svn.wordpress.org/trunk@53201 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-04 10:11:12 +00:00
audrasjb
7c94f45bb0 Docs: Use third-person singular verbs for function descriptions in WP_Comments_List_Table class, as per docblock standards.
See #55646.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53200 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-04 08:20:15 +00:00
audrasjb
ec9b9bee76 Comments: Use more appropriate escaping functions in class WP_Comments_List_Table.
This changeset replaces `esc_attr` escaping function with `esc_html` as it is more appropriate in this context.

Props chintan1896, afragen, peterwilsoncc, SergeyBiryukov.
Fixes #56101.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53199 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-04 08:16:16 +00:00
audrasjb
a72203aa54 Docs: Add missing docblock description for install_themes_upload().
See #55646.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53198 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-04 08:00:15 +00:00
audrasjb
46eb690e8f Help/About: Typo correction in the Media Library help tab text.
Follow-up to [53586].

Props SergeyBiryukov.
Fixes #55800.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53175 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-29 13:39:14 +00:00
audrasjb
e170038ca1 Help/About: Add help tab info for available row actions in the Media Library.
This changeset fills the existing help tab with more detailed information about available row actions in the Media Library, when using the List view.

Props kebbet, audrasjb, costdev, SergeyBiryukov, mukesh27.
Fixes #55800.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53174 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-28 20:47:11 +00:00
Sergey Biryukov
79efd59bca Upgrade/Install: Add a conditional to facilitate testing of the Rollbacks feature project.
The [https://make.wordpress.org/core/2021/02/19/feature-plugin-rollback-update-failure/ Rollback Update Failure feature project] creates a temporary backup of plugins and themes before updating. This aims to make the update process more reliable and ensure that if a plugin or theme update fails, the previous version can be safely restored.

If the [https://wordpress.org/plugins/rollback-update-failure/ Rollback Update Failure plugin] is installed, `WP_Upgrader::install_package()` will use the `move_dir()` function from there for better performance. Instead of copying a directory from one location to another, it uses the `rename()` PHP function to speed up the process, which is instrumental in creating a temporary backup without a delay. If the renaming failed, it falls back to `copy_dir()` WP function.

This conditional aims to facilitate broader testing of the feature. It is temporary, until the plugin is merged into core.

Props afragen, pbiron, costdev, davidbaumwald, audrasjb, jrf, SergeyBiryukov.
Fixes #56057. See #51857, #54166.
Built from https://develop.svn.wordpress.org/trunk@53578


git-svn-id: http://core.svn.wordpress.org/trunk@53167 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-26 12:37:18 +00:00
Sergey Biryukov
7abd4bc951 Media: Use correct escaping function for URLs in some legacy media functions.
This affects:
* `get_image_send_to_editor()`
* `image_link_input_fields()`

Follow-up to [7092], [7874], [8653], [11109], [11204], [11383], [12051], [12199], [19982].

Props smit08, mukesh27.
Fixes #56064.
Built from https://develop.svn.wordpress.org/trunk@53570


git-svn-id: http://core.svn.wordpress.org/trunk@53159 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-24 13:52:13 +00:00
audrasjb
9a2ae08812 Application Passwords: Ensure long passwords don't break the "new password" notice.
This changeset adds a `word-wrap: break-word` CSS declaration to avoid text overflow in the "new application password" notice.

Props Presskopp, hasanuzzamanshamim, yannielsen, audrasjb.
Fixes #54581.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53156 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-23 23:04:09 +00:00
Aaron Jorbin
a457e3498e Editor: Universalize functions for checking block editor status.
`use_block_editor_for_post_type` and `use_block_editor_for_post` can be very useful in more contexts than wp-admin, especially when a site is in transition. For example, you may want to do things on init that are different.

Neither function depends on other functions that are available only in wp-admin (other than use_block_editor_for_post() relying on use_block_editor_for_post_type() and an admin-referrer check that's historically gated by a query variable and now also gated by is_admin), therefore  moving them to wp-includes seems both feasible and beneficial

Props ethitter, jorbin.
Fixes #51819.


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


git-svn-id: http://core.svn.wordpress.org/trunk@53148 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-23 18:48:13 +00:00
Sergey Biryukov
5d2e8afebd Code Modernization: Use the integer portion of an item position in add_submenu_page().
This fixes an `Implicit conversion from float to int loses precision` PHP 8.1 deprecation notice when adding a new admin menu item with a `float` value passed as the `$position` parameter.

This change is covered by existing unit tests and addresses 8 errors when running the test suite on PHP 8.1.

References:
* [https://php.watch/versions/8.1/deprecate-implicit-conversion-incompatible-float-string PHP 8.1: Implicit incompatible float to int conversion is deprecated]
* [https://wiki.php.net/rfc/implicit-float-int-deprecate PHP RFC: Deprecate implicit non-integer-compatible float to int conversions]

Follow-up to [52569], [53104].

Props jrf.
See #55656, #54798.
Built from https://develop.svn.wordpress.org/trunk@53555


git-svn-id: http://core.svn.wordpress.org/trunk@53144 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-22 14:55:11 +00:00
Sergey Biryukov
b8290da037 Docs: Improve documentation for WP_Image_Editor::save() and related functions.
Includes:
* Documenting the returned array using hash notation.
* Adding a `@since` note for the `$filesize` value being included in the returned array.

This affects:
 * `wp_generate_attachment_metadata()`
 * `wp_get_attachment_metadata()`
 * `WP_Image_Editor::save()`
 * `WP_Image_Editor_GD::save()` and `::_save()`
 * `WP_Image_Editor_Imagick::save()` and `::_save()`

Follow-up to [22094], [22619], [52837], [53546].

See #55646.
Built from https://develop.svn.wordpress.org/trunk@53547


git-svn-id: http://core.svn.wordpress.org/trunk@53136 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-21 11:18:17 +00:00
Sergey Biryukov
b352d32d8a Docs: Correct the return type for wp_save_image_file().
Since WordPress 3.5, `wp_save_image_file()` uses `WP_Image_Editor` classes under the hood to save the images.

While the `save()` method in those instances returns `array|WP_Error` and is documented as such, the return type of the `wp_save_image_file()` function was still left as `bool`.

A better solution would be to adjust the function to return the documented boolean type. However, doing that after 20+ major WP releases would be a backward compatibility break, so the documentation is now updated instead.

Includes:
* Documenting the returned array using hash notation.
* Adding a `@since` note for the `$image` parameter expecting a `WP_Image_Editor` instance.
* Adding a `@since` note for the `$filesize` value being included in the returned array.

Follow-up to [22094], [22619], [52837].

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


git-svn-id: http://core.svn.wordpress.org/trunk@53135 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-21 11:16:17 +00:00
audrasjb
bac638e610 Docs: Use third-person singular verbs for function descriptions in the Taxonomy Administration API.
See #55646.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53105 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-16 23:39:08 +00:00
audrasjb
8ea403e9bb Docs: Use third-person singular verbs for function descriptions in the WP_Screen API.
See #55646.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53103 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-16 23:10:10 +00:00
Sergey Biryukov
cacf46f12b Docs: Add a missing word in pre_months_dropdown_query filter description.
Follow-up to [50163].

See #55646.
Built from https://develop.svn.wordpress.org/trunk@53502


git-svn-id: http://core.svn.wordpress.org/trunk@53091 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-14 15:07:10 +00:00
Sergey Biryukov
3f74637dfe I18N: Use a translatable string for displaying a user's first name and last name.
That allows locales to switch the order of the first name and last name, should they prefer to do so.

The string was previously used in `wp_insert_user()` and is now reused in other places for consistency:

* `WP_MS_Users_List_Table::column_name()`​
* `WP_Users_List_Table::column_name()​`
* `wp_list_authors()`
* `wp_list_users()`

Note: This also removes the `wp_list_author_full_name` filter, introduced for the same purpose in `wp_list_authors()`, as redundant for now.

Follow-up to [53486].

See #17025.
Built from https://develop.svn.wordpress.org/trunk@53501


git-svn-id: http://core.svn.wordpress.org/trunk@53090 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-14 14:43:12 +00:00
audrasjb
7821fe08db Text Changes: Improve consistency of admin error notices in wp-admin/options.php.
This changeset replaces <strong>Error</strong>: with <strong>Error:</strong>, for better consistency.

Follow-up to [53458].

Fixes #50785.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53065 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-07 05:30:13 +00:00
audrasjb
bbe60d66c3 Text Changes: Improve consistency of admin error notices.
This changeset replaces `<strong>Error</strong>:` with `<strong>Error:</strong>`, for better consistency.

Props transl8or, mihaidumitrascu, audrasjb.
Fixes #50785.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53047 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-02 15:05:13 +00:00
Sergey Biryukov
01d172b581 General: Replace all esc_url_raw() calls in core with sanitize_url().
This aims to improve performance by calling `sanitize_url()` directly, instead of the `esc_url_raw()` wrapper. As of WordPress 6.1, `sanitize_url()` is the recommended function for sanitizing a URL for database or redirect usage.

Follow-up to [11383], [13096], [51597], [53452].

Props benjgrolleau, peterwilsoncc, SergeyBiryukov.
Fixes #55852.
Built from https://develop.svn.wordpress.org/trunk@53455


git-svn-id: http://core.svn.wordpress.org/trunk@53044 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-01 18:14:10 +00:00
Sergey Biryukov
d842b3b5c3 Docs: Explicitly declare some globals for clarity.
This aims to improve developer experience by making it clear that these variables are defined elsewhere.

Props ravipatel, davidbaumwald, hellofromTonya, costdev, SergeyBiryukov.
Fixes #51439.
Built from https://develop.svn.wordpress.org/trunk@53450


git-svn-id: http://core.svn.wordpress.org/trunk@53039 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-29 15:35:11 +00:00
Sergey Biryukov
9a2a423eb6 Quick/Bulk Edit: Check the show_in_quick_edit taxonomy property when processing the data for bulk edited posts.
Previously, setting the `show_in_quick_edit` property to `false` removed the taxonomy from the inline edit form, but several taxonomy-related database queries were still being performed in `bulk_edit_posts()` when building the arguments to pass to `wp_update_post()`, even though terms were not modified.

This commit improves performance by avoiding unnecessary database queries when `show_in_quick_edit` is `false`, and mirrors a similar check in the `get_inline_data()` function.

Follow-up to [13535], [14580], [31307], [52841], [53368].

Props Chouby, sabernhardt, costdev, nalininonstopnewsuk, webcommsat, marybaum, meher, wparslan, SergeyBiryukov.
Fixes #42474.
Built from https://develop.svn.wordpress.org/trunk@53449


git-svn-id: http://core.svn.wordpress.org/trunk@53038 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-27 15:51:12 +00:00
Peter Wilson
cf5cf75f09 Help/About: Add cache busting string to video thumbnail.
Append `?ver=6.0` to the image used for linking to the video to break the cache in browsers, proxy servers and on the CDN.

A new version of the image has been uploaded and replaced the file in the original location.

Props annezazu, critterverse, ryelle, costdev, ironprogrammer, dd32.
Fixes #55808.


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


git-svn-id: http://core.svn.wordpress.org/trunk@53036 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-25 02:19:17 +00:00
Peter Wilson
5214e469df Help/About: Finalise links on about page.
Wrap up about page for 6.0 release.

Props ryelle, mukesh27, hellofromTonya, SergeyBiryukov, peterwilsoncc.
Fixes #55775.


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


git-svn-id: http://core.svn.wordpress.org/trunk@53031 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-23 23:53:13 +00:00
Sergey Biryukov
d0e055e68f Coding Standards: Correct alignment in various files.
This fixes an `Equals sign not aligned correctly` WPCS warning.

Additionally, this commit sets the `svn:eol-style` property for the `phpunit/tests/ajax/wpAjaxCropImage.php` file and corrects line endings, so that the output of `composer format` is clean.

Follow-up to [53027], [53217], [53404].

Props hellofromTonya, SergeyBiryukov.
See #55647.
Built from https://develop.svn.wordpress.org/trunk@53441


git-svn-id: http://core.svn.wordpress.org/trunk@53030 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-23 20:40:14 +00:00
Sergey Biryukov
653a3af0d4 Upgrade/Install: Update $_old_files for 6.0.
Props hellofromTonya, JeffPaul, SergeyBiryukov.
Fixes #55794.
Built from https://develop.svn.wordpress.org/trunk@53439


git-svn-id: http://core.svn.wordpress.org/trunk@53028 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-23 17:02:16 +00:00
ryelle
c07f05ab86 Administration: Fix image overlap in Dashboard welcome panel.
Use longhand positioning properties (top, right, etc) so that the rtlcss build process can correctly adjust the layout for the RTL CSS.

Props ryelle, costdev, ironprogrammer, hellofromtonya.
Fixes #55793.


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


git-svn-id: http://core.svn.wordpress.org/trunk@53026 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-23 16:48:15 +00:00
Sergey Biryukov
40fc19024f Code Modernization: Replace phpversion() function calls with PHP_VERSION constant.
`phpversion()` return value and `PHP_VERSION` constant value are identical, but the latter is several times faster because it is a direct constant value lookup compared to a function call.

Props ayeshrajans, jrf, mukesh27, costdev, hellofromTonya, SergeyBiryukov.
Fixes #55680.
Built from https://develop.svn.wordpress.org/trunk@53426


git-svn-id: http://core.svn.wordpress.org/trunk@53015 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-20 17:38:14 +00:00
Peter Wilson
ec3b0158d8 Themes: Accept valid block themes.
Updates theme validation to accept block themes. This replaces the requirement for an `index.php` with a requirement for either an `index.php`, `/templates/index.html` or the deprecated `/block-templates/index.html`.

Validation is updated for theme uploads, within `WP_Theme::__construct` and `validate_current_theme()`. 

A block theme using the deprecated file structure is now included in the unit tests.

Props peterwilsoncc, sergeybiryukov, hellofromtonya, costdev, azaozz, gziolo, FlorianBrinkmann, Boniu91, aristath, poena, audrasjb.
Fixes #55754.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53005 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-20 00:49:18 +00:00
Sergey Biryukov
4b46629139 Accessibility: List Tables: Hide the Comments column icon and title attribute from screen readers.
The element already has non-visual text, making the icon and the `title` attribute redundant for assistive technologies.

Follow-up to [22439], [27548], [31513], [32991], [50804].

Props sabernhardt, ryokuhi, afercia, karlgroves, SergeyBiryukov.
Fixes #55555. See #24766.
Built from https://develop.svn.wordpress.org/trunk@53414


git-svn-id: http://core.svn.wordpress.org/trunk@53003 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-19 15:54:15 +00:00
Peter Wilson
08c5dbc7e9 Site Editor: Include style parameter in home template redirect.
When redirecting the site editor to the home template include the `style` querystring parameter if it is set. This ensures the style panel opens if the user expects it.

Props grantmkin, mamaduka, peterwilsoncc.
Fixes #55752.


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


git-svn-id: http://core.svn.wordpress.org/trunk@53002 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-19 02:27:13 +00:00
Peter Wilson
88f38062e2 Help/About: Ensure about page shows current header.
Add a query string parameter to the about page header images to ensure the cache is broken in browsers and CDNs.

Props ryelle.
Fixes #55750.


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


git-svn-id: http://core.svn.wordpress.org/trunk@52998 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-18 03:01:13 +00:00
gziolo
571e1e01b3 Editor: Return additional block patterns to server-generated settings
Reverts changes from [53155] to ensure backward compatibility.

Companion to Gutenberg changes https://github.com/WordPress/gutenberg/pull/40818. That makes sure that patterns registered with `admin_init` or `current_screen` hooks are not lost.

Props jsnajdr, zieladam, peterwilsoncc, johnstonphilip.
See #55567.


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


git-svn-id: http://core.svn.wordpress.org/trunk@52993 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-17 14:38:14 +00:00
audrasjb
c03decd0cb Users: Fix misalignment of new user password toggle button on mobile.
This fixes an issue where the password hide/show button was misaligned when creating a new user on small screens.

Props kebbet.
Fixes #55558.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52990 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-16 22:37:12 +00:00
Sergey Biryukov
f4d9778c98 Menus: Replace "drop down" (noun) with "dropdown" in a few strings.
This makes the spelling more consistent with other instances of the word in core.

Follow-up to [23844], [27676].

Props NekoJonez, mukesh27, SergeyBiryukov.
Fixes #55661.
Built from https://develop.svn.wordpress.org/trunk@53391


git-svn-id: http://core.svn.wordpress.org/trunk@52980 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-11 13:22:15 +00:00
ryelle
e8c02840a7 Administration: Update design of the Dashboard welcome panel.
This updates the panel to match the 6.0 About page styles, with the 6.0 graphic changing color based on the selected admin color scheme.

Props fcoveram, critterverse, joedolson, SergeyBiryukov.
Fixes #55532.


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


git-svn-id: http://core.svn.wordpress.org/trunk@52972 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-10 16:45:08 +00:00
ryelle
8817bba1bf Help/About: Update the About section for 6.0.
Switch the images to use the s.w.org CDN. Update the font style and spacing on the About page. Update the header images for Credits, Freedoms, and Privacy.

Props fcoveram, peterwilsoncc, SergeyBiryukov.
Fixes #55434.


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


git-svn-id: http://core.svn.wordpress.org/trunk@52971 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-10 16:33:08 +00:00
Sergey Biryukov
8c8b0a203a 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 `$parent` parameter to `$parent_page` in `parent_dropdown()`.

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

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


git-svn-id: http://core.svn.wordpress.org/trunk@52953 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-07 17:16:13 +00:00
Sergey Biryukov
8f805f4ddd Coding Standards: Remove extra space in wp-admin/admin-ajax.php.
Props rajeshraval786, costdev.
Fixes #55692.
Built from https://develop.svn.wordpress.org/trunk@53363


git-svn-id: http://core.svn.wordpress.org/trunk@52952 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-07 16:21:18 +00:00
Sergey Biryukov
7997df84a8 Site Health: Remove unused variables in WP_Site_Health::get_test_plugin_version().
Follow-up to [44986].

Props david.binda, mukesh27.
Fixes #55683.
Built from https://develop.svn.wordpress.org/trunk@53355


git-svn-id: http://core.svn.wordpress.org/trunk@52944 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-05 16:29:08 +00:00
ryelle
686a22802b Help/About: Add link to 6.0 Field Guide, fix missing placeholder in string.
Props audrasjb.
Follow-up to [53339].
See #55434.


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


git-svn-id: http://core.svn.wordpress.org/trunk@52943 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-05 15:35:10 +00:00
Peter Wilson
a34abb93b7 Quick/Bulk Edit: Remove duplicate HTML IDs.
Rename `#inline-edit-legend` to avoid duplicate HTML IDs. These have been renamed `#quick-edit-legend` and `#bulk-edit-legend` for the quick and bulk editors respectively.

This HTML ID is not required by the quick editor duplicated via JavaScript so is removed as part of the duplication process.

Follow up to [53096].

Props azaozz, costdev, greglone, hellofromtonya, ironprogrammer, joedolson, sabernhardt.
Fixes #55575.
See #35483.


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


git-svn-id: http://core.svn.wordpress.org/trunk@52941 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-05 03:26:16 +00:00
ryelle
7bd9548322 Help/About: Update the About section for 6.0.
This is the start of the WordPress 6.0 about page, introducing new content and a first pass of the new style.

Props fcoveram, estelaris, JeffPaul, critterverse, chanthaboune, dansoschin, webcommsat, annezazu, marybaum, cbringmann, eidolonnight, laurlittle, sergeybiryukov.
See #55434.


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


git-svn-id: http://core.svn.wordpress.org/trunk@52928 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-03 16:28:09 +00:00
audrasjb
4de4330b17 General: Add missing strong tag to some error messages.
This changeset adds missing `strong` tag to some error messages and updates some AJAX messages, for better consistency.

Follow-up to [53118].

Props NekoJonez, audrasjb, ocean90.
Fixes #54437.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52926 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-03 14:53:09 +00:00
Sergey Biryukov
056bbc95ea Docs: Improve plugin_install_action_links filter's docs.
Refer developers to `plugins_api()` for array of plugin data.

Follow-up to [53074], [53328].

Props afragen, pbiron.
See #55480.
Built from https://develop.svn.wordpress.org/trunk@53330


git-svn-id: http://core.svn.wordpress.org/trunk@52919 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-02 13:07:14 +00:00
Peter Wilson
0fcdd744c1 Plugins: Improve plugin_install_description filter's docs.
Refer developers to `plugins_api()` for array of plugin data.

Props afragen, pbiron, SergeyBiryukov, costdev.
Fixes #55480.


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


git-svn-id: http://core.svn.wordpress.org/trunk@52917 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-02 02:46:11 +00:00
John Blackbourn
bdaba2407c Docs: Improve documentation of the walker argument for various functions.
See #54729

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


git-svn-id: http://core.svn.wordpress.org/trunk@52907 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-29 19:28:09 +00:00
Peter Wilson
ef8a32f6b9 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.


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


git-svn-id: http://core.svn.wordpress.org/trunk@52896 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-29 04:50:12 +00:00
Sergey Biryukov
2334cea3e9 Bootstrap/Load: Move some more administration-related hooks to admin-filters.php.
Follow-up to [53266].

Fixes #54795.
Built from https://develop.svn.wordpress.org/trunk@53304


git-svn-id: http://core.svn.wordpress.org/trunk@52893 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-28 16:39:11 +00:00
Mike Schroder
d9266d5bfd 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.
Built from https://develop.svn.wordpress.org/trunk@53303


git-svn-id: http://core.svn.wordpress.org/trunk@52892 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-28 11:00:10 +00:00
John Blackbourn
c6dbcf8576 Docs: Various docblock corrections and improvements for changes introduced in 6.0.
See #54729

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


git-svn-id: http://core.svn.wordpress.org/trunk@52891 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-28 09:59:13 +00:00
John Blackbourn
6aa053dc01 Docs: Various docblock improvements.
See #54729

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


git-svn-id: http://core.svn.wordpress.org/trunk@52888 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-28 09:46:21 +00:00
Peter Wilson
87c8ca71b5 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.


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


git-svn-id: http://core.svn.wordpress.org/trunk@52882 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-27 05:37:08 +00:00
Peter Wilson
da0ce4038f 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.


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


git-svn-id: http://core.svn.wordpress.org/trunk@52881 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-27 05:21:08 +00:00
audrasjb
22de3f7711 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52856 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-26 06:54:09 +00:00
audrasjb
813c4d604c 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52855 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-26 06:32:08 +00:00
Peter Wilson
e9610a5d20 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52853 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-26 02:59:08 +00:00
Sergey Biryukov
0cc2cb34cd 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.
Built from https://develop.svn.wordpress.org/trunk@53232


git-svn-id: http://core.svn.wordpress.org/trunk@52821 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-20 11:19:12 +00:00
Sergey Biryukov
91ad9dbb07 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.
Built from https://develop.svn.wordpress.org/trunk@53230


git-svn-id: http://core.svn.wordpress.org/trunk@52819 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-20 10:46:09 +00:00
audrasjb
3d7603869b Docs: Misc fixes and improvements in the Administration Media API docblocks, as per documentation standards.
See #54729.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52818 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-20 08:29:08 +00:00
audrasjb
aab2815d58 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52817 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-20 08:13:10 +00:00
Sergey Biryukov
eeb9f68181 Menus: Use correct parameter in _wp_nav_menu_meta_box_object().
Follow-up to [53220].

Props davidbaumwald.
See #55327.
Built from https://develop.svn.wordpress.org/trunk@53222


git-svn-id: http://core.svn.wordpress.org/trunk@52811 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-19 15:59:10 +00:00
Sergey Biryukov
9ce061ae8c 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.
Built from https://develop.svn.wordpress.org/trunk@53220


git-svn-id: http://core.svn.wordpress.org/trunk@52809 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-19 15:13:08 +00:00
Sergey Biryukov
05d12bfa4c 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.
Built from https://develop.svn.wordpress.org/trunk@53216


git-svn-id: http://core.svn.wordpress.org/trunk@52805 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-19 13:51:08 +00:00
Sergey Biryukov
90cbd98c6b 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.
Built from https://develop.svn.wordpress.org/trunk@53215


git-svn-id: http://core.svn.wordpress.org/trunk@52804 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-19 12:48:08 +00:00
Sergey Biryukov
c4c4edccc0 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.
Built from https://develop.svn.wordpress.org/trunk@53207


git-svn-id: http://core.svn.wordpress.org/trunk@52796 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-18 15:22:08 +00:00
Sergey Biryukov
f53b215bfe 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.
Built from https://develop.svn.wordpress.org/trunk@53203


git-svn-id: http://core.svn.wordpress.org/trunk@52792 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-18 10:33:09 +00:00
Sergey Biryukov
99de4aea45 Docs: Use third-person singular verbs for function descriptions in wp-admin/includes/meta-boxes.php, per the documentation standards.
See #54729.
Built from https://develop.svn.wordpress.org/trunk@53201


git-svn-id: http://core.svn.wordpress.org/trunk@52790 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-17 17:57:09 +00:00
Sergey Biryukov
9043ef83ef Docs: Add missing descriptions for function parameters in wp-admin/includes/meta-boxes.php.
See #54729.
Built from https://develop.svn.wordpress.org/trunk@53200


git-svn-id: http://core.svn.wordpress.org/trunk@52789 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-17 17:47:13 +00:00
Sergey Biryukov
6c36a0867d Coding Standards: Simplify long conditions in xfn_check().
Add some comments for clarity.

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

See #54728.
Built from https://develop.svn.wordpress.org/trunk@53199


git-svn-id: http://core.svn.wordpress.org/trunk@52788 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-17 17:26:08 +00:00
Sergey Biryukov
447bd92f5d 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.
Built from https://develop.svn.wordpress.org/trunk@53198


git-svn-id: http://core.svn.wordpress.org/trunk@52787 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-17 15:37:09 +00:00
Sergey Biryukov
e0d13f8b59 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.
Built from https://develop.svn.wordpress.org/trunk@53197


git-svn-id: http://core.svn.wordpress.org/trunk@52786 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-17 15:07:08 +00:00
Sergey Biryukov
8a6d7ea5ac Coding Standards: Correct the $items_count variable in add_menu_classes().
Follow-up to [53195].

See #54728.
Built from https://develop.svn.wordpress.org/trunk@53196


git-svn-id: http://core.svn.wordpress.org/trunk@52785 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-17 14:44:07 +00:00
Sergey Biryukov
b32080c332 Coding Standards: Use more descriptive variable names in add_menu_classes().
Follow-up to [9578], [53193], [53194].

See #54728.
Built from https://develop.svn.wordpress.org/trunk@53195


git-svn-id: http://core.svn.wordpress.org/trunk@52784 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-17 14:41:08 +00:00
Sergey Biryukov
a30a1efac4 Docs: Add missing documentation for add_cssclass() and add_menu_classes().
Follow-up to [9578], [53193].

See #54729.
Built from https://develop.svn.wordpress.org/trunk@53194


git-svn-id: http://core.svn.wordpress.org/trunk@52783 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-17 14:30:13 +00:00
Sergey Biryukov
f6b7a1fd7a 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.
Built from https://develop.svn.wordpress.org/trunk@53193


git-svn-id: http://core.svn.wordpress.org/trunk@52782 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-17 14:10:07 +00:00
Sergey Biryukov
88cce3c705 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.
Built from https://develop.svn.wordpress.org/trunk@53192


git-svn-id: http://core.svn.wordpress.org/trunk@52781 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-17 10:51:10 +00:00
audrasjb
9998c01dca 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52780 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-16 06:15:09 +00:00
audrasjb
f087315090 Text Changes: Fix various inconsistent capitalization issues.
Props Presskopp, arpitgshah, mukesh27, desrosj, audrasjb, marybaum.
Fixes #53028.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52775 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-15 11:58:10 +00:00
Sergey Biryukov
ad5deed830 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.
Built from https://develop.svn.wordpress.org/trunk@53185


git-svn-id: http://core.svn.wordpress.org/trunk@52774 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-15 10:52:11 +00:00
Sergey Biryukov
e86b90cad6 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.
Built from https://develop.svn.wordpress.org/trunk@53184


git-svn-id: http://core.svn.wordpress.org/trunk@52773 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-14 15:26:09 +00:00
Sergey Biryukov
9a9617ea72 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.
Built from https://develop.svn.wordpress.org/trunk@53183


git-svn-id: http://core.svn.wordpress.org/trunk@52772 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-14 15:15:12 +00:00
audrasjb
c57fd8ae09 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52771 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-14 14:46:07 +00:00
audrasjb
80aea1734c 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52770 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-14 13:26:12 +00:00
Sergey Biryukov
c6a5a33e54 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.
Built from https://develop.svn.wordpress.org/trunk@53174


git-svn-id: http://core.svn.wordpress.org/trunk@52763 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-13 16:14:10 +00:00
davidbaumwald
2ea5eb36fe 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.
Built from https://develop.svn.wordpress.org/trunk@53168


git-svn-id: http://core.svn.wordpress.org/trunk@52757 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-12 19:37:14 +00:00
joedolson
fd9d7a7547 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.
Built from https://develop.svn.wordpress.org/trunk@53162


git-svn-id: http://core.svn.wordpress.org/trunk@52751 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-12 16:50:08 +00:00
joedolson
1d29cb6632 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.
Built from https://develop.svn.wordpress.org/trunk@53161


git-svn-id: http://core.svn.wordpress.org/trunk@52750 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-12 16:16:08 +00:00
audrasjb
bc0f186599 Administration: Clarify some sentences after [53131].
Props SergeyBiryukov, costdev, audrasjb.
Fixes #46057.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52745 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-12 13:43:16 +00:00
gziolo
e81c1a0267 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].


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


git-svn-id: http://core.svn.wordpress.org/trunk@52744 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-12 13:00:14 +00:00
Peter Wilson
5703931172 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52740 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-12 06:07:08 +00:00
Sergey Biryukov
561518cdd7 I18N: Remove wp-config.php file name from translatable strings.
Follow-up to [35547], [35557], [53131].

See #46057.
Built from https://develop.svn.wordpress.org/trunk@53148


git-svn-id: http://core.svn.wordpress.org/trunk@52737 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-12 01:47:07 +00:00
audrasjb
fcb19b1c42 Docs: Misc. docblock fixes in wp-admin/includes/mic.php, as per documentation standards.
See #54729.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52735 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-11 21:48:09 +00:00
audrasjb
476e73194d 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52734 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-11 21:34:08 +00:00
desrosj
523c679e76 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.
Built from https://develop.svn.wordpress.org/trunk@53143


git-svn-id: http://core.svn.wordpress.org/trunk@52732 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-11 19:10:13 +00:00
Sergey Biryukov
3180ab2cef Code Modernization: Rename parameters that use reserved keywords in wp-admin/includes/class-wp-site-icon.php.
While using reserved PHP keywords as parameter name labels is allowed, in the context of function calls using named parameters in PHP 8.0+, this will easily lead to confusion. To avoid that, it is recommended not to use reserved keywords as function parameter names.

This commit renames the `$object` variable to `$attachment` in `WP_Site_Icon::insert_attachment()` and updates the documentation accordingly.

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

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


git-svn-id: http://core.svn.wordpress.org/trunk@52726 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-11 14:21:09 +00:00
audrasjb
e0bb68d7cb Administration: Replace "can not" with "cannot" after [53131].
Follow-up to [53131], [52979].

See #46057, #38913

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


git-svn-id: http://core.svn.wordpress.org/trunk@52721 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-11 11:50:01 +00:00
audrasjb
12fc2d9146 Administration: Remove self-reference ("we") in WordPress Admin.
This changes updates many strings to remove self-references to an undefined "we" collective across the WordPress Administration.

The goal of this change is to better match the guidelines and recommendations set forth in the make/core handbook, specifically:

> the word "we" should be avoided (…) unless its made very clear which group is speaking.

Props johnbillion, shital-patel, audrasjb, marybaum, SergeyBiryukov, peterwilsoncc, johnjamesjacoby, kebbet, costdev, chaion07, davidbaumwald.
Fixes #46057.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52720 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-11 11:42:04 +00:00
Peter Wilson
f27ba31069 Permalinks: Improve settings page error messages.
Props sabernhardt.
Fixes #53141.


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


git-svn-id: http://core.svn.wordpress.org/trunk@52716 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-11 05:16:00 +00:00
Peter Wilson
cf4f9c9e61 Plugins: Update item count when plugin deleted.
Update the item count, "N items", on the plugin list when a plugin is deleted. This matches the live updating of various other counts on the screen.

Props mitogh, costdev, azouamauriac, swissspidy, kebbet.
Fixes #55316.


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


git-svn-id: http://core.svn.wordpress.org/trunk@52713 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-11 04:51:11 +00:00