apply_filters ( 'jetpack_get_default_modules', array $return, string $min_version, string $max_version )

Filters the array of default modules.

Source file: class.jetpack.php

View in GitHub

Parameters

$return

(array) Array of default modules.

$min_version

(string) Minimum version number required to use modules.

$max_version

(string) Maximum version number required to use modules.


Changelog

Since: Jetpack 2.5.0


Notes

You can use this filter to choose which modules are activated by default.

Do not activate any modules by default

add_filter( 'jetpack_get_default_modules', '__return_empty_array' );

Only activate Stats by default

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

Have a note to contribute?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s