Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/ninja-fo.../includes/Fields
File: Confirm.php
<?php if ( ! defined( 'ABSPATH' ) ) exit;
[0] Fix | Delete
[1] Fix | Delete
/**
[2] Fix | Delete
* Class NF_Fields_Confirm
[3] Fix | Delete
*/
[4] Fix | Delete
class NF_Fields_Confirm extends NF_Abstracts_Input
[5] Fix | Delete
{
[6] Fix | Delete
protected $_name = 'confirm';
[7] Fix | Delete
[8] Fix | Delete
protected $_type = 'confirm';
[9] Fix | Delete
[10] Fix | Delete
protected $_nicename = 'Confirm';
[11] Fix | Delete
[12] Fix | Delete
protected $_section = 'misc';
[13] Fix | Delete
[14] Fix | Delete
protected $_icon = 'check-circle-o';
[15] Fix | Delete
[16] Fix | Delete
protected $_error_message = '';
[17] Fix | Delete
[18] Fix | Delete
protected $_settings = array( 'confirm_field' );
[19] Fix | Delete
[20] Fix | Delete
public function __construct()
[21] Fix | Delete
{
[22] Fix | Delete
parent::__construct();
[23] Fix | Delete
[24] Fix | Delete
$this->_nicename = esc_html__( 'Confirm', 'ninja-forms' );
[25] Fix | Delete
$this->_settings[ 'confirm_field' ][ 'field_value_format' ] = 'key';
[26] Fix | Delete
[27] Fix | Delete
add_filter( 'nf_sub_hidden_field_types', array( $this, 'hide_field_type' ) );
[28] Fix | Delete
}
[29] Fix | Delete
[30] Fix | Delete
function hide_field_type( $field_types )
[31] Fix | Delete
{
[32] Fix | Delete
$field_types[] = $this->_name;
[33] Fix | Delete
return $field_types;
[34] Fix | Delete
}
[35] Fix | Delete
[36] Fix | Delete
public function validate( $field, $data )
[37] Fix | Delete
{
[38] Fix | Delete
if( false ){
[39] Fix | Delete
$errors[] = esc_html__( 'Fields do not match.', 'ninja-forms' );
[40] Fix | Delete
}
[41] Fix | Delete
return $errors;
[42] Fix | Delete
}
[43] Fix | Delete
}
[44] Fix | Delete
[45] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function