Multisite: Document all return types in get_networks().

Adds more complete documentation to get_networks() and the corresponding methods in WP_Network_Query.

Fixes #42260.


git-svn-id: https://develop.svn.wordpress.org/trunk@41918 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Felix Arntz
2017-10-18 18:12:20 +00:00
parent a540d91f8f
commit 4124fbfa7c
2 changed files with 6 additions and 3 deletions
+4 -2
View File
@@ -170,7 +170,8 @@ class WP_Network_Query {
* @since 4.6.0
*
* @param string|array $query Array or URL query string of parameters.
* @return array|int List of networks, or number of networks when 'count' is passed as a query var.
* @return array|int List of WP_Network objects, a list of network ids when 'fields' is set to 'ids',
* or the number of networks when 'count' is passed as a query var.
*/
public function query( $query ) {
$this->query_vars = wp_parse_args( $query );
@@ -182,7 +183,8 @@ class WP_Network_Query {
*
* @since 4.6.0
*
* @return int|array The list of networks.
* @return array|int List of WP_Network objects, a list of network ids when 'fields' is set to 'ids',
* or the number of networks when 'count' is passed as a query var.
*/
public function get_networks() {
$this->parse_query();