Make WordPress Core

Ticket #28947: 28947.2.diff

File 28947.2.diff, 1.3 KB (added by ocean90, 11 years ago)
  • src/wp-admin/includes/class-wp-upgrader-skins.php

     
    1818
    1919        public $upgrader;
    2020        public $done_header = false;
     21        public $done_footer = false;
    2122        public $result = false;
    2223
    2324        public function __construct($args = array()) {
     
    4748        }
    4849
    4950        public function header() {
    50                 if ( $this->done_header )
     51                if ( $this->done_header ) {
    5152                        return;
     53                }
    5254                $this->done_header = true;
    5355                echo '<div class="wrap">';
    5456                echo '<h2>' . $this->options['title'] . '</h2>';
    5557        }
    5658        public function footer() {
     59                if ( $this->done_footer ) {
     60                        return;
     61                }
     62                $this->done_footer = true;
    5763                echo '</div>';
    5864        }
    5965
     
    628634class Language_Pack_Upgrader_Skin extends WP_Upgrader_Skin {
    629635        public $language_update = null;
    630636        public $done_header = false;
     637        public $done_footer = false;
    631638        public $display_footer_actions = true;
    632639
    633640        public function __construct( $args = array() ) {
     
    635642                $args = wp_parse_args( $args, $defaults );
    636643                if ( $args['skip_header_footer'] ) {
    637644                        $this->done_header = true;
     645                        $this->done_footer = true;
    638646                        $this->display_footer_actions = false;
    639647                }
    640648                parent::__construct( $args );