Skip to content

Commit 443c35f

Browse files
author
Antti Kuosmanen
committed
Remove unnecessary example from readme
1 parent e97e2f3 commit 443c35f

1 file changed

Lines changed: 2 additions & 25 deletions

File tree

README.md

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -57,28 +57,7 @@ You can also install the plugin by directly uploading the zip file as instructed
5757

5858
### Filter: wplf_validate_submission
5959

60-
Used to add validation to your forms
61-
62-
Example use:
63-
64-
Make sure people don't include questions about Contact Form 7 in the message field.
65-
66-
```php
67-
add_filter( 'wplf_validate_submission', 'my_form_validation' );
68-
function my_form_validation( $return ) {
69-
// skip this validation if submission has already failed
70-
if ( ! $return->ok ) {
71-
return $return;
72-
}
73-
74-
// don't allow contact form 7 to be mentioned in the message field
75-
if ( false !== strpos( strtolower( $_POST['message'] ), 'contact form 7' ) ) {
76-
$return->ok = 0;
77-
$return->error = __("I don't like Contact Form 7 so I won't accept your submission.");
78-
}
79-
return $return;
80-
}
81-
```
60+
Used to add validation to your forms.
8261

8362
#### Example: Google ReCaptcha integration
8463

@@ -123,9 +102,7 @@ function wplf_recaptcha( $return ) {
123102

124103
Triggers after the form validation is done.
125104

126-
Example use:
127-
128-
Send a thank you email to the email in the submission
105+
#### Example: Send a thank you email to the email in the submission
129106

130107
```php
131108
add_action( 'wplf_post_validate_submission', 'my_email_thankyou' );

0 commit comments

Comments
 (0)