Commit Graph

18750 Commits

Author SHA1 Message Date
Sergey Biryukov
6e71523ead Upgrade/Install: Allow WordPress sites to opt-in to beta & RC releases.
The `WP_AUTO_UPDATE_CORE` constant now supports `beta` and `rc` values.

This makes it possible for sites to opt-in to updating to RC (or beta) releases without having to install a plugin, or run on a development version.

Props dd32, knutsp.
Fixes #51319.
Built from https://develop.svn.wordpress.org/trunk@49245


git-svn-id: http://core.svn.wordpress.org/trunk@49007 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-20 17:56:06 +00:00
Sergey Biryukov
94b088339c Upgrade/Install: Restore casting $filter_payload to an object in WP_MS_Themes_List_Table::prepare_items().
Follow-up to [48750], [49241].

See #50875.
Built from https://develop.svn.wordpress.org/trunk@49243


git-svn-id: http://core.svn.wordpress.org/trunk@49005 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-20 17:44:06 +00:00
Helen Hou-Sandí
c8fbc04276 Upgrade/Install: Include "from" version for plugins/themes in email.
This can help with chasing down any issues that may arise and rolling back if necessary. We hope it's not, but it might be.

Props dkotter, garrett-eclipse, pbiron, audrasjb.
Fixes #50774.

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


git-svn-id: http://core.svn.wordpress.org/trunk@49004 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-20 17:41:07 +00:00
Sergey Biryukov
e38c5ca7d4 Upgrade/Install: Introduce a wrapper for the auto_update_{$type} filter checks.
This allows for cleaner checks whether auto-updates are forced for a plugin or theme.

Follow-up to [48750].

Props rebasaurus, garrett-eclipse, SergeyBiryukov.
Fixes #50875.
Built from https://develop.svn.wordpress.org/trunk@49241


git-svn-id: http://core.svn.wordpress.org/trunk@49003 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-20 17:39:07 +00:00
Sergey Biryukov
be5fb561ad Quick/Bulk Edit: Introduce quick_edit_dropdown_authors_args filter.
This allows for customizing the arguments used to generate the Quick Edit authors drop-down.

Additionally, pass the `$bulk` argument to the `quick_edit_dropdown_pages_args` filter, for consistency.

Props Mista-Flo, garrett-eclipse, hellofromTonya.
Fixes #47685.
Built from https://develop.svn.wordpress.org/trunk@49238


git-svn-id: http://core.svn.wordpress.org/trunk@49000 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-20 16:40:05 +00:00
Sergey Biryukov
35681b0e9a Site Health: Introduce the WP_Site_Health::is_development_environment() method.
This allows Site Health tests to check if the current environment type is set to `development` or `local`.

Use the new method:
* In HTTPS tests, instead of a hardcoded check for `localhost`.
* In `WP_DEBUG` and `WP_DEBUG_DISPLAY` tests, to set the status to `recommended` instead of `critical`.

Props dkotter, Clorith, DavidAnderson, joyously, knutsp, afragen, SergeyBiryukov.
Fixes #47058.
Built from https://develop.svn.wordpress.org/trunk@49237


git-svn-id: http://core.svn.wordpress.org/trunk@48999 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-20 16:23:07 +00:00
desrosj
8778aa8922 Site Health: Improve the reliability of asynchronous tests.
This change adds additional logic to catch HTTP failures that do not return a `WP_Error` object (for example, a wp-json REST API error error).

This also fixes instances where REST API callbacks performed from cron do not work due to a lack of authentication by introducing a direct callback route that asynchronous tests can register.

Props dd32, clorith, timothyblynjacobs.
Fixes #51547.
Built from https://develop.svn.wordpress.org/trunk@49232


git-svn-id: http://core.svn.wordpress.org/trunk@48994 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-20 14:50:06 +00:00
Sergey Biryukov
0287a48764 Docs: Update the @since note for _media_states().
Follow-up to [49223].

Props mukesh27.
Fixes #42063.
Built from https://develop.svn.wordpress.org/trunk@49231


git-svn-id: http://core.svn.wordpress.org/trunk@48993 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-20 14:41:05 +00:00
desrosj
b2622d5d8c Site Health: Use consistent padding around header tags.
Props vinita29, clorith.
Fixes #50638.
Built from https://develop.svn.wordpress.org/trunk@49229


git-svn-id: http://core.svn.wordpress.org/trunk@48991 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-20 14:18:08 +00:00
desrosj
d40c365a30 Coding Standards: Correct some minor coding standards issues.
Introduced in [49154], [49212], [49223], and [49224].
Built from https://develop.svn.wordpress.org/trunk@49225


git-svn-id: http://core.svn.wordpress.org/trunk@48987 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-20 13:29:08 +00:00
Helen Hou-Sandí
edb64a3d8e Media: Indicate if item is or was used as a site option in the details modal.
Props Mista-Flo, melchoyce.
Fixes #42063.

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


git-svn-id: http://core.svn.wordpress.org/trunk@48985 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-20 03:14:06 +00:00
desrosj
d2fb6101c4 Bundled Themes: Make Twenty Twenty-One the default theme.
After being imported in [49216], Twenty Twenty-One can now be set as the default theme in WordPress.

See #48110.
Built from https://develop.svn.wordpress.org/trunk@49220


git-svn-id: http://core.svn.wordpress.org/trunk@48982 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-20 02:04:07 +00:00
Sergey Biryukov
9c82dfada2 Help/About: Serve the image on the Freedoms page locally.
Serving the files locally is beneficial for reasons of privacy and speed.

