Function: is_network_only_plugin

is_network_only_plugin( string $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 backward compatibility.


Name Type(s) Default Value Description
$plugin string

Path to the main plugin file from plugins directory.



True if plugin is network only, false otherwise.

WordPress Developer Newsletter

Stay on top of the latest WordPress API changes, developer tool updates, security alerts and more.