Commit Graph

18941 Commits

Author SHA1 Message Date
Sergey Biryukov
90ca61ba07 Upgrade/Install: Return a WP_Error from copy_dir() and _copy_dir() if the directory listing failed.
Props afragen, dd32.
Fixes #52342.
Built from https://develop.svn.wordpress.org/trunk@50149


git-svn-id: http://core.svn.wordpress.org/trunk@49828 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-02 17:23:06 +00:00
Sergey Biryukov
f5857c6a9f Privacy: Add help tabs for Export Personal Data and Erase Personal Data screens.
Props xkon, burtrw, netweblogic, desrosj, hellofromTonya, garrett-eclipse.
Fixes #43994.
Built from https://develop.svn.wordpress.org/trunk@50147


git-svn-id: http://core.svn.wordpress.org/trunk@49826 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-02 16:55:03 +00:00
antpb
f80e5d0919 Media: Avoid suppressing errors when using getimagesize().
Previously, all logic utilizing `getimagesize()` was supressing errors making it difficult to debug usage of the function. 

A new `wp_getimagesize()` function has been added to allow the errors to no longer be suppressed when `WP_DEBUG` is enabled.

Props Howdy_McGee, SergeyBiryukov, mukesh27, davidbaumwald, noisysocks, hellofromTonya.
Fixes #49889.

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


git-svn-id: http://core.svn.wordpress.org/trunk@49825 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-02 16:53:04 +00:00
Sergey Biryukov
ce816eeda1 Privacy: Introduce manage_{$this->screen->id}_custom_column action in WP_Privacy_Requests_Table::column_default().
This brings some consistency with other list tables and allows for adding custom column data to columns registered with `manage_export-personal-data_columns` or `manage_erase-personal-data_columns` filters.

Props xkon, garrett-eclipse, birgire, pbiron, hellofromTonya, TimothyBlynJacobs, 7studio, mukesh27, Mista-Flo.
Fixes #44354.
Built from https://develop.svn.wordpress.org/trunk@50145


git-svn-id: http://core.svn.wordpress.org/trunk@49824 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-02 16:44:04 +00:00
Sergey Biryukov
c504140c32 Block Editor: Remove the .is-dark-theme body class from the admin header.
With the changes to dark theme support in https://github.com/WordPress/gutenberg/pull/28233 to check the real background color of the theme, this no longer serves any purpose.

Follow-up to [44133].

Props scruffian, sabernhardt.
Fixes #52385.
Built from https://develop.svn.wordpress.org/trunk@50142


git-svn-id: http://core.svn.wordpress.org/trunk@49821 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-02 13:05:02 +00:00
Sergey Biryukov
e0bda3a704 Users: Use consistent strings for error messages in wp-admin/users.php.
Use `_n()` for a string with plural forms.

Follow-up to [50129].

See #34281.
Built from https://develop.svn.wordpress.org/trunk@50139


git-svn-id: http://core.svn.wordpress.org/trunk@49818 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-02 12:17:04 +00:00
iandunn
683e767517 Community Events: Show organizer CTA when less than 3 events.
When no events are available in the Events Widget, people have always been shown a message encouraging them to help organize one (see `tmpl-community-events-no-upcoming-events`). Now that it's common for online WordCamps and Learn discussion groups to be pinned to the Events API, it's rare that there are no events in the widget, even if there are no _local_ events. Because of that, users are rarely encouraged to join their local community and help organize.

This commit adds an additional call-to-action message, which is shown when there are only 1 or 2 events available.

Props anyssa, sippis, AmethystAnswers.
Fixes #51664.

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


git-svn-id: http://core.svn.wordpress.org/trunk@49812 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-02 00:43:06 +00:00
Felix Arntz
dbfbf5501a Security, Site Health: Make migrating a site to HTTPS a one-click interaction.
Switching a WordPress site from HTTP to HTTPS has historically been a tedious task. While on the surface the Site Address and WordPress Address have to be updated, existing content still remains using HTTP URLs where hard-coded in the database. Furthermore, updating _two_ URLs to migrate to HTTPS is still a fairly unintuitive step which is not clearly explained.

This changeset simplifies migration from HTTP to HTTPS and, where possible, makes it a one-click interaction.

* Automatically replace insecure versions of the Site Address (`home_url()`) with its HTTPS counterpart on the fly if the site has been migrated from HTTP to HTTPS. This is accomplished by introducing a `https_migration_required` option and enabling it when the `home_url()` is accordingly changed.
    * A new `wp_replace_insecure_home_url()` function is hooked into various pieces of content to replace URLs accordingly.
    * The migration only kicks in when the Site Address (`home_url()`) and WordPress Address (`site_url()`) match, which is the widely common case. Configurations where these differ are often maintained by more advanced users, where this migration routine would be less essential - something to potentially iterate on in the future though.
    * The migration does not actually update content in the database. More savvy users that prefer to do that can prevent the migration logic from running by either deleting the `https_migration_required` option or using the new `wp_should_replace_insecure_home_url` filter.
    * For fresh sites that do not have any content yet at the point of changing the URLs to HTTPS, the migration will also be skipped since it would not be relevant.
* Expose a primary action in the Site Health recommendation, if HTTPS is already supported by the environment, built on top of the HTTPS detection mechanism from [49904]. When clicked, the default behavior is to update `home_url()` and `site_url()` in one go to their HTTPS counterpart.
    * A new `wp_update_urls_to_https()` function takes care of the update routine.
    * A new `update_https` meta capability is introduced to control access.
    * If the site's URLs are controlled by constants, this update is not automatically possible, so in these scenarios the user is informed about that in the HTTPS status check in Site Health.
* Allow hosting providers to modify the URLs linked to in the HTTPS status check in Site Health, similar to how that is possible for the URLs around updating the PHP version.
    * A `WP_UPDATE_HTTPS_URL` environment variable or `wp_update_https_url` filter can be used to provide a custom URL with guidance about updating the site to use HTTPS.
    * A `WP_DIRECT_UPDATE_HTTPS_URL` environment variable or `wp_direct_update_https_url` filter can be used to provide a custom URL for the primary CTA to update the site to use HTTPS.

Props flixos90, timothyblynjacobs.
Fixes #51437.

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


git-svn-id: http://core.svn.wordpress.org/trunk@49810 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-02 00:10:01 +00:00
Adam Silverstein
315b1c185d Users: enable admins to send users a reset password link.
Add a feature so Admins can send users a 'password reset' email. This doesn't change the password or force a password change. It only emails the user the password reset link.

