Last active
November 18, 2015 20:59
-
-
Save frozzare/a976bc1bcb15d1c81156 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Force enable a plugin. | |
* | |
* @param array $plugins | |
* | |
* @return array | |
*/ | |
add_filter( 'option_active_plugins', function ( $plugins ) { | |
return array_merge( $plugins, [ | |
'akismet/akismet.php' | |
] ); | |
} ); | |
/** | |
* Force network enable a pugin. | |
* | |
* @param array $plugins | |
* | |
* @return array | |
*/ | |
add_filter( 'site_option_active_sitewide_plugins', function ( $plugins ) { | |
return array_merge( $plugins, [ | |
'akismet/akismet.php' | |
] ); | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment