Commit Graph

8078 Commits

Author SHA1 Message Date
Aaron Jorbin c3f642d953 Grouped Backports to the 5.8 branch
- Install: When populating options, maybe_serialize instead of always serialize.
- Uploads: Check for and verify ZIP archives.

Merges [57388] and [57389] to the 5.8 branch.

Props costdev, peterwilsoncc, azaozz, tykoted, johnbillion, desrosj, afragen, jorbin, xknown.

Built from https://develop.svn.wordpress.org/branches/5.8@57397


git-svn-id: http://core.svn.wordpress.org/branches/5.8@56903 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-30 14:47:04 +00:00
Joe McGill 04a88b9941 Grouped backports to the 5.8 branch.
- REST API: Limit `search_columns` for users without `list_users`.
- Comments: Prevent users who can not see a post from seeing comments on it.
- Application Passwords: Prevent the use of some pseudo protocols in application passwords.
- Restrict media shortcode ajax to certain type
- REST API: Ensure no-cache headers are sent when methods are overriden.
- Prevent unintended behavior when certain objects are unserialized.

Merges [56833], [56834], [56835], [56836], [56837], and [56838] to the 5.8 branch.
Props xknown, jorbin, Vortfu, joehoyle, timothyblynjacobs, peterwilsoncc, ehtis, tykoted, martinkrcho, paulkevan, dd32, antpb, rmccue.

Built from https://develop.svn.wordpress.org/branches/5.8@56884


git-svn-id: http://core.svn.wordpress.org/branches/5.8@56395 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-12 18:30:41 +00:00
audrasjb fdbe707b83 Grouped backports to the 5.8 branch.
- Media: Prevent CSRF setting attachment thumbnails.
- Embeds: Add protocol validation for WordPress Embed code.
- I18N: Introduce sanitization function for locale.
- Editor: Ensure block comments are of a valid form.

Merges [55760-55764] to the 5.8 branch.
Props dd32, isabel_brison, martinkrcho, matveb, ocean90, paulkevan, peterwilsoncc, timothyblynjacobs, xknown, youknowriad.


Built from https://develop.svn.wordpress.org/branches/5.8@55777


git-svn-id: http://core.svn.wordpress.org/branches/5.8@55289 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-05-16 15:33:10 +00:00
audrasjb d8ffe4fe33 Grouped backports to the 5.8 branch.
- Editor: Bump @wordpress packages for the 5.9 branch,
- Media: Refactor search by filename within the admin,
- REST API: Lockdown post parameter of the terms endpoint,
- Customize: Escape blogname option in underscores templates,
- Query: Validate relation in `WP_Date_Query`,
- Users: Revert use of shared objects for current user,
- Posts, Post types: Apply KSES to post-by-email content,
- General: Validate host on "Are you sure?" screen,
- Posts, Post types: Remove emails from post-by-email logs,
- Pings/trackbacks: Apply KSES to all trackbacks,
- Mail: Reset PHPMailer properties between use,
- Comments: Apply kses when editing comments,
- Widgets: Escape RSS error messages for display.

Merges [54521-54530] to the 5.8 branch.
Props audrasjb, costdev, cu121, dd32, davidbaumwald, ehtis, johnbillion, johnjamesjacoby, martinkrcho, matveb, oztaser, paulkevan, peterwilsoncc, ravipatel, SergeyBiryukov, talldanwp, timothyblynjacobs, tykoted, voldemortensen, vortfu, xknown.

Built from https://develop.svn.wordpress.org/branches/5.8@54548


git-svn-id: http://core.svn.wordpress.org/branches/5.8@54103 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-17 17:48:01 +00:00
desrosj 66bb979049 Upgrade/Install: Avoid using `unserialize()` unnecessarily.
Merges [52456] to the 5.8 branch.
Props vortfu, xknown, dd32.
Built from https://develop.svn.wordpress.org/branches/5.8@52463


git-svn-id: http://core.svn.wordpress.org/branches/5.8@52055 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-06 17:29:56 +00:00
Sergey Biryukov fb283a3c27 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, circlecube, desrosj.
Merges [51982] to the 5.8 branch.
Fixes #54129.
Built from https://develop.svn.wordpress.org/branches/5.8@51983


git-svn-id: http://core.svn.wordpress.org/branches/5.8@51572 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-02 18:33:59 +00:00
desrosj bbda256d9c Filesystem API: Make sure to only call `fread()` on non-empty files in `PclZip::privAddFile()`.
This avoids a fatal error on PHP 8 caused by passing a zero value to `fread()` as the `$length` argument, which must be greater than zero.

