public

  • Download Gist
gplus-authorship-tweaks.php
PHP
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
<?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!

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.

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.