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
This commit is contained in:
dd32 2011-04-03 09:41:19 +00:00
parent 6000019f89
commit 01c50614c9
1 changed files with 8 additions and 2 deletions

View File

@ -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);
}