Make WordPress Core

Ticket #39593: 39593.3.diff

File 39593.3.diff, 2.4 KB (added by carl-alberto, 8 years ago)

Here's another attempt

  • src/wp-admin/includes/class-automatic-upgrader-skin.php

    diff --git src/wp-admin/includes/class-automatic-upgrader-skin.php src/wp-admin/includes/class-automatic-upgrader-skin.php
    index 23fab8b..c812dfe 100644
     
    1919 * @see Bulk_Upgrader_Skin
    2020 */
    2121class Automatic_Upgrader_Skin extends WP_Upgrader_Skin {
     22
     23        /**
     24         * Variable that holds internal messages of array in this class.
     25         *
     26         * @access protected
     27         *
     28         * @var array
     29         */
    2230        protected $messages = array();
    2331
    2432        /**
    class Automatic_Upgrader_Skin extends WP_Upgrader_Skin { 
    3038         *
    3139         * @see request_filesystem_credentials()
    3240         *
     41         * @access public
     42         *
    3343         * @param bool   $error                        Optional. Whether the current request has failed to connect.
    3444         *                                             Default false.
    3545         * @param string $context                      Optional. Full path to the directory that is tested
    class Automatic_Upgrader_Skin extends WP_Upgrader_Skin { 
    4252                        $this->options['context'] = $context;
    4353                }
    4454                // TODO: fix up request_filesystem_credentials(), or split it, to allow us to request a no-output version
    45                 // This will output a credentials form in event of failure, We don't want that, so just hide with a buffer
     55                // This will output a credentials form in event of failure, We don't want that, so just hide with a buffer.
    4656                ob_start();
    4757                $result = parent::request_filesystem_credentials( $error, $context, $allow_relaxed_file_ownership );
    4858                ob_end_clean();
    class Automatic_Upgrader_Skin extends WP_Upgrader_Skin { 
    5060        }
    5161
    5262        /**
     63         * Returns upgrade messages.
     64         *
    5365         * @access public
    5466         *
    5567         * @return array
    class Automatic_Upgrader_Skin extends WP_Upgrader_Skin { 
    5971        }
    6072
    6173        /**
    62          * @param string|array|WP_Error $data
     74         * Displays success or error message on the update process.
     75         *
     76         * @access public
     77         *
     78         * @param string $data Upgrade function that needs feedback to show if success or fail.
    6379         */
    6480        public function feedback( $data ) {
    6581                if ( is_wp_error( $data ) ) {
    class Automatic_Upgrader_Skin extends WP_Upgrader_Skin { 
    98114        }
    99115
    100116        /**
     117         * Buffers the output.
     118         *
    101119         * @access public
    102120         */
    103121        public function header() {
    class Automatic_Upgrader_Skin extends WP_Upgrader_Skin { 
    105123        }
    106124
    107125        /**
     126         * Cleans the output buffer.
     127         *
    108128         * @access public
    109129         */
    110130        public function footer() {