function is_network_only_plugin( $plugin ) {}

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 backwards compatibility.


  • string $plugin: Plugin to check

Return values

returns:True if plugin is network only, false otherwise.

Source code

function is_network_only_plugin( $plugin ) {

	$plugin_data = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin );

	if ( $plugin_data )

		return $plugin_data['Network'];

	return false;



No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: