From bcd6daf2cf52f964254baf6ccfe8eb4be834d5c5 Mon Sep 17 00:00:00 2001 From: dd32 Date: Sat, 6 Mar 2010 09:12:49 +0000 Subject: [PATCH] First pass at completing the Themes component of the GUU. See #12528 git-svn-id: http://svn.automattic.com/wordpress/trunk@13604 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/update-core.php | 46 +++++++++++++++++++++++++++++++++++----- 1 file changed, 41 insertions(+), 5 deletions(-) diff --git a/wp-admin/update-core.php b/wp-admin/update-core.php index 0dca9873d..9597f26b7 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');