beans_field_slider

Echo slider field type.

beans_field_slider( $field )

Source

function beans_field_slider( $field ) {

	$defaults = array(
		'min'      => 0,
		'max'      => 100,
		'interval' => 1,
		'unit'     => null,
	);

	$field	= array_merge( $defaults, $field );

	?>
	<div class="bs-slider-wrap" slider_min="<?php echo (int) $field['min']; ?>" slider_max="<?php echo (int) $field['max']; ?>" slider_interval="<?php echo (int) $field['interval']; ?>">

		<?php // Don't make this a hidden field to prevent triggering issues with wp_customise. ?>
		<input type="text" value="<?php echo esc_attr( $field['value'] ); ?>" name="<?php echo esc_attr( $field['name'] ); ?>" <?php echo beans_esc_attributes( $field['attributes'] ); ?> style="display: none;"/>

	</div>
	<span class="bs-slider-value"><?php echo $field['value']; ?></span>

	<?php if ( $field['unit'] ) : ?>
		<span class="bs-slider-unit"><?php echo $field['unit']; ?></span>
	<?php endif;

}