Skip to content

Commit

Permalink
Add the delete_event in the action
Browse files Browse the repository at this point in the history
  • Loading branch information
amieiro committed Feb 15, 2024
1 parent edb9b55 commit c5f597e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wporg-gp-translation-events.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ function submit_event_ajax() {
wp_send_json_error( 'Form name must be set' );
}
$action = sanitize_text_field( wp_unslash( $_POST['form_name'] ) );
if ( ! in_array( $action, array( 'create_event', 'edit_event' ), true ) ) {
if ( ! in_array( $action, array( 'create_event', 'edit_event', 'delete_event' ), true ) ) {
wp_send_json_error( 'Invalid form name' );
}

Expand Down

0 comments on commit c5f597e

Please sign in to comment.