This commit also amends the previous solution for similar issues elsewhere in the file to ensure consistent type for string values, instead of changing the type from `string` to `bool` when trying to read from an empty file.

Follow-up to [50355].

Props DavidAnderson, jrf, SergeyBiryukov.
Merges [51686] to the 5.8 branch.
Fixes #54036.
Built from https://develop.svn.wordpress.org/branches/5.8@51694


git-svn-id: http://core.svn.wordpress.org/branches/5.8@51300 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-08-30 14:28:57 +00:00
desrosj b9d1f9170d Customize: Hide native control on background position field.
Hide the browser's native radio button on the custom background position selector in the Customizer and the legacy background screen. This fixes an issue causing both to display.

Props mukesh27, ravipatel, sabernhardt, walbo, peterwilsoncc.
Merges [51637] to the 5.8 branch.
Fixes #53803.
Built from https://develop.svn.wordpress.org/branches/5.8@51640


git-svn-id: http://core.svn.wordpress.org/branches/5.8@51246 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-08-19 13:47:00 +00:00
desrosj 720a2a7035 Themes: Add "Template Editing" to the list of WordPress theme features.
Follow-up to [meta11158].

Props poena, desrosj, SergeyBiryukov.
Merges [51510] to the 5.8 branch.
Fixes #53556. See #meta5802.
Built from https://develop.svn.wordpress.org/branches/5.8@51516


git-svn-id: http://core.svn.wordpress.org/branches/5.8@51127 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-30 12:24:59 +00:00
desrosj 89bd77009b Upgrade/Install: Add files for 5.8 to the `$_old_files` list that were missed.
Follow up to [51133], [51459].

Props WFMattR, audrasjb, ocean90, johnbillion, pbiron.
Merges [51497] to the 5.8 branch.
Fixes #53702.
Built from https://develop.svn.wordpress.org/branches/5.8@51509


git-svn-id: http://core.svn.wordpress.org/branches/5.8@51120 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-28 13:06:58 +00:00
desrosj f6b7f4c3e9 Media: Check the `posts_per_page` value in `wp_ajax_query_attachments()` before using it as a divisor.
This avoids a "Division by zero" PHP warning if a plugin changes the `posts_per_page` value to zero.

Follow-up to [51145].

Props 2linctools, kapilpaul, audrasjb, SergeyBiryukov.
Merges [51485] to the 5.8 branch.
Fixes #53773.
Built from https://develop.svn.wordpress.org/branches/5.8@51507


git-svn-id: http://core.svn.wordpress.org/branches/5.8@51118 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-28 13:02:58 +00:00
Peter Wilson ce8a07686a Upgrade/Install: Add additional files to `$_old_files` for 5.8.
Follow up to [51134].

Props desrosj.
Merges [51459] to the 5.8 branch.
Fixes #53367.


Built from https://develop.svn.wordpress.org/branches/5.8@51460


git-svn-id: http://core.svn.wordpress.org/branches/5.8@51071 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-19 01:27:57 +00:00
desrosj 6dafb3154f Docs: Adjust `wp_dashboard_browser_nag()` DocBlock per the documentation standards.
Follow-up to [51117], [51119], [51120].

Props SergeyBiryukov.
Merges [51282] to the 5.8 branch.
See #52628, #53461.
Built from https://develop.svn.wordpress.org/branches/5.8@51313


git-svn-id: http://core.svn.wordpress.org/branches/5.8@50922 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-02 18:59:56 +00:00
Peter Wilson 1b7cd950ca Upgrade/Install: Notify users of deactivated plugins during upgrade.
This adds a one-off notice to the dashboard in the event WordPress has automatically deactivated a plugin due to incompatibility with the new version of WordPress.

Introduces the new private function `deactivated_plugins_notice()` to display the notice in the dashboard. Introduces the new auto-loaded option `wp_force_deactivated_plugins` to store a list of automatically deactivated plugins; the option is used on both a site and network level.

Follow up to [51180].

Props desrosj, jorbin, azaozz, SergeyBiryukov, peterwilsoncc.
See #53432.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50875 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-30 00:21:58 +00:00
ryelle aea10c0c44 Help/About: WordPress 5.8 About Page.
This is the start of the WordPress 5.8 about page, introducing new content and a first pass of the new style.