The feature appears in several places:
* A "Send Reset Link" button on user profile screen.
* A "Send password reset" option in the user list bulk action dropdown.
* A "Send password reset" quick action when hovering over a username in the user list.

Props Ipstenu, DrewAPicture, eventualo, wonderboymusic, knutsp, ericlewis, afercia, JoshuaWold, johnbillion, paaljoachim, hedgefield.
Fixes #34281.


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


git-svn-id: http://core.svn.wordpress.org/trunk@49808 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-01 22:13:03 +00:00
Adam Silverstein
68c6e9982b Revisions: Address PHP/JS errors when viewing autosave on imported posts.
Fix an issue where viewing an autosave created on a post without any previous revisions would throw a PHP notice. Also fixes the revision screen which was broken in these cases and showed a console error.

Props iseulde.
Fixes #31249.


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


git-svn-id: http://core.svn.wordpress.org/trunk@49807 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-01 22:03:01 +00:00
ryelle
a69964f4a7 Build/Test Tools: Replace node-sass with Dart Sass
Switch the Sass implementation used by Grunt to `sass` (the Dart version), since LibSass & `node-sass` have been deprecated.

Props desrosj.
Fixes #51763.


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


git-svn-id: http://core.svn.wordpress.org/trunk@49805 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-01 20:24:16 +00:00
ryelle
17c79a583a Administration: Use correct color scheme color on admin bar icons when hovered.
This also removes a CSS rule in the light scheme which was flagged as temporary and overrides the hover text color.

Fixes #52229.


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


git-svn-id: http://core.svn.wordpress.org/trunk@49804 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-01 19:46:03 +00:00
Sergey Biryukov
38293a6aa4 Upgrade/Install: Display correct message about the current version in the admin footer.
Previously, "You are using a development version" message could be displayed if the user has configured core updates to receive Beta or RC versions, but the update has not happened yet.

This brings some consistency with displaying a similar message in `core_upgrade_preamble()` on WordPress Updates screen.

Follow-up to [49708], [49736].

Props afragen, pbiron, azaozz, audrasjb, SergeyBiryukov.
Fixes #51976.
Built from https://develop.svn.wordpress.org/trunk@50121


git-svn-id: http://core.svn.wordpress.org/trunk@49800 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-01 14:29:01 +00:00
Sergey Biryukov
81462ca73e Posts, Post Types: Introduce "Filter by date" and "Filter by category" as post type and taxonomy labels, respectively.
This provides a more consistent location for these strings and allows for reusing them in other places without hardcoding them in the markup.

Props nicolalaserra, audrasjb, johnjamesjacoby, SergeyBiryukov.
Fixes #42421.
Built from https://develop.svn.wordpress.org/trunk@50120


git-svn-id: http://core.svn.wordpress.org/trunk@49799 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-01 14:13:00 +00:00
joedolson
4789d7585c Menus: Add sticky footer to avoid duplicate save buttons.
Make the navigation menu footer sticky so a Save Menu button is always available in the viewport. Improves usability and effectiveness of the interface when in a responsive view. 

Props garrett-eclipse, audrasjb, maxpertici, sabernhardt, kburgoine, poena
Fixes #51631
Built from https://develop.svn.wordpress.org/trunk@50115


git-svn-id: http://core.svn.wordpress.org/trunk@49794 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-31 20:11:03 +00:00
Sergey Biryukov
fc1677b504 Administration: Accommodate long translations of user roles in the "Role" list table column.
Follow-up to [49317].

Props Chaton666, audrasjb, kebbet.
Fixes #52184.
Built from https://develop.svn.wordpress.org/trunk@50111


git-svn-id: http://core.svn.wordpress.org/trunk@49790 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-31 16:53:58 +00:00
Sergey Biryukov
f6191c07df Upgrade/Install: Allow WordPress sites to opt-in to development releases.
The `WP_AUTO_UPDATE_CORE` constant now supports `development` and `branch-development` values.

This makes it possible for sites to opt-in to updating to nightly builds without having to install a plugin.

Follow-up to [49245], [49292].

Props xkon, knutsp, afragen, audrasjb, dd32.
Fixes #51978.
Built from https://develop.svn.wordpress.org/trunk@50082


git-svn-id: http://core.svn.wordpress.org/trunk@49782 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-30 10:34:02 +00:00
Felix Arntz
9d348e26f3 Security, Site Health: Improve accuracy in messaging about HTTPS support.
Following up on [49904], this changeset focuses mainly on improving the guidance about the current state of HTTPS in Site Health.

* Correct the existing copy to indicate that both the Site Address and the WordPress Address need to be changed to fully switch to HTTPS.
* Link to the respective input fields via anchor links rather than to the overall General Settings screen.
* Show different copy if the site is using HTTPS for the WordPress Address (for example to have only the administration panel in HTTPS), but not for the Site Address.
* Inform the user about potential problems even when the site is already using HTTPS, for example if the SSL certificate was no longer valid.
* Always rely on fresh information for determining HTTPS support issues in Site Health, and therefore change the `https_status` test to become asynchronous.
* Rename the new private `wp_is_owned_html_output()` function to a more appropriate `wp_is_local_html_output()`.

Props adamsilverstein, flixos90, johnjamesjacoby, timothyblynjacobs.
See #47577.

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


git-svn-id: http://core.svn.wordpress.org/trunk@49773 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-29 19:10:58 +00:00
Sergey Biryukov
ae40aad4c0 Docs: Switch a comment in WP_Media_List_Table::prepare_items() to multi-line format, per the documentation standards.
Follow-up to [48417].

Props pinkalbeladiya, davidbaumwald.
Fixes #52025.
Built from https://develop.svn.wordpress.org/trunk@50071


git-svn-id: http://core.svn.wordpress.org/trunk@49772 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-29 18:54:01 +00:00
noisysocks
4825dccd26 Block Editor: Add enableCustomSpacing
Adds the `enableCustomSpacing` editor setting. This enables the custom block
spacing feature from Gutenberg.

Props nosolosw, gziolo.
Fixes #51760.

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


git-svn-id: http://core.svn.wordpress.org/trunk@49771 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-29 05:04:59 +00:00
noisysocks
2152259257 Block Editor: Add defaultEditorStyles
The `defaultEditorStyles` setting was missing from the default block
editor settings. This causes the "Use theme styles" setting which was
added in WordPress 5.6 to not function properly.

