mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-03 06:57:35 +01:00
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:
parent
6000019f89
commit
01c50614c9
@ -412,6 +412,7 @@ if ( 'upgrade-core' == $action ) {
|
|||||||
wp_version_check();
|
wp_version_check();
|
||||||
require_once(ABSPATH . 'wp-admin/admin-header.php');
|
require_once(ABSPATH . 'wp-admin/admin-header.php');
|
||||||
core_upgrade_preamble();
|
core_upgrade_preamble();
|
||||||
|
include(ABSPATH . 'wp-admin/admin-footer.php');
|
||||||
|
|
||||||
} elseif ( 'do-core-upgrade' == $action || 'do-core-reinstall' == $action ) {
|
} elseif ( 'do-core-upgrade' == $action || 'do-core-reinstall' == $action ) {
|
||||||
check_admin_referer('upgrade-core');
|
check_admin_referer('upgrade-core');
|
||||||
@ -432,6 +433,8 @@ if ( 'upgrade-core' == $action ) {
|
|||||||
if ( isset( $_POST['upgrade'] ) )
|
if ( isset( $_POST['upgrade'] ) )
|
||||||
do_core_upgrade($reinstall);
|
do_core_upgrade($reinstall);
|
||||||
|
|
||||||
|
include(ABSPATH . 'wp-admin/admin-footer.php');
|
||||||
|
|
||||||
} elseif ( 'do-plugin-upgrade' == $action ) {
|
} elseif ( 'do-plugin-upgrade' == $action ) {
|
||||||
|
|
||||||
if ( ! current_user_can( 'update_plugins' ) )
|
if ( ! current_user_can( 'update_plugins' ) )
|
||||||
@ -459,6 +462,7 @@ if ( 'upgrade-core' == $action ) {
|
|||||||
echo '<h2>' . esc_html__('Update Plugins') . '</h2>';
|
echo '<h2>' . esc_html__('Update Plugins') . '</h2>';
|
||||||
echo "<iframe src='$url' style='width: 100%; height: 100%; min-height: 750px;' frameborder='0'></iframe>";
|
echo "<iframe src='$url' style='width: 100%; height: 100%; min-height: 750px;' frameborder='0'></iframe>";
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
|
include(ABSPATH . 'wp-admin/admin-footer.php');
|
||||||
|
|
||||||
} elseif ( 'do-theme-upgrade' == $action ) {
|
} elseif ( 'do-theme-upgrade' == $action ) {
|
||||||
|
|
||||||
@ -487,6 +491,8 @@ if ( 'upgrade-core' == $action ) {
|
|||||||
echo '<h2>' . esc_html__('Update Themes') . '</h2>';
|
echo '<h2>' . esc_html__('Update Themes') . '</h2>';
|
||||||
echo "<iframe src='$url' style='width: 100%; height: 100%; min-height: 750px;' frameborder='0'></iframe>";
|
echo "<iframe src='$url' style='width: 100%; height: 100%; min-height: 750px;' frameborder='0'></iframe>";
|
||||||
echo '</div>';
|
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