Props garrett-eclipse, pputzer, hellofromTonya.
Fixes #46363.
Built from https://develop.svn.wordpress.org/trunk@49219


git-svn-id: http://core.svn.wordpress.org/trunk@48981 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-20 02:02:06 +00:00
Sergey Biryukov
5cbad34501 Help/About: Update Privacy page to include illustration.
This brings some consistency with the Freedoms page.

Follow-up to [43938].

Props melchoyce, garrett-eclipse, hareesh-pillai, ryelle.
Fixes #45395.
Built from https://develop.svn.wordpress.org/trunk@49218


git-svn-id: http://core.svn.wordpress.org/trunk@48980 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-20 01:47:06 +00:00
Sergey Biryukov
651f426b3a General: Remove noreferrer from wp_targeted_link_rel() and other uses.
When `noopener noreferrer` was originally added in #37941 and related tickets, the `noreferrer` bit was specifically included due to Firefox not supporting `noopener` at the time.

Since `noopener` has been supported by all major browsers for a while, it should now be safe to remove the `noreferrer` attribute from core.

Props Mista-Flo, audrasjb, joostdevalk, jonoaldersonwp, peterwilsoncc, elgameel.
Fixes #49558.
Built from https://develop.svn.wordpress.org/trunk@49215


git-svn-id: http://core.svn.wordpress.org/trunk@48977 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-19 23:39:04 +00:00
Sergey Biryukov
80be8c138d Administration: Remove obsolete .ac_results class references.
Core does not use the jQuery.suggest plugin since [38797].

Props afercia, hareesh-pillai, garrett-eclipse.
Fixes #40260.
Built from https://develop.svn.wordpress.org/trunk@49213


git-svn-id: http://core.svn.wordpress.org/trunk@48975 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-19 22:33:08 +00:00
Helen Hou-Sandí
bdfd1a954f Multisite: More specific caching for get_dirsize.
Instead of one cache entry for all upload folders for a site on multisite, this now caches for each folder and invalidates that cache based on context. In multisite, this should speed up `get_dirsize` calls since older directories that are much less likely to change will no longer have the size recalculated.

Props janthiel, A5hleyRich, batmoo.
Fixes #19879.

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


git-svn-id: http://core.svn.wordpress.org/trunk@48974 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-19 21:51:06 +00:00
Sergey Biryukov
e209e00734 Coding Standards: Fix WPCS issues in [49207].
See #46866.
Built from https://develop.svn.wordpress.org/trunk@49209


git-svn-id: http://core.svn.wordpress.org/trunk@48971 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-19 20:45:06 +00:00
antpb
9556c08b35 Media: Add 'Uploaded to' for individual media items in the media editor.
Adds a link in the media editor showing which post a media item was uploaded to.
Props karmatosed, garrett-eclipse, Mista-Flo, SergeyBiryukov, joemcgill, hellofromTonya.
Fixes #46866.

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


git-svn-id: http://core.svn.wordpress.org/trunk@48969 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-19 20:29:05 +00:00
antpb
9d13ae60e4 Media: Indicate if media is header video in media library.
This introduces a label to indicate if a piece of media is being used as a video header in the media library.
Props desrosj, Mista-Flo, mikeschroder.
Fixes #42929.

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


git-svn-id: http://core.svn.wordpress.org/trunk@48967 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-19 18:32:07 +00:00
Sergey Biryukov
13b1b4bed3 Docs: Add a @deprecated note to WP_Community_Events::format_event_data_time().
Follow-up to [49146].

See #51130.
Built from https://develop.svn.wordpress.org/trunk@49201


git-svn-id: http://core.svn.wordpress.org/trunk@48963 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-19 13:22:07 +00:00
Sergey Biryukov
2716cc8048 Networks and Sites: Introduce network_site_info_form action.
The action fires at the end of the site info form in network admin, and complements the existing `network_site_new_form` action.

Props virgodesign.
Fixes #50704.
Built from https://develop.svn.wordpress.org/trunk@49199


git-svn-id: http://core.svn.wordpress.org/trunk@48961 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-18 21:17:05 +00:00
John Blackbourn
1bcda42567 Media: Add an image_sideload_extensions filter to the list of allowed file extensions when sideloading an image from a URL.
Props paulschreiber, hellofromTonya

Fixes #50695

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


git-svn-id: http://core.svn.wordpress.org/trunk@48960 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-18 21:06:05 +00:00
John Blackbourn
727922c8eb Docs: Further corrections and promotions for docblocks relating to object types.
See #50768

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


git-svn-id: http://core.svn.wordpress.org/trunk@48959 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-18 20:53:08 +00:00
John Blackbourn
b2515abd45 Docs: Improve the docs for the globals that are used in the actions and filters API.
See #50531, #50768

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


git-svn-id: http://core.svn.wordpress.org/trunk@48958 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-18 19:19:06 +00:00
Sergey Biryukov
1faa241fb6 Code Modernization: Use instanceof instead of a comparison with get_class().
Includes adjusting external libraries which are no longer maintained externally.

Props jrf.
See #50767.
Built from https://develop.svn.wordpress.org/trunk@49194


git-svn-id: http://core.svn.wordpress.org/trunk@48956 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-18 17:33:07 +00:00
Sergey Biryukov
0e3147c40e Coding Standards: Replace alias PHP functions with the canonical names.
Using the canonical function name for PHP functions is strongly recommended, as aliases may be deprecated or removed without (much) warning.

