ninja_forms_post_process

The Ninja Forms ninja forms post process function.

Description

ninja_forms_post_process(); 

Usage

  1. if ( !function_exists( 'ninja_forms_post_process' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'ninja-forms/deprecated/includes/display/processing/post-process.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = ninja_forms_post_process(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/deprecated/includes/display/processing/post-process.php  
  1. function ninja_forms_post_process() { 
  2. global $wpdb, $ninja_forms_processing; 
  3.  
  4. $ajax = $ninja_forms_processing->get_form_setting('ajax'); 
  5. $form_id = $ninja_forms_processing->get_form_ID(); 
  6.  
  7. if(!$ninja_forms_processing->get_all_errors()) { 
  8.  
  9.  
  10. if( !$ninja_forms_processing->get_all_errors() ) { 
  11.  
  12. $ninja_forms_processing->update_form_setting( 'processing_complete', 1 ); 
  13.  
  14.  
  15. if($ajax == 1) { 
  16. //header('Content-Type', 'application/json'); 
  17. echo $json; 
  18. die(); 
  19. }else{ 
  20.  
  21. if( $ninja_forms_processing->get_form_setting( 'landing_page' ) != '' ) { 
  22.  
  23. $url = str_replace( '&', '&', $ninja_forms_processing->get_form_setting( 'landing_page' ) ); 
  24.  
  25. wp_redirect( $url ); 
  26. die(); 
  27. }else{ 
  28. if($ajax == 1) { 
  29. //header('Content-Type', 'application/json'); 
  30. echo $json; 
  31. die(); 
  32. }else{ 
  33. //echo 'post-processing'; 
  34. //print_r($ninja_forms_processing->get_all_errors()); 
  35. }else{ 
  36. if($ajax == 1) { 
  37. //header('Content-Type', 'application/json'); 
  38. echo $json; 
  39. die(); 
  40. }else{ 
  41. //echo 'post-processing'; 
  42. //print_r($ninja_forms_processing->get_all_errors());