Hi, Kathy:
By default, wp_get_sites returns the first 100 sites, so any of my sites beyond that weren’t showing up.
I’ve hacked it for now using a limit of 10,000 (the same as large sites) – it might be better to use a smaller limit and loop with offset values until none are returned – although maybe not since it would all end up in one array anyways and we’d have to do concatenation.
Here’s my patch file.
ian.
--- a/wp-content/plugins/network-plugin-auditor/network-plugin-auditor.php
+++ b/wp-content/plugins/network-plugin-auditor/network-plugin-auditor.php
@@ -259,15 +259,17 @@ class NetworkPluginAuditor {
function get_network_blog_list( ) {
global $wpdb;
$blog_list = array();
+
+ $args = array();
+ $args['limit'] = 10000;
if ( function_exists( 'wp_get_sites' ) && function_exists( 'wp_is_large
// If wp_is_large_network() returns TRUE, wp_get_sites() will retur
// By default wp_is_large_network() returns TRUE if there are 10,00
// This can be filtered using the wp_is_large_network filter.
if ( ! wp_is_large_network() ) {
- $blog_list = wp_get_sites();
+ $blog_list = wp_get_sites($args);
}
-
} else {
// Fetch the list from the transient cache if available