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.

Built from https://develop.svn.wordpress.org/trunk@40372


git-svn-id: http://core.svn.wordpress.org/trunk@40279 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Felix Arntz 2017-04-05 02:18:43 +00:00
parent 58b810e9eb
commit a212ed8e25
2 changed files with 4 additions and 1 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.

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.8-alpha-40371';
$wp_version = '4.8-alpha-40372';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.