diff --git a/src/my-calendar-settings.php b/src/my-calendar-settings.php index 1af9c812..1ac32e52 100644 --- a/src/my-calendar-settings.php +++ b/src/my-calendar-settings.php @@ -2085,7 +2085,7 @@ function mc_update_location_controls() { if ( ! wp_verify_nonce( $nonce, 'my-calendar-nonce' ) ) { wp_die( 'Invalid nonce' ); } - $locations = isset( $_POST['mc_location_controls'] ) ? map_deep( $_POST['mc_location_controls'], 'sanitize_textarea_field' ) : array(); + $locations = isset( $_POST['mc_location_controls'] ) ? map_deep( wp_unslash( $_POST['mc_location_controls'] ), 'sanitize_textarea_field' ) : array(); $mc_location_controls = array(); foreach ( $locations as $key => $value ) { $mc_location_controls[ $key ] = mc_csv_to_array( $value[0] ); @@ -2100,7 +2100,6 @@ function mc_update_location_controls() { */ function mc_location_controls() { if ( current_user_can( 'mc_edit_settings' ) ) { - $response = mc_update_location_controls(); $location_fields = array( 'event_label' => __( 'Name of Location', 'my-calendar' ), 'event_city' => __( 'City', 'my-calendar' ), @@ -2110,7 +2109,7 @@ function mc_location_controls() { 'event_country' => __( 'Country', 'my-calendar' ), ); $mc_location_controls = mc_get_option( 'location_controls' ); - + mc_update_location_controls(); ?>

saved_value,Displayed Value', 'my-calendar' ) ); ?>