Jetpack

Jetpack

Last updated 3 months ago

Enable Development Mode:

PHP
// WP-Config Method.
define( 'JETPACK_DEV_DEBUG', true);

// Filter Method.
add_filter( 'jetpack_development_mode', '__return_true' );

Choose modules to be activated by default:

PHP
function hlabs_auto_activate_jetpack_modules() {
    return array( 'stats' );
}
add_filter( 'jetpack_get_default_modules', 'hlabs_auto_activate_jetpack_modules' );

Deactivate All Jetpack Modules by Default

PHP
add_filter( 'jetpack_get_default_modules', '__return_empty_array' );

Completely Hide Modules from the Jetpack Page

PHP
function hlabs_hide_jetapack_modules( $modules ) {
    unset( $modules['stats'] );
    return $modules;
}
add_filter( 'jetpack_get_available_modules', 'hlabs_hide_jetapack_modules' );

Turn off Jetpack publish by default:

PHP
add_filter( 'publicize_checkbox_default', '__return_false');

Tags: #Jetpack

All code snippets are licensed GPLv2 or later unless otherwise stated.