PluginProbe
Woody Code Snippets – Insert PHP, CSS, JS, and Header/Footer Scripts / 2.7.7
Woody Code Snippets – Insert PHP, CSS, JS, and Header/Footer Scripts v2.7.7
2.7.7 2.7.6 2.7.5 2.7.4 trunk 1.3 2.0.4 2.0.6 2.1.91 2.2.4 2.2.7 2.2.9 2.3.1 2.3.10 2.4.10 2.4.2 2.4.4 2.4.5 2.4.6 2.4.7 2.4.8 2.4.9 2.6.0 2.6.1 2.7.0 All 28 releases
← All changes | includes/class.rest.php +7 -0 2.7.42.7.7 View file →
@@ -307,8 +307,15 @@
307 307 );
308 308 }
309 309
310 310 foreach ( $data as $key => $value ) {
311 + if ( false === $value ) {
312 + // update_option() short-circuits when storing `false` over a
313 + // missing option (both compare equal), so a default-enabled
314 + // checkbox could never be persisted as disabled.
315 + $value = '';
316 + }
317 +
311 318 update_option( 'wbcr_inp_' . $key, $value );
312 319 }
313 320
314 321 return new \WP_REST_Response(