WordPress/wp-admin
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
..
css REST API: Introduce Application Passwords for API authentication. 2020-10-08 22:14:06 +00:00
images Customize: Move the WordPress logo with a white background to the `wp-includes` directory. 2020-05-21 09:10:12 +00:00
includes Administration: Allow context and priority to be specified when adding dashboard widgets. 2020-10-10 20:40:05 +00:00
js Users: prevent saving empty passwords, trim space from password ends on save. 2020-10-10 16:51:07 +00:00
maint Administration: Remove the `xmlns` attribute on the `<html>` tag. 2020-06-22 21:26:16 +00:00
network General: Replace older-style PHP type conversion functions with type casts. 2020-10-08 21:15:13 +00:00
user Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
about.php Help/About: Fix typo and remove trailing spaces from some strings. 2020-08-17 02:12:04 +00:00
admin-ajax.php Security: Add user interface to auto-update themes and plugins. 2020-05-20 18:49:09 +00:00
admin-footer.php Docs: Improve inline comments per the documentation standards. 2020-01-29 00:45:18 +00:00
admin-functions.php Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
admin-header.php General: Replace older-style PHP type conversion functions with type casts. 2020-10-08 21:15:13 +00:00
admin-post.php Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
admin.php Upgrade/Install: Don't trigger database upgrade on Ajax requests via `wp-admin/async-upload.php`. 2020-07-22 12:56:04 +00:00
async-upload.php General: Replace older-style PHP type conversion functions with type casts. 2020-10-08 21:15:13 +00:00
authorize-application.php I18N: Add missing placeholders in some translator comments. 2020-10-09 01:06:03 +00:00
comment.php Docs: Update the URL for PHP date formats table in translator comments. 2020-09-18 10:37:08 +00:00
credits.php Help/About: Remove “Musician Name” placeholder. 2020-08-04 17:35:06 +00:00
custom-background.php Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
custom-header.php Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
customize.php Docs: Correct documentation for `customize_controls_head` hook and `_customizer_mobile_viewport_meta()` function. 2020-07-10 11:36:07 +00:00
edit-comments.php General: Replace older-style PHP type conversion functions with type casts. 2020-10-08 21:15:13 +00:00
edit-form-advanced.php Docs: Update the URL for PHP date formats table in translator comments. 2020-09-18 10:37:08 +00:00
edit-form-blocks.php Editor: Hide Screen Options tab from block editor 2020-09-24 03:00:08 +00:00
edit-form-comment.php Docs: Update the URL for PHP date formats table in translator comments. 2020-09-18 10:37:08 +00:00
edit-link-form.php Administration: Use HTTPS for XHTML Friends Network URL. 2020-07-04 09:33:01 +00:00
edit-tag-form.php Coding Standards: Use strict comparison in some `wp-admin` files. 2020-05-12 18:32:08 +00:00
edit-tags.php Coding Standards: Use strict type check for `in_array()` and `array_search()` where strings are involved. 2020-04-05 03:02:11 +00:00
edit.php Posts, Post Types: Switch to restoring posts to `draft` status by default when they are untrashed. 2020-10-11 13:39:07 +00:00
erase-personal-data.php Privacy: Improve clarity of privacy error strings. 2020-10-04 03:23:09 +00:00
export-personal-data.php Privacy: Set the direction for the "Username or email address" field on privacy screens to LTR. 2020-07-14 11:17:04 +00:00
export.php Coding Standards: Use strict comparison in some `wp-admin` files. 2020-05-12 18:32:08 +00:00
freedoms.php Help/About: Remove “Musician Name” placeholder. 2020-08-04 17:35:06 +00:00
import.php I18N: Add context to some plugin and theme strings for consistency. 2020-07-20 23:14:05 +00:00
index.php Site Health: Correct the message for snoozed email verifications. 2020-07-21 12:37:07 +00:00
install-helper.php Docs: Improve documentation for functions in `wp-admin/install-helper.php` per the documentation standards. 2020-05-12 18:40:07 +00:00
install.php Site Health: Improve the error message displayed when activating a plugin that requires a higher version of PHP or WordPress. 2020-06-26 00:27:09 +00:00
link-add.php Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
link-manager.php Coding Standards: Use strict comparison in some `wp-admin` files. 2020-05-12 18:32:08 +00:00
link-parse-opml.php XML-RPC: Explicitly unset the reference to the parser resource after calling `xml_parser_free()` to avoid memory leaks in PHP 7.0.0 or higher. 2020-07-05 15:22:01 +00:00
link.php Coding Standards: Use strict comparison in some `wp-admin` files. 2020-05-12 18:32:08 +00:00
load-scripts.php Coding Standards: Fix instances of `Generic.WhiteSpace.ArbitraryParenthesesSpacing.FoundEmpty`. 2020-05-26 09:37:10 +00:00
load-styles.php Coding Standards: Fix instances of `Generic.WhiteSpace.ArbitraryParenthesesSpacing.FoundEmpty`. 2020-05-26 09:37:10 +00:00
media-new.php Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
media-upload.php General: Replace older-style PHP type conversion functions with type casts. 2020-10-08 21:15:13 +00:00
media.php Coding Standards: Fix instances of `Generic.WhiteSpace.ArbitraryParenthesesSpacing.FoundEmpty`. 2020-05-26 09:37:10 +00:00
menu-header.php Administration: Add the `aria-hidden` attribute to admin menu icons. 2020-09-09 16:15:06 +00:00
menu.php Users: Change "Your Profile" and "My Profile" links in admin menu and toolbar to just "Profile" for consistency. 2020-04-20 08:39:06 +00:00
moderation.php Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
ms-admin.php Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
ms-delete-site.php Docs: Various docblock improvements related to user and site signup functionality. 2020-09-30 21:54:07 +00:00
ms-edit.php Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
ms-options.php Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
ms-sites.php Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
ms-themes.php Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
ms-upgrade-network.php Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
ms-users.php Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
my-sites.php Coding Standards: Use strict comparison in some `wp-admin` files. 2020-05-12 18:32:08 +00:00
nav-menus.php General: Replace older-style PHP type conversion functions with type casts. 2020-10-08 21:15:13 +00:00
network.php Coding Standards: Use strict comparison for `count()` calls. 2020-05-23 11:38:08 +00:00
options-discussion.php General: Update code for readability and inclusion 2020-07-23 03:14:06 +00:00
options-general.php Docs: Update the URL for PHP date formats table in translator comments. 2020-09-18 10:37:08 +00:00
options-head.php Administration: Replace legacy `updated` message type in `add_settings_error()` calls with `success`. 2019-08-16 00:39:55 +00:00
options-media.php Docs: Correct and clarify an inline comment about the `upload_url_path` and `upload_path` options in `wp-admin/options-media.php`. 2020-06-01 11:22:13 +00:00
options-permalink.php Permalinks: Don't show "You should update your `.htaccess` file now" message when saving permalink settings on Multisite. 2020-08-02 12:57:08 +00:00
options-privacy.php Privacy: Improve clarity of privacy error strings. 2020-10-04 03:23:09 +00:00
options-reading.php Administration: Correct the padding for "Warning: these pages should not be the same" messages on Reading Settings screen. 2020-08-29 00:42:05 +00:00
options-writing.php Administration: Add missing comma to the message in "Post via email" section. 2020-06-26 19:38:06 +00:00
options.php General: Update code for readability and inclusion 2020-07-23 03:14:06 +00:00
plugin-editor.php Coding Standards: Replace `echo sprintf()` with `printf()`. 2020-06-20 13:18:11 +00:00
plugin-install.php Accessibility: Plugins: Accessibility and CSS improvements for the Plugins pages. 2020-07-03 08:51:05 +00:00
plugins.php Upgrade/Install: Enhance auto-updates to be disabled for plugins that don't suport updates. 2020-07-28 16:32:01 +00:00
post-new.php Coding Standards: Use strict comparison where static strings are involved. 2020-05-16 18:42:12 +00:00
post.php Posts, Post Types: Switch to restoring posts to `draft` status by default when they are untrashed. 2020-10-11 13:39:07 +00:00
press-this.php Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
privacy-policy-guide.php Privacy: Improve clarity of privacy error strings. 2020-10-04 03:23:09 +00:00
privacy.php Help/About: Remove “Musician Name” placeholder. 2020-08-04 17:35:06 +00:00
profile.php Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
revision.php Revisions: Ensure the global `$post` remains the same after revision is restored. 2020-07-26 21:25:02 +00:00
setup-config.php Administration: Remove the `xmlns` attribute on the `<html>` tag. 2020-06-22 21:26:16 +00:00
site-health-info.php Accessibility: Site Health: Improve the "Copy site info" button accessibility. 2020-06-30 13:26:03 +00:00
site-health.php Site Health: Remove paragraph tag from the actions container in issue template. 2020-03-30 01:25:11 +00:00
term.php Coding Standards: Use strict type check for `in_array()` and `array_search()` where strings are involved. 2020-04-05 03:02:11 +00:00
theme-editor.php Coding Standards: Replace `echo sprintf()` with `printf()`. 2020-06-20 13:18:11 +00:00
theme-install.php Themes: Display a message in theme grid if a theme requires a higher version of PHP or WordPress. 2020-07-27 15:04:03 +00:00
themes.php Upgrade/Install: Only show auto-update for themes that support the feature. 2020-07-29 20:01:08 +00:00
tools.php Privacy: Fix the URLs and legacy redirects for the personal data export and erasure screens. 2020-03-03 00:50:06 +00:00
update-core.php Upgrade/Install: Show the installed WordPress version number on WordPress Updates screen if there is a newer version available. 2020-08-01 19:46:04 +00:00
update.php Upgrade/Install: Ensure cleanup after canceled update. 2020-07-10 06:08:06 +00:00
upgrade-functions.php Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
upgrade.php Site Health: Improve the error message displayed when activating a plugin that requires a higher version of PHP or WordPress. 2020-06-26 00:27:09 +00:00
upload.php Posts, Post Types: Clarify some "Error in deleting" messages, use more specific strings for attachments. 2020-07-05 10:41:10 +00:00
user-edit.php REST API: Introduce Application Passwords for API authentication. 2020-10-08 22:14:06 +00:00
user-new.php 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. 2020-09-21 17:16:07 +00:00
users.php General: Replace older-style PHP type conversion functions with type casts. 2020-10-08 21:15:13 +00:00
widgets.php Accessibility: Widgets: Add a "Cancel" link when editing a widget in accessibility mode. 2020-10-09 15:53:08 +00:00