acf_get_visitor_ip(); $this->settings = $acf_core_loader->settings; $output = ''; if ($output == '') { $headers = 'Content-type: text/html'; $info = array( 'IP' => $ip, 'DATE' => date('r'), 'REFERRER' => $referrer, 'MESSAGE' => stripcslashes($_REQUEST['message']), 'NAME' => strip_tags(stripcslashes($_REQUEST['name'])), 'EMAIL' => strip_tags(stripcslashes($_REQUEST['email'])), 'URL' => strip_tags(stripcslashes($_REQUEST['url'])) ); $content = ''; $content = 'DATE: '.$info['DATE'].'
'. 'IP: '.$info['IP'].'
'. 'NAME: '.$info['NAME'].'
'. 'EMAIL: '.$info['EMAIL'].'
'. 'MESSAGE: '.$info['MESSAGE'].'
'. 'URL: '.$info['URL'].'
'; $subject = $this->settings['emailsubject']; $target = get_option('admin_email'); if ($this->settings['duplicateemail']) { $target = $target .','. $info['email']; } $res = wp_mail($target, $subject, $content, $headers); if ($res) { $output = 'success'; } } header('content-type: application/json; charset=utf-8'); die(json_encode(array('response' => $output))); } } ?>