Created
October 3, 2016 13:12
-
-
Save barrykooij/8673ae79f71c182ef4a88cfc55003167 to your computer and use it in GitHub Desktop.
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
function dlm_ninja_forms_redirect_to_download() { | |
if ( isset( $_POST['_download_id'] ) && is_numeric( $_POST['_download_id'] ) ) { | |
global $ninja_forms_processing; | |
$ninja_forms_processing->update_form_setting( 'landing_page', site_url( '/download/' . $_POST['_download_id'] . '/' ) ); | |
} | |
} | |
add_action( 'ninja_forms_post_process', 'dlm_ninja_forms_redirect_to_download', 1, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment