Uses
Uses | Description |
---|---|
wp-admin/includes/plugin.php: get_plugin_data() | Parses the plugin contents to retrieve plugin’s metadata. |
Checks for “Network: true” in the plugin header to see if this should be activated only as a network wide plugin. The plugin would also work when Multisite is not enabled.
Checks for "Site Wide Only: true" for backward compatibility.
(string) (Required) Path to the plugin file relative to the plugins directory.
(bool) True if plugin is network only, false otherwise.
File: wp-admin/includes/plugin.php
function is_network_only_plugin( $plugin ) { $plugin_data = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin ); if ( $plugin_data ) { return $plugin_data['Network']; } return false; }
Version | Description |
---|---|
3.0.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/is_network_only_plugin