WordPress.org

Make WordPress Core

Ticket #23221: 23221.diff

File 23221.diff, 609 bytes (added by markoheijnen, 13 months ago)

Replace build url with site_url()

  • wp-includes/link-template.php

    diff --git a/wp-includes/link-template.php b/wp-includes/link-template.php
    index 1daf487..a597e08 100644
    a b function network_site_url( $path = '', $scheme = null ) { 
    21072107        if ( ! is_multisite() ) 
    21082108                return site_url($path, $scheme); 
    21092109 
    2110         if ( 'relative' == $scheme ) 
    2111                 $url = $current_site->path; 
    2112         else 
    2113                 $url = set_url_scheme( 'http://' . $current_site->domain . $current_site->path, $scheme ); 
     2110        $url = trailingslashit( site_url( '', $scheme ) ); 
    21142111 
    21152112        if ( $path && is_string( $path ) ) 
    21162113                $url .= ltrim( $path, '/' );