*/ /** * Enable Localization. */ function arcf_textdomain() { load_plugin_textdomain( 'antirobot-contact-form', false, basename( dirname( __FILE__ ) ) . '/languages/' ); } add_action( 'plugins_loaded', 'arcf_textdomain' ); /** * Contact Form Frontend Code. */ function arcf_frontend() { ?>
', 'antirobot-contact-form' ), $sender_name, $sender_email ); $sender_message .= "\r\n\r\n"; $sender_message .= sanitize_text_field( $_POST['arcf-message'] ); $admin_message = sprintf( /* translators: 1: Admin E-Mail 2: WordPress URL */ __( 'You successfully sent the following message to %1$s (via %2$s)', 'antirobot-contact-form' ), $admin_email, get_bloginfo( 'url' ) ); $admin_message .= "\r\n\r\n"; $admin_message .= sanitize_text_field( $_POST['arcf-message'] ); $admin_subject = __( 'You successfully sent us an E-Mail!', 'antirobot-contact-form' ); $admin_headers[] = "From: $admin_email"; $admin_headers[] = "Reply-To: $admin_email"; $sender_headers[] = "From: $sender_name <$sender_email>"; $sender_headers[] = "Reply-To: $sender_name <$sender_email>"; $privatekey = sanitize_text_field( get_option( 'arcf_privatekey' ) ); $captcha = null; // Verify that a POST Request was issued to reCAPTCHA ... ! empty( $_POST['g-recaptcha-response'] ) ? $captcha = $_POST['g-recaptcha-response'] : null; // ... if not, throw an Error ... if ( empty( $captcha ) ) { echo '' . __( 'Please solve the reCAPTCHA before submitting the form.', 'antirobot-contact-form' ) . '
' . __( 'reCAPTCHA did not authorize your request. Make sure your keys are correct.', 'antirobot-contact-form' ) . '
' . __( 'Mail Delivery with wp_mail() failed. Is your web server configuration allowing to send mails?', 'antirobot-contact-form' ) . '
[antirobot_contact_form] on pages or posts to display the contact form.', 'antirobot-contact-form' ); ?>
leave a review and spread the word. If you want to support my coffee addiction, you can tip me on paypal.
', 'antirobot-contact-form' ); ?>