Also, the RTL version of editor styles were not being loaded. This
change has not yet been ported over from Gutenberg.

Fixes #52394.

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


git-svn-id: http://core.svn.wordpress.org/trunk@49770 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-29 04:58:58 +00:00
whyisjake
22bb49e4d6 Site Health: Update the language around how PHP should be updated.
Follow-up to [50042].

Props SergeyBiryukov.

See #52327.

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


git-svn-id: http://core.svn.wordpress.org/trunk@49759 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-28 17:23:09 +00:00
Sergey Biryukov
6f2bba08d9 Privacy: Add newlines to the index.php file in wp-personal-data-exports directory, for consistency with other similar files.
Follow-up to [50037].

See #52299.
Built from https://develop.svn.wordpress.org/trunk@50055


git-svn-id: http://core.svn.wordpress.org/trunk@49756 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-28 12:58:58 +00:00
Sergey Biryukov
38b205e5dc Coding Standards: Simplify a long condition in WP_Site_Health_Auto_Updates::test_wp_version_check_attached() for better readability.
Follow-up to [50035].

See #52135.
Built from https://develop.svn.wordpress.org/trunk@50049


git-svn-id: http://core.svn.wordpress.org/trunk@49750 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-28 10:35:59 +00:00
whyisjake
d3d95965dd Site Health: Update php update strings to not overpromise performance.
Fixes #52327.

Props chanthaboune, SergeyBiryukov, audrasjb, Clorith, whyisjake.


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


git-svn-id: http://core.svn.wordpress.org/trunk@49742 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-28 00:17:58 +00:00
whyisjake
5f532382aa Privacy: Ensure that exported user data reports can't be found with directory listings.
By moving from `.html` to `.php` files, we can prevent directory listings, and ensure that WordPress can load.

Fixes #52299.

Props lucasbustamante, xkon, freewebmentor, SergeyBiryukov, whyisjake. 

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


git-svn-id: http://core.svn.wordpress.org/trunk@49738 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-27 23:46:58 +00:00
whyisjake
ab6271c0a7 Site Health: Only run the version checks on the main site.
The version checks that are setup in `wp-includes/update.php` do set up the action, but only for the main site.

Fixes #52135.

Props audrasjb, SergeyBiryukov, maxpertici, aaribaud.
 

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


git-svn-id: http://core.svn.wordpress.org/trunk@49736 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-27 23:27:00 +00:00
joedolson
35aaaacc04 Revisions: Generate correct number of columns in wp_text_diff.
The function `wp_text_diff` generated an invalid table structure if the $args parameter contained any values. This patch corrects the structure generated by `wp_text_diff` and related usages so that the column count matches the data generated. Additionally, this patch passes arguments to the Revisions screen so that the screen has column headings that reflect the content in each column. Improves the accessibility and usability of the Revisions table.

Props joedolson, mehulkaklotar, afercia, adamsilverstein, zodiac1978, jeremyfelt
Fixes #25473
Built from https://develop.svn.wordpress.org/trunk@50034


git-svn-id: http://core.svn.wordpress.org/trunk@49735 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-27 21:53:58 +00:00
joedolson
ee751b9779 Administration: Remove italic text to improve readability.
Italicized text can be difficult to read for some people with dyslexia or related forms of reading disorders. This removes italics on a number of larger blocks onpm run grunt rpf text in the admin. This has been a task 5.3; this commit closes the task. Further instances of italicized text should be addressed individually.

Props afercia, xkon, audrasjb
Fixes #47327
Built from https://develop.svn.wordpress.org/trunk@50032


git-svn-id: http://core.svn.wordpress.org/trunk@49733 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-27 21:03:57 +00:00
TimothyBlynJacobs
ee710f2c16 App Passwords: Improve validation and sanitization of the application name.
Application names are now required to be unique and cannot contain solely whitespace characters. Additionally, invalid characters are now stripped from the application name using `sanitize_text_field()`.

Props Boniu91, hellofromTonya, engahmeds3ed, xkon, francina.
Fixes #51941.

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


git-svn-id: http://core.svn.wordpress.org/trunk@49731 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-27 19:05:02 +00:00
Sergey Biryukov
401b0bbe8c Accessibility: Administration: Respect the prefers-reduced-motion media query for update icon spinner animations.
The update icon rotation should not occur when the user has opted to reduce motion, for example by selecting the "Reduce motion" option in macOS' preferences or unselecting "Show animations in Windows" in Windows' preferences.

Follow-up to [47813], [50027].

Props xkon, audrasjb, johnbillion.
Fixes #52263. See #51476.
Built from https://develop.svn.wordpress.org/trunk@50028


git-svn-id: http://core.svn.wordpress.org/trunk@49729 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-27 11:40:59 +00:00
Sergey Biryukov
3a695a7be2 Plugins: Rotate the Updates icon in the admin bar when performing inline updates on the Plugins screen.
This provides better indication within the viewport about ongoing processes on the page when updating several plugins at the same time, but without using the bulk updater.

Props ravipatel, audrasjb, johnjamesjacoby, paaljoachim, hellofromTonya, sabernhardt, mdwolinski, karmatosed, SergeyBiryukov.
Fixes #51476.
Built from https://develop.svn.wordpress.org/trunk@50027


git-svn-id: http://core.svn.wordpress.org/trunk@49728 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-27 10:59:02 +00:00
ryelle
fed21a9863 Administration: Standardize colors used in CSS to a single palette.
This is part of a larger project in cleaning up core's admin CSS. This collapses all colors used in the CSS to one of 12 blues, greens, reds, and yellows, 13 grays, pure black, and pure white. The colors are perceptually uniform from light to dark, half of each range has a 4.5 or higher contrast against white, the other half has a 4.5 or higher contrast against black.

Standardizing on this set of colors will help contributors make consistent, accessible design decisions. The full color palette can be seen here: https://codepen.io/ryelle/full/WNGVEjw

Props notlaura, danfarrow, kburgoine, drw158, audrasjb, Joen, hedgefield, ibdz, melchoyce.
See #49999.


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


git-svn-id: http://core.svn.wordpress.org/trunk@49726 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-26 18:54:59 +00:00
Gary Pendergast
7e93e28784 Export: Create an export-specific filter for post titles.
Since WordPress 2.5 and 2.6, `post_content` and `post_excerpt` have both had export-specific filters: `the_content_export`, and `the_excerpt_export`, respectively. `post_title`, however, has used `the_title_rss`, which behaves differently in two important ways:

