]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/update-core.php
WordPress 3.8
[autoinstalls/wordpress.git] / wp-admin / update-core.php
index 3a17482c56d8fc3c8cbec9b99e9d2ccd20603c3f..61535996891a465523edf3facaa80ea97dc0d475 100644 (file)
@@ -268,7 +268,7 @@ function list_plugin_updates() {
                $details = sprintf('<a href="%1$s" class="thickbox" title="%2$s">%3$s</a>.', esc_url($details_url), esc_attr($plugin_data->Name), $details_text);
 
                echo "
-       <tr class='active'>
+       <tr>
                <th scope='row' class='check-column'><input type='checkbox' name='checked[]' value='" . esc_attr($plugin_file) . "' /></th>
                <td><p><strong>{$plugin_data->Name}</strong><br />" . sprintf(__('You have version %1$s installed. Update to %2$s.'), $plugin_data->Version, $plugin_data->update->new_version) . ' ' . $details . $compat . $upgrade_notice . "</p></td>
        </tr>";
@@ -316,7 +316,7 @@ function list_theme_updates() {
 <?php
        foreach ( $themes as $stylesheet => $theme ) {
                echo "
-       <tr class='active'>
+       <tr>
                <th scope='row' class='check-column'><input type='checkbox' name='checked[]' value='" . esc_attr( $stylesheet ) . "' /></th>
                <td class='plugin-title'><img src='" . esc_url( $theme->get_screenshot() ) . "' width='85' height='64' style='float:left; padding: 0 5px 5px' /><strong>" . $theme->display('Name') . '</strong> ' . sprintf( __( 'You have version %1$s installed. Update to %2$s.' ), $theme->display('Version'), $theme->update['new_version'] ) . "</td>
        </tr>";
@@ -376,7 +376,6 @@ function do_core_upgrade( $reinstall = false ) {
 
 ?>
        <div class="wrap">
-       <?php screen_icon('tools'); ?>
        <h2><?php _e('Update WordPress'); ?></h2>
 <?php
 
@@ -448,10 +447,6 @@ function do_undismiss_core_update() {
        exit;
 }
 
-function no_update_actions($actions) {
-       return '';
-}
-
 $action = isset($_GET['action']) ? $_GET['action'] : 'upgrade-core';
 
 $upgrade_error = false;
@@ -464,35 +459,42 @@ if ( ( 'do-theme-upgrade' == $action || ( 'do-plugin-upgrade' == $action && ! is
 $title = __('WordPress Updates');
 $parent_file = 'tools.php';
 
+$updates_overview  = '<p>' . __( '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.' ) . '</p>';
+$updates_overview .= '<p>' . __( 'If an update is available, you&#8127;ll see a notification appear in the Toolbar and navigation menu.' ) . ' ' . __( 'Keeping your site up to date is important for your site&#8217;s security, and makes the internet a safer place for you and your readers.' ) . '</p>';
+
 get_current_screen()->add_help_tab( array(
-'id'           => 'overview',
-'title'                => __('Overview'),
-'content'      =>
-       '<p>' . __('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.') . '</p>' .
-       '<p>' . __('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.') . '</p>'
+       'id'      => 'overview',
+       'title'   => __( 'Overview' ),
+       'content' => $updates_overview
 ) );
 
+$updates_howto  = '<p>' . __( '<strong>WordPress</strong> &mdash; Updating your WordPress installation is a simple one-click procedure: just <strong>click on the &#8220;Update Now&#8221; button</strong> 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.' ) . '</p>';
+$updates_howto .= '<p>' . __( '<strong>Themes and Plugins</strong> &mdash; To update individual themes or plugins from this screen, use the checkboxes to make your selection, then <strong>click on the appropriate &#8220;Update&#8221; button</strong>. 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.' ) . '</p>';
+
+if ( 'en_US' != get_locale() ) {
+       $updates_howto .= '<p>' . __( '<strong>Translations</strong> &mdash; 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 <strong>click the &#8220;Update Translations&#8221;</strong> button.' ) . '</p>';
+}
+
 get_current_screen()->add_help_tab( array(
-'id'           => 'how-to-update',
-'title'                => __('How to Update'),
-'content'      =>
-       '<p>' . __('Updating your WordPress installation is a simple one-click procedure; just click on the Update button when it says a new version is available.') . '</p>' .
-       '<p>' . __('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.') . '</p>'
+       'id'      => 'how-to-update',
+       'title'   => __( 'How to Update' ),
+       'content' => $updates_howto
 ) );
 
 get_current_screen()->set_help_sidebar(
        '<p><strong>' . __('For more information:') . '</strong></p>' .
-       '<p>' . __('<a href="http://codex.wordpress.org/Dashboard_Updates_Screen" target="_blank">Documentation on Updating WordPress</a>') . '</p>' .
-       '<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
+       '<p>' . __( '<a href="http://codex.wordpress.org/Dashboard_Updates_Screen" target="_blank">Documentation on Updating WordPress</a>' ) . '</p>' .
+       '<p>' . __( '<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>' ) . '</p>'
 );
 
 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');
        ?>
        <div class="wrap">
-       <?php screen_icon('tools'); ?>
        <h2><?php _e('WordPress Updates'); ?></h2>
        <?php
        if ( $upgrade_error ) {
@@ -507,7 +509,7 @@ if ( 'upgrade-core' == $action ) {
        echo '<p>';
        /* 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 ' &nbsp; <a class="button" href="' . esc_url( self_admin_url('update-core.php') ) . '">' . __( 'Check Again' ) . '</a>';
+       echo ' &nbsp; <a class="button" href="' . esc_url( self_admin_url('update-core.php?force-check=1') ) . '">' . __( 'Check Again' ) . '</a>';
        echo '</p>';
 
        if ( $core = current_user_can( 'update_core' ) )
@@ -571,7 +573,6 @@ if ( 'upgrade-core' == $action ) {
 
        require_once(ABSPATH . 'wp-admin/admin-header.php');
        echo '<div class="wrap">';
-       screen_icon('plugins');
        echo '<h2>' . esc_html__('Update Plugins') . '</h2>';
        echo "<iframe src='$url' style='width: 100%; height: 100%; min-height: 750px;' frameborder='0'></iframe>";
        echo '</div>';
@@ -600,7 +601,6 @@ if ( 'upgrade-core' == $action ) {
 
        require_once(ABSPATH . 'wp-admin/admin-header.php');
        echo '<div class="wrap">';
-       screen_icon('themes');
        echo '<h2>' . esc_html__('Update Themes') . '</h2>';
        echo "<iframe src='$url' style='width: 100%; height: 100%; min-height: 750px;' frameborder='0'></iframe>";
        echo '</div>';