Slider

function search_form_radius_field( $output, $gmw, $class ) {
                
	if ( !isset( $gmw['search_form']['radius_slider']['use'] ) ) return $output;
        
    $initValue  = ( isset( $_GET['gmw_distance'] ) && !empty( $_GET['gmw_distance'] ) ) ? $_GET['gmw_distance'] : $gmw['search_form']['radius_slider']['default_value'];
    $maxValue   = explode( ",", $gmw['search_form']['radius'] );
    $maxValue   = end( $maxValue );
    $stitle     = ( $gmw['search_form']['units'] == 'imperial' ) ? __('Miles: ','GMW-PS') : __('Kilometers: ','GMW-PS');
    $title      = ( $gmw['search_form']['units']  == 'both' ) ? __( 'Radius: ','GMW-PS') : $stitle;
        
    $output  =  '
'; $output .= ''; $output .= ''; //$output .= '
'; $output .= '
'; //$output .= '
'; $output .= ''; $output .= '
'; wp_enqueue_script( 'jquery-ui-slider' ); wp_enqueue_style( 'gmw-ps-slider', GMW_PS_URL .'/assets/css/slider.css' ); return $output; } add_filter( 'gmw_radius_dropdown_output', 'search_form_radius_field', 10, 3 );