This replaces all uses of the following:
* `join()` with `implode()`
* `sizeof()` with `count()`
* `is_writeable()` with `is_writable()`
* `doubleval()` with a `(float)` cast

In part, this is a follow-up to #47746.

Props jrf.
See #50767.
Built from https://develop.svn.wordpress.org/trunk@49193


git-svn-id: http://core.svn.wordpress.org/trunk@48955 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-18 17:27:06 +00:00
Sergey Biryukov
b6f0882ddd Coding Standards: Use self when appropriate.
* `WP_List_Table::get_default_primary_column_name()` is a protected method, so calling it statically with the class name is bad practice.
* Similarly, this applies when calling a private constructor in `WP_Screen::get()`.

Props jrf.
See #50767.
Built from https://develop.svn.wordpress.org/trunk@49192


git-svn-id: http://core.svn.wordpress.org/trunk@48954 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-18 17:18:07 +00:00
John Blackbourn
a01f94cad8 Administration: Allow WP_List_Table::get_bulk_items() to receive a nested array in order to output optgroups.
The allowed format for bulk actions is now an associative array where each element represents either a top level option value and label, or an array representing an optgroup and its options.

For a standard option, the array element key is the field value and the array element value is the field label.

For an optgroup, the array element key is the label and the array element value is an associative array of options as above.

Props goldenapples, mattkeys, valentinbora, davidbaumwald

Fixes #19278

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


git-svn-id: http://core.svn.wordpress.org/trunk@48952 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-18 16:22:10 +00:00
John Blackbourn
c16ae60deb Docs: Fix and upgrade various object docblock notations.
See #50768

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


git-svn-id: http://core.svn.wordpress.org/trunk@48945 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-17 16:05:09 +00:00
John Blackbourn
5a573f28f2 Docs: Miscellaneous docblock fixes.
See #50768

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


git-svn-id: http://core.svn.wordpress.org/trunk@48943 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-17 14:54:05 +00:00
John Blackbourn
ee96f93558 Administration: Fix a coding standards issue after [49179].
See #50699

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


git-svn-id: http://core.svn.wordpress.org/trunk@48942 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-17 12:34:08 +00:00
Andrew Ozz
59c45c41e4 Fix and improve arranging of postboxes/metaboxes:
- Enable arranging only when the Screen Options tab is open.
- Prevent accidental/unintended dragging. Seen it happen mostly on laptops when using the mousepad/trackpad.
- Improve discoverability and usefulness by always showing the "drop zones" outline when postboxes are draggable/arrangeable.
- Add some (brief) explanation to the Screen Options tab helping the user understand what options are available and how to change them. This is especially helpful for screen reader users to give an idea how to use the screen options and what to expect.
- Fix/enhance some of the code in `postbox.js` and make it coding standards compliant.

See #50699.
Built from https://develop.svn.wordpress.org/trunk@49179


git-svn-id: http://core.svn.wordpress.org/trunk@48941 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-17 10:00:06 +00:00
Sergey Biryukov
c5f1d21020 Administration: Wrap the list table items count to a new line on small screens.
This avoids overlapping with action buttons and brings some consistency to bottom paddings across various screens.

Props passoniate, afercia, anuj2, rolfsiebers, uxkai, ireneyoast, thijsvanloef, hellofromTonya, audrasjb, helen, SergeyBiryukov.
Fixes #49246.
Built from https://develop.svn.wordpress.org/trunk@49178


git-svn-id: http://core.svn.wordpress.org/trunk@48940 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-17 01:13:06 +00:00
Peter Wilson
32d193f96f REST API, Posts: Add a hook to fire once a post, its terms and meta update.
Introduces the action `wp_after_insert_post` inside a wrapper function of the same name. This hook allows plugin developers to access a posts full data (including its terms and meta data) regardless of the workflow used to save it.

A new parameter is introduced to `wp_insert_post()` to indicate whether the hook should be fired within the function call or will be fired afterward.

Props aristath, Collizo4sky, danielbachhuber, joyously, kadamwhite, kraftbj, markparnell, mikeschroder, noisysocks, peterwilsoncc, SergeyBiryukov, talldanwp, thewebprincess, TimothyBlynJacobs.
Fixes #45114.

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


git-svn-id: http://core.svn.wordpress.org/trunk@48934 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-16 03:34:08 +00:00
Sergey Biryukov
81ce3c1335 Privacy: Denote removed suggested privacy policy text in a more noticeable way.
Props garrett-eclipse, sabernhardt, audrasjb.
Fixes #51435.
Built from https://develop.svn.wordpress.org/trunk@49170


git-svn-id: http://core.svn.wordpress.org/trunk@48932 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-16 01:29:09 +00:00
Sergey Biryukov
df51aa9b6f Upgrade/Install: Check if plugin or theme update results are available before applying the notification filters.
This avoids a PHP notice for an undefined index of either `plugin` or `theme` in the `auto_{plugin|theme}_update_send_email` filter hook.

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


git-svn-id: http://core.svn.wordpress.org/trunk@48928 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-15 23:27:03 +00:00
TimothyBlynJacobs
039ce3f16f Site Health, REST API: Move async tests to REST API endpoints.
This provides more flexibility when writing tests and benefits from running in a front-end context which is necessary for some tests like checking that updates are supported. Additionally, this provides a more robust interface for developers who want to integrate with Site Health tests.

