Skip to content
Commit c6781ac0 authored by Jonathan Desrosiers's avatar Jonathan Desrosiers
Browse files

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: https://core.svn.wordpress.org/trunk@47075 1a063a9b-81f0-0310-95a4-ce76da25c4cd
parent 66c8ce5f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment