Edit File by line
/home/barbar84/www/wp-conte.../plugins/ninja-fo.../includes/Actions
File: Custom.php
<?php if ( ! defined( 'ABSPATH' ) ) exit;
[0] Fix | Delete
[1] Fix | Delete
/**
[2] Fix | Delete
* Class NF_Action_Custom
[3] Fix | Delete
*/
[4] Fix | Delete
final class NF_Actions_Custom extends NF_Abstracts_Action
[5] Fix | Delete
{
[6] Fix | Delete
/**
[7] Fix | Delete
* @var string
[8] Fix | Delete
*/
[9] Fix | Delete
protected $_name = 'custom';
[10] Fix | Delete
[11] Fix | Delete
/**
[12] Fix | Delete
* @var array
[13] Fix | Delete
*/
[14] Fix | Delete
protected $_tags = array();
[15] Fix | Delete
[16] Fix | Delete
/**
[17] Fix | Delete
* @var string
[18] Fix | Delete
*/
[19] Fix | Delete
protected $_timing = 'normal';
[20] Fix | Delete
[21] Fix | Delete
/**
[22] Fix | Delete
* @var int
[23] Fix | Delete
*/
[24] Fix | Delete
protected $_priority = 10;
[25] Fix | Delete
[26] Fix | Delete
/**
[27] Fix | Delete
* Constructor
[28] Fix | Delete
*/
[29] Fix | Delete
public function __construct()
[30] Fix | Delete
{
[31] Fix | Delete
parent::__construct();
[32] Fix | Delete
[33] Fix | Delete
$this->_nicename = esc_html__( 'WP Hook', 'ninja-forms' );
[34] Fix | Delete
[35] Fix | Delete
$settings = Ninja_Forms::config( 'ActionCustomSettings' );
[36] Fix | Delete
[37] Fix | Delete
$this->_settings = array_merge( $this->_settings, $settings );
[38] Fix | Delete
}
[39] Fix | Delete
[40] Fix | Delete
/*
[41] Fix | Delete
* PUBLIC METHODS
[42] Fix | Delete
*/
[43] Fix | Delete
[44] Fix | Delete
public function save( $action_settings )
[45] Fix | Delete
{
[46] Fix | Delete
[47] Fix | Delete
}
[48] Fix | Delete
[49] Fix | Delete
public function process( $action_settings, $form_id, $data )
[50] Fix | Delete
{
[51] Fix | Delete
if( isset( $action_settings[ 'tag' ] ) ) {
[52] Fix | Delete
ob_start(); // Use the Output Buffer to suppress output
[53] Fix | Delete
[54] Fix | Delete
do_action($action_settings[ 'tag' ], $data);
[55] Fix | Delete
[56] Fix | Delete
ob_end_clean();
[57] Fix | Delete
}
[58] Fix | Delete
[59] Fix | Delete
return $data;
[60] Fix | Delete
}
[61] Fix | Delete
}
[62] Fix | Delete
[63] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function