Because the `wp/v2` endpoint is reserved for modeling core entities, site health is registered in its own `wp-site-health/v1` namespace.

The existing ajax actions have been maintained for backward compatibility.

Props Clorith, chrisvanpatten, afragen, pokhriyal, TimothyBlynJacobs.
Fixes #48105.

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


git-svn-id: http://core.svn.wordpress.org/trunk@48916 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-15 02:00:08 +00:00
iandunn
8d2beacd45 Community Events: Update timezone-related @since tags to 5.5.2.
r49145 and r49146 were originally planned for 5.6 when they were committed, but are now planned for 5.5.2.

See #51130.

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


git-svn-id: http://core.svn.wordpress.org/trunk@48914 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-14 21:35:05 +00:00
Dominik Schilling
c6f7e0f155 I18N: Use wp.i18n for translatable strings in wp-admin/js/dashboard.js.
* Deprecate the `l10n` property on `communityEventsData`.
* Introduce `version` parameter for `deprecateL10nObject` and backfill the version for deprecated objects in 5.5.0.
* Add a noop version of `deprecateL10nObject` for QUnit testing.

Fixes #51498.
Built from https://develop.svn.wordpress.org/trunk@49151


git-svn-id: http://core.svn.wordpress.org/trunk@48913 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-14 21:13:08 +00:00
Helen Hou-Sandí
8ce5e19a65 Updates: Reduce secondary buttons for less visual complexity.
Props audrasjb, karmatosed.
Fixes #51523.

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


git-svn-id: http://core.svn.wordpress.org/trunk@48912 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-14 20:27:09 +00:00
Helen Hou-Sandí
0e4d84b105 Admin Menu: Better wrapping for long menu item names.
Props munyagu, jagirbaheshwp, harshbarach, pratikkry, hareesh-pillai, naveenkharwar, mukesh27, chetan200891, dushanthi, worldweb, audrasjb, afercia, amolv, iqbalbary, davidbaumwald, sabernhardt, johnjamesjacoby, garrett-eclipse, garrett-eclipse.
Fixes #42201.

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


git-svn-id: http://core.svn.wordpress.org/trunk@48911 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-14 19:53:08 +00:00
iandunn
5bf0005827 Community Events: Display dates and times in the user's time zone.
Fixes #51130
Props sippis, hlashbrooke, audrasjb, Rarst, iandunn

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


git-svn-id: http://core.svn.wordpress.org/trunk@48908 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-14 18:21:06 +00:00
iandunn
5d42748c18 Community Events: Trim events by Unix timestamp for accuracy.
The `date` and `end_date` fields are ''WP'' timestamps representing the venue's local time. As of meta:changeset:10270 (#meta4480), new `start_unix_timestamp` and `end_unix_timestamp` values are available, providing a proper ''Unix'' timestamp in the  UTC timezone. Using those is more precise, and removes the time window where the event has expired but still appears in the Events Widget.

To simplify the function, it now only accepts and returns the events themselves, rather than the entire response body.

See #51130
See #meta4480
Related: https://make.wordpress.org/core/2019/09/23/date-time-improvements-wp-5-3/

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


git-svn-id: http://core.svn.wordpress.org/trunk@48907 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-14 18:19:10 +00:00
Sergey Biryukov
a706c4505e Administration: Make sure list table row actions in Extended view stay visible when a single row gets focus.
Follow-up to [48398], [48423], [48424], [48450], [48670].

Props ryelle.
Fixes #51516. See #49715.
Built from https://develop.svn.wordpress.org/trunk@49142


git-svn-id: http://core.svn.wordpress.org/trunk@48904 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-14 02:02:06 +00:00
Dominik Schilling
7137daec42 Administration: Restore alternative admin menu position for menu items with the same position value as an existing menu item.
Reverts parts of [49108].

Props johnjamesjacoby.
Fixes #42918.
Built from https://develop.svn.wordpress.org/trunk@49138


git-svn-id: http://core.svn.wordpress.org/trunk@48900 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-13 19:59:08 +00:00
John Blackbourn
e11accb411 Networks and Sites: Extract into a new function the email that gets sent to the network administrator when a new site is created, and introduce filters to disable and modify its
contents.

* The `send_new_site_email` filter can be used to disable this email.
* The `new_site_email` filter can be used to modify its contents.

Props Dhruvin, Dharm1025, dharmin16, jipmoors

Fixes #42134

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


git-svn-id: http://core.svn.wordpress.org/trunk@48889 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-11 19:29:08 +00:00
John Blackbourn
bd1fa2d998 Posts, Post Types: Switch to restoring posts to draft status by default when they are untrashed.
This allows for edits to be made to a restored post before it goes live again. This also prevents scheduled posts being published unexpectedly if they are untrashed after their originally scheduled date.

The old behaviour of restoring untrashed posts to their original status can be reinstated using the `wp_untrash_post_set_previous_status()` helper function.

Also fixes an issue where the incorrect post ID gets passed to hooks if no post ID is passed to the function.

Props harrym, bananastalktome, jaredcobb, chriscct7, melchoyce, johnbillion, pankajmohale

Fixes #23022

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


git-svn-id: http://core.svn.wordpress.org/trunk@48887 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-11 13:39:07 +00:00
John Blackbourn
da04189357 Administration: Allow context and priority to be specified when adding dashboard widgets.
Props davidjlaietta, soulseekah, johnbillion

Fixes #42791

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


