Opened 8 years ago
Closed 8 years ago
#37053 closed enhancement (fixed)
Ensure `get_site_by_path()` returns a `WP_Site`
Reported by: | flixos90 | Owned by: | jeremyfelt |
---|---|---|---|
Milestone: | 4.7 | Priority: | normal |
Severity: | normal | Version: | 4.6 |
Component: | Networks and Sites | Keywords: | has-patch has-unit-tests |
Focuses: | docs, multisite | Cc: |
Description
When using the filter pre_get_sites_by_path
, the return value might possibly be a raw site object. Let's ensure it is turned into a WP_Site
instance.
Attachments (2)
Change History (10)
#2
follow-up:
↓ 7
@
8 years ago
- Focuses docs added
- Keywords has-unit-tests added
- Milestone changed from Awaiting Review to 4.7
- Owner set to jeremyfelt
- Status changed from new to reviewing
- Type changed from defect (bug) to enhancement
- Version changed from 3.9 to 4.6
This ticket was mentioned in Slack in #core by desrosj. View the logs.
8 years ago
#5
@
8 years ago
- Keywords needs-testing added
This is most of the way there. Just needs some feedback if it will land in 4.7.
This ticket was mentioned in Slack in #core-multisite by flixos90. View the logs.
8 years ago
#7
in reply to:
↑ 2
@
8 years ago
- Keywords needs-testing removed
Replying to flixos90:
37053.2.diff is an updated patch, including a unit test for when using the filter to short-circuit.
This looks great, thanks @flixos90. I removed the removal of the todo
doc. We should address that in another ticket with the docs in the paragraph just above as well. There are some things that are still relevant and some that aren't.
37053.2.diff is an updated patch, including a unit test for when using the filter to short-circuit.