Make WordPress Core

Ticket #33620: 33620.diff

File 33620.diff, 566 bytes (added by tryon, 9 years ago)

Until #14867 is resolved, this sets the schema to https if the site being created is part of a sub directory install and the site home is also https. based on https://core.trac.wordpress.org/attachment/ticket/27499/27499.diff

  • wp-includes/ms-functions.php

     
    14091409
    14101410        $url = untrailingslashit( $url );
    14111411
     1412        if ( defined( 'SUBDOMAIN_INSTALL' ) && SUBDOMAIN_INSTALL === false){
     1413                $siteurl = parse_url( get_site_option( 'siteurl' ) );
     1414
     1415                if ( $siteurl['scheme'] == 'https' ) {
     1416                        $url = set_url_scheme( $url, 'https' );
     1417                }
     1418
     1419        }
     1420
    14121421        update_option( 'siteurl', $url );
    14131422        update_option( 'home', $url );
    14141423