git-svn-id: http://core.svn.wordpress.org/trunk@48885 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-10 20:40:05 +00:00
John Blackbourn
cdd8b2cbfa Site Health: Remove an unused function that was erroneously added when the site health feature was introduced.
This function was and is never used as the `is_in_debug_mode` check is a direct one.

Fixes #50282

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


git-svn-id: http://core.svn.wordpress.org/trunk@48884 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-10 20:24:03 +00:00
John Blackbourn
905460bd5e Docs: Standardise the type name for booleans and integers.
This brings these docs inline with the documentation standards.

Props ravipatel, justinahinon

Fixes #51426

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


git-svn-id: http://core.svn.wordpress.org/trunk@48882 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-10 20:02:05 +00:00
John Blackbourn
6b7ba33d68 Docs: Fix the types for some properties and parameters that use the generic object type.
See #50768

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


git-svn-id: http://core.svn.wordpress.org/trunk@48881 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-10 19:14:04 +00:00
Adam Silverstein
e3d280ffd8 Users: prevent saving empty passwords, trim space from password ends on save.
Fix an issue where users could save a password with only spaces, or spaces at the beginning or end of their password, preventing them from logging in.

Props ronakganatra, 1naveengiri, ajensen, oolleegg55, bookdude13, nrqsnchz, aristath.
Fixes #42766.


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


git-svn-id: http://core.svn.wordpress.org/trunk@48880 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-10 16:51:07 +00:00
iandunn
92dacfafaf Dashboard: Show 2 w.org news items to preserve clustered posts.
These days there are often 2 posts published close to each other, like a release announcement and a Month In WordPress post. When that happens, the earlier post is often pushed out of the widget before many people have had a chance to see it.

Ideally, the number of total items would remain at `4`, to reduce visual clutter. Implementing a conditional item would require a significant refactor, though. Increasing the total number of items to `5` is a practical compromise.

Props hlashbrooke, tellyworth.
Fixes #43441.

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


git-svn-id: http://core.svn.wordpress.org/trunk@48876 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-09 16:07:07 +00:00
Sergey Biryukov
c628344422 Accessibility: Widgets: Add a "Cancel" link when editing a widget in accessibility mode.
This allows the user to go back without saving any changes to the widget.

Props garrett-eclipse, audrasjb, afercia.
Fixes #49354.
Built from https://develop.svn.wordpress.org/trunk@49113


git-svn-id: http://core.svn.wordpress.org/trunk@48875 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-09 15:53:08 +00:00
Sergey Biryukov
5affd982a0 I18N: Add missing placeholders in some translator comments.
Follow-up to [49109].

See #42790.
Built from https://develop.svn.wordpress.org/trunk@49110


git-svn-id: http://core.svn.wordpress.org/trunk@48872 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-09 01:06:03 +00:00
TimothyBlynJacobs
d5ebe12f11 REST API: Introduce Application Passwords for API authentication.
In WordPress 4.4 the REST API was first introduced. A few releases later in WordPress 4.7, the Content API endpoints were added, paving the way for Gutenberg and countless in-site experiences. In the intervening years, numerous plugins have built on top of the REST API. Many developers shared a common frustration, the lack of external authentication to the REST API.

This commit introduces Application Passwords to allow users to connect to external applications to their WordPress website. Users can generate individual passwords for each application, allowing for easy revocation and activity monitoring. An authorization flow is introduced to make the connection flow simple for users and application developers.

Application Passwords uses Basic Authentication, and by default is only available over an SSL connection.

Props georgestephanis, kasparsd, timothyblynjacobs, afercia, akkspro, andraganescu, arippberger, aristath, austyfrosty, ayesh, batmoo, bradyvercher, brianhenryie, helen, ipstenu, jeffmatson, jeffpaul, joostdevalk, joshlevinson, kadamwhite, kjbenk, koke, michael-arestad, Otto42, pekz0r, salzano, spacedmonkey, valendesigns.
Fixes #42790.

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


git-svn-id: http://core.svn.wordpress.org/trunk@48871 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-08 22:14:06 +00:00
Sergey Biryukov
897f004a9c General: Replace older-style PHP type conversion functions with type casts.
This improves performance, readability, and consistency throughout core.

* `intval()` → `(int)`
* `strval()` → `(string)`
* `floatval()` → `(float)`

Props ayeshrajans.
Fixes #42918.
Built from https://develop.svn.wordpress.org/trunk@49108


git-svn-id: http://core.svn.wordpress.org/trunk@48870 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-08 21:15:13 +00:00
Sergey Biryukov
aef2b539cd Docs: Correct @since version for add_allowed_options().
Follow-up to [48121].

Props coffee2code.
Fixes #51450.
Built from https://develop.svn.wordpress.org/trunk@49096


git-svn-id: http://core.svn.wordpress.org/trunk@48858 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-06 15:55:05 +00:00
Sergey Biryukov
bea55db921 Docs: Add missing @return tag to Language_Pack_Upgrader::check_package().
Synchronize documentation of the `::check_package()` method between `Plugin_Upgrader`, `Theme_Upgrader`, and `Language_Pack_Upgrader`.

Props ankitmaru, mukesh27, desrosj.
Fixes #51448.
Built from https://develop.svn.wordpress.org/trunk@49091


git-svn-id: http://core.svn.wordpress.org/trunk@48853 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-05 13:44:11 +00:00
Sergey Biryukov
1651342d2b Privacy: Improve clarity of privacy error strings.
Primarily this adds "user privacy" to the strings for privacy requests, so they are more easily distinguished from other system actions within logs.

