[wp-trac] [WordPress Trac] #40064: Deprecate `get_blog_details()`

WordPress Trac noreply at wordpress.org
Thu Mar 23 00:35:22 UTC 2017


#40064: Deprecate `get_blog_details()`
--------------------------------+------------------------
 Reporter:  flixos90            |       Owner:
     Type:  enhancement         |      Status:  new
 Priority:  normal              |   Milestone:  4.8
Component:  Networks and Sites  |     Version:
 Severity:  normal              |  Resolution:
 Keywords:  dev-feedback        |     Focuses:  multisite
--------------------------------+------------------------
Changes (by jeremyfelt):

 * keywords:   => dev-feedback


Comment:

 I think we should hold off on deprecating `get_blog_details()`. :)

 We eliminated its use within core, which solves most of the issue we had
 with it. We deprecated the `blog_details` filter, which encourages anyone
 customizing a site's details to look to the new location instead.

 As there is no one to one replacement (it's unique that way), I don't
 think there's much harm in letting it be. As @stephdau mentions, the
 person hours involved in making this change are pretty high because it's
 used frequently. And because it's not a one to one replacement, the chance
 for error when people make that change is higher.

 If we do not deprecate it, then we should also update the internals as
 best we can so that it can take the most advantage of newer cache keys,
 etc...

 Separately, it's worth repeating... `get_site()` is a one to one
 replacement if only passed a site's ID. `get_site( 234 )` is a better
 option than `get_blog_details( 234 )`.

 And I'm not sure if this is the best place to start this conversation, but
 what if `get_site()` supported a partial site object in addition to an ID?
 It could then initiate a `get_sites()` query based on what information is
 available. That would bring it much closer to a replacement, and then
 easier to argue for deprecation of `get_blog_details()`.

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


More information about the wp-trac mailing list