Props chanthaboune, cbringmann, webcommsat, marybaum, melchoyce, shaunandrews, desrosj, ryelle, oglekler, yvettesonneveld, nalininonstopnewsuk, meher, femkreations, alanjacobmathew, courane01, annezazu, matveb, milana_cap, javiarce, ryokuhi, audrasjb.
See #52775.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50873 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-29 19:06:57 +00:00
Clorith c26143ea2e Site Health: Add a unique wrapper for dashboard widget content.
This wraps the inner-content of the Site Health dashboard widget to give a unique target for CSS selectors, restoring the ability to collapse the widget.

The initial implementation targeted the `.inside` class used by all widgets to apply styling to the widget content, but this prevented the widget from being collapsed, as it added grid-styles which other widgets do not use, overriding the usual behavior when toggling widget visibility.

Follow-up to [50833].

Props alanjacobmathew, walbo.
Fixes #53521.
Built from https://develop.svn.wordpress.org/trunk@51247


git-svn-id: http://core.svn.wordpress.org/trunk@50856 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-27 15:56:58 +00:00
Sergey Biryukov 4381bf2ef6 Coding Standards: Fix WPCS issues in [51227].
This fixes a "Tabs must be used to indent lines; spaces are not allowed" error.

See #53475.
Built from https://develop.svn.wordpress.org/trunk@51230


git-svn-id: http://core.svn.wordpress.org/trunk@50839 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-24 20:55:58 +00:00
Andrew Ozz 936a38255b Media: Prevent uploading and show an error message when the server doesn't support editing of WebP images, take II. Add new, better error message for it.
Props antpb, joedolson, iandunn, azaozz.
Fixes #53475.
Built from https://develop.svn.wordpress.org/trunk@51227


git-svn-id: http://core.svn.wordpress.org/trunk@50836 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-24 19:12:00 +00:00
joedolson c17e2baa80 Media: Correct undefined variable in wp_ajax_query_attachments.
Fix a misnamed variable introduced in [51145]. Change `$query_args` to correctly defined variable `$query`.

Follow-up to [51145].

props desrosj, audrasjb.
Fixes #50105.
Built from https://develop.svn.wordpress.org/trunk@51224


git-svn-id: http://core.svn.wordpress.org/trunk@50833 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-23 22:47:59 +00:00
desrosj 5acf559613 Docs: Remove inaccurate `@since` tag.
Follow up to [50829,50831,51145,51147].

Props johnbillion.
Fixes #53461. See #50105.
Built from https://develop.svn.wordpress.org/trunk@51222


git-svn-id: http://core.svn.wordpress.org/trunk@50831 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-23 19:09:56 +00:00
Sergey Biryukov 19f8ac491d Administration: Consistently escape `network_admin_url()` links.
Follow-up to [51177].

Props chintan1896, mukesh27.
Fixes #53459.
Built from https://develop.svn.wordpress.org/trunk@51189


git-svn-id: http://core.svn.wordpress.org/trunk@50798 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-21 04:30:56 +00:00
Sergey Biryukov 0e5a98eec5 Docs: Correct DocBlock formatting for `Core_Upgrader::upgrade()`.
Document the `$auto_update_settings` parameter of the `after_core_auto_updates_settings` action.

Follow-up to [49254].

See #52628.
Built from https://develop.svn.wordpress.org/trunk@51185


git-svn-id: http://core.svn.wordpress.org/trunk@50794 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-19 21:37:57 +00:00
Sergey Biryukov 4ccc58801d Upgrade/Install: Deactivate the Gutenberg plugin if its version is 10.7 or lower.
This avoids a fatal error due to `WP_Block_Template` class redeclaration when updating to WordPress 5.8 with an older version of Gutenberg activated.

Follow-up to [35582] for the REST API plugin.

Props hellofromTonya, oglekler, azaozz, desrosj, pbiron, jorbin, youknowriad, TimothyBlynJacobs, Clorith, markparnell.
See #53432.
Built from https://develop.svn.wordpress.org/trunk@51180


git-svn-id: http://core.svn.wordpress.org/trunk@50789 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-18 12:14:01 +00:00
Sergey Biryukov 6a163e199a Administration: Consistently escape `admin_url()` links.
Props chintan1896, mukesh27.
Fixes #53426.
Built from https://develop.svn.wordpress.org/trunk@51177


git-svn-id: http://core.svn.wordpress.org/trunk@50786 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-17 14:37:00 +00:00
Sergey Biryukov d32aa67e80 Docs: Update syntax for multi-line comment in `wp_generate_attachment_metadata()` per the documentation standards.
Follow-up to [23766], [25968], [35554], [51162].

