[wp-trac] [WordPress Trac] #41936: get_main_site_id ignores custom values of $current_site->blog_id

WordPress Trac noreply at wordpress.org
Sat Oct 14 22:41:17 UTC 2017


#41936: get_main_site_id ignores custom values of $current_site->blog_id
---------------------------------------------+-----------------------------
 Reporter:  spacedmonkey                     |       Owner:  flixos90
     Type:  defect (bug)                     |      Status:  closed
 Priority:  normal                           |   Milestone:  4.9
Component:  Networks and Sites               |     Version:  trunk
 Severity:  normal                           |  Resolution:  fixed
 Keywords:  has-unit-tests has-patch commit  |     Focuses:  multisite,
                                             |  performance
---------------------------------------------+-----------------------------
Changes (by flixos90):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"41861"]:
 {{{
 #!CommitTicketReference repository="" revision="41861"
 Multisite: Take `WP_Network::$blog_id` into account in
 `get_main_site_id()`.

 When the `WP_Network::$blog_id` property is set manually, for example in
 the multisite bootstrap process, `get_main_site_id()` should use that
 value instead of running its own logic. The main logic for the function
 was therefore moved into the internal `WP_Network::get_main_site_id()`
 method, which is now being accessed by the function through the magic
 property handling for `WP_Network::$blog_id` (and its equivalent
 `WP_Network::$site_id`).

 Props spacedmonkey, jeremyfelt.
 Fixes #41936.
 }}}

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


More information about the wp-trac mailing list