function cntctfrm_check_and_send() { global $cntctfrm_result, $cntctfrm_options; if (isset($_POST['cntctfrm_contact_action']) && isset($_POST['cntctfrm_language']) || true === $cntctfrm_result) { require_once ABSPATH . 'wp-admin/includes/plugin.php'; if (is_plugin_active('contact-form-multi/contact-form-multi.php') || is_plugin_active('contact-form-multi-pro/contact-form-multi-pro.php')) { if (!isset($_POST['cntctfrmmlt_shortcode_id'])) { $cntctfrm_options = get_option('cntctfrmmlt_options'); } else { $cntctfrm_options = get_option('cntctfrmmlt_options_' . $_POST['cntctfrmmlt_shortcode_id']); } } else { $cntctfrm_options = get_option('cntctfrm_options'); } if (isset($_POST['cntctfrm_contact_action'])) { /* Check all input data */ $cntctfrm_result = cntctfrm_check_form(); } /* If it is good */ if (true === $cntctfrm_result) { $_SESSION['cntctfrm_send_mail'] = true; if (0 == $cntctfrm_options['cntctfrm_action_after_send']) { wp_redirect($cntctfrm_options['cntctfrm_redirect_url']); exit; } } } }
function cntctfrm_check_and_send() { global $cntctfrm_result; $cntctfrm_options = get_option('cntctfrm_options'); if (isset($_POST['cntctfrm_contact_action'])) { /* Check all input data */ $cntctfrm_result = cntctfrm_check_form(); } /* If it is good */ if (true === $cntctfrm_result) { $_SESSION['cntctfrm_send_mail'] = true; if (0 == $cntctfrm_options['cntctfrm_action_after_send']) { wp_redirect($cntctfrm_options['cntctfrm_redirect_url']); exit; } } }