Last active
February 2, 2016 12:21
-
-
Save AaronHolbrook/874e03ec4c3652be0776 to your computer and use it in GitHub Desktop.
Disable jetpack tools
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 | |
/** | |
* Disable certain tools in jetpack that can cause issues | |
*/ | |
add_filter( 'jetpack-tools-to-include', function( $tools ) { | |
$disabled_array = [ | |
'theme-tools/random-redirect.php', | |
'holiday-snow.php', | |
]; | |
foreach ( $disabled_array as $disabled_item ) { | |
$key = array_search( $disabled_item, $tools ); | |
if ( false !== $key ) { | |
unset( $tools[ $key ] ); | |
} | |
} | |
return $tools; | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment