gps_max_snaps
Description
Filter the maximum number of generated snap positions for numeric sliders. When the configured range and step would produce more positions than this cap, positions are sampled evenly across the range using a step-aligned increment; the max value is always included. Raising the cap increases PHP memory usage on large ranges and can exhaust it entirely.
Usage
Filter applied globally to all slider fields.
add_filter( 'gps_max_snaps', 'my_custom_function' );Filter applied to all slider fields in form FORMID.
add_filter( 'gps_max_snaps_FORMID', 'my_custom_function' );Filter applied to specific field FIELDID in form FORMID.
add_filter( 'gps_max_snaps_FORMID_FIELDID', 'my_custom_function' );Parameters
$max_snaps
int
Maximum number of generated snap positions. Default 1000.
$config
array
The slider configuration array.
$field
GF_Field
The current field object.
Since
1.0.9Hook added.