diff --git a/wp-admin/update-core.php b/wp-admin/update-core.php index 0dca9873d4..9597f26b7b 100644 --- a/wp-admin/update-core.php +++ b/wp-admin/update-core.php @@ -152,7 +152,7 @@ function core_upgrade_preamble() { dismissed_updates(); list_plugin_updates(); - //list_theme_updates(); + list_theme_updates(); do_action('core_upgrade_preamble'); echo ''; } @@ -239,34 +239,46 @@ function list_theme_updates() { $themes = get_theme_updates(); if ( empty($themes) ) return; + + $form_action = 'update-core.php?action=do-theme-upgrade'; + ?>

+

+

Please Note: Any customizations you have made to the Themes files will be lost. Please consider using Child Themes for modifications.'); ?>

+
+ +

- + - + $theme_data) { + $screenshot = $theme_data->{'Theme Root URI'} . '/' . $stylesheet . '/' . $theme_data->Screenshot; + echo " - + "; } ?>
{$theme_data->Name}{$theme_data->Name}" . sprintf(__('You are running version %1$s. Update to %2$s.'), $theme_data->Version, $theme_data->update['new_version']) . "
+

+
' . esc_html__('Update Plugins') . ''; echo ""; echo ''; +} elseif ( 'do-theme-upgrade' == $action ) { + check_admin_referer('upgrade-core'); + + if ( isset( $_GET['themes'] ) ) { + $themes = explode( ',', $_GET['themes'] ); + } elseif ( isset( $_POST['checked'] ) ) { + $themes = (array) $_POST['checked']; + } else { + wp_redirect('update-core.php'); + exit; + } + + $url = 'update.php?action=update-selected-themes&themes=' . urlencode(implode(',', $themes)); + $url = wp_nonce_url($url, 'bulk-update-themes'); + + $title = __('Update Themes'); + + require_once('admin-header.php'); + echo '
'; + screen_icon('themes'); + echo '

' . esc_html__('Update Themes') . '

'; + echo "

@TODO: Sorry, This part of the functionality hasnt been written yet.

"; + echo ""; + echo '
'; } include('admin-footer.php');