Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#38351 closed enhancement (fixed)

Replace get_blog_details() usage in wp-includes/ms-blogs.php with get_site()

Reported by: iamfriendly's profile iamfriendly Owned by: jeremyfelt's profile jeremyfelt
Milestone: 4.7 Priority: normal
Severity: normal Version: 4.4
Component: Networks and Sites Keywords: has-patch
Focuses: multisite Cc:

Attachments (2)

38351.diff (921 bytes) - added by flixos90 7 years ago.
38351.2.diff (1.2 KB) - added by flixos90 7 years ago.

Download all attachments as: .zip

Change History (9)

#1 @iamfriendly
7 years ago

get_blogaddress_by_id(), refresh_blog_details(), update_blog_details(), get_blog_status() numbers 13-16 from

7 years ago

#2 @flixos90
7 years ago

  • Keywords has-patch added
  • Milestone changed from Awaiting Review to 4.7

38351.diff replaces get_blog_details() calls in refresh_blog_details(), update_blog_details() and get_blog_status().

I didn't replace it for get_blogaddress_by_id() yet since the $get_all parameter is true there. I can see us do one of two things here:

  • either replace it anyway and rely on stating in the dev-note that the site_details filter must be used instead of the blog_details filter
  • or not replace it at this point, but do it at the same time we deprecate get_blog_details()

What do you think?

#3 @jorbin
7 years ago

  • Owner set to jeremyfelt
  • Status changed from new to assigned

7 years ago

#4 @flixos90
7 years ago

38351.2.diff includes the additional replacement.

I personally think we're fine replacing get_blog_details() regardless of the parameters and document it the filter change. We could theoretically also add an apply_filters_deprecated( 'blog_details', array( $details ), '4.7.0', 'site_details' ) into the relevant part of WP_Site to give developers time to migrate.

This ticket was mentioned in Slack in #core by jeffpaul. View the logs.

7 years ago

This ticket was mentioned in Slack in #core-multisite by flixos90. View the logs.

7 years ago

#7 @jeremyfelt
7 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 38915:

Multisite: Replace get_blog_details() in wp-includes/ms-blogs.php with get_site().

Props flixos90.
See #37102.
Fixes #38351.

Note: See TracTickets for help on using tickets.