WordPress.org

Make WordPress Core

Changeset 24276


Ignore:
Timestamp:
05/16/13 12:46:36 (2 years ago)
Author:
ryan
Message:

Don't show both "update failed" and "update successful" messages when upgrading a theme fails due to connectivity problems.

Props SergeyBiryukov
fixes #23027

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/class-wp-upgrader.php

    r24189 r24276  
    13131313            echo '<script type="text/javascript">jQuery(\'#progress-' . esc_js($this->upgrader->update_current) . '\').show();</script>'; 
    13141314        } 
    1315         if ( !empty($this->result) && !is_wp_error($this->result) ) { 
    1316             echo '<div class="updated"><p>' . sprintf($this->upgrader->strings['skin_update_successful'], $title, 'jQuery(\'#progress-' . esc_js($this->upgrader->update_current) . '\').toggle();jQuery(\'span\', this).toggle(); return false;') . '</p></div>'; 
     1315        if ( $this->result && ! is_wp_error( $this->result ) ) { 
     1316            if ( ! $this->error ) 
     1317                echo '<div class="updated"><p>' . sprintf($this->upgrader->strings['skin_update_successful'], $title, 'jQuery(\'#progress-' . esc_js($this->upgrader->update_current) . '\').toggle();jQuery(\'span\', this).toggle(); return false;') . '</p></div>'; 
    13171318            echo '<script type="text/javascript">jQuery(\'.waiting-' . esc_js($this->upgrader->update_current) . '\').hide();</script>'; 
    13181319        } 
Note: See TracChangeset for help on using the changeset viewer.