NF_Notification_Base_Type

Class for notification types.

Defined (1)

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

/deprecated/classes/notification-base-type.php  
  1. abstract class NF_Notification_Base_Type 
  2.  
  3. /** 
  4. * Get things rolling 
  5. * @since 2.8 
  6. */ 
  7. function __construct() { 
  8.  
  9.  
  10. /** 
  11. * Processing function 
  12. * @access public 
  13. * @since 2.8 
  14. * @return false 
  15. */ 
  16. public function process( $id ) { 
  17. // This space left intentionally blank 
  18.  
  19. /** 
  20. * Output admin edit screen 
  21. * @access public 
  22. * @since 2.8 
  23. * @return false 
  24. */ 
  25. public function edit_screen( $id = '' ) { 
  26. // This space left intentionally blank 
  27.  
  28. /** 
  29. * Save admin edit screen 
  30. * @access public 
  31. * @since 2.8 
  32. * @return void 
  33. */ 
  34. public function save_admin( $id = '', $data ) { 
  35. // This space left intentionally blank 
  36. return $data; 
  37.  
  38. /** 
  39. * Explode our settings by ` and extract each value. 
  40. * Check to see if the setting is a field; if it is, assign the value. 
  41. * Run shortcodes and return the result. 
  42. * @access public 
  43. * @since 2.8 
  44. * @return array $setting 
  45. */ 
  46. public function process_setting( $id, $setting, $html = 1 ) { 
  47. global $ninja_forms_processing; 
  48.  
  49. $setting_name = $setting; 
  50.  
  51. $setting = explode( '`', Ninja_Forms()->notification( $id )->get_setting( $setting ) ); 
  52.  
  53. for ( $x = 0; $x <= count ( $setting ) - 1; $x++ ) { 
  54. if ( strpos( $setting[ $x ], 'field_' ) !== false ) { 
  55. if ( $ninja_forms_processing->get_field_value( str_replace( 'field_', '', $setting[ $x ] ) ) ) { 
  56. $setting[ $x ] = $ninja_forms_processing->get_field_value( str_replace( 'field_', '', $setting[ $x ] ) ); 
  57. } else { 
  58. $setting[ $x ] = ''; 
  59.  
  60. if ( ! is_array ( $setting[ $x] ) ) { 
  61. $setting[ $x ] = str_replace( '[ninja_forms_all_fields]', '[ninja_forms_all_fields html=' . $html . ']', $setting[ $x ] ); 
  62. $setting[ $x ] = do_shortcode( $setting[ $x ] ); 
  63. $setting[ $x ] = nf_parse_fields_shortcode( $setting[ $x ] );  
  64.  
  65.  
  66. return apply_filters( 'nf_notification_process_setting', $setting, $setting_name, $id );