diff --git a/wp-admin/themes.php b/wp-admin/themes.php index 213c11f666..e8feeaccca 100644 --- a/wp-admin/themes.php +++ b/wp-admin/themes.php @@ -109,13 +109,14 @@ function theme_update_available( $theme ) { $theme_name = is_object($theme) ? $theme->name : (is_array($theme) ? $theme['Name'] : ''); $details_url = add_query_arg(array('TB_iframe' => 'true', 'width' => 1024, 'height' => 800), $update['url']); //Theme browser inside WP? replace this, Also, theme preview JS will override this on the available list. $update_url = wp_nonce_url('update.php?action=upgrade-theme&theme=' . urlencode($stylesheet), 'upgrade-theme_' . $stylesheet); + $update_onclick = 'onclick="if ( confirm(\'' . esc_js( __("Upgrading this theme will lose any customizations you have made. 'Cancel' to stop, 'OK' to upgrade.") ) . '\') ) {return true;}return false;"'; if ( ! current_user_can('update_themes') ) printf( __('

There is a new version of %1$s available. View version %3$s Details.

'), $theme_name, $details_url, $update['new_version']); else if ( empty($update->package) ) printf( __('

There is a new version of %1$s available. View version %3$s Details automatic upgrade unavailable for this theme.

'), $theme_name, $details_url, $update['new_version']); else - printf( __('

There is a new version of %1$s available. View version %3$s Details or upgrade automatically.

'), $theme_name, $details_url, $update['new_version'], $update_url ); + printf( __('

There is a new version of %1$s available. View version %3$s Details or upgrade automatically.

'), $theme_name, $details_url, $update['new_version'], $update_url, $update_onclick ); } }