NF_Notification_Redirect

Class for our redirect notification type.

Defined (1)

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

/deprecated/classes/notification-redirect.php  
  1. class NF_Notification_Redirect extends NF_Notification_Base_Type 
  2.  
  3. /** 
  4. * Get things rolling 
  5. */ 
  6. function __construct() { 
  7. $this->name = __( 'Redirect', 'ninja-forms' ); 
  8.  
  9. /** 
  10. * Output our edit screen 
  11. * @access public 
  12. * @since 2.8 
  13. * @return void 
  14. */ 
  15. public function edit_screen( $id = '' ) { 
  16. $redirect_url = trim( Ninja_Forms()->notification( $id )->get_setting( 'redirect_url' ) ); 
  17. ?> 
  18. <tr> 
  19. <th scope="row"><label for="settings-redirect_url"><?php _e( 'Url', 'ninja-forms' ); ?></label></th> 
  20. <td><input type="text" name="settings[redirect_url]" id="settings-redirect_url" value="<?php echo esc_attr( $redirect_url ); ?>" class="regular-text"/></td> 
  21. </tr> 
  22. <?php 
  23.  
  24. /** 
  25. * Process our Redirect notification 
  26. * @access public 
  27. * @since 2.8 
  28. * @return void 
  29. */ 
  30. public function process( $id ) { 
  31. global $ninja_forms_processing; 
  32.  
  33. $redirect_url = trim( Ninja_Forms()->notification( $id )->get_setting( 'redirect_url' ) ); 
  34.  
  35. $ninja_forms_processing->update_form_setting( 'landing_page', $redirect_url ); 
  36.