Skip to content

Instantly share code, notes, and snippets.

@AaronHolbrook
Last active February 2, 2016 12:21
Show Gist options
  • Save AaronHolbrook/874e03ec4c3652be0776 to your computer and use it in GitHub Desktop.
Save AaronHolbrook/874e03ec4c3652be0776 to your computer and use it in GitHub Desktop.
Disable jetpack tools
<?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