mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
Multisite: Introduce get_networks()
.
`get_networks()` is a wrapper for `WP_Network_Query`. Props flixos90. See #32504. Built from https://develop.svn.wordpress.org/trunk@37895 git-svn-id: http://core.svn.wordpress.org/trunk@37836 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
f111fdb69a
commit
b99a31d35c
@ -1071,6 +1071,21 @@ function get_last_updated( $deprecated = '', $start = 0, $quantity = 40 ) {
|
||||
return $wpdb->get_results( $wpdb->prepare("SELECT blog_id, domain, path FROM $wpdb->blogs WHERE site_id = %d AND public = '1' AND archived = '0' AND mature = '0' AND spam = '0' AND deleted = '0' AND last_updated != '0000-00-00 00:00:00' ORDER BY last_updated DESC limit %d, %d", $wpdb->siteid, $start, $quantity ) , ARRAY_A );
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a list of networks.
|
||||
*
|
||||
* @since 4.6.0
|
||||
*
|
||||
* @param string|array $args Optional. Array or string of arguments. See {@see WP_Network_Query::parse_query()}
|
||||
* for information on accepted arguments. Default empty.
|
||||
* @return int|array List of networks or number of found networks if `$count` argument is true.
|
||||
*/
|
||||
function get_networks( $args = '' ) {
|
||||
$query = new WP_Network_Query();
|
||||
|
||||
return $query->query( $args );
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves network data given a network ID or network object.
|
||||
*
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.6-alpha-37894';
|
||||
$wp_version = '4.6-alpha-37895';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user