CreditCardZip.php 787 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php if ( ! defined( 'ABSPATH' ) ) exit;
  2. /**
  3. * Class NF_Fields_CreditCardZip
  4. */
  5. class NF_Fields_CreditCardZip extends NF_Fields_Zip
  6. {
  7. protected $_name = 'creditcardzip';
  8. protected $_type = 'creditcardzip';
  9. protected $_section = '';
  10. protected $_icon = 'credit-card';
  11. protected $_templates = array( 'zip', 'textbox' );
  12. protected $_settings_exclude = array( 'disable_input', 'input_limit_set' );
  13. public function __construct()
  14. {
  15. parent::__construct();
  16. $this->_nicename = __( 'Credit Card Zip', 'ninja-forms' );
  17. add_filter( 'nf_sub_hidden_field_types', array( $this, 'hide_field_type' ) );
  18. }
  19. function hide_field_type( $field_types )
  20. {
  21. $field_types[] = $this->_name;
  22. return $field_types;
  23. }
  24. }