From 14308c0d41d28e2b4b1e7c0c5ddeb21715f96ae6 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 6 Sep 2013 11:41:09 +0000 Subject: [PATCH] Deprecate get_blogaddress_by_domain(), unused since [25261]. props jeremyfelt. fixes #25235. Built from https://develop.svn.wordpress.org/trunk@25276 git-svn-id: http://core.svn.wordpress.org/trunk@25241 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/ms-blogs.php | 26 -------------------------- wp-includes/ms-deprecated.php | 29 +++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 26 deletions(-) diff --git a/wp-includes/ms-blogs.php b/wp-includes/ms-blogs.php index 19fcf5ee7c..615535a049 100644 --- a/wp-includes/ms-blogs.php +++ b/wp-includes/ms-blogs.php @@ -55,32 +55,6 @@ function get_blogaddress_by_name( $blogname ) { return esc_url( $url . '/' ); } -/** - * Get a full blog URL, given a domain and a path. - * - * @since MU - * - * @param string $domain - * @param string $path - * @return string - */ -function get_blogaddress_by_domain( $domain, $path ) { - 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 ( $blogname != 'www.' ) - $url .= $blogname . '/'; - } else { // main blog - $url = 'http://' . $domain . $path; - } - } - return esc_url_raw( $url ); -} - /** * Given a blog's (subdomain or directory) slug, retrieve its id. * diff --git a/wp-includes/ms-deprecated.php b/wp-includes/ms-deprecated.php index e5b916cccb..093f6ae610 100644 --- a/wp-includes/ms-deprecated.php +++ b/wp-includes/ms-deprecated.php @@ -316,3 +316,32 @@ function get_user_id_from_string( $string ) { return $user->ID; return 0; } + +/** + * Get a full blog URL, given a domain and a path. + * + * @since MU + * @deprecated 3.7.0 + * + * @param string $domain + * @param string $path + * @return string + */ +function get_blogaddress_by_domain( $domain, $path ) { + _deprecated_function( __FUNCTION__, '3.7' ); + + 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 ( $blogname != 'www.' ) + $url .= $blogname . '/'; + } else { // main blog + $url = 'http://' . $domain . $path; + } + } + return esc_url_raw( $url ); +}