Opened 8 years ago
Closed 8 years ago
#38175 closed enhancement (fixed)
Use `get_sites()` instead of a database lookup in `get_id_from_blogname()`
Reported by: | jeremyfelt | Owned by: | jeremyfelt |
---|---|---|---|
Milestone: | 4.7 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Networks and Sites | Keywords: | has-patch |
Focuses: | multisite | Cc: |
Description
This was originally introduced in a patch on #34450, but deserved its own ticket due to the scope of changes.
Now that get_sites()
is available (4.6.0) and via WP_Site_Query
(4.6.0) caches queries, we can use this to handle the slug lookup instead of the manual database query.
Attachments (1)
Change History (4)
Note: See
TracTickets for help on using
tickets.
38175.diff is a carry over of @flixos90's changes from #34450. It also removes tests for the
get_id_from_blogname
cache key, specifically one from #20950. The functionality ofget_id_from_blogname()
is now covered in the tests added via #34450.