NF_Fields_StarRating

Class NF_Fields_StarRating.

Defined (1)

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

/includes/Fields/StarRating.php  
  1. class NF_Fields_StarRating extends NF_Abstracts_Input 
  2. protected $_name = 'starrating'; 
  3.  
  4. protected $_section = 'misc'; 
  5.  
  6. protected $_icon = 'star-half-o'; 
  7.  
  8. protected $_aliases = array( 'rating' ); 
  9.  
  10. protected $_type = 'starrating'; 
  11.  
  12. protected $_templates = 'starrating'; 
  13.  
  14. protected $_settings_only = array( 'label', 'label_pos', 'default', 'required', 'classes' ); 
  15.  
  16. public function __construct() 
  17. parent::__construct(); 
  18.  
  19. $this->_settings[ 'default' ][ 'group' ] = 'primary'; 
  20.  
  21. $this->_settings[ 'default' ][ 'label' ] = __( 'Number of Stars', 'ninja-forms' ); 
  22.  
  23. $this->_settings[ 'default' ][ 'width' ] = 'one-half'; 
  24.  
  25. $this->_settings[ 'default' ][ 'use_merge_tags' ] = FALSE; 
  26.  
  27. $this->_settings[ 'default' ][ 'value' ] = 5; 
  28.  
  29. $this->_nicename = __( 'Star Rating', 'ninja-forms' ); 
  30.