Edit File by line
/home/barbar84/www/wp-conte.../plugins/ninja-fo.../includes/Fields
File: CreditCardExpiration.php
<?php if ( ! defined( 'ABSPATH' ) ) exit;
[0] Fix | Delete
[1] Fix | Delete
/**
[2] Fix | Delete
* Class NF_Fields_CreditCardExpiration
[3] Fix | Delete
*/
[4] Fix | Delete
class NF_Fields_CreditCardExpiration extends NF_Abstracts_Input
[5] Fix | Delete
{
[6] Fix | Delete
protected $_name = 'creditcardexpiration';
[7] Fix | Delete
protected $_type = 'creditcardexpiration';
[8] Fix | Delete
[9] Fix | Delete
protected $_section = '';
[10] Fix | Delete
[11] Fix | Delete
protected $_icon = 'credit-card';
[12] Fix | Delete
[13] Fix | Delete
protected $_templates = 'textbox';
[14] Fix | Delete
[15] Fix | Delete
protected $_test_value = '01/2025';
[16] Fix | Delete
[17] Fix | Delete
protected $_settings_exclude = array( 'input_limit_set', 'disable_input' );
[18] Fix | Delete
[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__( 'Credit Card Expiration', 'ninja-forms' );
[25] Fix | Delete
[26] Fix | Delete
add_filter( 'nf_sub_hidden_field_types', array( $this, 'hide_field_type' ) );
[27] Fix | Delete
[28] Fix | Delete
$this->_settings[ 'mask' ] = array(
[29] Fix | Delete
'name' => 'mask',
[30] Fix | Delete
'value' => '99/9999',
[31] Fix | Delete
);
[32] Fix | Delete
[33] Fix | Delete
}
[34] Fix | Delete
[35] Fix | Delete
function hide_field_type( $field_types )
[36] Fix | Delete
{
[37] Fix | Delete
$field_types[] = $this->_name;
[38] Fix | Delete
[39] Fix | Delete
return $field_types;
[40] Fix | Delete
}
[41] Fix | Delete
}
[42] Fix | Delete
[43] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function