X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/72836ec95a52eacbda4dc5aa296b7dd6de08bd3b..245e789b234afa4525862e7a6e5e3c2e7a52ef20:/wp-admin/update-core.php diff --git a/wp-admin/update-core.php b/wp-admin/update-core.php index 99887d36..a8a7aa99 100644 --- a/wp-admin/update-core.php +++ b/wp-admin/update-core.php @@ -11,6 +11,7 @@ require_once( dirname( __FILE__ ) . '/admin.php' ); wp_enqueue_style( 'plugin-install' ); wp_enqueue_script( 'plugin-install' ); +wp_enqueue_script( 'updates' ); add_thickbox(); if ( is_multisite() && ! is_network_admin() ) { @@ -133,7 +134,7 @@ function dismissed_updates() { /** * Display upgrade WordPress for downloading latest or upgrading automatically form. * - * @since 2.7 + * @since 2.7.0 * * @return null */ @@ -146,7 +147,7 @@ function core_upgrade_preamble() { echo '

'; _e('You have the latest version of WordPress.'); - if ( wp_http_supports( 'ssl' ) ) { + if ( wp_http_supports( array( 'ssl' ) ) ) { require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; $upgrader = new WP_Automatic_Updater; $future_minor_update = (object) array( @@ -220,7 +221,7 @@ function list_plugin_updates() {

- +
@@ -268,7 +269,7 @@ function list_plugin_updates() { $details = sprintf('%3$s.', esc_url($details_url), esc_attr($plugin_data->Name), $details_text); echo " - + "; @@ -298,7 +299,7 @@ function list_theme_updates() {

-

{$plugin_data->Name}
" . sprintf(__('You have version %1$s installed. Update to %2$s.'), $plugin_data->Version, $plugin_data->update->new_version) . ' ' . $details . $compat . $upgrade_notice . "

+
@@ -316,7 +317,7 @@ function list_theme_updates() { $theme ) { echo " - + "; @@ -353,7 +354,7 @@ function list_translation_updates() { /** * Upgrade WordPress core display. * - * @since 2.7 + * @since 2.7.0 * * @return null */ @@ -376,7 +377,6 @@ function do_core_upgrade( $reinstall = false ) { ?>
-

' . __( 'On this screen, you can update to the latest version of WordPress, as well as update your themes and plugins from the WordPress.org repositories.' ) . '

'; +$updates_overview .= '

' . __( 'If an update is available, you᾿ll see a notification appear in the Toolbar and navigation menu.' ) . ' ' . __( 'Keeping your site updated is important for security. It also makes the internet a safer place for you and your readers.' ) . '

'; get_current_screen()->add_help_tab( array( -'id' => 'overview', -'title' => __('Overview'), -'content' => - '

' . __('This screen lets you update to the latest version of WordPress as well as update your themes and plugins from the WordPress.org repository. When updates are available, the number of available updates will appear in a bubble on the left hand menu as a notification.') . '

' . - '

' . __('It is very important to keep your WordPress installation up to date for security reasons, so when you see a number appear, make sure you take the time to update, which is an easy process.') . '

' + 'id' => 'overview', + 'title' => __( 'Overview' ), + 'content' => $updates_overview ) ); +$updates_howto = '

' . __( 'WordPress — Updating your WordPress installation is a simple one-click procedure: just click on the “Update Now” button when you are notified that a new version is available.' ) . ' ' . __( 'In most cases, WordPress will automatically apply maintenance and security updates in the background for you.' ) . '

'; +$updates_howto .= '

' . __( 'Themes and Plugins — To update individual themes or plugins from this screen, use the checkboxes to make your selection, then click on the appropriate “Update” button. To update all of your themes or plugins at once, you can check the box at the top of the section to select all before clicking the update button.' ) . '

'; + +if ( 'en_US' != get_locale() ) { + $updates_howto .= '

' . __( 'Translations — The files translating WordPress into your language are updated for you whenever any other updates occur. But if these files are out of date, you can click the “Update Translations” button.' ) . '

'; +} + get_current_screen()->add_help_tab( array( -'id' => 'how-to-update', -'title' => __('How to Update'), -'content' => - '

' . __('Updating your WordPress installation is a simple one-click procedure; just click on the Update button when it says a new version is available.') . '

' . - '

' . __('To update themes or plugins from this screen, use the checkboxes to make your selection and click on the appropriate Update button. Check the box at the top of the Themes or Plugins section to select all and update them all at once.') . '

' + 'id' => 'how-to-update', + 'title' => __( 'How to Update' ), + 'content' => $updates_howto ) ); get_current_screen()->set_help_sidebar( '

' . __('For more information:') . '

' . - '

' . __('Documentation on Updating WordPress') . '

' . - '

' . __('Support Forums') . '

' + '

' . __( 'Documentation on Updating WordPress' ) . '

' . + '

' . __( 'Support Forums' ) . '

' ); if ( 'upgrade-core' == $action ) { + // Force a update check when requested + $force_check = ! empty( $_GET['force-check'] ); + wp_version_check( array(), $force_check ); - wp_version_check(); require_once(ABSPATH . 'wp-admin/admin-header.php'); ?>
-

'; /* translators: %1 date, %2 time. */ printf( __('Last checked on %1$s at %2$s.'), date_i18n( get_option( 'date_format' ) ), date_i18n( get_option( 'time_format' ) ) ); - echo '   ' . __( 'Check Again' ) . ''; + echo '   ' . __( 'Check Again' ) . ''; echo '

'; if ( $core = current_user_can( 'update_core' ) ) @@ -519,7 +522,12 @@ if ( 'upgrade-core' == $action ) { if ( $core || $plugins || $themes ) list_translation_updates(); unset( $core, $plugins, $themes ); - do_action('core_upgrade_preamble'); + /** + * Fires after the core, plugin, and theme update tables. + * + * @since 2.9.0 + */ + do_action( 'core_upgrade_preamble' ); echo '
'; include(ABSPATH . 'wp-admin/admin-footer.php'); @@ -571,7 +579,6 @@ if ( 'upgrade-core' == $action ) { require_once(ABSPATH . 'wp-admin/admin-header.php'); echo '
'; - screen_icon('plugins'); echo '

' . esc_html__('Update Plugins') . '

'; echo ""; echo '
'; @@ -600,7 +607,6 @@ if ( 'upgrade-core' == $action ) { require_once(ABSPATH . 'wp-admin/admin-header.php'); echo '
'; - screen_icon('themes'); echo '

' . esc_html__('Update Themes') . '

'; echo ""; echo '
'; @@ -627,5 +633,14 @@ if ( 'upgrade-core' == $action ) { require_once( ABSPATH . 'wp-admin/admin-footer.php' ); } else { - do_action('update-core-custom_' . $action); + /** + * Fires for each custom update action on the WordPress Updates screen. + * + * The dynamic portion of the hook name, $action, refers to the + * passed update action. The hook fires in lieu of all available + * default update actions. + * + * @since 3.2.0 + */ + do_action( "update-core-custom_{$action}" ); }
" . $theme->display('Name') . ' ' . sprintf( __( 'You have version %1$s installed. Update to %2$s.' ), $theme->display('Version'), $theme->update['new_version'] ) . "