jetpack_development_version

Allows filtering whether this is a development version of Jetpack.

Description

apply_filters( 'jetpack_development_version', (bool) $preg_match_d_d_jetpack_constants_get_constant_jetpack_version ); 

This filter is especially useful for tests.

Parameters (1)

0. $preg_match_d_d_jetpack_constants_get_constant_jetpack_version (bool) => ! preg_match( '/^\d+(\.\d+)+$/', Jetpack_Constants::get_constant( 'JETPACK__VERSION' ) )
The preg match d d jetpack constants get constant jetpack version.

Usage

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

Defined (1)

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

/class.jetpack.php  
  1. return (bool) apply_filters(