mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Multisite: Introduce WP_Site_Query
Provides a consistent way to query `$wpdb->blogs` for `WP_Site` objects based on domain, path, site ID, network ID, and more. Introduces and uses `update_site_cache()` and `_prime_site_caches()` to maintain a cached list of `WP_Site` objects for use in multiple queries. Props spacedmonkey, flixos90, DrewAPicture, jeremyfelt, ocean90. See #35791. git-svn-id: https://develop.svn.wordpress.org/trunk@37477 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -491,7 +491,7 @@ class WP_Date_Query {
|
||||
$valid_columns = array(
|
||||
'post_date', 'post_date_gmt', 'post_modified',
|
||||
'post_modified_gmt', 'comment_date', 'comment_date_gmt',
|
||||
'user_registered',
|
||||
'user_registered', 'registered', 'last_updated',
|
||||
);
|
||||
|
||||
// Attempt to detect a table prefix.
|
||||
@@ -525,6 +525,10 @@ class WP_Date_Query {
|
||||
$wpdb->users => array(
|
||||
'user_registered',
|
||||
),
|
||||
$wpdb->blogs => array(
|
||||
'registered',
|
||||
'last_updated',
|
||||
),
|
||||
);
|
||||
|
||||
// If it's a known column name, add the appropriate table prefix.
|
||||
|
||||
Reference in New Issue
Block a user