Password.php 700 B

123456789101112131415161718192021222324252627282930313233
  1. <?php if ( ! defined( 'ABSPATH' ) ) exit;
  2. /**
  3. * Class NF_Fields_Password
  4. */
  5. class NF_Fields_Password extends NF_Abstracts_Input
  6. {
  7. protected $_name = 'password';
  8. protected $_nicename = 'Password';
  9. protected $_section = '';
  10. protected $_type = 'password';
  11. protected $_templates = array( 'password', 'textbox', 'input' );
  12. public function __construct()
  13. {
  14. parent::__construct();
  15. $this->_nicename = __( 'Password', 'ninja-forms' );
  16. add_filter( 'nf_sub_hidden_field_types', array( $this, 'hide_field_type' ) );
  17. }
  18. function hide_field_type( $field_types )
  19. {
  20. $field_types[] = $this->_name;
  21. return $field_types;
  22. }
  23. }