get_blogaddress_by_domain

Advertisement

Deprecated Deprecated

This function has been deprecated.

Summery Summery

Get a full blog URL, given a domain and a path.

Syntax Syntax

get_blogaddress_by_domain( string $domain, string $path )

Parameters Parameters

$domain

(string) (Required)

$path

(string) (Required)

Return Return

(string)

Source Source

File: wp-includes/ms-deprecated.php

function get_blogaddress_by_domain( $domain, $path ) {
	_deprecated_function( __FUNCTION__, '3.7.0' );

	if ( is_subdomain_install() ) {
		$url = "http://" . $domain.$path;
	} else {
		if ( $domain != $_SERVER['HTTP_HOST'] ) {
			$blogname = substr( $domain, 0, strpos( $domain, '.' ) );
			$url = 'http://' . substr( $domain, strpos( $domain, '.' ) + 1 ) . $path;
			// We're not installing the main blog.
			if ( 'www.' !== $blogname )
				$url .= $blogname . '/';
		} else { // Main blog.
			$url = 'http://' . $domain . $path;
		}
	}
	return esc_url_raw( $url );
}

Advertisement

Changelog Changelog

Changelog
Version Description
3.7.0 This function has been deprecated.
MU (3.0.0) Introduced.

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.