Skip to content

Commit

Permalink
Sanitize input
Browse files Browse the repository at this point in the history
  • Loading branch information
TorbenLundsgaard committed Oct 10, 2024
1 parent acd9268 commit 80f7b85
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Admin/MetaBox.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public function save_meta_box_options(): void {
if ( empty( $_POST['gtmkit_option']['page_type'] ) ) {
delete_post_meta( (int) $_POST['post_ID'], 'gtmkit_page_type' );
} else {
$page_type = sanitize_text_field( $_POST['gtmkit_option']['page_type'] );
$page_type = sanitize_text_field( wp_unslash( $_POST['gtmkit_option']['page_type'] ) );
update_post_meta( (int) $_POST['post_ID'], 'gtmkit_page_type', $page_type );
}
}
Expand Down

0 comments on commit 80f7b85

Please sign in to comment.