Commit Graph

7760 Commits

Author SHA1 Message Date
Jonathan Desrosiers
874c62cde2 Themes: Remove temporary Full Site Editing safety checks.
These checks were added in [51193] and [51197] as a temporary measure to prevent a site owner from activating a Full Site Editing theme when Gutenberg plugin was not active.

Because Core only had partial support for the features required for FSE, the front end of the site would display a white screen or error message to visitors. Unless the site owner visited the front end, there would be no indication that there was a problem.

Since 5.9 will include the remaining features required for FSE, these checks can be removed.

Props poena, jffng.
Fixes #54366. See #534190.

git-svn-id: https://develop.svn.wordpress.org/trunk@52044 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-08 15:26:32 +00:00
John Blackbourn
d088e31c73 Docs: Various docblock improvements and corrections.
See #53399


git-svn-id: https://develop.svn.wordpress.org/trunk@52035 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-08 10:47:55 +00:00
Anthony Burchell
9c00ed2069 Media: Adjust alt text info link text.
Previous messaging of this link was confusing given it went to an external source. This change describes more accurately that it will perform the action of taking you to the resource.

Props karmatosed, joedolson, melchoyce, hellofromTonya, afercia, sabernhardt, antpb.
Fixes #48939.



git-svn-id: https://develop.svn.wordpress.org/trunk@52033 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-08 00:21:50 +00:00
Anthony Burchell
8ac6425f19 Media: Remove security messaging in media upload failures.
Previously, when uploading a media item type that is not supported, the default error message claims that the reason it cannot upload is due to security reasons. This is not always true. Now the warning says that the type is not allowed, which is always true.

Props antpb, Presskopp, peterwilsoncc, desrosj, iluy, circlecube, mikeschroder.
Fixes #53626.



git-svn-id: https://develop.svn.wordpress.org/trunk@52032 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-07 23:28:48 +00:00
Joe Dolson
4f2ce0716c Editor: Update structure of title element for editing.
Re-format the title element for post editing to follow general scheme for WordPress admin screens.

Props SergeyBiryukov.
Fixes #52314.

git-svn-id: https://develop.svn.wordpress.org/trunk@52030 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-07 22:08:55 +00:00
Marius L. J
3d679af2a7 Site Health: Add the constant WP_ENVIRONMENT_TYPE for debug data.
As a legacy from the old Health Check plugin, the constant `WP_LOCAL_DEV` was included in the debug data under the "WordPress Constants" section. This was incorrect, and has never been a constant used by core.

Instead, that field is now replaced by `WP_ENVIRONMENT_TYPE`, which was introduced with WordPress 5.5, and is a much more appropriate value to provide in a debug scenario.

Props johnbillion, bgoewert, sabbirshouvo.
Fixes #54340.

git-svn-id: https://develop.svn.wordpress.org/trunk@52021 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-05 21:03:34 +00:00
Sergey Biryukov
b64d06f784 Coding Standards: Consistently escape attribute in wp-admin/themes.php.
Follow-up to [27012], [38057], [47816], [51083].

Props sabbirshouvo, audrasjb.
Fixes #54256.

git-svn-id: https://develop.svn.wordpress.org/trunk@52020 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-05 17:57:40 +00:00
Tonya Mork
68b5fffc49 Code Modernization: Pass correct default value to http_build_query() in get_core_checksums() and wp_version_check().
The `get_core_checksums()` and `wp_version_check()` functions call the PHP native `http_build_query()` function, the second parameter of which is the ''optional'' `$numeric_prefix` parameter which expects a non-nullable `string`.

A parameter being optional, however, does not automatically make it nullable.

As of PHP 8.1, passing `null` to a non-nullable PHP native function will generate a deprecation notice.

In this case, this function call yielded a `http_build_query(): Passing null to parameter #2 ($numeric_prefix) of type string is deprecated` notice.

Changing the `null` to an empty string fixes this without a backward compatibility break.

