WordPress.org

Make WordPress Core

Ticket #33909: 33909.2.diff

File 33909.2.diff, 852 bytes (added by kraftbj, 4 years ago)

Complete version of the 1st patch.

  • src/wp-admin/includes/schema.php

     
    344344function populate_options() {
    345345        global $wpdb, $wp_db_version, $wp_current_db_version;
    346346
    347         $guessurl = wp_guess_url();
     347        $guessurl = $homeurl = wp_guess_url();
     348        if ( defined( 'WP_HOME' ) && ! empty( WP_HOME ) ) { // wp_guess_url() checked WP_SITEURL constant.
     349                $homeurl = WP_HOME;
     350        }
    348351        /**
    349352         * Fires before creating WordPress options and populating their default values.
    350353         *
     
    379382
    380383        $options = array(
    381384        'siteurl' => $guessurl,
    382         'home' => $guessurl,
     385        'home' => $homeurl,
    383386        'blogname' => __('My Site'),
    384387        /* translators: blog tagline */
    385388        'blogdescription' => __('Just another WordPress site'),