Sanitization should be key

This commit is contained in:
Brian Miyaji
2021-11-06 00:51:32 +09:00
parent 39cf8f9662
commit 8f1becc68f

View File

@@ -75,7 +75,7 @@ class SP_Meta_Box_Event_Performance {
update_post_meta( $post_id, 'sp_stars', sp_array_value( $_POST, 'sp_stars', array(), 'text' ) );
if ( isset( $_POST['sp_columns'] ) ) {
$columns = array_filter( (array) sp_array_value( $_POST, 'sp_columns', array(), 'text' ) );
$columns = array_filter( (array) sp_array_value( $_POST, 'sp_columns', array(), 'key' ) );
update_post_meta( $post_id, 'sp_columns', $columns );
}
}