#38491 closed enhancement (fixed)
Deprecate the `blog_details` filter
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 4.7 | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Networks and Sites | Keywords: | has-patch has-dev-note |
| Focuses: | multisite | Cc: |
Description
Per discussion during multisite office-hours (https://wordpress.slack.com/archives/core-multisite/p1477413103001760) we are going to deprecate the blog_details filter and advise developers to use site_details instead.
One issue with that is since we have been replacing all the get_blog_details() calls in Core with get_site() (see #37102), the blog_details filter isn't run at all in some of these occasions. Therefore we will also add the blog_details filter (as deprecated) to WP_Site::get_details() to maintain backward compatibility.
The function get_blog_details() will also be deprecated very soon, likely in the next release.
Because of the complexity of these function replacements and the deprecated filter we need to write a dev-note on this or at least make it a highlighted topic on the general multisite dev-note.
Attachments (2)
Change History (8)
#2
follow-up:
↓ 3
@
9 years ago
- Keywords has-patch added; needs-patch removed
- Owner changed from flixos90 to jeremyfelt
- Status changed from assigned to reviewing
38491.diff deprecates the blog_details filter and makes it available in WP_Site::get_details() to maintain BC.
It also replaces get_blog_details() with get_site() in all unit tests that do not test get_blog_details() specifically.
Note: #38350, #38351 and #38355 should probably go in before this one.
#3
in reply to:
↑ 2
@
9 years ago
Replying to flixos90:
38491.diff deprecates the
blog_detailsfilter and makes it available inWP_Site::get_details()to maintain BC.
Looking good. apply_filters_deprecated() already runs has_filter() as its first line, so we can probably skip that part.
It also replaces
get_blog_details()withget_site()in all unit tests that do not testget_blog_details()specifically.
Let's handle this separately as part of #37102.
#4
@
9 years ago
- Keywords needs-dev-note added
38491.2.diff removes the unnecessary has_filter() check and also gets rid of unit test replacements which will be handled separately.
#6
@
5 years ago
- Keywords has-dev-note added; needs-dev-note removed
Linking the dev note that was published here for reference: https://make.wordpress.org/core/2016/11/04/multisite-focused-changes-in-4-7/
Status of this and the related tickets: