PluginProbe
Booktics – Appointment Booking Calendar for Service Businesses / 1.0.27
Booktics – Appointment Booking Calendar for Service Businesses v1.0.27
1.0.29 1.0.28 1.0.27 1.0.26 1.0.25 1.0.24 1.0.23 1.0.22 1.0.21 1.0.20 1.0.19 trunk 1.0.0 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.15 1.0.16 1.0.17 1.0.18 1.0.2 1.0.3 All 31 releases
← All changes | core/settings/controllers/settings-controller.php +24 -0 1.0.25 → 1.0.27 View file →
@@ -176,8 +176,32 @@
176 176 ? $params['wc_thankyou_page']
177 177 : 'woocommerce';
178 178 }
179 179
180 + /**
181 + * Last chance to clean the settings payload before it is stored.
182 + *
183 + * Settings::update() writes what it is handed, so a feature adding a
184 + * structured key of its own sanitizes it here. schedule, custom and
185 + * holiday are not in $params: Schedule_Manager has already saved them.
186 + *
187 + * @since 1.0.26
188 + *
189 + * @param array $params Settings payload from the request.
190 + */
191 + $filtered = apply_filters( 'booktics_settings_update_params', $params );
192 +
193 + if ( ! is_array( $filtered ) ) {
194 + _doing_it_wrong(
195 + __METHOD__,
196 + esc_html__( 'The booktics_settings_update_params filter must return an array.', 'booktics' ),
197 + '1.0.26'
198 + );
199 + $filtered = $params;
200 + }
201 +
202 + $params = $filtered;
203 +
180 204 Settings::update( $params );
181 205
182 206 $settings = Settings::get();
183 207 $settings = apply_filters( 'booktics_rest_settings', $settings );