BP_Customizer_Control_Range

BuddyPress Customizer font size control.

Defined (1)

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

/bp-core/classes/class-bp-customizer-control-range.php  
  1. class BP_Customizer_Control_Range extends WP_Customize_Control { 
  2. /** 
  3. * @var string 
  4. */ 
  5. public $type = 'range'; 
  6.  
  7. /** 
  8. * Enqueue scripts/styles for the color picker. 
  9. * @since 2.5.0 
  10. */ 
  11. public function enqueue() { 
  12. wp_enqueue_script( 'bp-customizer-controls' ); 
  13. wp_enqueue_style( 'bp-customizer-controls' ); 
  14.  
  15. /** 
  16. * Render the control. 
  17. * @since 2.5.0 
  18. */ 
  19. public function render_content() { 
  20. $id = 'customize-control-' . str_replace( '[', '-', str_replace( ']', '', $this->id ) ); 
  21. $class = 'customize-control customize-control-' . $this->type; 
  22.  
  23. ?><li id="<?php echo esc_attr( $id ); ?>" class="<?php echo esc_attr( $class ); ?>"> 
  24. <?php if ( $this->label ) : ?> 
  25. <label for="<?php echo esc_attr( "{$id}-range" ); ?>"> 
  26. <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span> 
  27. </label> 
  28. <?php endif; ?> 
  29.  
  30. <input type="range" id="<?php echo esc_attr( "{$id}-range" ); ?>" <?php $this->link(); $this->input_attrs(); ?> value="<?php echo esc_attr( $this->value() ); ?>" /> 
  31. <output for="<?php echo esc_attr( "{$id}-range" ); ?>"><?php echo esc_html( $this->value() ); ?></output> 
  32.  
  33. <?php if ( $this->description ) : ?> 
  34. <p><span class="description customize-control-description"><?php echo esc_html( $this->description ); ?></span></p> 
  35. <?php endif; ?> 
  36. </li><?php