From 01c50614c9e23cbcdf7cf2fb581e2a7e956a83b0 Mon Sep 17 00:00:00 2001 From: dd32 Date: Sun, 3 Apr 2011 09:41:19 +0000 Subject: [PATCH] Allow plugins to hook into /wp-admin/update-core.php. Props ampt. Fixes #15221 git-svn-id: http://svn.automattic.com/wordpress/trunk@17589 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/update-core.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/wp-admin/update-core.php b/wp-admin/update-core.php index 3671915d57..df5ea75d01 100644 --- a/wp-admin/update-core.php +++ b/wp-admin/update-core.php @@ -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 '

' . esc_html__('Update Plugins') . '

'; echo ""; echo ''; + include(ABSPATH . 'wp-admin/admin-footer.php'); } elseif ( 'do-theme-upgrade' == $action ) { @@ -487,6 +491,8 @@ if ( 'upgrade-core' == $action ) { echo '

' . esc_html__('Update Themes') . '

'; echo ""; echo ''; -} + include(ABSPATH . 'wp-admin/admin-footer.php'); -include(ABSPATH . 'wp-admin/admin-footer.php'); +} else { + do_action('update-core-custom_' . $action); +} \ No newline at end of file