References:
* [https://www.php.net/manual/en/function.http-build-query.php PHP Manual: http_build_query()]
* [https://wiki.php.net/rfc/deprecate_null_to_scalar_internal_arg PHP RFC: Deprecate passing null to non-nullable arguments of internal functions]

Follow-up to [18697], [25540].

Props bjorsch, kraftbj, hellofromTonya, jrf.
See #54229.

git-svn-id: https://develop.svn.wordpress.org/trunk@52019 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-05 12:17:32 +00:00
Marius L. J
18e9b9a135 Site Health: Update the icon used when no issues are reported.
The icon used to be a rather blocky checkmark, but has now been changed to the more friendly, and less ambiguous, smiley dashicon.

It also helps cover a rare cases where a checkmark, while often used to mark something as done, may also be used to indicate that something is incorrect (many thanks to my 6th grade teacher for this rationale).

As an added bonus, this commit also adjusts the margins used around the icon, to make it fit more nicely on both large and small viewports.

Props sabernhardt, generosus.
Fixes #53980.

git-svn-id: https://develop.svn.wordpress.org/trunk@52018 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-05 11:39:44 +00:00
Tonya Mork
243149b2c0 Administration: Make dashboard widget control submit button text more clear.
Changes the submit button text from "Submit" to "Save Changes".

Why? The text is more semantic and clear of what happens when activating that button.

Follow-up to [9103].

Props zodiac1978, knutsp, hilayt24, audrasjb.
Fixes #54229.

git-svn-id: https://develop.svn.wordpress.org/trunk@52014 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-04 23:30:01 +00:00
David Baumwald
d782ee4c3c Comments: Add noopener noreferrer to author links in list table.
When viewing the listing of all comments, author links previously passed referrer information to untrusted URLs.  This change adds `noreferrer` to each author link, as well as `noopener` to prevent the passing of information about the parent window.

Props cybr, adam3128, erayalakese, andraganescu, audrasjb, joedolson, sabernhardt. 
Fixes #40916.

git-svn-id: https://develop.svn.wordpress.org/trunk@52007 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-03 20:00:36 +00:00
Sergey Biryukov
a88e82020c General: Remove the svn:executable property from wp-admin/_index.php.
The property appears to be added accidentally. The removing was mentioned but not included in the previous commit.

Follow-up to [38049], [42200], [46585], [51995], [52001].

See #54321.

git-svn-id: https://develop.svn.wordpress.org/trunk@52005 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-03 17:22:55 +00:00
Sergey Biryukov
387269d5e5 Help/About: Improve typography in the Welcome to your WordPress Dashboard! text.
Per the general consensus in #8714 and similar tickets, user-facing strings should use “curly quotes” for better typography.

Remove the `svn:executable` property that appears to be added accidentally.

Follow-up to [38049], [42200], [46585], [51995].

See #54321.

git-svn-id: https://develop.svn.wordpress.org/trunk@52001 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-03 03:15:21 +00:00
Tonya Mork
53f646d382 Customizer: Make range controls full width.
Adds CSS for range controls in the Customizer to be as wide as possible allowing for smaller increments to be more easily obtained by the user.

Follow-up to [28930].

Props domainsupport, dlh, sabernhardt, audrasjb.
Fixes #54329.

git-svn-id: https://develop.svn.wordpress.org/trunk@51996 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-02 23:18:46 +00:00
Tonya Mork
88835bea75 Help/About: Improve the Welcome text in wp-admin/_index.php.
Improves the `Welcome to your WordPress Dashboard!` copy in the `Overview` section of the help tab.

Follow-up to [18914], [19007], [37680].

Props webcommsat, marybaum, costdev, audrasjb.
Fixes #54321.

git-svn-id: https://develop.svn.wordpress.org/trunk@51995 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-02 22:53:54 +00:00
Tonya Mork
032b98dbdd Help/About: Simplifies WordPress version in "Help" sidebar.
Simplifies the logic for when not in alpha/beta/RC.

The changelog URL is translatable in a few other places in core. This commit uses the same pattern for consistency.

Follow-up to [51985].

Props sergeybiryukov.
Fixes #47848.

git-svn-id: https://develop.svn.wordpress.org/trunk@51991 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-02 21:42:44 +00:00
Sergey Biryukov
3e2ec6c215 Coding Standards: Fix some WPCS errors and warnings in wp-admin/user-edit.php:
* Add missing translators comment.
* Add missing space, correct indentation.
* Put opening and closing PHP tag on a line by itself.
* Remove unnecessary escaping for consistency with other strings.

Follow-up to [51980].

See #53658.

git-svn-id: https://develop.svn.wordpress.org/trunk@51988 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-02 20:18:09 +00:00
John James Jacoby
9007b1dd3a Help/About: add WordPress version to contextual "Help" sidebar area.
This change adds a new way for users to quickly identify what version of WordPress they are looking at, directly from the "Help" sidebar on the main "Dashboard" page.

* Stable versions will link to their respective support documents.
* Development versions (alpha/beta/RC) will not link anywhere.

Props audrasjb, costdev, donmhico, hellofromtonya, ipstenu, justinahinon, karmatosed, knutsp, marybaum, sergeybiryukov, webcommsat.

Fixes #47848.

git-svn-id: https://develop.svn.wordpress.org/trunk@51985 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-02 19:07:10 +00:00
Sergey Biryukov
d7518d1927 Media: Use WP_Query::get() method to retrieve the posts_per_page value in wp_ajax_query_attachments().
This avoids a PHP notice and ensures that a default value is always provided if none is set by the user.

Follow-up to [51145], [51485].

Props davidwebca, mukesh27.
Fixes #54129.

git-svn-id: https://develop.svn.wordpress.org/trunk@51982 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-02 18:28:23 +00:00
John James Jacoby
4440711bfb Application Passwords: display guiding text & link in user-edit.php when unavailable.
This change intends to avoid confusion around the requirements of the Application Passwords feature, specific to it requiring HTTPS and the `WP_ENVIRONMENT_TYPE` constant.

It does this by conditionally hiding the traditional UI and showing some insightful explanations instead, including a translatable link to the `WP_ENVIRONMENT_TYPE` documentation on the "Editing wp-config.php" support page.

Props ashfame, audrasjb, iluy, johnbillion.

Fixes  #53658.

git-svn-id: https://develop.svn.wordpress.org/trunk@51980 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-02 17:55:07 +00:00
John James Jacoby
8d26fccb10 Admin/UI-Copy: reword some "we" usages.
This changes some admin-area, user-facing text, 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

(There are several more usages of "we" that will receive this same scrutiny in future commits/releases.)

Props audrasjb, johnbillion, marybaum, peterwilsoncc, sergeybiryukov, shital-patel.

Fixes  #46057.

git-svn-id: https://develop.svn.wordpress.org/trunk@51979 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-02 17:36:34 +00:00
John James Jacoby
dbf96aadab Admin/Discussion Settings: attempt to clarify intent of "Default post settings" section.
This changes the descriptive text underneath 3 settings that are frequently overridden by individual posts & pages, and are also often misunderstood to work differently than they do.

"(These settings may be overridden for individual posts.)"

...becomes...

"Individual posts may override these settings. Changes here will only be applied to new posts."

* Parenthesis were removed to improve text layout and flow for RTL languages.
* Original statement was reworded to emphasize "individual posts".
* New statement provides clarity to users about settings changes not being retroactive.

Props audrasjb, johnjamesjacoby, sabbirshouvo, sabernhardt, tobifjellner.

Fixes #54300.

git-svn-id: https://develop.svn.wordpress.org/trunk@51976 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-02 16:42:01 +00:00
John James Jacoby
4923d75fb1 Admin/Comments: remove bespoke truncation from search string HTML.
This change removes a call to `wp_html_excerpt()` used on the HTML output of the search string, supplied by the current user in the previous page request via the named `s` input in the search-box UI.

If the search string is extremely long, it wraps around the available empty space in a way that is not visually displeasing, confirming that truncation is not a requirement here.

This also addresses a small accessibility concern as the non-truncated string was not alternatively presented, and helps normalize the output of `$_REQUEST['s']` for more broad improvements in the future.

Props hareesh-pillai, jakubtyrcha, johnjamesjacoby, lukecavanagh, sabernhardt.

Fixes #17636.

git-svn-id: https://develop.svn.wordpress.org/trunk@51975 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-02 15:56:02 +00:00
Joe Dolson
b45c85a405 Widgets: Remove unused CSS breaking wp_text_diff layout.
Remove CSS used in version of `wp_text_diff` prior to [50034]. Orphaned CSS breaks default layout of function output, but is overridden in the revisions screen.

Props mt8.biz, hareesh-pillai, mukesh27.
Fixes #54140.

git-svn-id: https://develop.svn.wordpress.org/trunk@51972 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-01 23:12:06 +00:00
Joe Dolson
93b2e8d9a6 Widgets: Use a text-based button to select location.
The WordPress Events and News widget used an icon-only button to select a location. The Pencil icon alone provided insufficient context and labeling for accessibility. Add text to clearly describe button action and change icon to represent a location marker. 

Props AmethystAnswers, sabernhardt.
Fixes #53311.

git-svn-id: https://develop.svn.wordpress.org/trunk@51971 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-01 22:53:19 +00:00
Tonya Mork
d9bb269a31 Site Health: Internationalizes count in the info section headings.
If a site health info section includes the `show_count` parameter, this commit internationalizes the count.

Follow-up to [45176].

Props johnbillion, swissspidy.
Fixes #54341.

git-svn-id: https://develop.svn.wordpress.org/trunk@51970 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-01 22:35:43 +00:00
Joe Dolson
054dac262f Editor: Include post's title in editor title element.
Include the current post title in the `title` element when editing a post. Improve accessibility by distinguishing between different edit screens in the browser tab list. 

Props skierpage, alexstine, audrasjb, sabernhardt.
Fixes #52314.

git-svn-id: https://develop.svn.wordpress.org/trunk@51969 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-01 22:31:56 +00:00
Timothy Jacobs
bb6c5dbb8d REST API: Support custom namespaces for custom post types.
While a custom post type can define a custom route by using the `rest_base` argument, a namespace of `wp/v2` was assumed. This commit introduces support for a `rest_namespace` argument. 

A new `rest_get_route_for_post_type_items` function has been introduced and the `rest_get_route_for_post` function updated to facilitate getting the correct route for custom post types.

While the WordPress Core Block Editor bootstrap code has been updated to use these API functions, for maximum compatibility sticking with the default `wp/v2` namespace is recommended until the API functions see wider use.

Props spacedmonkey, swissspidy.
Fixes #53656.


git-svn-id: https://develop.svn.wordpress.org/trunk@51962 602fd350-edb4-49c9-b593-d223f7449a82
2021-10-31 23:15:10 +00:00
John Blackbourn
2716cc52af Docs: Miscellaneous docblock improvements.
See #53399


git-svn-id: https://develop.svn.wordpress.org/trunk@51957 602fd350-edb4-49c9-b593-d223f7449a82
2021-10-30 20:15:59 +00:00
Sergey Biryukov
1f1f1d64d8 Docs: Further update the debug_information filter description per the documentation standards.
Specifically, this ensures that the DocBlock follows the line wrapping recommendations.

Follow-up to [44986], [45156], [45259], [51949].

See #53399.

git-svn-id: https://develop.svn.wordpress.org/trunk@51956 602fd350-edb4-49c9-b593-d223f7449a82
2021-10-30 13:39:24 +00:00
John Blackbourn
ec5ed03bf6 Docs: Miscellaneous docblock improvements.
See #53399


git-svn-id: https://develop.svn.wordpress.org/trunk@51955 602fd350-edb4-49c9-b593-d223f7449a82
2021-10-29 23:11:32 +00:00
Sergey Biryukov
ba6b4c4cd9 Coding Standards: Correct alignment in WP_Site_Health::get_test_update_temp_backup_writable().
This fixes an `Equals sign not aligned with surrounding assignments; expected 1 space but found 6 spaces` WPCS warning.

Follow-up to [51815].

See #51857, #53359.

git-svn-id: https://develop.svn.wordpress.org/trunk@51951 602fd350-edb4-49c9-b593-d223f7449a82
2021-10-29 16:51:42 +00:00
John Blackbourn
59dc049816 Site Health: Correct and improve the documentation for the debug_information hook.
This corrects the structure of the documentation so it accurately reflects the array elements contained within.

See #53399.


git-svn-id: https://develop.svn.wordpress.org/trunk@51949 602fd350-edb4-49c9-b593-d223f7449a82
2021-10-29 15:33:18 +00:00
Pascal Birchler
0cf6d3e48d Role/Capability: Add support for capability queries in WP_User_Query.
Similar to the existing `role`/`role__in`/`role__not_in` query arguments, this adds support for three new query arguments in `WP_User_Query`:

* `capability` 
* `capability__in`
* `capability__not_in`

These can be used to fetch users with (or without) a specific set of capabilities, for example to get all users
with the capability to edit a certain post type.

Under the hood, this will check all existing roles on the site and perform a `LIKE` query against the `capabilities` user meta field to find:

* all users with a role that has this capability
* all users with the capability being assigned directly

Note: In WordPress, not all capabilities are stored in the database. Capabilities can also be modified using filters like `map_meta_cap`. These new query arguments do NOT work for such capabilities.

The prime use case for capability queries is to get all "authors", i.e. users with the capability to edit a certain post type.

Until now, `'who' => 'authors'` was used for this, which relies on user levels. However, user levels were deprecated a long time ago and thus never added to custom roles. This led to constant frustration due to users with custom roles missing from places like author dropdowns.

This updates any usage of `'who' => 'authors'` in core to use capability queries instead.

Subsequently, `'who' => 'authors'` queries are being **deprecated** in favor of these new query arguments.

Also adds a new `capabilities` parameter (mapping to `capability__in` in `WP_User_Query`) to the REST API users controller.

Also updates `twentyfourteen_list_authors()` in Twenty Fourteen to make use of this new functionality, adding a new `twentyfourteen_list_authors_query_args` filter to make it easier to override this behavior.

Props scribu, lgladdly, boonebgorges, spacedmonkey, peterwilsoncc, SergeyBiryukov, swissspidy.
Fixes #16841.


git-svn-id: https://develop.svn.wordpress.org/trunk@51943 602fd350-edb4-49c9-b593-d223f7449a82
2021-10-27 18:42:13 +00:00
John James Jacoby
9b6c18b756 Admin/HTTP API: add suggested filename support to download_url().
This change allows for external clients to supply a suggested filename via a `Content-Disposition` response header. This filename is processed through `sanitize_file_name()` to ensure it is allowable (on the server, MIME's, etc...) and `validate_file()` to prevent directory traversal.

If the suggested filename fails the above processing/checks, that suggestion is discarded and the standard temporary filename (generated by WordPress) is used.

If no `Content-Disposition` header is found in the response headers, the standard temporary filename continues to be used as per normal.

Included in this change are 6 additional PHPUnit tests with 9 assertions. These tests confirm that valid filename values are correctly saved, and invalid filename values are correctly rejected.

Props cklosows, costdev, dd32, johnjamesjacoby, ocean90, psrpinto.

Fixes #38231.

git-svn-id: https://develop.svn.wordpress.org/trunk@51939 602fd350-edb4-49c9-b593-d223f7449a82
2021-10-27 14:58:24 +00:00
Sergey Biryukov
85d529d100 Coding Standards: Improve escaping in wp-admin/theme-install.php.
* Rename a duplicate `$feature_name` variable to `$feature_group` for clarity.
* Escape the remaining `$feature_name` variable.

Follow-up to [27636], [35273].

Props sabbirshouvo, sabernhardt, mukesh27, afragen.
Fixes #54277.

git-svn-id: https://develop.svn.wordpress.org/trunk@51923 602fd350-edb4-49c9-b593-d223f7449a82
2021-10-20 19:17:00 +00:00
Sergey Biryukov
40fd54aede Help/About: Don't output empty <span> tags on Credits screen.
If the contributor does not have a title, the empty tags are not necessary.

Follow-up to [17877], [17909], [17942], [18162], [19143], [46709].

Props sayedulsayem, audrasjb, mukesh27.
Fixes #54275.

git-svn-id: https://develop.svn.wordpress.org/trunk@51920 602fd350-edb4-49c9-b593-d223f7449a82
2021-10-19 23:07:42 +00:00
Tonya Mork
b0cc77854f Coding Standards: Add public visibility to methods in src directory.
This commit adds the `public` visibility keyword to each method which did not have an explicit visibility keyword.

Why `public`?

With no visibility previously declared, these methods are implicitly `public` and available for use. Changing them to anything else would be a backwards-compatibility break.

Props costdev, jrf.
See #54177.

git-svn-id: https://develop.svn.wordpress.org/trunk@51919 602fd350-edb4-49c9-b593-d223f7449a82
2021-10-18 17:51:17 +00:00
Tonya Mork
ac18b68a32 Cron: Remove errant false values in cron array when upgrading to 5.9+.
[51916] fixed a bug where `array( `false` )` was added to the cron array when `_get_cron_array()` returned `false`. 

This commit:
* Removes any `false` values from the cron array when upgrading to 5.9+.
* Bumps the database version.

Follow-up to [44917], [51916].

Props peterwilsoncc, jrf.
See #53950.

git-svn-id: https://develop.svn.wordpress.org/trunk@51917 602fd350-edb4-49c9-b593-d223f7449a82
2021-10-18 13:29:47 +00:00
Sergey Biryukov
d802fecf97 Coding Standards: Consistently escape form action URL in wp-admin/update-core.php.
Follow-up to [10166], [23739], [25806].

Props sabbirshouvo, mukesh27.
Fixes #54278.

git-svn-id: https://develop.svn.wordpress.org/trunk@51914 602fd350-edb4-49c9-b593-d223f7449a82
2021-10-17 20:29:58 +00:00
Sergey Biryukov
d96e75674b I18N: Add context for some Media Library filter strings:
* Audio
* Video
* Unattached

This allows for more homogeneous translations in languages where keeping a plural form is important.

Follow-up to [6910], [7397], [8901], [9556], [11749], [13100], [12110], [15491], [15578], [22743], [29426], [29625], [34256], [45651], [46437].

Props jdy68, audrasjb, SergeyBiryukov.
Fixes #54238.

git-svn-id: https://develop.svn.wordpress.org/trunk@51903 602fd350-edb4-49c9-b593-d223f7449a82
2021-10-12 16:42:19 +00:00
Sergey Biryukov
1227fc5119 Upgrade/Install: Restore or clean up the temporary plugin or theme backup on shutdown.
This allows these actions to run ''after'' the main process, without affecting the update. Actions running on `shutdown` are immune to PHP timeouts, so in case the failure was due to a PHP timeout, we'll still be able to properly restore the previous version.

Follow-up to [51815], [51898], [51899].

Props aristath, peterwilsoncc.
See #54166.

git-svn-id: https://develop.svn.wordpress.org/trunk@51902 602fd350-edb4-49c9-b593-d223f7449a82
2021-10-11 15:07:52 +00:00
Sergey Biryukov
184e7c15ed Upgrade/Install: Introduce a move_dir() function.
This replaces the `copy_dir()` usage in `WP_Upgrader::install_package()` and aims to avoid PHP timeout issues when installing or updating large plugins on slower systems like Vagrant or the WP Docker test environment.

The new function attempts a native PHP `rename()` function first and falls back to the previous `copy_dir()`.

Follow-up to [51815], [51898].

Props afragen, aristath, peterwilsoncc, galbaras, noisysocks, pbiron.
Fixes #54166. See #51857.

git-svn-id: https://develop.svn.wordpress.org/trunk@51899 602fd350-edb4-49c9-b593-d223f7449a82
2021-10-09 03:37:41 +00:00
Sergey Biryukov
4b60c38a36 Site Health: Use an integer value as a fallback in the available disk space check.
This avoids a few type problems further in the code: boolean divided by a number, or passing `false` to `size_format()` which is documented to accept integers or strings only.

Follow-up to [51815].

Props TobiasBg.
See #51857.

git-svn-id: https://develop.svn.wordpress.org/trunk@51898 602fd350-edb4-49c9-b593-d223f7449a82
2021-10-09 02:49:02 +00:00
Sergey Biryukov
440336b73e Taxonomy: Populate the WP_Terms_List_Table::$items property in ::prepare_items().
This allows the parent `WP_List_Table::has_items()` method to work as expected, and the override in the child class can now be removed. It also makes the class more consistent with other list table classes.

As a result of this change, the "Bulk actions" dropdown is no longer unnecessarily displayed if there are no terms.

Follow-up to [15491], [17025], [17026].

Props mattoakley, swissspidy, audrasjb, SergeyBiryukov.
Fixes #54181.

git-svn-id: https://develop.svn.wordpress.org/trunk@51896 602fd350-edb4-49c9-b593-d223f7449a82
2021-10-08 00:36:18 +00:00
Tonya Mork
83b2339a0e Permalinks: Move the Nginx documentation link to help sidebar in wp-admin/options-permalink.php.
The "Documentation on Nginx configuration." link is out of place being below the "Save Changes" button on the Settings > Permalinks UI.

This commit relocates the link to join the other support related content links in the help tab's "For more information:" right sidebar area.

Follow-up to [34691], [45674].

Props audrasjb, hellofromTonya, johnjamesjacoby, mukesh27, peterwilsoncc, timlappe.
Fixes #39258.

git-svn-id: https://develop.svn.wordpress.org/trunk@51892 602fd350-edb4-49c9-b593-d223f7449a82
2021-10-05 23:09:21 +00:00
Sergey Biryukov
a86f7c7def Accessibility: Privacy: Use red color for action buttons on the Erase Personal Data screen:
* "Erase Personal Data" button in the Next Steps column.
* "Force Erase Personal Data" row action.

This highlights the destructive nature of those buttons to avoid an accidental erasure, and is consistent with other similar UI elements in the admin, e.g. various "Delete", "Spam", or "Trash" buttons.

Props arena, sabernhardt, carike, azaozz, joedolson, audrasjb, SergeyBiryukov.
Fixes #49603.

git-svn-id: https://develop.svn.wordpress.org/trunk@51891 602fd350-edb4-49c9-b593-d223f7449a82
2021-10-05 20:30:11 +00:00
Tonya Mork
f2d146d3f1 Administration: Allow plugin action links row to wrap.
When there are several action links or the text for these links is long, the plugin name column's width extends causing the other columns to shrink in width. This case is a less than desirable user experience.

The plugin name's column has `white-space: nowrap` (on larger screens). This commit changes the `white-space` to `normal`, allowing the plugin action links row to wrap into more than one line.

Follow-up to [41695].

Props ankit-k-gupta, nekojonez, sabernhardt, sergeybiryukov.
Fixes #53275.

git-svn-id: https://develop.svn.wordpress.org/trunk@51887 602fd350-edb4-49c9-b593-d223f7449a82
2021-10-05 15:05:15 +00:00
Tonya Mork
1f0aed81a6 Administration: Enable first and last page buttons in WP_List_Table::pagination().
Previously the first and last page pagination buttons were disabled when on their next or previous page respectively. This commit removes that unnecessary logic to keep these buttons enabled and avoid confusion in the user's navigation workflow. 

New behavior:
- When on page 2, the go to first page `«` button is enabled
- When on the page before the last page, the go to last page `»` button is enabled

Follow-up to [32948], [47219].

Props wp_kc, ronakganatra, knutsp, sabernhardt, Hareesh Pillai, audrasjb, hellofromTonya.
Fixes #42763.

git-svn-id: https://develop.svn.wordpress.org/trunk@51880 602fd350-edb4-49c9-b593-d223f7449a82
2021-10-01 18:38:52 +00:00
Tonya Mork
f6755ded9f App Passwords: Remove placeholder from the app password name input field.
In [49294, 49752], the `placeholder` attribute changed to `"WordPress App on My Phone"`. This change causes confusion as the field can be used in a variety of ways and is not limited to a phone.

Given a label exists for each field and clearly identifies its purpose, this commit removes the `placeholder` attribute from the `input` field.

Follow-up to [49109], [49294], [49752].

Props seedsca, audrasjb, joedolson, rehanali.
Fixes #54047.

git-svn-id: https://develop.svn.wordpress.org/trunk@51878 602fd350-edb4-49c9-b593-d223f7449a82
2021-10-01 13:47:59 +00:00