mirror of
git://develop.git.wordpress.org/
synced 2025-03-18 19:09:47 +01:00
Multisite: Deprecate the blog_details
filter.
`get_site()` has replaced `get_blog_details()` throughout core and is the recommended way to retrieve a current or single site object. The `blog_details` filter is applied when full details are requested from `get_blog_details()`. To ensure backwards compatibility in the switch to `get_site()`, this `blog_details` filter is now applied in `WP_Site::get_details()` and marked as deprecated with a note to rely instead on the `site_details` filter introduced in 4.6. Props flixos90. See #37102. Fixes #38491. git-svn-id: https://develop.svn.wordpress.org/trunk@38936 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
b6969df877
commit
1515813dd4
@ -346,6 +346,9 @@ final class WP_Site {
|
||||
}
|
||||
}
|
||||
|
||||
/** This filter is documented in wp-includes/ms-blogs.php */
|
||||
$details = apply_filters_deprecated( 'blog_details', array( $details ), '4.7.0', 'site_details' );
|
||||
|
||||
/**
|
||||
* Filters a site's extended properties.
|
||||
*
|
||||
|
@ -240,10 +240,11 @@ function get_blog_details( $fields = null, $get_all = true ) {
|
||||
* Filters a blog's details.
|
||||
*
|
||||
* @since MU
|
||||
* @deprecated 4.7.0 Use site_details
|
||||
*
|
||||
* @param object $details The blog details.
|
||||
*/
|
||||
$details = apply_filters( 'blog_details', $details );
|
||||
$details = apply_filters_deprecated( 'blog_details', array( $details ), '4.7.0', 'site_details' );
|
||||
|
||||
wp_cache_set( $blog_id . $all, $details, 'blog-details' );
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user