Skip to content

Instantly share code, notes, and snippets.

@andrezrv
Created April 7, 2014 19:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrezrv/10039657 to your computer and use it in GitHub Desktop.
Save andrezrv/10039657 to your computer and use it in GitHub Desktop.
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