- It strips HTML tags from the string.
- It HTML-encodes the title string.

These behaviours are not ideal for exports, since it changes the post title, resulting in data loss in export files, and incorrect post duplicate matching on import. This changes replaces the usage of `the_title_rss` with a new filter, `the_title_export`. The new filter is intended to be used in the same as `the_content_export` and `the_excerpt_export`.

Props jmdodd, audrasjb.
Fixes #52250.


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


git-svn-id: http://core.svn.wordpress.org/trunk@49712 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-25 00:09:59 +00:00
Sergey Biryukov
2259adf433 Docs: Document globals in dropdown_categories() and dropdown_link_categories().
Props umangvaghela123, pawki07.
Fixes #41504.
Built from https://develop.svn.wordpress.org/trunk@50008


git-svn-id: http://core.svn.wordpress.org/trunk@49709 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-24 13:59:58 +00:00
TimothyBlynJacobs
6a8a83ea09 App Passwords: Extract Basic Auth check into a reusable filterable function.
In [49752] a check was added to prevent creating new Application Passwords if Basic Auth credentials were detected to prevent conflicts. This check takes place in WP-Admin, though a conflict would only arise if Basic Auth was used on the website's front-end.

This commit extracts the Basic Auth check into a reusable function, `wp_is_site_protected_by_basic_auth()`, which can be adjusted using a filter of the same name. This way, a site that uses Basic Auth to protect WP-Admin can still use the Application Passwords feature.

In the future, instead of requiring the use of a filter, WordPress could make a loopback request and check for a `WWW-Authenticate` header to make this detection more robust out of the box.

Props SeBsZ, archon810, aaroncampbell, ocean90, SergeyBiryukov, TimothyBlynJacobs.
Fixes #52066.

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


git-svn-id: http://core.svn.wordpress.org/trunk@49707 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-24 02:57:59 +00:00
Sergey Biryukov
c3e48b857b App Passwords: Use correct translation function for a heading on Authorize Application screen.
Props akramipro.
Fixes #52351.
Built from https://develop.svn.wordpress.org/trunk@50003


git-svn-id: http://core.svn.wordpress.org/trunk@49704 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-23 13:12:57 +00:00
Sergey Biryukov
a45a292777 Docs: Fix typo in WP_Links_List_Table DocBlock.
Props audrasjb.
Fixes #52349.
Built from https://develop.svn.wordpress.org/trunk@50002


git-svn-id: http://core.svn.wordpress.org/trunk@49703 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-23 07:25:02 +00:00
Sergey Biryukov
9f12d7f575 External Libraries: First pass at fixing jQuery deprecations in WordPress core and bundled themes.
To be able to disable jQuery Migrate as step 3 of updating the jQuery version shipped with WordPress, all `JQMIGRATE` warnings in the browser console will have to be addressed.

This includes many minor adjustments to a wide array of core files.

Follow-up to:
* Step 1: Disabling jQuery Migrate 1.4.1 in WordPress 5.5: [48323], [48324]
* Step 2: Updating jQuery to 3.5.1 and adding jQuery Migrate 3.3.x in WordPress 5.6: [49101], [49338], [49615], [49649]

Props Clorith, azaozz.
See #51812.
Built from https://develop.svn.wordpress.org/trunk@50001


git-svn-id: http://core.svn.wordpress.org/trunk@49702 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-22 12:32:03 +00:00
desrosj
3eb9b3e714 Build/Test Tools: Update CSS files after grunt precommit:css.
This removes instances of the `-moz-user-select` property, which was required until Firefox 68.

Firefox is currently in version 84, so these can safely be removed.

Fixes #52332.
Built from https://develop.svn.wordpress.org/trunk@49991


git-svn-id: http://core.svn.wordpress.org/trunk@49692 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-20 19:07:00 +00:00
desrosj
ebeaae9de0 Build/Test Tools: Update the uglify-js package.
This updates the `uglify-js` package from version `3.12.4` to `3.12.5`.

See #51801.
Built from https://develop.svn.wordpress.org/trunk@49989


git-svn-id: http://core.svn.wordpress.org/trunk@49690 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-20 13:35:18 +00:00
Sergey Biryukov
777f752c2d Upgrade/Install: Display version number on the "Re-install now" button on WordPress Updates screen.
This makes the button label more clear and allows for removing unnecessary description.

Props afragen, audrasjb.
Fixes #51774.
Built from https://develop.svn.wordpress.org/trunk@49984


git-svn-id: http://core.svn.wordpress.org/trunk@49685 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-19 16:48:07 +00:00
Sergey Biryukov
489e47692a Media: Use consistent method for instantiating an attachment author object in Media Library.
Previously, attachments without an author could cause a PHP fatal error due to calling the `::exists()` method on a `false` value.

Props antpb, carloscastilloadhoc, hellofromTonya, garrett-eclipse.
Fixes #52030.
Built from https://develop.svn.wordpress.org/trunk@49979


git-svn-id: http://core.svn.wordpress.org/trunk@49680 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-18 12:55:07 +00:00
Sergey Biryukov
b88116d24f Coding Standards: Improve code layout in wp-admin/includes/class-wp-media-list-table.php.
This allows for better readability and easier understanding of where each section opens and closes.

Props laxman-prajapati, hansjovisyoast, audrasjb.
Fixes #51014.
Built from https://develop.svn.wordpress.org/trunk@49975


git-svn-id: http://core.svn.wordpress.org/trunk@49676 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-18 09:50:10 +00:00
joedolson
fe3610466a Widgets: Implement TinyMCE on text widgets in Accessibility Mode
TinyMCE was not implemented on the accessibility mode for widgets, disabling text editing fields. Change ensures that TinyMCE is initialized when accessibility mode is set up. Prior implementation hid the text widget fields if they were empty, which they always were for new widgets.

Props MadtownLems, alexstine, hareesh-pillai, dariak
Built from https://develop.svn.wordpress.org/trunk@49973


git-svn-id: http://core.svn.wordpress.org/trunk@49674 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-17 18:17:07 +00:00
Sergey Biryukov
4104f92d7f Privacy: Use more consistent wording for strings related to personal data requests.
This replaces "user privacy" in various error messages with "personal data", for consistency with other existing strings.

Follow-up to [49090].

Props xkon, transl8or.
Fixes #51849.
Built from https://develop.svn.wordpress.org/trunk@49970


