function wp_get_active_network_plugins() { $active_plugins =
(array) get_site_option( 'active_sitewide_plugins', array
() );
if ( empty( $active_plugins ) ) { return array
();
} $plugins = array
();
$active_plugins =
array_keys( $active_plugins );
sort( $active_plugins );
foreach ( $active_plugins as $plugin ) { if ( !
validate_file( $plugin ) // $plugin must validate as file.
&&
str_ends_with( $plugin, '.php'
) // $plugin must end with '.php'.
&&
file_exists( WP_PLUGIN_DIR . '/' .
$plugin ) // $plugin must exist.
) { $plugins[] = WP_PLUGIN_DIR . '/' .
$plugin;
} } return $plugins;
}/**
* Checks status of current blog.
*
* Checks if the blog is deleted, inactive, archived, or spammed.
*
* Dies with a default message if the blog does not pass the check.
*
* To change the default message when a blog does not pass the check,
* use the wp-content/blog-deleted.php, blog-inactive.php and
* blog-suspended.php drop-ins.
*
* @since 3.0.0
*
* @return true|string Returns true on success, or drop-in file to include.
*/