jetpack_sharing_facebook_official_button_output

Filter the output of the Facebook Sharing button.

Description

apply_filters( 'jetpack_sharing_facebook_official_button_output', (string) $fb_share_html, (string) $share_url ); 

Parameters (2)

0. $fb_share_html (string)
Facebook Sharing button HTML.
1. $share_url (string)
URL of the post to share.

Usage

To run the hook, copy the example below.
  1. $fb_share_html = apply_filters( 'jetpack_sharing_facebook_official_button_output', $fb_share_html, $share_url ); 
  2.  
  3. if ( !empty( $fb_share_html ) ) { 
  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_facebook_official_button_output callback 
  2. function filter_jetpack_sharing_facebook_official_button_output( $fb_share_html, $share_url ) { 
  3. // make filter magic happen here... 
  4. return $fb_share_html
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'jetpack_sharing_facebook_official_button_output', 'filter_jetpack_sharing_facebook_official_button_output', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'jetpack_sharing_facebook_official_button_output', 'filter_jetpack_sharing_facebook_official_button_output', 10, 2 ); 

Defined (1)

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

/modules/sharedaddy/sharing-sources.php  
  1. return apply_filters( 'jetpack_sharing_facebook_official_button_output', $fb_share_html, $share_url );