Created
September 12, 2018 17:06
-
-
Save ChrisHardie/4979d28dd5bde9c5504336008fec8a42 to your computer and use it in GitHub Desktop.
Override Jetpack development mode to activate modules for testing in WordPress
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
/** | |
* Modify Jetpack module properties for testing/development | |
* | |
* @param array $mod Module to look at modifying the properties of. | |
* @return boolean | |
*/ | |
function jp_module_override( $mod ) { | |
switch ( $mod['name'] ) { | |
case 'Related posts': | |
$mod['requires_connection'] = false; | |
break; | |
} | |
return $mod; | |
} | |
add_filter( 'jetpack_get_module', 'jp_module_override' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment