grunion_enable_spam_recheck

Add the scripts that will add the "Check for Spam" button to the Feedbacks dashboard page.

Description

grunion_enable_spam_recheck(); 

Usage

  1. if ( !function_exists( 'grunion_enable_spam_recheck' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'jetpack-by-wordpress-com/modules/contact-form/admin.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = grunion_enable_spam_recheck(); 
  7.  

Defined (1)

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

/modules/contact-form/admin.php  
  1. function grunion_enable_spam_recheck() { 
  2. if ( ! defined( 'AKISMET_VERSION' ) ) { 
  3. return; 
  4.  
  5. $screen = get_current_screen(); 
  6.  
  7. // Only add to feedback, only to non-spam view 
  8. if ( 'edit-feedback' != $screen->id || ( ! empty( $_GET['post_status'] ) && 'spam' == $_GET['post_status'] ) ) { 
  9. return; 
  10.  
  11. // Add the scripts that handle the spam check event. 
  12. wp_register_script( 'grunion-admin', plugin_dir_url( __FILE__ ) . 'js/grunion-admin.js', array( 'jquery' ) ); 
  13. wp_enqueue_script( 'grunion-admin' ); 
  14.  
  15. wp_enqueue_style( 'grunion.css' ); 
  16.  
  17. // Add the actual "Check for Spam" button.