| Server IP : 151.101.66.159 / Your IP : 216.73.216.66 Web Server : Flywheel/5.1.0 System : Linux wordpress 6.12.113+ #1 SMP Thu Oct 22 02:38:20 UTC 2026 x86_64 User : root ( ) PHP Version : 7.4.33.18 Disable Function : disk_free_space,diskfreespace,dl,exec,fpassthru,getmypid,getmyuid,highlight_file,link,opcache_compile_file,opcache_get_configuration,opcache_is_script_cached,passthru,pcntl_alarm,pcntl_exec,pcntl_fork,pcntl_get_last_error,pcntl_getpriority,pcntl_setpriority,pcntl_signal,pcntl_signal_dispatch,pcntl_sigprocmask,pcntl_sigtimedwait,pcntl_sigwaitinfo,pcntl_strerror,pcntl_wait,pcntl_waitpid,pcntl_wexitstatus,pcntl_wifcontinued,pcntl_wifexited,pcntl_wifsignaled,pcntl_wifstopped,pcntl_wstopsig,pcntl_wtermsig,phpinfo,popen,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix_getppid,posix_getpwnam,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_times,posix_ttyname,posix_uname,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,show_source,socket_listen,source,system,virtual MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /www/wp-content/plugins/pods/ui/fields/ |
Upload File : |
<?php
// Don't load directly.
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
// phpcs:ignoreFile WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound
wp_enqueue_script( 'jquery-ui-slider' );
pods_form_enqueue_style( 'pods-styles' );
if ( is_array( $value ) ) {
$value = implode( ',', $value );
}
if ( strlen( $value ) < 1 ) {
$value = 0;
}
$values = explode( ',', $value );
$values = array(
(int) pods_v( 0, $values, pods_v( $form_field_type . '_min', $options, 0, true ) ),
(int) pods_v( 1, $values, pods_v( $form_field_type . '_max', $options, 100, true ) ),
);
$values[0] = max( $values[0], (int) pods_v( $form_field_type . '_min', $options, 0 ) );
$values[1] = min( $values[1], (int) pods_v( $form_field_type . '_min', $options, 100 ) );
if ( 0 === pods_v( $form_field_type . '_range', $options, 0 ) ) {
$value = $values[0];
$output_value = $value;
} else {
$value = implode( ',', $values );
$output_value = implode( ' - ', $values );
}
$attributes = array();
$attributes['type'] = 'hidden';
$attributes['value'] = $value;
$attributes = PodsForm::merge_attributes( $attributes, $name, $form_field_type, $options );
?>
<input<?php PodsForm::attributes( $attributes, $name, $form_field_type, $options ); ?> />
<div class="pods-slider-field pods-compat-container">
<div id="<?php echo esc_js( pods_js_name( $attributes['id'] ) ); ?>-range" class="pods-slider-range"></div>
<div id="<?php echo esc_js( pods_js_name( $attributes['id'] ) ); ?>-amount-display" class="pods-slider-field-display">
<?php echo esc_html( $output_value ); ?>
</div>
</div>
<script>
jQuery( function ( $ ) {
$( "#<?php echo esc_js( pods_js_name( $attributes['id'] ) ); ?>-range" ).slider( {
orientation : '<?php echo esc_js( pods_v( $form_field_type . '_orientation', $options, 'horizontal' ) ); ?>',
min : <?php echo esc_js( pods_v( $form_field_type . '_min', $options, 0 ) ); ?>,
max : <?php echo esc_js( pods_v( $form_field_type . '_max', $options, 100 ) ); ?>,
step : <?php echo esc_js( pods_v( $form_field_type . '_step', $options, 1 ) ); ?>,
<?php
if ( 1 === (int) pods_v( $form_field_type . '_range', $options, 0 ) ) {
?>
range : true,
values : [
<?php echo esc_js( $values[0] ); ?>,
<?php echo esc_js( $values[1] ); ?>
],
slide : function ( event, ui ) {
$( "#<?php echo esc_js( pods_js_name( $attributes['id'] ) ); ?>" ).val( ui.values[0] + ',' + ui.values[1] );
$( "#<?php echo esc_js( pods_js_name( $attributes['id'] ) ); ?>-amount-display" ).html( ui.values[0] + ' - ' + ui.values[1] );
}
<?php
} else {
?>
range : false,
value : <?php echo esc_js( $value ); ?>,
slide : function ( event, ui ) {
$( "#<?php echo esc_js( pods_js_name( $attributes['id'] ) ); ?>" ).val( ui.value );
$( "#<?php echo esc_js( pods_js_name( $attributes['id'] ) ); ?>-amount-display" ).html( ui.value );
}
<?php
}//end if
?>
} );
} );
</script>