git-svn-id: http://core.svn.wordpress.org/trunk@49671 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-17 17:46:06 +00:00
Dominik Schilling
cf3e30b301 Customize: Update button label reference in themes help text to reflect the label introduced in [41626].
Props ovidiul.
See #39896, #42305.
Fixes #52271.
Built from https://develop.svn.wordpress.org/trunk@49969


git-svn-id: http://core.svn.wordpress.org/trunk@49670 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-17 17:01:08 +00:00
Sergey Biryukov
dc17e504bf Menus: Fix minor UI issues on Edit Menus screen on smaller viewports.
This removes extra margin from the Select button and ensures the checkboxes in the Menu Settings section are fully visible.

Props sabernhardt, passoniate, mukesh27, afercia, audrasjb, Boniu91, ravipatel, jomisica.
Fixes #49245, #51706.
Built from https://develop.svn.wordpress.org/trunk@49964


git-svn-id: http://core.svn.wordpress.org/trunk@49665 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-16 05:00:08 +00:00
Sergey Biryukov
585303540a I18N: Add context for the Public string in site attributes list on Edit Site screen.
This allows for the string to be distinguished from a post status of the same name, which is useful for better translations in languages were "public" can be masculine or feminine depending on context.

Props audrasjb.
Fixes #52309.
Built from https://develop.svn.wordpress.org/trunk@49962


git-svn-id: http://core.svn.wordpress.org/trunk@49663 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-15 17:39:12 +00:00
ryelle
476d0a1450 Administration: Update hover and focus states in admin menu.
This adds a border along the side of admin menu links when hovering or focusing on them, as color should not be the only indicator of link state.

Props accessiblejoe florianziegler afercia rianrietveld michael-arestad ryan hedgefield audrasjb ibdz.
Fixes #28599.


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


git-svn-id: http://core.svn.wordpress.org/trunk@49660 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-14 22:00:11 +00:00
Sergey Biryukov
c5d1214607 Accessibility: Administration: Remove <strong> tags from labels on plugin/theme editor screens.
If every single label is emphasized with a `<strong>` tag, none of them is really emphasized anymore.

This removes the tags in favor of CSS styling, for consistency with the other labels on the screen.

Props chemiker, audrasjb, mukesh27, paaljoachim, estelaris, ibdz, SergeyBiryukov.
Fixes #52232.
Built from https://develop.svn.wordpress.org/trunk@49958


git-svn-id: http://core.svn.wordpress.org/trunk@49657 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-13 14:08:10 +00:00
Sergey Biryukov
6f18efba66 Privacy: Clarify the "Contact information" heading in default privacy policy content.
The section is intended to tell how to contact the website owners, and is not about the visitor's contact information.

Props shital-patel, TylerTork, audrasjb.
Fixes #52272.
Built from https://develop.svn.wordpress.org/trunk@49956


git-svn-id: http://core.svn.wordpress.org/trunk@49655 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-11 19:53:14 +00:00
Sergey Biryukov
9b44c28f78 Themes: Add missing <p> tags to error message in WP_Theme_Install_List_Table::prepare_items().
Follow-up to [45909], [49953].

See #52254.
Built from https://develop.svn.wordpress.org/trunk@49954


git-svn-id: http://core.svn.wordpress.org/trunk@49653 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-10 19:37:06 +00:00
John Blackbourn
b364ff86e5 Posts, Post Types: Introduce the wp_list_table_show_post_checkbox filter which allows the visibility of the bulk edit checkbox on the post list table to be controlled separately from the edit_post capability of the current user.
Props coreyw, alexstine

Fixes #51291

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


git-svn-id: http://core.svn.wordpress.org/trunk@49649 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-08 17:18:07 +00:00
John Blackbourn
6f3a940e64 Plugins: Replace usage of $this in action and filter parameter docblocks with more appropriate variable names.
See #51800, #52217

Fixes #52243

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


git-svn-id: http://core.svn.wordpress.org/trunk@49645 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-08 14:30:14 +00:00
John Blackbourn
bc5b34672c Quick/Bulk Edit: By the power vested in me, I hereby declare the top bulk actions and the bottom bulk actions joined forever in MatrimonyScript.
This joyous marriage means that users will no longer find a selected top bulk action on a list table unexpectedly being applied instead of their selected bottom bulk action. The top and bottom controls for changing user roles are equally wedded forever too.

Props clayray, subrataemfluence, garrett-eclipse, pbiron, hareesh-pillai

Fixes #46872

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


git-svn-id: http://core.svn.wordpress.org/trunk@49643 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-07 16:23:07 +00:00
Sergey Biryukov
7e4a39ba6e Accessibility: Help/About: Use more descriptive link text for the Privacy Policy link on the Privacy screen.
Props audrasjb, carike, mukesh27.
Fixes #52233.
Built from https://develop.svn.wordpress.org/trunk@49943


git-svn-id: http://core.svn.wordpress.org/trunk@49642 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-07 16:09:08 +00:00
John Blackbourn
f0078d043e Docs: Miscellaneous docblock corrections and improvements.
See #51800.
Built from https://develop.svn.wordpress.org/trunk@49942


git-svn-id: http://core.svn.wordpress.org/trunk@49641 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-07 14:17:11 +00:00
desrosj
05f174acf6 Build/Test Tools: Update UglifyJS to the latest version.
This updates the `uglify-js` package from version `3.6.0` to `3.12.4`.

See #51801.
Built from https://develop.svn.wordpress.org/trunk@49940


git-svn-id: http://core.svn.wordpress.org/trunk@49639 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-06 15:29:24 +00:00
desrosj
60a2f144ac Build/Test Tools: Update several NPM packages.
This updates the following packages to the latest versions. 

Updated packages:
- `copy-webpack-plugin` from `5.1.1` to `5.1.2`.
- `grunt` from `1.1.0` to `1.3.0`.
- `grunt-contrib-jshint` from `2.1.0` to `3.0.0`.
- `grunt-contrib-qunit` from `3.1.0` to `4.0.0`.
- `grunt-rtlcss` from `2.0.1` to `2.0.2`.
- `qunit` from `2.9.0` to `2.13.0`.
- `sinon` from `9.0.0` to `9.2.2`.
- `source-map-loader` from `0.2.4` to `1.1.3`.
- `uuid` from `8.2.0` to `8.3.2`.
- `webpack-dev-server` from `3.11.0` to `3.11.1`.

