Title: is_network_only_plugin
Published: April 25, 2014
Last modified: February 24, 2026

---

# is_network_only_plugin( string $plugin ): bool

## In this article

 * [Description](https://developer.wordpress.org/reference/functions/is_network_only_plugin/?output_format=md#description)
 * [Parameters](https://developer.wordpress.org/reference/functions/is_network_only_plugin/?output_format=md#parameters)
 * [Return](https://developer.wordpress.org/reference/functions/is_network_only_plugin/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/functions/is_network_only_plugin/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/is_network_only_plugin/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/is_network_only_plugin/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/functions/is_network_only_plugin/?output_format=md#wp--skip-link--target)

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](https://developer.wordpress.org/reference/functions/is_network_only_plugin/?output_format=md#description)󠁿

Checks for “Site Wide Only: true” for backward compatibility.

## 󠀁[Parameters](https://developer.wordpress.org/reference/functions/is_network_only_plugin/?output_format=md#parameters)󠁿

 `$plugin`stringrequired

Path to the plugin file relative to the plugins directory.

## 󠀁[Return](https://developer.wordpress.org/reference/functions/is_network_only_plugin/?output_format=md#return)󠁿

 bool True if plugin is network only, false otherwise.

## 󠀁[Source](https://developer.wordpress.org/reference/functions/is_network_only_plugin/?output_format=md#source)󠁿

    ```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;
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-admin/includes/plugin.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-admin/includes/plugin.php#L605)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-admin/includes/plugin.php#L605-L611)

## 󠀁[Related](https://developer.wordpress.org/reference/functions/is_network_only_plugin/?output_format=md#related)󠁿

| Uses | Description | 
| [get_plugin_data()](https://developer.wordpress.org/reference/functions/get_plugin_data/)`wp-admin/includes/plugin.php` |

Parses the plugin contents to retrieve plugin’s metadata.

  |

| Used by | Description | 
| [WP_REST_Plugins_Controller::handle_plugin_status()](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/handle_plugin_status/)`wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php` |

Handle updating a plugin’s status.

  | 
| [WP_REST_Plugins_Controller::check_read_permission()](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/check_read_permission/)`wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php` |

Checks if the given plugin can be viewed by the current user.

  | 
| [WP_Plugins_List_Table::single_row()](https://developer.wordpress.org/reference/classes/wp_plugins_list_table/single_row/)`wp-admin/includes/class-wp-plugins-list-table.php` |  | 
| [WP_Plugins_List_Table::prepare_items()](https://developer.wordpress.org/reference/classes/wp_plugins_list_table/prepare_items/)`wp-admin/includes/class-wp-plugins-list-table.php` |  | 
| [activate_plugin()](https://developer.wordpress.org/reference/functions/activate_plugin/)`wp-admin/includes/plugin.php` |

Attempts activation of plugin in a “sandbox” and redirects on success.

  | 
| [is_wpmu_sitewide_plugin()](https://developer.wordpress.org/reference/functions/is_wpmu_sitewide_plugin/)`wp-admin/includes/ms-deprecated.php` |

Deprecated functionality for determining if the current plugin is network-only.

  |

[Show 1 more](https://developer.wordpress.org/reference/functions/is_network_only_plugin/?output_format=md#)
[Show less](https://developer.wordpress.org/reference/functions/is_network_only_plugin/?output_format=md#)

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/is_network_only_plugin/?output_format=md#changelog)󠁿

| Version | Description | 
| [3.0.0](https://developer.wordpress.org/reference/since/3.0.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fis_network_only_plugin%2F)
before being able to contribute a note or feedback.