[wp-trac] [WordPress Trac] #40228: Use get_sites in get_blog_details

WordPress Trac noreply at wordpress.org
Tue Oct 3 19:40:04 UTC 2017


#40228: Use get_sites in get_blog_details
-------------------------------------------------+-------------------------
 Reporter:  spacedmonkey                         |       Owner:  flixos90
     Type:  enhancement                          |      Status:  closed
 Priority:  normal                               |   Milestone:  4.9
Component:  Networks and Sites                   |     Version:
 Severity:  normal                               |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests dev-        |     Focuses:  multisite
  feedback ms-roadmap                            |
-------------------------------------------------+-------------------------
Changes (by flixos90):

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


Comment:

 In [changeset:"41719"]:
 {{{
 #!CommitTicketReference repository="" revision="41719"
 Multisite: Improve `get_blog_details()` by using `get_site_by()`.

 `get_site_by()` is now the preferred way to retrieve a site object by
 lookup for identifying data. By using a coherent structure and
 `get_sites()` internally, it has several advantages over the direct
 database queries and complex code in `get_blog_details()`. Therefore
 `get_blog_details()` is now a wrapper for `get_site_by()`, providing
 backward compatibility fixes where necessary.

 Unit tests have been adjusted to account for the `blog-details` and `blog-
 lookup` cache groups, which are no longer needed.

 Props spacedmonkey, jeremyfelt, flixos90.
 Fixes #40228.
 }}}

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


More information about the wp-trac mailing list