Created
April 7, 2014 19:50
-
-
Save andrezrv/10039657 to your computer and use it in GitHub Desktop.
Disallow Jetpack modules.
This file contains hidden or 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 | |
/** | |
* 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