WordPress/wp-admin
desrosj be2ec734f2 Upgrade/Install: Enable maintenance mode when plugins are auto-updated.
When an attempt is made to update an active plugin automatically, there is the potential currently for two negative scenarios:

- The plugin can be deactivated if the Plugins admin screen is loaded when the plugin update is incomplete, causing a PHP error.
- The WSOD protection could be triggered, sending a false alarm email to the site administrator.

By enabling maintenance mode before an active plugin update is attempted, these scenarios can be avoided.

This change implements the same approach as the `Theme_Upgrader` class of using the `upgrader_pre_install` and `upgrader_post_install` hooks to toggle maintenance mode.

Props desrosj, SergeyBiryukov.
Fixes #49400.
Built from https://develop.svn.wordpress.org/trunk@47275


git-svn-id: http://core.svn.wordpress.org/trunk@47075 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-02-11 20:14:05 +00:00
..
css Upload: Fix Plugin and Theme upload form are misaligned. 2020-02-11 19:18:09 +00:00
images Build/Test tools: Update grunt-contrib-imagemin and run it 2019-10-05 14:20:59 +00:00
includes Upgrade/Install: Enable maintenance mode when plugins are auto-updated. 2020-02-11 20:14:05 +00:00
js Widgets: Prevent currently active wide widget controls from being partially covered by another widget's controls. 2020-02-11 15:26:09 +00:00
maint Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
network Coding Standards: Use Yoda conditions where appropriate. 2020-02-09 16:55:09 +00:00
user Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
about.php Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
admin-ajax.php Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +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 Coding Standards: Use Yoda conditions where appropriate. 2020-02-09 16:55:09 +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 Administration: Capitalize `Trash` consistently in various messages and comments. 2020-02-10 04:12:07 +00:00
async-upload.php Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
comment.php Coding Standards: Use Yoda conditions where appropriate. 2020-02-09 16:55:09 +00:00
credits.php Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +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 Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
edit-comments.php Coding Standards: Use Yoda conditions where appropriate. 2020-02-09 16:55:09 +00:00
edit-form-advanced.php Editor: Fix incorrect usage of ID attributes on custom fields. 2020-02-09 19:41:07 +00:00
edit-form-blocks.php Block Editor: Backport inclusion of new editor settings to the core. 2020-02-10 17:52:15 +00:00
edit-form-comment.php Comments: Improve the appearance of the Status box on Edit Comment screen. 2020-02-11 00:06:04 +00:00
edit-link-form.php Editor: Fix incorrect usage of ID attributes on custom fields. 2020-02-09 19:41:07 +00:00
edit-tag-form.php Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
edit-tags.php Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
edit.php Administration: Capitalize `Trash` consistently in various messages and comments. 2020-02-10 04:12:07 +00:00
erase-personal-data.php Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
export-personal-data.php Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
export.php Export: Use correct context for the `Posts` label on the Export screen. 2020-02-11 19:35:06 +00:00
freedoms.php Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
import.php Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
index.php Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
install-helper.php Coding Standards: Use Yoda conditions where appropriate. 2020-02-09 16:55:09 +00:00
install.php Docs: Add descriptions for some globals: 2020-02-10 03:30:06 +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 Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
link-parse-opml.php Docs: Improve inline comments per the documentation standards. 2020-01-29 00:45:18 +00:00
link.php Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
load-scripts.php Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
load-styles.php Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +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 Coding Standards: Use Yoda conditions in some `wp-admin` files. 2020-02-09 16:53:06 +00:00
media.php Coding Standards: Use Yoda conditions in some `wp-admin` files. 2020-02-09 16:53:06 +00:00
menu-header.php Docs: Improve inline comments per the documentation standards. 2020-01-29 00:45:18 +00:00
menu.php Privacy: Un-map privacy capabilities to make them available to be assigned for custom roles: 2020-02-11 18:36: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 Coding Standards: Use Yoda conditions in some `wp-admin` files. 2020-02-09 16:53:06 +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 Yoda conditions where appropriate. 2020-02-09 16:55:09 +00:00
nav-menus.php Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
network.php Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
options-discussion.php Administration: Capitalize `Trash` consistently in various messages and comments. 2020-02-10 04:12:07 +00:00
options-general.php Coding Standards: Use Yoda conditions where appropriate. 2020-02-09 16:55:09 +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 Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
options-permalink.php Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
options-privacy.php Administration: Capitalize `Trash` consistently in various messages and comments. 2020-02-10 04:12:07 +00:00
options-reading.php Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
options-writing.php Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
options.php Coding Standards: Use Yoda conditions in some `wp-admin` files. 2020-02-09 16:53:06 +00:00
plugin-editor.php Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
plugin-install.php Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
plugins.php Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
post-new.php Coding Standards: Use Yoda conditions where appropriate. 2020-02-09 16:55:09 +00:00
post.php Coding Standards: Use Yoda conditions in some `wp-admin` files. 2020-02-09 16:53:06 +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 Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
privacy.php Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
profile.php Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
revision.php Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
setup-config.php Docs: Add descriptions for some globals: 2020-02-10 03:30:06 +00:00
site-health-info.php Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
site-health.php Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
term.php Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
theme-editor.php Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
theme-install.php Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
themes.php Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
tools.php Coding Standards: Use Yoda conditions where appropriate. 2020-02-09 16:55:09 +00:00
update-core.php Docs: Add descriptions for some globals: 2020-02-10 03:30:06 +00:00
update.php Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +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 Docs: Add descriptions for some globals: 2020-02-10 03:30:06 +00:00
upload.php Administration: Capitalize `Trash` consistently in various messages and comments. 2020-02-10 04:12:07 +00:00
user-edit.php Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
user-new.php Coding Standards: Use Yoda conditions in some `wp-admin` files. 2020-02-09 16:53:06 +00:00
users.php Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00
widgets.php Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant. 2020-02-06 06:33:11 +00:00