Props garrett-eclipse, carike, birgire.
Fixes #51351.
Built from https://develop.svn.wordpress.org/trunk@49090


git-svn-id: http://core.svn.wordpress.org/trunk@48852 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-04 03:23:09 +00:00
Adam Silverstein
f426a1fa04 Media: clear inputs after cropping on attachment details screen.
Clear the crop selection input fields after the crop action is complete. 
Fixes unexpected re-cropping behavior if the crop button was clicked more than once.

Props davidbinda.
Fixes #30155.


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


git-svn-id: http://core.svn.wordpress.org/trunk@48849 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-02 15:11:06 +00:00
John Blackbourn
1079647d30 Docs: Various docblock improvements related to user and site signup functionality.
See #50768

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


git-svn-id: http://core.svn.wordpress.org/trunk@48840 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-30 21:54:07 +00:00
Sergey Biryukov
b3b8942dfc Docs: Correct description for wp_ajax_update_widget().
Follow-up to [28355].

Props burhandodhy, sabernhardt.
Fixes #44583.
Built from https://develop.svn.wordpress.org/trunk@49071


git-svn-id: http://core.svn.wordpress.org/trunk@48833 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-30 09:44:09 +00:00
Sergey Biryukov
2cbcc5d548 Media: Make the "Copy URL" button implementation more consistent with other instances in core:
* Make the "Copied!" text green.
* Make the button verbiage clear that it's copied "to clipboard".

Props garrett-eclipse, mukesh27.
Fixes #51355.
Built from https://develop.svn.wordpress.org/trunk@49064


git-svn-id: http://core.svn.wordpress.org/trunk@48826 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-27 20:48:05 +00:00
Sergey Biryukov
c298458751 Docs: Add missing @return tags for some WP_Automatic_Updater methods:
* `::is_vcs_checkout()`
* `::should_update()`
* `::send_core_update_notification_email()`

Props ankitmaru, mukesh27.
Fixes #51385.
Built from https://develop.svn.wordpress.org/trunk@49061


git-svn-id: http://core.svn.wordpress.org/trunk@48823 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-27 08:36:06 +00:00
John Blackbourn
eaf325e386 Upgrade/Install: Introduce the wp_installed_email filter for filtering the contents of the email sent when WordPress is installed, without needing to override the wp_new_blog_notification() pluggable function.
Props Dharm1025, nikolam, johnbillion

Fixes #42133

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


git-svn-id: http://core.svn.wordpress.org/trunk@48810 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-25 22:33:08 +00:00
noisysocks
41b456eca9 Editor: Hide Screen Options tab from block editor
The block editor provides its own interface for managing screen options, so we
can safely hide Screen Options tab found in the top right of the page.

Props aduth.
See #46157.

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


git-svn-id: http://core.svn.wordpress.org/trunk@48802 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-24 03:00:08 +00:00
desrosj
a16faa6989 Privacy: Ensure bulk action related strings end with periods.
Props garrett-eclipse, mukesh27.
Fixes #51371.
Built from https://develop.svn.wordpress.org/trunk@49035


git-svn-id: http://core.svn.wordpress.org/trunk@48797 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-22 18:40:04 +00:00
John Blackbourn
175c2c5b7c Users: Introduce the invited_user_email filter for filtering the contents of the email sent when an existing user is invited to a site on Multisite.
Props contact-banker, anand.au14, nikolam, johnbillion

Fixes #42132

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


git-svn-id: http://core.svn.wordpress.org/trunk@48791 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-21 17:16:07 +00:00
John Blackbourn
aef504acfd Docs: Correct the indentation for some array type docs.
See #50768

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


git-svn-id: http://core.svn.wordpress.org/trunk@48790 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-21 16:46:06 +00:00
Sergey Biryukov
29c0edfbba Privacy: Check if the accumulated data in wp_privacy_process_personal_data_export_page() is not empty.
This avoids an error on PHP 8 caused by passing an empty string to `array_merge()`, instead of an array.

See #50913.
Built from https://develop.svn.wordpress.org/trunk@49026


git-svn-id: http://core.svn.wordpress.org/trunk@48788 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-21 13:51:03 +00:00
John Blackbourn
aba2165aae Media: Standardise the description for image size parameters.
This brings continuity to all the image related functions and filters which accept or pass a size parameter.

Props dilipbheda, johnbillion

Fixes #47364

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


git-svn-id: http://core.svn.wordpress.org/trunk@48783 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-20 16:23:07 +00:00
John Blackbourn
0b2e31a7f8 Docs: Inline documentation improvements for media related functions and hooks.
See #47364, #50768

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


git-svn-id: http://core.svn.wordpress.org/trunk@48782 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-20 15:55:10 +00:00
John Blackbourn
43b11121de Media: Correct some types for attachment ID parameters passed to functions and filters.
See #47364, #50768 

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


git-svn-id: http://core.svn.wordpress.org/trunk@48779 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-20 14:05:05 +00:00
John Blackbourn
7d61c45afc I18N: Add a language icon next to the Default Language network option.
Fixes #51359

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


git-svn-id: http://core.svn.wordpress.org/trunk@48775 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-20 13:18:05 +00:00
John Blackbourn
123806ff28 Themes: Remove the ability to delete themes from the single site Appearance screen on Multisite installations.
This brings theme deletion inline with plugin deletion and theme and plugin editing, which can only be performed from within Network Admin.

