sharing_email_check

Allow plugins to stop the email sharing button from running the shared message through Akismet.

Description

apply_filters( 'sharing_email_check', (bool) $true, (object) $post, (array) $post_data ); 

Parameters (3)

0. $true (bool)
True Should we check if the message isn't spam?
1. $post (object)
Post information.
2. $post_data (array)
Information about the shared message.

Usage

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

Defined (1)

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

/modules/sharedaddy/sharing-sources.php  
  1. if ( apply_filters( 'sharing_email_check', true, $post, $post_data ) ) {