From a212ed8e252dba5eef4c241f724e21a9b8c96aae Mon Sep 17 00:00:00 2001 From: Felix Arntz Date: Wed, 5 Apr 2017 02:18:43 +0000 Subject: [PATCH] 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 --- wp-includes/ms-deprecated.php | 3 +++ wp-includes/version.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/wp-includes/ms-deprecated.php b/wp-includes/ms-deprecated.php index cd35f55c63..3d06dab9fb 100644 --- a/wp-includes/ms-deprecated.php +++ b/wp-includes/ms-deprecated.php @@ -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. diff --git a/wp-includes/version.php b/wp-includes/version.php index c50f431d5d..c7bd8aea01 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.