is_network_only_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.

Description

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.

Usage

$bool = is_network_only_plugin( $plugin );

Parameters

$plugin
( string ) required – Path to the plugin file relative to the plugins directory.

Returns

bool True if plugin is network only, false otherwise.

Source

File name: wordpress/wp-admin/includes/plugin.php
Lines:

1 to 7 of 7
function is_network_only_plugin( $plugin ) {
  $plugin_data = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin );
  if ( $plugin_data ) {
    return $plugin_data['Network'];
  }
  return false;
}
 

 View on GitHub View on Trac

Called by

    Invoked by

      Calls

      Call hooks

      API Letters: ,,,