Skip to content

Instantly share code, notes, and snippets.

@georgestephanis
Created September 18, 2013 17:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save georgestephanis/6612677 to your computer and use it in GitHub Desktop.
Save georgestephanis/6612677 to your computer and use it in GitHub Desktop.
<?php
// To disable the auto-activation of Jetpack's Google Plus Authorship module:
add_filter( 'jetpack_get_default_modules', 'disable_jetpack_gplus_authorship_autoactivate' );
function disable_jetpack_gplus_authorship_autoactivate( $modules ) {
return array_diff( $modules, array( 'gplus-authorship' ) );
}
// Or, to disable the functionality in your own plugin if the user activates it in Jetpack:
if ( ! class_exists( 'Jetpack' ) || ! Jetpack::is_module_active( 'gplus-authorship' ) ) {
// It's not there, do as you like!
}
// If you'd like to join the Jetpack Beta Group, drop us a line @jetpack on Twitter!
@dhollings
Copy link

If I want this to work on a multisite install, what do I do?

Say I want no Jetpack Modules auto-activated?

add_filter( 'jetpack_get_default_modules', '__return_empty_array' );

Is the code above correct for Multisite, and where do I place this code?

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment