jetpack_auth_type

Filter the type of authorization.

Description

apply_filters( 'jetpack_auth_type', (string) $calypso ); 

'calypso' completes authorization on wordpress.com/jetpack/connect while jetpack ( or any other value ) completes the authorization at jetpack.wordpress.com.

Parameters (1)

0. $calypso (string) => 'calypso'
Defaults to calypso,, can also be jetpack..

Usage

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

Defined (1)

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

/class.jetpack.php  
  1. $auth_type = apply_filters( 'jetpack_auth_type', 'calypso' );