Forked from georgestephanis/gplus-authorship-tweaks.php
Last active
December 23, 2015 15:08
-
-
Save jeherve/6653059 to your computer and use it in GitHub Desktop.
[Jetpack] Do not automatically activate the Widget Visibility module
This file contains 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 | |
// To disable the auto-activation of Jetpack's Widget Visibility module: | |
add_filter( 'jetpack_get_default_modules', 'disable_jetpack_widget_visibility_autoactivate' ); | |
function disable_jetpack_widget_visibility_autoactivate( $modules ) { | |
return array_diff( $modules, array( 'widget-visibility' ) ); | |
} | |
// Or, to disable the functionality in your own plugin if the user activates it in Jetpack: | |
if ( ! class_exists( 'Jetpack' ) || ! Jetpack::is_module_active( 'widget-visibility' ) ) { | |
// 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! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment