PluginProbe
Booking Calendar / 11.9
Booking Calendar v11.9
11.9 11.8.4 11.8.3 11.8.2 11.8.1 11.8 11.7 11.6.1 11.6 11.5 11.4.3 11.4.2 11.4.1 11.4 11.3 11.2.1 11.2 11.1 11.0 10.15.7 10.15.6 10.1.3 10.10 10.10.1 10.10.2 All 205 releases
← All changes | includes/_shared-ui-catalog/class-wpbc-ui-catalog-inline-field-schema.php +9 -1 11.6.1 → 11.9 View file →
@@ -97,11 +97,19 @@
97 97 if ( isset( $raw_field[ $property_name ] ) && is_scalar( $raw_field[ $property_name ] ) ) {
98 98 $normalized_field[ $property_name ] = wp_strip_all_tags( (string) $raw_field[ $property_name ] );
99 99 }
100 100 }
101 - foreach ( array( 'min', 'max', 'step', 'maxlength', 'default_value', 'slider_min', 'slider_max', 'slider_step' ) as $property_name ) {
101 + foreach ( array( 'min', 'max', 'maxlength', 'default_value', 'slider_min', 'slider_max', 'slider_step' ) as $property_name ) {
102 102 if ( isset( $raw_field[ $property_name ] ) && is_numeric( $raw_field[ $property_name ] ) ) {
103 103 $normalized_field[ $property_name ] = (float) $raw_field[ $property_name ];
104 + }
105 + }
106 + if ( isset( $raw_field['step'] ) && is_scalar( $raw_field['step'] ) ) {
107 + $raw_step = strtolower( trim( (string) $raw_field['step'] ) );
108 + if ( 'any' === $raw_step ) {
109 + $normalized_field['step'] = 'any';
110 + } elseif ( is_numeric( $raw_step ) ) {
111 + $normalized_field['step'] = (float) $raw_step;
104 112 }
105 113 }
106 114 if ( isset( $raw_field['operations'] ) ) {
107 115 $normalized_field['operations'] = self::normalize_choices( $raw_field['operations'], 'id' );