SimpleCalendarAdminFieldsStandard

Standard input field.

Defined (1)

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

/includes/admin/fields/standard.php  
  1. class Standard extends Field { 
  2.  
  3. /** 
  4. * Field subtype. 
  5. * @var string 
  6. */ 
  7. public $subtype = ''; 
  8.  
  9. /** 
  10. * Construct. 
  11. * @since 3.0.0 
  12. * @param array $field 
  13. */ 
  14. public function __construct( $field ) { 
  15.  
  16. $this->subtype = isset( $field['subtype'] ) ? esc_attr( $field['subtype'] ) : 'text'; 
  17. $this->type_class = 'simcal-field-' . $this->subtype; 
  18.  
  19. parent::__construct( $field ); 
  20.  
  21. /** 
  22. * Outputs the field markup. 
  23. * @since 3.0.0 
  24. */ 
  25. public function html() { 
  26.  
  27. ?> 
  28. <input type="<?php echo $this->subtype; ?>" 
  29. name="<?php echo $this->name; ?>" 
  30. id="<?php echo $this->id; ?>" 
  31. value="<?php echo $this->value; ?>" 
  32. class="<?php echo $this->class; ?>"<?php 
  33. echo $this->style ? 'style="' . $this->style . '" ' : ' '; 
  34. echo $this->placeholder ? 'placeholder="' . $this->placeholder . '"' : ' '; 
  35. echo $this->attributes; ?>/> 
  36. <?php 
  37.  
  38. echo $this->tooltip; 
  39.  
  40. if ( ! empty( $this->description ) ) { 
  41. echo '<p class="description">' . wp_kses_post( $this->description ) . '</p>'; 
  42.  
  43. if ( is_string( $this->validation ) && ! empty ( $this->validation ) ) { 
  44. echo $this->validation; 
  45.  
  46.