jetpack_publicize_global_connections_cap

Filter the capability to change global Publicize connection options.

Description

apply_filters( 'jetpack_publicize_global_connections_cap', (string) $this_global_cap ); 

All users with this cap can unglobalize all other global connections, and globalize any of their own Globalized connections cannot be unselected by users without this capability when publishing.

Parameters (1)

0. $this_global_cap (string)
Default capability in control of global Publicize connection options. Default to edit_others_posts.

Usage

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

Defined (1)

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

/modules/publicize/publicize.php  
  1. $this->GLOBAL_CAP = apply_filters( 'jetpack_publicize_global_connections_cap', $this->GLOBAL_CAP );