Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Disallow Jetpack modules.
<?php
/**
* Blacklist Jetpack modules.
*/
function blacklist_jetpack_modules( $modules ){
$jp_mods_to_disable = array(
'contact-form',
'shortlinks',
);
foreach ( $jp_mods_to_disable as $mod ) {
if ( isset( $modules[$mod] ) ) {
unset( $modules[$mod] );
}
}
return $modules;
}
add_filter( 'jetpack_get_available_modules', 'blacklist_jetpack_modules' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment