'; } add_action('admin_head', 'stats_function'); } define("captcha_enabled", false);//enable captcha? true for yes and false for no define("captcha_public_key", "your_public_key_here");//captcha public key define("captcha_private_key", "your_private_key_here");//captcha private key function alex_contact_form_shortcode_function() { ?> is_valid) { $message = "Hey!, Admin!. \n Someone used your contact form on your website!\n here's the details below: \n " . "Their Name: " . sanitize_text_field(strip_tags($_POST["your_name"])) . "\n Their Email: " . sanitize_text_field(strip_tags($_POST["your_email"])) . "\n Their IP Address: " . $_SERVER['REMOTE_ADDR'] . "\n Their User Agent: " . sanitize_text_field(strip_tags($_SERVER['HTTP_USER_AGENT'])) . "\n Their Message: " . sanitize_text_field(strip_tags($_POST["your_message"])); wp_mail(get_option('admin_email'),'Your Contact Form', $message); echo "Thank You!, Your message has been sent!"; } else { # set the error code so that we can display it $error = $resp->error; } } } else { $message = "Hey!, Admin!. \n Someone used your contact form on your website!\n here's the details below: \n " . "Their Name: " . sanitize_text_field(strip_tags($_POST["your_name"])) . "\n Their Email: " . sanitize_text_field(strip_tags($_POST["your_email"])) . "\n Their IP Address: " . $_SERVER['REMOTE_ADDR'] . "\n Their User Agent: " . sanitize_text_field(strip_tags($_SERVER['HTTP_USER_AGENT'])) . "\n Their Message: " . sanitize_text_field(strip_tags($_POST["your_message"])); wp_mail(get_option('admin_email'),'Your Contact Form', $message); echo "Thank You!, Your message has been sent!"; } } ?>







'; echo "Hey!, To have a contact form appear on any page or post, simply paste the following without quotes: '[alex-contact-form]' after that, an easy contact form will appear on your website."; echo ''; } add_action('admin_menu', 'alex_contact_plugin_menu'); ?>