jetpack_module_feature

Filters the feature array on a module.

Description

apply_filters( 'jetpack_module_feature', (array) $mod_feature, (string) $module, (array) $mod ); 

This filter allows you to control where each module is filtered: Recommended, Jumpstart, and the default Other listing.

Parameters (3)

0. $mod_feature (array)
The areas to feature this module:
1. $module (string)
The slug of the module, e.g. sharedaddy.
2. $mod (array)
All the currently assembled module data.

Usage

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

Defined (1)

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

/class.jetpack.php  
  1. $mod['feature'] = apply_filters( 'jetpack_module_feature', $mod['feature'], $module, $mod );