Ticket #11232: 11232.patch

File 11232.patch, 4.5 KB (added by ocean90, 3 years ago)

Spinner and start/end message

  • wp-admin/css/wp-admin.dev.css

     
    37523752        padding: 4px 20px 6px; 
    37533753        font: italic normal normal 24px/35px Georgia, "Times New Roman", "Bitstream Charter", Times, serif; 
    37543754} 
     3755 
     3756/* Scrollbar fix for bulk upgrade iframe */ 
     3757body.update-php { 
     3758        height: 98%; 
     3759} 
  • wp-admin/includes/class-wp-upgrader.php

     
    466466                        return false; 
    467467                } 
    468468 
     469                $this->skin->feedback('bulk_upgrade_start'); 
    469470                $this->maintenance_mode(true); 
    470471 
    471472                $results = array(); 
     
    507508                        if ( false === $result ) 
    508509                                break; 
    509510                } //end foreach $plugins 
     511 
    510512                $this->maintenance_mode(false); 
     513                $this->skin->feedback('bulk_upgrade_end'); 
     514                 
    511515                $this->skin->footer(); 
    512516 
    513517                // Cleanup our hooks, incase something else does a upgrade on this connection. 
     
    704708                        return false; 
    705709                } 
    706710 
     711                $this->skin->feedback('bulk_upgrade_start'); 
    707712                $this->maintenance_mode(true); 
    708713 
    709714                $results = array(); 
     
    745750                        if ( false === $result ) 
    746751                                break; 
    747752                } //end foreach $plugins 
     753                 
    748754                $this->maintenance_mode(false); 
     755                $this->skin->feedback('bulk_upgrade_end'); 
    749756                $this->skin->footer(); 
    750757 
    751758                // Cleanup our hooks, incase something else does a upgrade on this connection. 
     
    10561063        } 
    10571064 
    10581065        function add_strings() { 
     1066                $this->upgrader->strings['bulk_upgrade_start'] = __('The update process will start now. It may take awhile to finish.'); 
    10591067                $this->upgrader->strings['skin_update_failed_error'] = __('An error occured while updating %1$s: <strong>%2$s</strong>.'); 
    10601068                $this->upgrader->strings['skin_update_failed'] = __('The update of %1$s failed.'); 
    10611069                $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>'; 
     1070                $this->upgrader->strings['bulk_upgrade_end'] = __('The update process is complete.'); 
    10621071        } 
    10631072 
    10641073        function feedback($string) { 
     
    11031112 
    11041113        function before($title = '') { 
    11051114                $this->in_loop = true; 
    1106                 printf( '<h4>' . $this->upgrader->strings['skin_before_update_header'] . '</h4>',  $title, $this->upgrader->update_current, $this->upgrader->update_count); 
     1115                printf( '<h4>' . $this->upgrader->strings['skin_before_update_header'] . ' <img alt="" src="' . admin_url( 'images/wpspin_light.gif' ) . '" class="hidden waiting-' . $this->upgrader->update_current . '" style="vertical-align:middle;"></h4>',  $title, $this->upgrader->update_current, $this->upgrader->update_count); 
     1116                echo '<script type="text/javascript">jQuery(\'.waiting-' . esc_js($this->upgrader->update_current) . '\').show();</script>'; 
    11071117                echo '<div class="update-messages hide-if-js" id="progress-' . esc_attr($this->upgrader->update_current) . '"><p>'; 
    11081118                $this->flush_output(); 
    11091119        } 
     
    11201130                } 
    11211131                if ( !empty($this->result) && !is_wp_error($this->result) ) { 
    11221132                        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>'; 
     1133                        echo '<script type="text/javascript">jQuery(\'.waiting-' . esc_js($this->upgrader->update_current) . '\').hide();</script>'; 
    11231134                } 
    11241135                $this->reset(); 
    11251136                $this->flush_output(); 
  • wp-admin/update-core.php

     
    418418        echo '<div class="wrap">'; 
    419419        screen_icon('plugins'); 
    420420        echo '<h2>' . esc_html__('Update Plugins') . '</h2>'; 
    421         echo "<iframe src='$url' style='width: 100%; height:100%; min-height:850px;'></iframe>"; 
     421        echo "<iframe src='$url' style='width: 100%; height: 100%; min-height: 750px;' frameborder='0'></iframe>"; 
    422422        echo '</div>'; 
    423423} elseif ( 'do-theme-upgrade' == $action ) { 
    424424        check_admin_referer('upgrade-core'); 
     
    441441        echo '<div class="wrap">'; 
    442442        screen_icon('themes'); 
    443443        echo '<h2>' . esc_html__('Update Themes') . '</h2>'; 
    444         echo "<iframe src='$url' style='width: 100%; height:100%; min-height:850px;'></iframe>"; 
     444        echo "<iframe src='$url' style='width: 100%; height: 100%; min-height: 750px;' frameborder='0'></iframe>"; 
    445445        echo '</div>'; 
    446446} 
    447447