Opened 9 years ago
Closed 9 years ago
#41762 closed enhancement (fixed)
Use WP_Network_Query in ms_load_current_site_and_network
| Reported by: | spacedmonkey | Owned by: | flixos90 |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.9 |
| Component: | Networks and Sites | Version: | 4.6 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: | multisite |
Description (last modified by )
Use WP_Network_Query in ms_load_current_site_and_network instead of raw SQL query.
Attachments (2)
Change History (11)
#1
@
9 years ago
- Description modified (diff)
- Summary Use get_networks in ms_load_current_site_and_network → Use WP_Network_Query in ms_load_current_site_and_network
This ticket was mentioned in Slack in #core-multisite by spacedmonkey. View the logs.
9 years ago
This ticket was mentioned in Slack in #core-multisite by spacedmonkey. View the logs.
9 years ago
This ticket was mentioned in Slack in #core-multisite by spacedmonkey. View the logs.
9 years ago
This ticket was mentioned in Slack in #core-multisite by flixos90. View the logs.
9 years ago
#7
@
9 years ago
- Milestone Awaiting Review → 4.9
- Owner set to
- Status new → reviewing
Let's keep the current-network cache in place for now, as it's less aggressively invalidated compared to the cache used by WP_Network_Query.
#8
@
9 years ago
41762.2.diff keeps the current-network cache key in place, and removes the now unused $wpdb global.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Replace raw sql to the sites table with wp_network_query. Number of briefs to this, wp_network_query has filters that are run. Also network queries also have caching out of the box.