Uses
| Uses | Description |
|---|---|
| wp-includes/load.php: is_multisite() | If Multisite is enabled. |
| wp-includes/ms-load.php: wp_get_active_network_plugins() | Returns array of network plugin files to be included in global scope. |
Checks whether the given extension a network activated plugin.
(array) (Required) Extension data.
(bool) True if network plugin, false otherwise.
File: wp-includes/class-wp-recovery-mode.php
protected function is_network_plugin( $extension ) {
if ( 'plugin' !== $extension['type'] ) {
return false;
}
if ( ! is_multisite() ) {
return false;
}
$network_plugins = wp_get_active_network_plugins();
foreach ( $network_plugins as $plugin ) {
if ( 0 === strpos( $plugin, $extension['slug'] . '/' ) ) {
return true;
}
}
return false;
} | Version | Description |
|---|---|
| 5.2.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_recovery_mode/is_network_plugin