Props hellofromTonya.
Fixes #52603.
Built from https://develop.svn.wordpress.org/trunk@51166


git-svn-id: http://core.svn.wordpress.org/trunk@50775 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-15 19:10:58 +00:00
Sergey Biryukov 4803207ba1 Media: Make sure `wp_generate_attachment_metadata()` always returns an array.
This matches the documentation for the filter of the same name.

Previously, the function could return `false` for an audio or video attachment that does not exist in the local filesystem.

Props Chouby, SergeyBiryukov.
Fixes #52603.
Built from https://develop.svn.wordpress.org/trunk@51162


git-svn-id: http://core.svn.wordpress.org/trunk@50771 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-15 16:52:56 +00:00
Sergey Biryukov 0def70a94c Coding Standards: Use consistent formatting for `_wp_posts_page_notice()` and `_wp_block_editor_posts_page_notice()`.
Remove redundant casting to `int` for post ID, which is always an integer.

Follow-up to [51116].

See #45537, #52627.
Built from https://develop.svn.wordpress.org/trunk@51158


git-svn-id: http://core.svn.wordpress.org/trunk@50767 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-15 15:50:58 +00:00
desrosj e0e19035dc Coding Standards: Apply some alignment fixes.
Follow up to [51145].
See #50105.
Built from https://develop.svn.wordpress.org/trunk@51147


git-svn-id: http://core.svn.wordpress.org/trunk@50756 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-14 23:43:02 +00:00
joedolson fe1cb3ff0d Media: Restore AJAX response data shape in media library.
Restore the original shape of the AJAX response data in the media library after removing infinite scroll, and pass total number of attachments in the response headers `X-WP-Total` and `X-WP-TotalPages`. 

Improve backwards compatibility for plugins intercepting the ajax response. Headers match the structure and count calculation used in REST API responses.

Fix an issue with hiding the spinner after the load is completed and ensure that the load more view is created when changing tabs in the media library modal.

Follow up to [50829].

props adamsilverstein, spacedmonkey, joedolson.
Fixes #50105.
Built from https://develop.svn.wordpress.org/trunk@51145


git-svn-id: http://core.svn.wordpress.org/trunk@50754 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-14 20:50:57 +00:00
desrosj b7489425cb Site Health: Display a list of file formats supported by the GD library.
This adds the list of file formats supported by the GD library to the Media Handling section in Site Health.

This will help site owners debug any issues they encounter as support for newer, more modern image formats is added (such as WebP in [50810]).

Follow up to [50817].
Props adamsilverstein, jorbin. 
Fixes #53022.
Built from https://develop.svn.wordpress.org/trunk@51143


git-svn-id: http://core.svn.wordpress.org/trunk@50752 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-14 18:59:59 +00:00
desrosj 8c4cff0708 Upgrade/Install: Built files should not be included in the `$_old_files` list.
Follow up to [51133].
Unprops desrosj.
See #53367.
Built from https://develop.svn.wordpress.org/trunk@51134


git-svn-id: http://core.svn.wordpress.org/trunk@50743 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-09 16:22:03 +00:00
desrosj f7c74d3994 Upgrade/Install: Update the `$_old_files` list for 5.8.
Follow up to [50761], [50794], [51021].
Props kapilpaul, desrosj.
See #52991, #52846, #53246.
Fixes #53367.
Built from https://develop.svn.wordpress.org/trunk@51133


git-svn-id: http://core.svn.wordpress.org/trunk@50742 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-09 15:54:57 +00:00
antpb 06cddbd3b3 Privacy: Improve naming of user confimed action email filters.
The filters `user_confirmed_action_email_content`, `user_erasure_complete_email_subject`, and `user_erasure_complete_email_headers` have been deprecated.

They have been replaced with `user_erasure_fulfillment_email_content`, `user_erasure_fulfillment_email_subject`, and `user_erasure_fulfillment_email_headers`.

Props desrosj, garrett-eclipse, birgire, DrewAPicture, lifeforceinst, ocean90, pbiron, pento, coffee2code, TZ-Media, SergeyBiryukov, johnbillion, audrasjb, davidbaumwald, hellofromTonya, helen, xkon, antpb, peterwilsoncc, lukecarbis.
Fixes #44314.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50738 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-09 01:35:58 +00:00
desrosj bdbda4c306 Coding Standards: Use single quotes when there are no variables within the string.
Follow up to [51117].

