WordPress.org

Make WordPress Core

Changeset 13881


Ignore:
Timestamp:
03/29/2010 07:57:17 PM (8 years ago)
Author:
wpmuguru
Message:

tweaks to network_*_url(), see #12736

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/link-template.php

    r13880 r13881  
    20352035*/
    20362036function network_site_url( $path = '', $scheme = null ) {
     2037    global $current_site;
    20372038    $orig_scheme = $scheme;
    20382039    if ( !in_array($scheme, array('http', 'https')) ) {
     
    20522053
    20532054    if ( !empty($path) && is_string($path) && strpos($path, '..') === false )
    2054         $url .= '/' . ltrim($path, '/');
     2055        $url .= ltrim($path, '/');
    20552056
    20562057    return apply_filters('network_site_url', $url, $path, $orig_scheme);
     
    20722073*/
    20732074function network_home_url( $path = '', $scheme = null ) {
     2075    global $current_site;
    20742076    $orig_scheme = $scheme;
    20752077    $scheme      = is_ssl() && !is_admin() ? 'https' : 'http';
     
    20772079    $url = 'http://' . $current_site->domain . $current_site->path;
    20782080
    2079     $url = str_replace( 'http://', "$scheme://", $home );
     2081    $url = str_replace( 'http://', "$scheme://", $url );
    20802082
    20812083    if ( !empty( $path ) && is_string( $path ) && strpos( $path, '..' ) === false )
    2082         $url .= '/' . ltrim( $path, '/' );
     2084        $url .= ltrim( $path, '/' );
    20832085
    20842086    return apply_filters( 'network_home_url', $url, $path, $orig_scheme);
     
    20962098*/
    20972099function network_admin_url( $path = '', $scheme = 'admin' ) {
    2098     $url = network_site_url($blog_id, 'wp-admin/', $scheme);
     2100    $url = network_site_url('wp-admin/', $scheme);
    20992101
    21002102    if ( !empty($path) && is_string($path) && strpos($path, '..') === false )
Note: See TracChangeset for help on using the changeset viewer.