Props Mista-Flo, williampatton, johnbillion

Fixes #41441

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


git-svn-id: http://core.svn.wordpress.org/trunk@48773 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-20 12:03:05 +00:00
Sergey Biryukov
d5b8d282e8 Docs: Update the URL for PHP date formats table in translator comments.
Props hareesh-pillai, iandunn.
Fixes #51332.
Built from https://develop.svn.wordpress.org/trunk@48991


git-svn-id: http://core.svn.wordpress.org/trunk@48753 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-18 10:37:08 +00:00
Sergey Biryukov
282c813259 Coding Standards: Explicitly declare the $wp_version global used in some core files.
Props jaydeep-rami, sabernhardt.
Fixes #44932.
Built from https://develop.svn.wordpress.org/trunk@48971


git-svn-id: http://core.svn.wordpress.org/trunk@48733 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-12 00:12:08 +00:00
Sergey Biryukov
f29d62012d Coding Standards: Use strict comparison in wp-admin/includes/class-wp-plugin-install-list-table.php.
See #50767.
Built from https://develop.svn.wordpress.org/trunk@48970


git-svn-id: http://core.svn.wordpress.org/trunk@48732 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-11 01:05:08 +00:00
Sergey Biryukov
e36c7f0ba0 Coding Standards: Use strict comparison in wp-admin/includes/class-wp-plugins-list-table.php.
See #50767.
Built from https://develop.svn.wordpress.org/trunk@48968


git-svn-id: http://core.svn.wordpress.org/trunk@48730 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-10 14:23:08 +00:00
Sergey Biryukov
7dada5df2f Coding Standards: Use strict comparison in wp-admin/includes/class-wp-ms-themes-list-table.php.
See #50767.
Built from https://develop.svn.wordpress.org/trunk@48967


git-svn-id: http://core.svn.wordpress.org/trunk@48729 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-10 14:21:09 +00:00
Helen Hou-Sandí
447b526379 Privacy: Remove extraneous colon from settings screen.
Props vinita29, garrett-eclipse.
Fixes #50414.

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


git-svn-id: http://core.svn.wordpress.org/trunk@48727 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-09 19:43:08 +00:00
desrosj
04c8217724 Administration: Add the aria-hidden attribute to admin menu icons.
The admin menu icons are included as a visual element to support the text links. Without the `aria-hidden=“true”` attribute, they are also exposed to assistive technologies (which can process icon fonts in unpredictable ways).

This change improves the experience for multiple types of assistive technologies, including screen reading and voice control software. With `aria-hidden=“true”` added, the icons will not be read, and a user can now trigger a click of a top level admin menu item with commands such as “click posts”, or “click plugins”.

Props joedolson, afercia, audrasjb, adriantirusli.
Fixes #51012.
Built from https://develop.svn.wordpress.org/trunk@48963


git-svn-id: http://core.svn.wordpress.org/trunk@48725 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-09 16:15:06 +00:00
Sergey Biryukov
17a4c20d55 Comments: Check if a valid comment ID was passed when editing a comment.
This avoids a PHP notice after submitting the Edit Comment form.

Props regan.khadgi.
Fixes #51263.
Built from https://develop.svn.wordpress.org/trunk@48958


git-svn-id: http://core.svn.wordpress.org/trunk@48720 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-08 13:41:08 +00:00
Sergey Biryukov
93b8183327 Media: In wp_ajax_image_editor(), check if the error property exists before accessing it.
This avoids a PHP notice when editing an image.

Follow-up to [48375].

Props Mista-Flo.
Fixes #51251.
Built from https://develop.svn.wordpress.org/trunk@48946


git-svn-id: http://core.svn.wordpress.org/trunk@48708 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-05 18:12:08 +00:00
Sergey Biryukov
e05edbcd53 Comments: Rename WP_Comments_List_Table::comment_status_dropdown() to ::comment_type_dropdown().
This better reflects the purpose of the method, which doesn't have anything to do with a comment status.

Follow-up to [48521].

Props davidbaumwald, johnbillion, SergeyBiryukov.
Fixes #51248.
Built from https://develop.svn.wordpress.org/trunk@48943


git-svn-id: http://core.svn.wordpress.org/trunk@48705 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-05 00:33:05 +00:00
Sergey Biryukov
dd03a5a156 Docs: Further correct placement for wp_editor_expand filter DocBlock.
This ensures that the filter is only applied if the conditions before it are evaluated to true.

Follow-up to [48714].

Props johnbillion.
See #50768.
Built from https://develop.svn.wordpress.org/trunk@48942


git-svn-id: http://core.svn.wordpress.org/trunk@48704 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-04 21:48:07 +00:00
John Blackbourn
d0a32c5111 Docs: Various docblock corrections and improvements.
See #50768
Built from https://develop.svn.wordpress.org/trunk@48941


git-svn-id: http://core.svn.wordpress.org/trunk@48703 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-04 20:41:07 +00:00
Sergey Biryukov
6d0491119e Administration: Give the $error variable in wp-admin/admin-header.php a more descriptive name.
This avoids a conflict with the same global variable used elsewhere, e.g. in Theme Editor.

Follow-up to [48850].

Props vinayak.anivase.
Fixes #51219.
Built from https://develop.svn.wordpress.org/trunk@48938


