ninja_forms_field_credit_card_expire_filter

Function that filters the display script field data so that the mask is included for the expires field.

Description

ninja_forms_field_credit_card_expire_filter( $data, $field_id ); 

Parameters (2)

0. $data
The data.
1. $field_id
The field id.

Usage

  1. if ( !function_exists( 'ninja_forms_field_credit_card_expire_filter' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'ninja-forms/deprecated/includes/fields/credit-card.php'; 
  3.  
  4. // The data. 
  5. $data = null; 
  6.  
  7. // The field id. 
  8. $field_id = null; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = ninja_forms_field_credit_card_expire_filter($data, $field_id); 
  12.  

Defined (1)

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

/deprecated/includes/fields/credit-card.php  
  1. function ninja_forms_field_credit_card_expire_filter( $data, $field_id ) { 
  2. $field = ninja_forms_get_field_by_id( $field_id ); 
  3. if ( $field['type'] == '_credit_card' ) { 
  4. $data['mask'] = '99/9999'; 
  5. return $data;