See #48743.
Built from https://develop.svn.wordpress.org/trunk@51120


git-svn-id: http://core.svn.wordpress.org/trunk@50729 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-08 22:55:58 +00:00
desrosj 892e5dd68e Administration: Adjust Internet Explorer message to be a bit more clear.
This moves “Internet Explorer” to the beginning of the sentence introduced in [51117] to make the reason the user is seeing this message more clear.

Props chanthaboune, jeffpaul, desrosj.
Fixes #48743.
Built from https://develop.svn.wordpress.org/trunk@51119


git-svn-id: http://core.svn.wordpress.org/trunk@50728 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-08 22:54:57 +00:00
antpb a8321ed2d5 Administration: Introduce dashboard notice to discourage use of out of date browser.
If a browser matches Internet Explorer, the dashboard will display a notice recommending a more modern browser.

Props youknowriad, sabernhardt, afercia, SergeyBiryukov, davidbaumwald, netweb, johnbillion, jeherve.
See #48743.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50726 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-08 22:47:58 +00:00
whyisjake 71f37fe636 Editor: Ensure that the block editor can be used on the page post type.
Additionally, add a notice for when you are editing the "latest posts" page.

Fixes #45537.

Props cameronjonesweb, swissspidy, hannahmalcolm, Fantasy1125, ArnaudBan, grantmkin, youknowriad, knutsp, SergeyBiryukov, audrasjb, whyisjake. 

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


git-svn-id: http://core.svn.wordpress.org/trunk@50725 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-08 22:38:58 +00:00
whyisjake 1b7df89e93 Administration: Escape the values of data-colname.
Adds a `esc_attr` wrapper to `strip_all_tags`.

See [33016].

Fixes #40401.

Props rellect, SergeyBiryukov, hareesh-pillai, audrasjb.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50724 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-08 22:21:57 +00:00
Sergey Biryukov 08f5a1b098 Upgrade/Install: Remove parsing of `readme.txt` files for plugin or theme requirements.
This affects:
* `validate_plugin_requirements()`
* `validate_theme_requirements()`

Historically, the `Requires PHP` header was introduced in #meta2952 for the Plugin Directory first, so at the time it made sense to have it defined in the same place as `Requires at least`, which only existed in `readme.txt`. 

Since parsing of PHP and WordPress requirements was later added to WordPress core, the core should retrieve all the necessary data from the main plugin or theme file and not from `readme.txt`, which only contains the data meant for the Plugin or Theme Directory.

The recommended place for `Requires PHP` and `Requires at least` headers is as follows:
* The plugin's main PHP file
* The theme's `style.css` file

The place for the `Tested up to` header remains in `readme.txt` for the time being, as it's not used by WordPress core.

Follow-up to [44978], [45546], [47573], [47574], [meta5841], [meta9050].

Props afragen, Otto42, joyously, williampatton, audrasjb.
Fixes #48520. See #48515, #meta2952, #meta4514, #meta4621.
Built from https://develop.svn.wordpress.org/trunk@51092


git-svn-id: http://core.svn.wordpress.org/trunk@50701 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-08 10:13:00 +00:00
noisysocks bbc2d09a9f Make new WordPress installations use blocks in widget areas instead of widgets
Modifies `wp_install_defaults()` so that when you install a new WordPress site you
have block in your widget areas, not widgets.

Fixes #53324.
Props isabel_brison, hellofromtonya, andraganescu.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50697 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-08 01:55:57 +00:00
joedolson e53ace6056 Application Passwords: Allow enter key to submit profile form.
Fix the enter key in profile form fields moving focus to the application password input instead of submitting the profile update for. Replace the submit button type used for application passwords with `button type="button"` and ensure that the enter key's native behavior isn't overwritten.

props audrasjb, alexstine, promz, sabernhardt.
Fixes #52849.
Built from https://develop.svn.wordpress.org/trunk@51086


git-svn-id: http://core.svn.wordpress.org/trunk@50695 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-07 23:49:58 +00:00
Sergey Biryukov f637014b61 Site Health: Remove unnecessary `function_exists()` checks from `WP_Site_Health::get_tests()`.
By the time the tests run, both `wp_is_site_protected_by_basic_auth()` and `rest_url()` functions are available, so there is no need to check for their existence.

Follow-up to [44986], [51057].

Props Clorith, costdev, SergeyBiryukov.
Fixes #52642.
Built from https://develop.svn.wordpress.org/trunk@51066


