Add sanitization to setup, welcome, importer, settings, and admin cpt

This commit is contained in:
Brian Miyaji
2021-11-09 03:37:04 +09:00
parent e23e1c2eed
commit c7302dfc80
12 changed files with 38 additions and 38 deletions

View File

@@ -67,7 +67,7 @@ class SP_Settings_Text extends SP_Settings_Page {
*/
public function save() {
if ( isset( $_POST['sportspress_text'] ) )
update_option( 'sportspress_text', $_POST['sportspress_text'] );
update_option( 'sportspress_text', array_map( 'sanitize_text_field', $_POST['sportspress_text'] ) );
}
}