Allow plugins to hook into /wp-admin/update-core.php. Props ampt. Fixes #15221
git-svn-id: https://develop.svn.wordpress.org/trunk@17589 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
a41a62b0c3
commit
95bafc3a51
@ -412,6 +412,7 @@ if ( 'upgrade-core' == $action ) {
|
||||
wp_version_check();
|
||||
require_once(ABSPATH . 'wp-admin/admin-header.php');
|
||||
core_upgrade_preamble();
|
||||
include(ABSPATH . 'wp-admin/admin-footer.php');
|
||||
|
||||
} elseif ( 'do-core-upgrade' == $action || 'do-core-reinstall' == $action ) {
|
||||
check_admin_referer('upgrade-core');
|
||||
@ -432,6 +433,8 @@ if ( 'upgrade-core' == $action ) {
|
||||
if ( isset( $_POST['upgrade'] ) )
|
||||
do_core_upgrade($reinstall);
|
||||
|
||||
include(ABSPATH . 'wp-admin/admin-footer.php');
|
||||
|
||||
} elseif ( 'do-plugin-upgrade' == $action ) {
|
||||
|
||||
if ( ! current_user_can( 'update_plugins' ) )
|
||||
@ -459,6 +462,7 @@ if ( 'upgrade-core' == $action ) {
|
||||
echo '<h2>' . esc_html__('Update Plugins') . '</h2>';
|
||||
echo "<iframe src='$url' style='width: 100%; height: 100%; min-height: 750px;' frameborder='0'></iframe>";
|
||||
echo '</div>';
|
||||
include(ABSPATH . 'wp-admin/admin-footer.php');
|
||||
|
||||
} elseif ( 'do-theme-upgrade' == $action ) {
|
||||
|
||||
@ -487,6 +491,8 @@ if ( 'upgrade-core' == $action ) {
|
||||
echo '<h2>' . esc_html__('Update Themes') . '</h2>';
|
||||
echo "<iframe src='$url' style='width: 100%; height: 100%; min-height: 750px;' frameborder='0'></iframe>";
|
||||
echo '</div>';
|
||||
}
|
||||
include(ABSPATH . 'wp-admin/admin-footer.php');
|
||||
|
||||
include(ABSPATH . 'wp-admin/admin-footer.php');
|
||||
} else {
|
||||
do_action('update-core-custom_' . $action);
|
||||
}
|
Loading…
Reference in New Issue
Block a user