See #51801.
Built from https://develop.svn.wordpress.org/trunk@49939


git-svn-id: http://core.svn.wordpress.org/trunk@49638 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-06 14:53:40 +00:00
John Blackbourn
b59c0f307b Docs: Corrections and improvements to types used in various docblocks.
See #51800, #52217

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


git-svn-id: http://core.svn.wordpress.org/trunk@49635 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-05 17:16:11 +00:00
Sergey Biryukov
7ced0efbf4 Docs: Use more consistent descriptions for void|false return values.
See #51800.
Built from https://develop.svn.wordpress.org/trunk@49935


git-svn-id: http://core.svn.wordpress.org/trunk@49634 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-05 16:48:07 +00:00
Sergey Biryukov
37662df05e Docs: In various @return tags, list the expected type first, instead of false or WP_Error.
Follow-up to [46696], [47060], [49926], [49927].

See #51800.
Built from https://develop.svn.wordpress.org/trunk@49929


git-svn-id: http://core.svn.wordpress.org/trunk@49628 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-04 17:18:04 +00:00
John Blackbourn
dfe1f9b322 Docs: Promote many bool types to true or false where only that value is used.
See #51800

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


git-svn-id: http://core.svn.wordpress.org/trunk@49626 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-03 22:04:04 +00:00
John Blackbourn
53da9208dd Docs: Various docblock corrections particularly relating to boolean types.
See #51800

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


git-svn-id: http://core.svn.wordpress.org/trunk@49625 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-03 21:57:09 +00:00
TimothyBlynJacobs
5363474e5d App Passwords: Ensure the Add New button isn't hidden on mobile.
Also removes an unnecessary `!important` rule introduced in [49772] when fixing a similar issue.

Props vladytimy, mukesh27.
Fixes #51980.
See [49772].

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


git-svn-id: http://core.svn.wordpress.org/trunk@49620 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-02 22:36:05 +00:00
TimothyBlynJacobs
6d3109dd2a App Passwords: Correct authorize app action names and signatures.
When App Passwords was introduced, the `wp_authorize_application_password_form` and `wp_application_passwords_approve_app_request_success` hook were mistakenly duplicated and incorrectly documented. This commit corrects the hook names and ensures the correct parameters are passed.

Props johnbillion, engahmeds3ed.
Fixes #52013.

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


git-svn-id: http://core.svn.wordpress.org/trunk@49619 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-02 22:21:04 +00:00
TimothyBlynJacobs
33cb202f07 Site Health: Use a front-end URL for loopback tests.
In [49154] the async Site Health tests were changed to use the REST API instead of admin-ajax. An unintended side effect of this change was that the loopback tests which tried to ping the site's `admin_url()` were no longer authenticated because admin-cookies aren't provided to the REST API.

This commit adjusts the loopback test to use the front-end `site_url` which checks that cron will function properly. A follow-up ticket will focus on tests that will cover the file editor checks.

Props Clorith.
Fixes #52097.
See #48105.

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


git-svn-id: http://core.svn.wordpress.org/trunk@49616 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-02 20:09:08 +00:00
Sergey Biryukov
ee7c953731 Docs: Second pass at replacing Codex URLs with a corresponding HelpHub or DevHub article.
Follow-up to [45674-45677].

Props marcio-zebedeu, zodiac1978, netweb.
See #48987.
Built from https://develop.svn.wordpress.org/trunk@49912


git-svn-id: http://core.svn.wordpress.org/trunk@49611 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-12-29 20:14:11 +00:00
Sergey Biryukov
fa83e92c76 Export: Add post_modified and post_modified_gmt fields to the generated WXR export file.
This allows for more flexibility when determining which version of a post is the latest one, and makes it possible to implement import logic involving updating and adding revisions to existing posts or pages.

Props jmdodd.
Fixes #52180.
Built from https://develop.svn.wordpress.org/trunk@49910


git-svn-id: http://core.svn.wordpress.org/trunk@49609 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-12-28 15:26:08 +00:00
Sergey Biryukov
1fd05dee6e Site Health: Add WP_MEMORY_LIMIT constant to debug info.
This complements the `WP_MAX_MEMORY_LIMIT` constant previously displayed there.

Props sanketchodavadiya, nre, talldanwp, noisysocks.
Fixes #51680.
Built from https://develop.svn.wordpress.org/trunk@49908


git-svn-id: http://core.svn.wordpress.org/trunk@49607 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-12-27 19:27:06 +00:00
Sergey Biryukov
3f05756219 Accessibility: Upgrade/Install: Add more contrast to input borders during installation.
This brings the accessibility improvements previously made for other areas of the admin in WordPress 5.3 to the installation screens too.

Follow-up to [46241-46244], [46247], [46248], [46293], [46425].

Props Maigret, audrasjb.
Fixes #51854.
Built from https://develop.svn.wordpress.org/trunk@49907


git-svn-id: http://core.svn.wordpress.org/trunk@49606 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-12-26 19:54:07 +00:00
Felix Arntz
c81db1f6e6 Security, Site Health: Detect HTTPS support and encourage switching.
This changeset modifies the Site Health panel for HTTPS to provide more accurate recommendations based on whether the environment is already set up for HTTPS.

* Introduces `wp_is_using_https()` to check whether the site is configured to use HTTPS (via its Site Address and WordPress Address).
* Introduces `wp_is_https_supported()` to check whether the environment supports HTTPS. This relies on a cron job which periodically checks support using a loopback request.

Props Clorith, flixos90, miinasikk, westonruter.
Fixes #47577.

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


git-svn-id: http://core.svn.wordpress.org/trunk@49603 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-12-23 19:13:04 +00:00
John Blackbourn
e7cc15b321 Upload: Introduce the {$action}_overrides filter that allows the overrides parameter for file uploads and file sideloads to be filtered.
The dynamic portion of the hook name, `$action`, refers to the post action.

Props iandunn, jakub.tyrcha, nacin, wonderboymusic, Mte90, johnbillion

Fixes #16849

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


git-svn-id: http://core.svn.wordpress.org/trunk@49564 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-12-20 16:15:03 +00:00
Sergey Biryukov
0e700c40ea Docs: Fix typo in getCursorMarkerSpan() DocBlock in js/_enqueues/wp/editor/base.js.
Props voboghure, mukesh27, audrasjb.
Fixes #52128.
Built from https://develop.svn.wordpress.org/trunk@49841


git-svn-id: http://core.svn.wordpress.org/trunk@49560 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-12-20 12:32:11 +00:00
Sergey Biryukov
41c9686313 Docs: Update the reference to Appearance → Theme Editor admin menu item in the inline documentation.
Follow-up to [42685].

See #51800.
Built from https://develop.svn.wordpress.org/trunk@49837


git-svn-id: http://core.svn.wordpress.org/trunk@49556 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-12-18 15:46:04 +00:00
Andrew Ozz
71ae342050 Editor: Fix improper triggering of the "Are you sure" prompt when navigating away from the old, "classic" Edit Post screen and there are no changes. Was triggered when there is an instance of TinyMCE in the Excerpt postbox.
Props rodrigosprimo, jonathanstegall, kevin940726, azaozz.
Fixes #52038.
Built from https://develop.svn.wordpress.org/trunk@49807


git-svn-id: http://core.svn.wordpress.org/trunk@49530 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-12-16 15:25:09 +00:00
John Blackbourn
7e9060a0e4 Upgrade/Install: Remove a duplicate description for the upgrader_overwrote_package action.
See #51800, #9757

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


git-svn-id: http://core.svn.wordpress.org/trunk@49511 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-12-10 23:38:04 +00:00
Sergey Biryukov
4a69dfa63a Docs: Fix typo in some DocBlocks.
See #51800.
Built from https://develop.svn.wordpress.org/trunk@49785


git-svn-id: http://core.svn.wordpress.org/trunk@49508 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-12-10 18:12:03 +00:00
Helen Hou-Sandí
e516134d10 Update $_old_files for 5.6.
See #39943.

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


git-svn-id: http://core.svn.wordpress.org/trunk@49497 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-12-08 21:50:07 +00:00
TimothyBlynJacobs
a9244a2912 App Passwords: Ensure redirection description is shown on mobile devices.
Props #core.
Fixes #51970.

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


git-svn-id: http://core.svn.wordpress.org/trunk@49495 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-12-08 20:28:04 +00:00
ryelle
aaf90076c5 Help/About: Use CDN URLs for About page images.
See #51415.


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


git-svn-id: http://core.svn.wordpress.org/trunk@49493 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-12-08 17:02:06 +00:00
TimothyBlynJacobs
efdba220e6 App Passwords: Store the "in use" option in the main network options.
Whether App Passwords are being used is a global featurel, not a per-network feature. This fixes issues on Multi Network installs if App Passwords are used on a different network from where they were created.

Props spacedmonkey.
Fixes #51939.
See [49752].

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


git-svn-id: http://core.svn.wordpress.org/trunk@49487 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-12-07 15:59:04 +00:00
TimothyBlynJacobs
aac98aae97 App Passwords: Prevent conflicts when Basic Auth is already used by the site.
Application Passwords uses Basic Authentication to transfer authentication details. If the site is already using Basic Auth, for instance to implement a private staging environment, then the REST API will treat this as an authentication attempt and would end up generating an error for any REST API request.

Now, Application Password authentication will only be attempted if Application Passwords is in use by a site. This is flagged by setting an option whenever an Application Password is created. An upgrade routine is added to set this option if any App Passwords already exist.

Lastly, creating an Application Password will be prevented if the site appears to already be using Basic Authentication.

Props chexwarrior, georgestephanis, adamsilverstein, helen, Clorith, marybaum, TimothyBlynJacobs.
Fixes #51939.


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


git-svn-id: http://core.svn.wordpress.org/trunk@49475 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-12-04 21:44:07 +00:00
Sergey Biryukov
e7b601f7c5 Database: Check the correct value for displaying the "Successfully repaired table" or "Failed to repair" messages on Database Repair screen.
Additionally, rename the variables holding the results of `ANALYZE TABLE` and `OPTIMIZE TABLE` requests, for clarity.

Props mehrshaddarzi.
Fixes #51932.
Built from https://develop.svn.wordpress.org/trunk@49750


git-svn-id: http://core.svn.wordpress.org/trunk@49473 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-12-04 15:50:12 +00:00
TimothyBlynJacobs
692c6498e9 App Passwords: Ensure the Created At and Last Used dates are properly translated.
The `date_i18n` function is now used when formatting the dates in PHP instead of `gmdate` which doesn't handle localization properly.

Additionally, we now use a translation to get the date format to use instead of pulling from the `date_format` option which is only supposed to affect the front-end.

Lastly, when passing the date format to the Backbone JS template, we now use `wp_json_encode()` to format the value for JavaScript. This ensures that backslashes are properly preserved which are used by some locales to escape date formatting control characters.

Props pedromendonca, TimothyBlynJacobs, ocean90, hellofromtonya, SergeyBiryukov, antpb.
Fixes #51918.
See [35811].

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


git-svn-id: http://core.svn.wordpress.org/trunk@49469 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-12-03 21:06:08 +00:00
iandunn
4de6175227 Multisite: Cache absolute dirsize paths to avoid PHP 8 fatal.
r49212 greatly improved the performance of `get_dirsize()`, but also changed the structure of the data stored in the `dirsize_cache` transient. It stored relative paths instead of absolute ones, and also removed the unnecessary `size` array.

That difference in data structures led to a fatal error in the following environment:

* PHP 8
* Multisite
* A custom `WP_CONTENT_DIR` which is not a child of WP's `ABSPATH` folder (e.g., [https://roots.io/bedrock/ Bedrock])
* The `upload_space_check_disabled` option set to `0`

