Make WordPress Core


Ignore:
Timestamp:
09/06/2013 11:40:58 AM (11 years ago)
Author:
SergeyBiryukov
Message:

Deprecate get_blogaddress_by_domain(), unused since [25261]. props jeremyfelt. fixes #25235.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/ms-blogs.php

    r25033 r25276  
    5454    }
    5555    return esc_url( $url . '/' );
    56 }
    57 
    58 /**
    59  * Get a full blog URL, given a domain and a path.
    60  *
    61  * @since MU
    62  *
    63  * @param string $domain
    64  * @param string $path
    65  * @return string
    66  */
    67 function get_blogaddress_by_domain( $domain, $path ) {
    68     if ( is_subdomain_install() ) {
    69         $url = "http://" . $domain.$path;
    70     } else {
    71         if ( $domain != $_SERVER['HTTP_HOST'] ) {
    72             $blogname = substr( $domain, 0, strpos( $domain, '.' ) );
    73             $url = 'http://' . substr( $domain, strpos( $domain, '.' ) + 1 ) . $path;
    74             // we're not installing the main blog
    75             if ( $blogname != 'www.' )
    76                 $url .= $blogname . '/';
    77         } else { // main blog
    78             $url = 'http://' . $domain . $path;
    79         }
    80     }
    81     return esc_url_raw( $url );
    8256}
    8357
Note: See TracChangeset for help on using the changeset viewer.