NF_Fields_HTML

Class NF_Fields_HTML.

Defined (1)

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

/includes/Fields/HTML.php  
  1. class NF_Fields_HTML extends NF_Abstracts_Input 
  2. protected $_name = 'html'; 
  3.  
  4. protected $_section = 'layout'; 
  5.  
  6. protected $_icon = 'code'; 
  7.  
  8. protected $_aliases = array( 'html' ); 
  9.  
  10. protected $_type = 'html'; 
  11.  
  12. protected $_templates = 'html'; 
  13.  
  14. protected $_settings_only = array( 'label', 'default', 'classes' ); 
  15.  
  16. protected $_use_merge_tags_include = array( 'calculations' ); 
  17.  
  18. public function __construct() 
  19. parent::__construct(); 
  20.  
  21. $this->_settings[ 'label' ][ 'width' ] = 'full'; 
  22. $this->_settings[ 'default' ][ 'group' ] = 'primary'; 
  23. $this->_settings[ 'default' ][ 'type' ] = 'rte'; 
  24. $this->_settings[ 'default' ][ 'use_merge_tags' ] = array( 
  25. 'include' => array( 
  26. 'calcs' 
  27. ),  
  28. 'exclude' => array( 
  29. 'form',  
  30. 'fields' 
  31. ),  
  32. ); 
  33.  
  34. $this->_nicename = __( 'HTML', 'ninja-forms' ); 
  35.  
  36. add_filter( 'nf_sub_hidden_field_types', array( $this, 'hide_field_type' ) ); 
  37.  
  38. function hide_field_type( $field_types ) 
  39. $field_types[] = $this->_name; 
  40.  
  41. return $field_types;