git-svn-id: http://core.svn.wordpress.org/trunk@50675 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-03 11:14:56 +00:00
Sergey Biryukov 8e5b3d5a97 Plugins: Make sure Hello Dolly translations are deleted when the plugin is deleted.
Follow-up to [19965], [29856].

Props costdev, Otshelnik-Fm, JeffPaul, SergeyBiryukov.
Fixes #52817.
Built from https://develop.svn.wordpress.org/trunk@51064


git-svn-id: http://core.svn.wordpress.org/trunk@50673 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-02 15:12:58 +00:00
Clorith 918610fb88 Site Health: Conditionally run Authorization header test.
The test to confirm if Authorization headers can be used and recognized by WordPress needs to include a username and password combination that WordPress can compare against during the testing phase. The inclusion of credentials here would unfortunately also invalidate any existing basic auth session for the site, for example if the user had added this as an extra layer of security on their back-end.

This test is now skipped if the `wp_is_site_protected_by_basic_auth()` function detects that basic auth is being used, since the act of using basic auth to access the site confirms that this feature is working as expected in the first place.

Props WebDragon, TimothyBlynJacobs, costdev.
Fixes #52642.
Built from https://develop.svn.wordpress.org/trunk@51057


git-svn-id: http://core.svn.wordpress.org/trunk@50666 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-02 00:51:57 +00:00
Peter Wilson 885bdb2556 Posts, Post Types: Improve `post_exists()` query.
Add `$status` parameter to `post_exists()` to allow developers to specify a post type, date and status to ensure they hit the `wp_posts` table's `type_status_date` index when determining if a post exists.

Props apokalyptik, boonebgorges, brettshumaker, DrewAPicture, MikeHansenMe, peterwilsoncc, whyisjake.
Fixes #34012.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50636 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-26 02:17:56 +00:00
ryelle 6e4b41c848 Site Health, Privacy: Combine shared CSS for Site Health & Privacy Settings
The styles for the Privacy settings page were based on the Site Health section. These were duplicated into `edit.css` in #49264. This change merges the selectors from Site Health into the Privacy section, to reduce that duplicate code.

Props xkon, notlaura, clorith.
See #52429.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50634 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-26 01:53:57 +00:00
Sergey Biryukov 8f8f433b3c Administration: Improve the message about installing the Link Manager plugin to use legacy Links screen.
This provides direct links to install and activate the plugin, if the user has the capabilities to do so, instead of just linking to plugin search results.

It also matches more closely the message about installing the Classic Editor plugin for meta boxes incompatible with the block editor.

Follow-up to [22855], [44280], [45657].

Props tw2113, peterwilsoncc, SergeyBiryukov.
Fixes #52669.
Built from https://develop.svn.wordpress.org/trunk@51011


git-svn-id: http://core.svn.wordpress.org/trunk@50620 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-25 20:14:59 +00:00
Sergey Biryukov b722ba6ca5 Coding Standards: Further update the code for bulk menu items deletion to better follow WordPress coding standards.
Follow-up to [51006], [51009].

See #21603.
Built from https://develop.svn.wordpress.org/trunk@51010


git-svn-id: http://core.svn.wordpress.org/trunk@50619 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-25 19:14:57 +00:00
joedolson 212f532d4c Menus: Add bulk delete for menu items.
Adds an option to bulk delete menu items from the core Navigation Menus screen, offering a considerable usability benefit when making significant changes to navigation menus.

Uses the bulk select pattern found in post and media lists for consistency with other core management screens, rather than the rapid delete pattern found in menus in the customizer.

Props wphound, welcher, melchoyce, maxpertici, audrasjb
Fixes #21603.
Built from https://develop.svn.wordpress.org/trunk@51006


git-svn-id: http://core.svn.wordpress.org/trunk@50615 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-25 17:42:58 +00:00
desrosj 0d1e4e553c General: Avoid unnecessary calls to `update_user_option()`.
The `update_user_option()` function is a way to update a user meta value after adding a blog’s prefix to the beginning of the meta key. But when the fourth parameter is `true`, the behavior is exactly the same as calling `update_user_meta()` directly.

This replaces all instances of `update_user_option()` when the fourth parameter is `true` in Core with a direct call to `update_user_meta()` to prevent an unnecessary call to `update_user_option()`.

Props johnjamesjacoby, zkancs, obenland, desrosj.
Fixes #43339.
Built from https://develop.svn.wordpress.org/trunk@50981


git-svn-id: http://core.svn.wordpress.org/trunk@50590 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-24 19:59:57 +00:00