]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/includes/class-wp-upgrader-skins.php
WordPress 4.5-scripts
[autoinstalls/wordpress.git] / wp-admin / includes / class-wp-upgrader-skins.php
index 3e9a5556b63d0a4325e85c0d510010f98097c494..c9d32cebe8c5fa6cd93e85afdae8f02519a9d5af 100644 (file)
@@ -224,7 +224,8 @@ class Plugin_Upgrader_Skin extends WP_Upgrader_Skin {
        public function after() {
                $this->plugin = $this->upgrader->plugin_info();
                if ( !empty($this->plugin) && !is_wp_error($this->result) && $this->plugin_active ){
-                       echo '<iframe style="border:0;overflow:hidden" width="100%" height="170px" src="' . wp_nonce_url('update.php?action=activate-plugin&networkwide=' . $this->plugin_network_active . '&plugin=' . urlencode( $this->plugin ), 'activate-plugin_' . $this->plugin) .'"></iframe>';
+                       // Currently used only when JS is off for a single plugin update?
+                       echo '<iframe title="' . esc_attr__( 'Update progress' ) . '" style="border:0;overflow:hidden" width="100%" height="170" src="' . wp_nonce_url( 'update.php?action=activate-plugin&networkwide=' . $this->plugin_network_active . '&plugin=' . urlencode( $this->plugin ), 'activate-plugin_' . $this->plugin ) . '"></iframe>';
                }
 
                $this->decrement_update_count( 'plugin' );
@@ -281,8 +282,11 @@ class Bulk_Upgrader_Skin extends WP_Upgrader_Skin {
         */
        public function add_strings() {
                $this->upgrader->strings['skin_upgrade_start'] = __('The update process is starting. This process may take a while on some hosts, so please be patient.');
-               $this->upgrader->strings['skin_update_failed_error'] = __('An error occurred while updating %1$s: <strong>%2$s</strong>');
+               /* translators: 1: Title of an update, 2: Error message */
+               $this->upgrader->strings['skin_update_failed_error'] = __('An error occurred while updating %1$s: %2$s');
+               /* translators: 1: Title of an update */
                $this->upgrader->strings['skin_update_failed'] = __('The update of %1$s failed.');
+               /* translators: 1: Title of an update */
                $this->upgrader->strings['skin_update_successful'] = __( '%1$s updated successfully.' ) . ' <a onclick="%2$s" href="#" class="hide-if-no-js"><span>' . __( 'Show Details' ) . '</span><span class="hidden">' . __( 'Hide Details' ) . '</span></a>';
                $this->upgrader->strings['skin_upgrade_end'] = __('All updates have been completed.');
        }
@@ -366,7 +370,7 @@ class Bulk_Upgrader_Skin extends WP_Upgrader_Skin {
         */
        public function before($title = '') {
                $this->in_loop = true;
-               printf( '<h4>' . $this->upgrader->strings['skin_before_update_header'] . ' <span class="spinner waiting-' . $this->upgrader->update_current . '"></span></h4>',  $title, $this->upgrader->update_current, $this->upgrader->update_count);
+               printf( '<h2>' . $this->upgrader->strings['skin_before_update_header'] . ' <span class="spinner waiting-' . $this->upgrader->update_current . '"></span></h2>', $title, $this->upgrader->update_current, $this->upgrader->update_count );
                echo '<script type="text/javascript">jQuery(\'.waiting-' . esc_js($this->upgrader->update_current) . '\').css("display", "inline-block");</script>';
                echo '<div class="update-messages hide-if-js" id="progress-' . esc_attr($this->upgrader->update_current) . '"><p>';
                $this->flush_output();
@@ -379,10 +383,11 @@ class Bulk_Upgrader_Skin extends WP_Upgrader_Skin {
        public function after($title = '') {
                echo '</p></div>';
                if ( $this->error || ! $this->result ) {
-                       if ( $this->error )
-                               echo '<div class="error"><p>' . sprintf($this->upgrader->strings['skin_update_failed_error'], $title, $this->error) . '</p></div>';
-                       else
+                       if ( $this->error ) {
+                               echo '<div class="error"><p>' . sprintf($this->upgrader->strings['skin_update_failed_error'], $title, '<strong>' . $this->error . '</strong>' ) . '</p></div>';
+                       } else {
                                echo '<div class="error"><p>' . sprintf($this->upgrader->strings['skin_update_failed'], $title) . '</p></div>';
+                       }
 
                        echo '<script type="text/javascript">jQuery(\'#progress-' . esc_js($this->upgrader->update_current) . '\').show();</script>';
                }
@@ -739,7 +744,7 @@ class Theme_Upgrader_Skin extends WP_Upgrader_Skin {
                                }
                        } elseif ( current_user_can( 'switch_themes' ) ) {
                                if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) {
-                                       $update_actions['preview'] .= '<a href="' . wp_customize_url( $stylesheet ) . '" class="hide-if-no-customize load-customize"><span aria-hidden="true">' . __( 'Live Preview' ) . '</span><span class="screen-reader-text">' . sprintf( __( 'Live Preview &#8220;%s&#8221;' ), $name ) . '</span></a>';
+                                       $update_actions['preview'] = '<a href="' . wp_customize_url( $stylesheet ) . '" class="hide-if-no-customize load-customize"><span aria-hidden="true">' . __( 'Live Preview' ) . '</span><span class="screen-reader-text">' . sprintf( __( 'Live Preview &#8220;%s&#8221;' ), $name ) . '</span></a>';
                                }
                                $update_actions['activate'] = '<a href="' . esc_url( $activate_link ) . '" class="activatelink"><span aria-hidden="true">' . __( 'Activate' ) . '</span><span class="screen-reader-text">' . sprintf( __( 'Activate &#8220;%s&#8221;' ), $name ) . '</span></a>';
                        }
@@ -801,7 +806,7 @@ class Language_Pack_Upgrader_Skin extends WP_Upgrader_Skin {
 
                echo '<div class="update-messages lp-show-latest">';
 
-               printf( '<h4>' . __( 'Updating translations for %1$s (%2$s)&#8230;' ) . '</h4>', $name, $this->language_update->language );
+               printf( '<h2>' . __( 'Updating translations for %1$s (%2$s)&#8230;' ) . '</h2>', $name, $this->language_update->language );
        }
 
        /**