parent
d3a519f6e4
commit
c22d9a3c14
|
@ -166,7 +166,7 @@ abstract class WC_Widget extends WP_Widget {
|
|||
$instance[ $key ] = wp_kses( trim( wp_unslash( $new_instance[ $key ] ) ), wp_kses_allowed_html( 'post' ) );
|
||||
break;
|
||||
case 'checkbox' :
|
||||
$instance[ $key ] = is_null( $new_instance[ $key ] ) ? 0 : 1;
|
||||
$instance[ $key ] = empty( $new_instance[ $key ] ) ? 0 : 1;
|
||||
break;
|
||||
default:
|
||||
$instance[ $key ] = sanitize_text_field( $new_instance[ $key ] );
|
||||
|
|
Loading…
Reference in New Issue