Skip to content

Commit 2934316

Browse files
author
Antti Kuosmanen
committed
Strip unnecessary checks + some cleanup
1 parent b25aa76 commit 2934316

3 files changed

Lines changed: 0 additions & 11 deletions

File tree

README.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,6 @@ Triggers after the form validation is done.
107107
```php
108108
add_action( 'wplf_post_validate_submission', 'my_email_thankyou' );
109109
function my_email_thankyou( $return ) {
110-
// do nothing if form validation failed
111-
if ( ! $return->ok ) {
112-
return;
113-
}
114-
115110
$name = sanitize_text_field( $_POST['name'] );
116111
$email = sanitize_email( $_POST['email'] );
117112
$to = "\"$name\" <$email>";

assets/scripts/wplf-form.js

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

inc/wplf-form-actions.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@
22

33
add_action( 'wplf_post_validate_submission', 'wplf_send_email_copy', 20 );
44
function wplf_send_email_copy( $return, $submission_id = null ) {
5-
// do nothing if form validation failed
6-
if ( ! $return->ok ) {
7-
return;
8-
}
9-
105
if ( ! $submission_id ) {
116
$submission_id = $return->submission_id;
127
}

0 commit comments

Comments
 (0)