Skip to content

Commit

Permalink
Add boolean validation.
Browse files Browse the repository at this point in the history
  • Loading branch information
renintw committed Jun 3, 2024
1 parent b03e329 commit 4f0b6d1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ protected function save_post_meta( $post, $new_meta ) {

delete_post_meta( $post->ID, 'wcor_transparency_report' );
if ( isset( $new_meta['wcor_transparency_report'] ) ) {
update_post_meta( $post->ID, 'wcor_transparency_report', $new_meta['wcor_transparency_report'] );
update_post_meta( $post->ID, 'wcor_transparency_report', filter_var( $new_meta['wcor_transparency_report'], FILTER_VALIDATE_BOOLEAN ) );
}

if ( isset( $new_meta['wcor_send_days_before'] ) ) {
Expand Down

0 comments on commit 4f0b6d1

Please sign in to comment.