jetpack_get_default_modules

Filters the array of default modules.

Description

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

Parameters (3)

0. $return (array)
Array of default modules.
1. $min_version (string)
Minimum version number required to use modules.
2. $max_version (string)
Maximum version number required to use modules.

Usage

To run the hook, copy the example below.
  1. $return = apply_filters( 'jetpack_get_default_modules', $return, $min_version, $max_version ); 
  2.  
  3. if ( !empty( $return ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the jetpack_get_default_modules callback 
  2. function filter_jetpack_get_default_modules( $return, $min_version, $max_version ) { 
  3. // make filter magic happen here... 
  4. return $return
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'jetpack_get_default_modules', 'filter_jetpack_get_default_modules', 10, 3 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'jetpack_get_default_modules', 'filter_jetpack_get_default_modules', 10, 3 ); 

Defined (1)

The filter is defined in the following location(s).

/class.jetpack.php  
  1. return apply_filters( 'jetpack_get_default_modules', $return, $min_version, $max_version );