After upgrading to WP 5.6, the `dirsize_cache` transient still had data in the old format. When `wp-admin.php/index.php` was visited, `get_space_used()` received an `array` instead of an `int`, and tried to divide it by another `int`. PHP 7 would silently cast the arguments to match data types, but [https://wiki.php.net/rfc/arithmetic_operator_type_checks PHP 8 throws a fatal error]: 

`Uncaught TypeError: Unsupported operand types: array / int`

`recurse_dirsize()` was using `ABSPATH` to convert the absolute paths to relative ones, but some upload locations are not located under `ABSPATH`. In those cases, `$directory` and `$cache_path` were identical, and that triggered the early return of the old `array`, instead of the expected `int`. 

In order to avoid that, this commit restores the absolute paths, but without the `size` array. It also adds a type check when returning cached values. Using absolute paths without `size` has the result of overwriting the old data, so that it matches the new format. The type check and upgrade routine are additional safety measures.

Props peterwilsoncc, janthiel, helen, hellofromtonya, francina, pbiron.
Fixes #51913. See #19879.


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


git-svn-id: http://core.svn.wordpress.org/trunk@49467 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-12-03 20:39:02 +00:00
Sergey Biryukov
be2891ef1a Upgrade/Install: Check $wp_version global for displaying "You are using a development version" message in the admin footer.
This brings some consistency with the same check in `core_upgrade_preamble()` and avoids a PHP warning if `$cur->version` is not set.

Additionally, remove the check for `$cur->url` property, unused since [8595].

Follow-up to [49708], [49709].

Props pbiron, afragen, audrasjb.
Fixes #51892.
Built from https://develop.svn.wordpress.org/trunk@49736


git-svn-id: http://core.svn.wordpress.org/trunk@49459 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-12-03 14:06:04 +00:00
John Blackbourn
00680f2e89 REST API: Pass the previous state of the post as a parameter to the wp_after_insert_post hook.
This enables, for example, the previous post status to be used by this hook without the need to first capture it on an earlier hook.

This also fixes the value of the `$fire_after_hooks` parameter in `get_default_post_to_edit()` so the `wp_after_insert_post` action correctly fires just once on the new post screen.

Props Collizo4sky, peterwilsoncc, hellofromTonya, TimothyBlynJacobs, SergeyBiryukov

Fixes #45114

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


git-svn-id: http://core.svn.wordpress.org/trunk@49454 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-12-01 20:47:06 +00:00
Sergey Biryukov
2c1bfb5baf Administration: Make sure row actions for recent comments in Activity dashboard widget stay visible when a single row gets focus.
Follow-up to [49142].

Props sabernhardt, kebbet, hareesh-pillai, pbiron.
Fixes #51886. See #51516, #49715.
Built from https://develop.svn.wordpress.org/trunk@49725


git-svn-id: http://core.svn.wordpress.org/trunk@49448 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-12-01 18:16:07 +00:00
Sergey Biryukov
785cb6cc7d Media: Revert [49567].
This addresses a regression with the pagination section in Media Library no longer taking additional query filtering into account.

Props iCaleb, trepmal, peterwilsoncc.
See #39968.
Built from https://develop.svn.wordpress.org/trunk@49720


git-svn-id: http://core.svn.wordpress.org/trunk@49443 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-12-01 16:33:05 +00:00
TimothyBlynJacobs
c3b40f7f80 Site Health, App Passwords: Ensure REST API responses are properly translated.
The REST API requests in Site Health and App Passwords now include `_locale=user` in the request URL to ensure the user's locale is used instead of the site locale. Additionally, the `apiRequest` library now sends a JSON `Accept` header which is required by `determine_locale()` to respect the `_locale` query parameter.

The Site Health REST API controllers now manually load the default admin textdomain if not `is_admin()`. This allows for the Site Health tests to be translated even though the translations are part of the administration project and the REST API is not.

Props oglekler, kebbet, Clorith, TimothyBlynJacobs, ocean90, SergeyBiryukov, adamsilverstein.
Fixes #51871.

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


git-svn-id: http://core.svn.wordpress.org/trunk@49439 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-12-01 03:44:05 +00:00
Andrew Ozz
190b9a0b32 Quick/Bulk Edit: Follow up to [49703]. Improve the logic a bit and always return this (the jQuery object) in wpTagsSuggest.
Fixes #51872.
Built from https://develop.svn.wordpress.org/trunk@49710


git-svn-id: http://core.svn.wordpress.org/trunk@49433 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-11-30 14:31:04 +00:00
Sergey Biryukov
ce3334571d Upgrade/Install: Display "You are using a development version" message on WordPress Updates screen for Beta or RC versions.
This ensures that the message is displayed when the `WP_AUTO_UPDATE_CORE` constant is set to `beta` or `rc` and the user is on a development version.

Follow-up to [49245], [49254], [49292], [49638], [49708].

Props afragen, audrasjb, azaozz, SergeyBiryukov.
Fixes #51822.
Built from https://develop.svn.wordpress.org/trunk@49709


git-svn-id: http://core.svn.wordpress.org/trunk@49432 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-11-30 13:42:07 +00:00
Sergey Biryukov
95f28a3fd2 Upgrade/Install: Display "You are using a development version" message in the admin footer for Beta or RC versions.
This ensures that the message is displayed when the `WP_AUTO_UPDATE_CORE` constant is set to `beta` or `rc` and the user is on a development version.

Props afragen.
Fixes #51892.
Built from https://develop.svn.wordpress.org/trunk@49708


git-svn-id: http://core.svn.wordpress.org/trunk@49431 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-11-29 16:13:06 +00:00
Sergey Biryukov
2797594835 Comments: Correct ending tag placement in the "Search results for: ..." subtitle.
Follow-up to [49284], [49286].

Props Clorith, kebbet, johnbillion, audrasjb, azaozz.
Fixes #51889. See #37353.
Built from https://develop.svn.wordpress.org/trunk@49705


git-svn-id: http://core.svn.wordpress.org/trunk@49428 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-11-28 17:28:05 +00:00
Andrew Ozz
bac1ada04d Quick/Bulk Edit: Fix undefined error when initializing UI Autocomplete 1.12.1 on non-existing element and then attempting to use the autocomplete instance.
Example: `jQuery( '#nonexisting' ).autocomplete().autocomplete( 'instance' ).something`.

Props _luigi, sabernhardt, donmhico, azaozz.
Fixes #51872.
Built from https://develop.svn.wordpress.org/trunk@49703


git-svn-id: http://core.svn.wordpress.org/trunk@49426 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-11-28 12:46:05 +00:00
ryelle
33749fcc74 Help/About: Update URLs in About page
Replace the placeholder links now that the posts have been published. This also updates the jQuery plugin links to to local-site links, if the user can install plugins.

Follow-up to [49640].
Props mukesh27, ocean90.
See #51415.


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


git-svn-id: http://core.svn.wordpress.org/trunk@49425 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-11-27 17:10:07 +00:00
John Blackbourn
f4cda1b62f Docs: Upgrade more parameters in docblocks to used typed array notation.
See #51800, #41756

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


git-svn-id: http://core.svn.wordpress.org/trunk@49416 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-11-24 21:27:05 +00:00
John Blackbourn
780cdb5eb5 Docs: Various docblock corrections relating to parameter types.
See #51800

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


git-svn-id: http://core.svn.wordpress.org/trunk@49415 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-11-24 21:22:04 +00:00