[wp-trac] [WordPress Trac] #37297: Deprecate get_blogaddress_by_id function

WordPress Trac noreply at wordpress.org
Thu Jul 7 18:40:34 UTC 2016


#37297: Deprecate get_blogaddress_by_id function
--------------------------------+------------------------------
 Reporter:  spacedmonkey        |       Owner:
     Type:  enhancement         |      Status:  new
 Priority:  normal              |   Milestone:  Awaiting Review
Component:  Networks and Sites  |     Version:  3.0
 Severity:  normal              |  Resolution:
 Keywords:                      |     Focuses:  multisite
--------------------------------+------------------------------

Comment (by thomaswm):

 You cannot replace `get_blogaddress_by_id` with `get_home_url` in
 `install_blog()`, because the `home` option hasn't been defined yet at
 that point. It is set in
 [https://core.trac.wordpress.org/browser/tags/4.5/src/wp-includes/ms-
 functions.php#L1360 line 1360] in ms-functions.php.

 So, in `install_blog()`, you'll have to do something like
 {{{
 #!php
 $site = get_site( $blog_id );
 $url = 'http://' . $site->domain . $site->path;
 }}}
 to get the value of `$url`.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/37297#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list