Created
October 12, 2015 22:16
-
-
Save kraftbj/6814311228aa5ce9b362 to your computer and use it in GitHub Desktop.
Auto-activating Jetpack modules
This file contains 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 | |
/* | |
* Plugin Name: DS.LC Force Jetpack Modules | |
* Plugin URI: http://jetpack.me | |
* Description: Custom plugin to enable exact set of Jetpack Modules | |
* Author: Brandon Kraft | |
* Version: 1.0.0 | |
* Author URI: https://kraft.im/ | |
* License: GPL2+ | |
*/ | |
function dslc_auto_activate_sso( $modules ) { | |
if ( ! in_array( 'sso', $modules ) ) { | |
$modules[] = 'sso'; | |
} | |
return $modules; | |
} | |
add_filter( 'jetpack_get_default_modules', 'dslc_auto_activate_sso' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment