Make WordPress Core

Ticket #31985: 31985.9.diff

File 31985.9.diff, 1.3 KB (added by jeremyfelt, 9 years ago)
  • src/wp-includes/class-wp-network.php

     
    129129                        $this->$key = $value;
    130130                }
    131131
     132                $this->_set_site_name();
    132133                $this->_set_cookie_domain();
    133134        }
    134135
    135136        /**
     137         * Set the site name assigned to the network if one has not been populated.
     138         *
     139         * @since 4.4.0
     140         * @access private
     141         */
     142        private function _set_site_name() {
     143                if ( ! empty( $this->site_name ) ) {
     144                        return;
     145                }
     146
     147                $default = ucfirst( $this->domain );
     148                $this->site_name = get_network_option( 'site_name', $default, $this->id );
     149        }
     150
     151        /**
    136152         * Set the cookie domain based on the network domain if one has
    137153         * not been populated.
    138154         *
  • src/wp-includes/ms-settings.php

     
    221221        $current_site = new WP_Network( $current_site );
    222222}
    223223
    224 if ( empty( $current_site->site_name ) ) {
    225         $current_site->site_name = get_network_option( 'site_name' );
    226         if ( ! $current_site->site_name ) {
    227                 $current_site->site_name = ucfirst( $current_site->domain );
    228         }
    229 }
    230 
    231224// Define upload directory constants
    232225ms_upload_constants();