Make WordPress Core


Ignore:
Timestamp:
06/28/2016 09:27:41 PM (8 years ago)
Author:
jeremyfelt
Message:

Multisite: Introduce get_networks().

get_networks() is a wrapper for WP_Network_Query.

Props flixos90.
See #32504.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/ms-blogs.php

    r37894 r37895  
    10731073
    10741074/**
     1075 * Retrieves a list of networks.
     1076 *
     1077 * @since 4.6.0
     1078 *
     1079 * @param string|array $args Optional. Array or string of arguments. See {@see WP_Network_Query::parse_query()}
     1080 *                           for information on accepted arguments. Default empty.
     1081 * @return int|array List of networks or number of found networks if `$count` argument is true.
     1082 */
     1083function get_networks( $args = '' ) {
     1084    $query = new WP_Network_Query();
     1085
     1086    return $query->query( $args );
     1087}
     1088
     1089/**
    10751090 * Retrieves network data given a network ID or network object.
    10761091 *
Note: See TracChangeset for help on using the changeset viewer.