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-deprecated.php

    r24993 r25276  
    317317    return 0;
    318318}
     319
     320/**
     321 * Get a full blog URL, given a domain and a path.
     322 *
     323 * @since MU
     324 * @deprecated 3.7.0
     325 *
     326 * @param string $domain
     327 * @param string $path
     328 * @return string
     329 */
     330function get_blogaddress_by_domain( $domain, $path ) {
     331    _deprecated_function( __FUNCTION__, '3.7' );
     332
     333    if ( is_subdomain_install() ) {
     334        $url = "http://" . $domain.$path;
     335    } else {
     336        if ( $domain != $_SERVER['HTTP_HOST'] ) {
     337            $blogname = substr( $domain, 0, strpos( $domain, '.' ) );
     338            $url = 'http://' . substr( $domain, strpos( $domain, '.' ) + 1 ) . $path;
     339            // we're not installing the main blog
     340            if ( $blogname != 'www.' )
     341                $url .= $blogname . '/';
     342        } else { // main blog
     343            $url = 'http://' . $domain . $path;
     344        }
     345    }
     346    return esc_url_raw( $url );
     347}
Note: See TracChangeset for help on using the changeset viewer.