Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Override Jetpack development mode to activate modules for testing in WordPress
/**
* 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