Created
September 18, 2014 16:34
-
-
Save edheltzel/d7dde441ab17645468ec to your computer and use it in GitHub Desktop.
redirect for contact form 7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ADD TO FUNCTIONS.PHP OR require get_template_directory() . '/inc/custom_fuctions.php'; | |
<?php | |
add_action('wpcf7_mail_sent', 'rdm_wpcf7_mail_sent'); | |
function rdm_wpcf7_mail_sent($wpcf7) | |
{ | |
$on_sent_ok = $wpcf7->additional_setting('rdm_on_sent_ok', false); | |
if (is_array($on_sent_ok) && count($on_sent_ok) > 0) | |
{ | |
wp_redirect(trim($on_sent_ok[0])); | |
exit; | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment