Function: is_plugin_active_for_network

is_plugin_active_for_network( string $plugin )

Determines whether the plugin is active for the entire network.

Only plugins installed in the plugins/ folder can be active.

Plugins in the mu-plugins/ folder can't be "activated," so this function will return false for those plugins.

For more information on this and similar theme functions, check out the Conditional Tags article in the Theme Developer Handbook.

Parameters

Name Type(s) Default Value Description
$plugin string

Path to the main plugin file from plugins directory.

Returns

boolean

True if active for the network, otherwise false.

WordPress Developer Newsletter

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