jetpack_sharing_twitter_via

This action is documented in modules/sharedaddy/sharing-sources.php.

Description

apply_filters( 'jetpack_sharing_twitter_via', (string) $twitter_site_tag_value, (int) $post_id ); 

Parameters (2)

0. $twitter_site_tag_value (string)
The twitter site tag value.
1. $post_id (int)
The post id.

Usage

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

Defined (3)

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

/modules/sharedaddy/sharing-sources.php  
  1. $twitter_site_tag_value = apply_filters( 'jetpack_sharing_twitter_via', $twitter_site_tag_value, $post->ID ); 
/class.jetpack-twitter-cards.php  
  1. $site_tag = apply_filters( 'jetpack_sharing_twitter_via', $site_tag, ( is_singular() ? $post->ID : null ) ); 
  1. $handle = apply_filters( 'jetpack_sharing_twitter_via', '', $post->ID );