コード例 #1
0
 function esu_spam_check()
 {
     $esu_check_nonce = self::esu_check_nonce();
     $esu_post_vars = $esu_check_nonce;
     $use_akismet = get_option('easy_sign_up_use_askismet');
     if (!esuAkismet::esu_has_akismet() or $use_akismet == false) {
         $is_spam = false;
         $has_akismet = false;
     } else {
         $is_spam = esuAkismet::is_akismet_spam($esu_post_vars);
         $has_akismet = true;
     }
     $honeypot = self::esu_use_honeypot();
     if ($honeypot != false) {
         $honeypot_value = trim($esu_post_vars['extra_fields'][$honeypot]);
     } else {
         $honeypot_value = false;
     }
     if ($honeypot_value != false) {
         $bot_message = __('Hello there, <br>Rex our automated bot detector thinks you may be a pesky robot! Super sorry if this is an error. Perhaps you are using an autofill add-on or something similar. If so please fill out the form manually and we should all be able to get on with our day. Cheerio!  ;-)', 'easy-sign-up');
         wp_die($bot_message, 'Domo Arigato, Mr. Roboto', array('back_link' => true));
     }
     // This is done to clean up if the honeypot field before sending the responders
     if ($honeypot != false) {
         if (isset($esu_post_vars['extra_fields']) && array_key_exists($honeypot, $esu_post_vars['extra_fields'])) {
             unset($esu_post_vars['extra_fields'][$honeypot]);
         }
     }
     // create hooks for use by extras or 3rd party plugins
     do_action('esu_hook_before_process_email', $esu_post_vars);
     do_action('esu_hook_process_email', $esu_post_vars, $is_spam, $has_akismet);
 }
コード例 #2
0
 function esu_spam_check()
 {
     $esu_check_nonce = self::esu_check_nonce();
     $esu_post_vars = $esu_check_nonce;
     $use_akismet = get_option('easy_sign_up_use_askismet');
     if (!esuAkismet::esu_has_akismet() or $use_akismet == false) {
         $is_spam = false;
         $has_akismet = false;
     } else {
         $is_spam = esuAkismet::is_akismet_spam($esu_post_vars);
         $has_akismet = true;
     }
     // add hooks for use by extras or plugins
     do_action('esu_hook_before_process_email', $esu_post_vars);
     do_action('esu_hook_process_email', $esu_post_vars, $is_spam, $has_akismet);
 }