grunion_check_for_spam_button

Add the "Check for Spam" button to the Feedbacks dashboard page.

Description

grunion_check_for_spam_button(); 

Usage

  1. if ( !function_exists( 'grunion_check_for_spam_button' ) ) { 
  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_check_for_spam_button(); 
  7.  

Defined (1)

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

/modules/contact-form/admin.php  
  1. function grunion_check_for_spam_button() { 
  2. // Get HTML for the button 
  3. $button_html = get_submit_button( 
  4. __( 'Check for Spam', jetpack ),  
  5. 'secondary',  
  6. 'jetpack-check-feedback-spam',  
  7. false,  
  8. array( 'class' => 'jetpack-check-feedback-spam' ) 
  9. ); 
  10. $button_html .= '<span class="jetpack-check-feedback-spam-spinner"></span>'; 
  11.  
  12. // Add the button next to the filter button via js 
  13. ?> 
  14. <script type="text/javascript"> 
  15. jQuery( function( $ ) { 
  16. $( '#posts-filter #post-query-submit' ).after( '<?php echo $button_html; ?>' ); 
  17. } ); 
  18. </script> 
  19. <?php