NF_Actions_Custom

Class NF_Action_Custom.

Defined (1)

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

/includes/Actions/Custom.php  
  1. final class NF_Actions_Custom extends NF_Abstracts_Action 
  2. /** 
  3. * @var string 
  4. */ 
  5. protected $_name = 'custom'; 
  6.  
  7. /** 
  8. * @var array 
  9. */ 
  10. protected $_tags = array(); 
  11.  
  12. /** 
  13. * @var string 
  14. */ 
  15. protected $_timing = 'normal'; 
  16.  
  17. /** 
  18. * @var int 
  19. */ 
  20. protected $_priority = 10; 
  21.  
  22. /** 
  23. * Constructor 
  24. */ 
  25. public function __construct() 
  26. parent::__construct(); 
  27.  
  28. $this->_nicename = __( 'WP Hook', 'ninja-forms' ); 
  29.  
  30. $settings = Ninja_Forms::config( 'ActionCustomSettings' ); 
  31.  
  32. $this->_settings = array_merge( $this->_settings, $settings ); 
  33.  
  34. /** 
  35. * PUBLIC METHODS 
  36. */ 
  37.  
  38. public function save( $action_settings ) 
  39.  
  40.  
  41. public function process( $action_settings, $form_id, $data ) 
  42. if( isset( $action_settings[ 'tag' ] ) ) { 
  43. ob_start(); // Use the Output Buffer to suppress output 
  44.  
  45. do_action($action_settings[ 'tag' ], $data); 
  46.  
  47. ob_end_clean(); 
  48.  
  49. return $data;