diff --git a/network-plugin-auditor.php b/network-plugin-auditor.php index 2d7012f..7b329d6 100644 --- a/network-plugin-auditor.php +++ b/network-plugin-auditor.php @@ -96,9 +96,9 @@ function manage_plugins_custom_column( $column_name, $plugin_file, $plugin_data $blog_details = get_blog_details( $blog_id, true ); - if ( isset( $blog_details->siteurl ) && isset( $blog_details->blogname ) ) { + if ( isset( $blog_details->siteurl ) ) { $blog_url = $blog_details->siteurl; - $blog_name = $blog_details->blogname; + $blog_name = ! empty( $blog_details->blogname ) ? $blog_details->blogname : $blog_details->siteurl; $blog_state = ''; $style = ''; @@ -294,10 +294,10 @@ static function get_network_blog_list( ) { if ( function_exists( 'get_sites' ) && function_exists( 'wp_is_large_network' ) ) { // number for get_sites(), uses the wp_is_large_network upper limit - $args = apply_filters( 'npa_get_network_blog_list_args', array( - 'number' => 10000 + $args = apply_filters( 'npa_get_network_blog_list_args', array( + 'number' => 10000 ) ); - + // If wp_is_large_network() returns TRUE, get_sites() will return an empty array. // By default wp_is_large_network() returns TRUE if there are 10,000 or more sites in your network. // This can be filtered using the wp_is_large_network filter. @@ -307,9 +307,9 @@ static function get_network_blog_list( ) { } else if ( function_exists( 'wp_get_sites' ) && function_exists( 'wp_is_large_network' ) ) { // limit for wp_get_sites(), uses the wp_is_large_network upper limit - $args = apply_filters( 'npa_get_network_blog_list_args', array( + $args = apply_filters( 'npa_get_network_blog_list_args', array( 'network_id' => null, // all networks - 'limit' => 10000 + 'limit' => 10000 ) ); // If wp_is_large_network() returns TRUE, wp_get_sites() will return an empty array. @@ -512,9 +512,9 @@ static function get_theme_link( $blog_id, $display='blog' ) { $blog_details = get_blog_details( $blog_id, true ); - if ( isset( $blog_details->siteurl ) && isset( $blog_details->blogname ) ) { + if ( isset( $blog_details->siteurl ) ) { $blog_url = $blog_details->siteurl; - $blog_name = $blog_details->blogname; + $blog_name = ! empty( $blog_details->blogname ) ? $blog_details->blogname : $blog_details->siteurl; $blog_state = ''; $style = '';