git-svn-id: http://core.svn.wordpress.org/trunk@48700 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-03 01:43:07 +00:00
Sergey Biryukov
68dfbf51d9 Script Loader: Add backward compatibility for JavaScript i18n globals and properties deprecated in WordPress 5.5.
The recommended approach for any plugins using these globals or properties is to switch to the newer `wp.i18n` functions.

In the meantime, this ensures that accessing any of these globals does not break the rest of the code on the page, and an appropriate warning message is logged to the JavaScript console.

Follow-up to: https://core.trac.wordpress.org/query?summary=~wp.i18n&milestone=5.5

Props omarreiss, peterwilsoncc, kbjohnson90, johnbillion, TimothyBlynJacobs, joostdevalk, ocean90, desrosj, SergeyBiryukov.
Fixes #51123.
Built from https://develop.svn.wordpress.org/trunk@48923


git-svn-id: http://core.svn.wordpress.org/trunk@48685 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-31 20:30:03 +00:00
Sergey Biryukov
d4d3e23ad0 Themes: Normalize the installed theme path in Theme_Installer_Skin::do_overwrite() before comparing with the uploaded theme.
This ensures that the data for the currently installed theme is picked up properly when uploading a theme update on Windows.

Follow-up to [48390].

Props bobbingwide, wpamitkumar, mukesh27.
Fixes #51182.
Built from https://develop.svn.wordpress.org/trunk@48913


git-svn-id: http://core.svn.wordpress.org/trunk@48675 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-31 17:11:04 +00:00
Sergey Biryukov
ee33a7b019 Docs: Add a @since note to the display_post_states filter to clarify that it is now also applied in the Customizer context.
If any admin functions are used within the filter, their existence should be checked with `function_exists()` before being used.

Follow-up to [47763], [48620].

Props audrasjb, garrett-eclipse, Howdy_McGee, dlh, khag7, SergeyBiryukov.
Fixes #51081.
Built from https://develop.svn.wordpress.org/trunk@48910


git-svn-id: http://core.svn.wordpress.org/trunk@48672 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-31 13:32:04 +00:00
Sergey Biryukov
94555079eb Docs: Clarify the usage of null for auto_update_{$type} filter.
The value is internally used to detect whether nothing has hooked into this filter.

Props audrasjb, pbiron, johnbillion, SergeyBiryukov.
Fixes #50848.
Built from https://develop.svn.wordpress.org/trunk@48909


git-svn-id: http://core.svn.wordpress.org/trunk@48671 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-31 13:20:07 +00:00
Sergey Biryukov
be4ad8548c Administration: Correct the padding for "Warning: these pages should not be the same" messages on Reading Settings screen.
Replace the legacy `.error` class with a more appropriate `.notice-warning`.

Props musicaljoeker, shital-patel, man4toman, garrett-eclipse, SergeyBiryukov.
Fixes #50766.
Built from https://develop.svn.wordpress.org/trunk@48906


git-svn-id: http://core.svn.wordpress.org/trunk@48668 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-29 00:42:05 +00:00
Sergey Biryukov
af523447f4 Media: Make the is_gd_image() function available on front end.
This avoids a fatal error if a plugin calls image creation or editing functions like `wp_imagecreatetruecolor()` outside of the admin.

Follow-up to [48798]

Props BackuPs.
Fixes #51174. See #50833.
Built from https://develop.svn.wordpress.org/trunk@48905


git-svn-id: http://core.svn.wordpress.org/trunk@48667 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-28 16:45:06 +00:00
Sergey Biryukov
71ffaac835 Docs: Correct formatting of the auto_theme_update_send_email filter DocBlock.
Synchronize description of the `$enabled` parameter with the `auto_plugin_update_send_email` filter.

Follow-up to [48889].

See #50768, #50988.
Built from https://develop.svn.wordpress.org/trunk@48903


git-svn-id: http://core.svn.wordpress.org/trunk@48665 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-28 02:38:05 +00:00
Sergey Biryukov
308f752596 Upgrade/Install: Only display the auto-update links on the Network Admin > Themes screen for themes that support the feature.
Follow-up to [48669], [48688].

Props afragen, pbiron, audrasjb, desrosj, SergeyBiryukov.
Fixes #51129.
Built from https://develop.svn.wordpress.org/trunk@48899


git-svn-id: http://core.svn.wordpress.org/trunk@48661 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-27 22:24:07 +00:00
desrosj
2aba7550c4 Upgrade/Install: Pass details about the specific plugin and theme updates attempted to filters.
This adds an additional parameter to the `auto_plugin_update_send_email` and `auto_theme_update_send_email` filters to provide the additional context of which updates were attempted and their outcome. This will help plugin and theme auto-update emails to be better tailored to a site owner’s liking.

Props audrasjb, Paddy Landau, desrosj.
Fixes #50988.
Built from https://develop.svn.wordpress.org/trunk@48888


git-svn-id: http://core.svn.wordpress.org/trunk@48650 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-27 19:27:03 +00:00
Sergey Biryukov
604b273c0f Taxonomy: Make sure wp_terms_checklist() and Walker_Category_Checklist::start_el() properly handle an array of strings as selected_cats or popular_cats values.
Even with these values documented as an array of integers, they can technically also accept an array of strings, e.g. as form results.

Add a unit test.

Props brianhogg, TimothyBlynJacobs, SergeyBiryukov.
Fixes #51137.
Built from https://develop.svn.wordpress.org/trunk@48880


git-svn-id: http://core.svn.wordpress.org/trunk@48642 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-27 02:48:06 +00:00