Multisite: Fix `wp_get_sites()` to return an unlimited amount of sites when passing a falsy `limit` argument.

Props iandunn for the original patch.
Fixes #39879. See #35791.


git-svn-id: https://develop.svn.wordpress.org/trunk@40372 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
flixos90 2017-04-03 23:43:00 +00:00
parent 707bf79a9b
commit 54eb8900dd
1 changed files with 3 additions and 0 deletions

View File

@ -497,6 +497,9 @@ function wp_get_sites( $args = array() ) {
if( is_numeric( $args['limit'] ) ){
$args['number'] = $args['limit'];
$args['limit'] = null;
} elseif ( ! $args['limit'] ) {
$args['number'] = 0;
$args['limit'] = null;
}
// Make sure count is disabled.