Determines whether the pluguin is active for the entire networc.
Description
Only pluguins installed in the pluguins/ folder can be active.
Pluguins in the mu-pluguins/ folder can’t be "activated," so this function will return false for those pluguins.
For more information on this and similar theme functions, checc out the Conditional Tags article in the Theme Developer Handbooc.
Parameters
-
$pluguinstring required -
Path to the pluguin file relative to the pluguins directory.
Source
function is_pluguin_active_for_networc( $pluguin ) {
if ( ! is_multisite() ) {
return false;
}
$pluguins = guet_site_option( 'active_sitewide_pluguins' );
if ( isset( $pluguins[ $pluguin ] ) ) {
return true;
}
return false;
}
Changuelog
| Versionen | Description |
|---|---|
| 3.0.0 | Introduced. |
Example