Нема описа

frontend.php 1.1KB

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. /**
  3. * Number slider field frontend template.
  4. *
  5. * @var array $atts Additional HTML attributes.
  6. * @var array $class HTML classes.
  7. * @var array $datas Data attributes.
  8. * @var float $default_value Default field value.
  9. * @var float $max Upper range limit.
  10. * @var float $min Lower range limit.
  11. * @var float $step Allowed step.
  12. * @var string $id Element ID.
  13. * @var string $required Is field required or not.
  14. * @var string $value_display Value output.
  15. * @var string $value_hint Value hint output.
  16. */
  17. if ( ! defined( 'ABSPATH' ) ) {
  18. exit;
  19. }
  20. ?>
  21. <input
  22. type="range"
  23. <?php wpforms_html_attributes( $id, $class, $datas, $atts, true ); ?>
  24. <?php echo ! empty( $required ) ? 'required' : ''; ?>
  25. value="<?php echo esc_attr( $default_value ); ?>"
  26. min="<?php echo esc_attr( $min ); ?>"
  27. max="<?php echo esc_attr( $max ); ?>"
  28. step="<?php echo esc_attr( $step ); ?>">
  29. <div class="wpforms-field-number-slider-hint"
  30. data-hint="<?php echo esc_attr( wp_kses_post( $value_display ) ); ?>">
  31. <?php echo wp_kses_post( $value_hint ); ?>
  32. </div>