WordPress Zero Spam - Version 4.9.12

Version Description

  • Enhancement - Added support for the French & Italian languages. See #207.
  • Enhancement - Strengthened spam detection for registrations using a 'honeypot' field.
  • Enhancement - Strengthened spam detection for Contact Form 7 using a 'honeypot' field.
  • Fix - Fix for Contact Form 7 protection not firing.
Download this release

Release Info

Developer bmarshall511
Plugin Icon 128x128 WordPress Zero Spam
Version 4.9.12
Comparing to
See all releases

Code changes from version 4.9.11 to 4.9.12

assets/css/admin.css CHANGED
@@ -20,15 +20,18 @@
20
  }
21
 
22
  .wpzerospam-callout-actions {
23
- display: block;
 
24
  width: 100%;
25
  }
26
 
27
  .wpzerospam-callout-actions a.button {
28
  display: block;
29
- margin-bottom: 3px;
 
 
30
  text-align: center;
31
- width: 100%;
32
  }
33
 
34
  .wpzerospam-callout-actions a:last-child {
@@ -46,6 +49,10 @@
46
  margin-left: 50px;
47
  width: auto;
48
  }
 
 
 
 
49
  }
50
 
51
  .wpzerospam-country-flag {
20
  }
21
 
22
  .wpzerospam-callout-actions {
23
+ display: flex;
24
+ flex-wrap: wrap;
25
  width: 100%;
26
  }
27
 
28
  .wpzerospam-callout-actions a.button {
29
  display: block;
30
+ margin-bottom: 4px;
31
+ margin-left: 2px;
32
+ margin-right: 2px;
33
  text-align: center;
34
+ width: calc(100% - 4px);
35
  }
36
 
37
  .wpzerospam-callout-actions a:last-child {
49
  margin-left: 50px;
50
  width: auto;
51
  }
52
+
53
+ .wpzerospam-callout-actions a.button {
54
+ width: calc(50% - 4px);
55
+ }
56
  }
57
 
58
  .wpzerospam-country-flag {
classes/class-wpzerospam-blacklisted-table.php CHANGED
@@ -17,8 +17,8 @@ class WPZeroSpam_Blacklisted_Table extends WP_List_Table {
17
  global $status, $page;
18
 
19
  $args = [
20
- 'singular' => __( 'Blacklist', 'wpzerospam' ),
21
- 'plural' => __( 'Blacklist IPs', 'wpzerospam' ),
22
  'ajax' => true
23
  ];
24
  parent::__construct( $args );
@@ -29,11 +29,11 @@ class WPZeroSpam_Blacklisted_Table extends WP_List_Table {
29
  // Render a checkbox instead of text
30
  $columns = [
31
  'cb' => '<input type="checkbox" />',
32
- 'last_updated' => __( 'Last Updated', 'wpzerospam' ),
33
- 'user_ip' => __( 'IP Address', 'wpzerospam' ),
34
- 'service' => __( 'Service', 'wpzerospam' ),
35
- 'attempts' => __( 'Attempts', 'wpzerospam' ),
36
- 'details' => __( 'Details', 'wpzerospam' )
37
  ];
38
 
39
  return $columns;
@@ -60,14 +60,14 @@ class WPZeroSpam_Blacklisted_Table extends WP_List_Table {
60
  ?>
61
  <div class="alignleft actions">
62
  <?php
63
- echo '<label class="screen-reader-text" for="filter-by-service">' . __( 'Filter by service' ) . '</label>';
64
  $current_service = ! empty( $_REQUEST['service'] ) ? sanitize_text_field( $_REQUEST['service'] ) : false;
65
  ?>
66
  <select name="service" id="filter-by-service">
67
- <option value=""><?php _e( 'All services', 'wpzerospam' ); ?></option>
68
- <option<?php if ( $current_service == 'botscout' ): ?> selected="selected" <?php endif; ?> value="botscout"><?php _e( 'BotScout', 'wpzerospam' ); ?></option>
69
- <option<?php if ( $current_service == 'stopforumspam' ): ?> selected="selected" <?php endif; ?> value="stopforumspam"><?php _e( 'Stop Forum Spam', 'wpzerospam' ); ?></option>
70
- <option<?php if ( $current_service == 'zerospam' ): ?> selected="selected" <?php endif; ?> value="zerospam"><?php _e( 'Zero Spam', 'wpzerospam' ); ?></option>
71
  </select>
72
  <?php
73
  submit_button( __( 'Filter' ), '', 'filter_action', false );
@@ -116,24 +116,24 @@ class WPZeroSpam_Blacklisted_Table extends WP_List_Table {
116
  if ( empty( $item->blacklist_data ) ) { return __( 'No details available.', 'wpzerospam' ); }
117
  ob_start();
118
  ?>
119
- <button class="button action wpzerospam-details-trigger" data-id="<?php echo $item->blacklist_id; ?>"><?php _e( 'View', 'wpzerospam' ); ?></button>
120
  <div class="wpzerospam-details-modal" id="wpzerospam-details-modal-<?php echo $item->blacklist_id; ?>">
121
  <div class="wpzerospam-details-modal-inner">
122
  <?php
123
  $item->blacklist_data = json_decode( $item->blacklist_data, true );
124
 
125
  echo '<div class="wpzerospam-details-item">';
126
- echo '<div class="wpzerospam-details-label">' . __( 'Detected Spam IP', 'wpzerospam' ) . '</div>';
127
  echo '<div class="wpzerospam-details-data">' . '<a href="https://zerospam.org/ip-lookup/' . urlencode( $item->user_ip ) .'" target="_blank" rel="noopener noreferrer">' . $item->user_ip . '</a>' . '</div>';
128
  echo '</div>';
129
 
130
  echo '<div class="wpzerospam-details-item">';
131
- echo '<div class="wpzerospam-details-label">' . __( 'Last Updated', 'wpzerospam' ) . '</div>';
132
  echo '<div class="wpzerospam-details-data">' . date( 'M j, Y g:ia' , strtotime( $item->last_updated ) ) . '</div>';
133
  echo '</div>';
134
 
135
  echo '<div class="wpzerospam-details-item">';
136
- echo '<div class="wpzerospam-details-label">' . __( 'Service', 'wpzerospam' ) . '</div>';
137
  echo '<div class="wpzerospam-details-data">';
138
  switch( $item->blacklist_service ) {
139
  case 'stopforumspam':
@@ -157,31 +157,31 @@ class WPZeroSpam_Blacklisted_Table extends WP_List_Table {
157
  switch( $key ):
158
  case 'appears':
159
  echo '<div class="wpzerospam-details-item">';
160
- echo '<div class="wpzerospam-details-label">' . __( 'Appears', 'wpzerospam' ) . '</div>';
161
  echo '<div class="wpzerospam-details-data">' . $value . '</div>';
162
  echo '</div>';
163
  break;
164
  case 'confidence':
165
  echo '<div class="wpzerospam-details-item">';
166
- echo '<div class="wpzerospam-details-label">' . __( 'Confidence', 'wpzerospam' ) . '</div>';
167
  echo '<div class="wpzerospam-details-data">' . $value . '%</div>';
168
  echo '</div>';
169
  break;
170
  case 'frequency':
171
  echo '<div class="wpzerospam-details-item">';
172
- echo '<div class="wpzerospam-details-label">' . __( 'Frequency', 'wpzerospam' ) . '</div>';
173
  echo '<div class="wpzerospam-details-data">' . $value . '</div>';
174
  echo '</div>';
175
  break;
176
  case 'lastseen':
177
  echo '<div class="wpzerospam-details-item">';
178
- echo '<div class="wpzerospam-details-label">' . __( 'Last Seen', 'wpzerospam' ) . '</div>';
179
  echo '<div class="wpzerospam-details-data">' . $value . '</div>';
180
  echo '</div>';
181
  break;
182
  case 'asn':
183
  echo '<div class="wpzerospam-details-item">';
184
- echo '<div class="wpzerospam-details-label">' . __( 'ASN', 'wpzerospam' ) . '</div>';
185
  echo '<div class="wpzerospam-details-data">' . $value . '</div>';
186
  echo '</div>';
187
  break;
@@ -205,8 +205,8 @@ class WPZeroSpam_Blacklisted_Table extends WP_List_Table {
205
  // Register bulk actions
206
  function get_bulk_actions() {
207
  $actions = [
208
- 'delete' => __( 'Delete', 'wpzerospam' ),
209
- 'delete_all' => __( 'Delete All Entries', 'wpzerospam' )
210
  ];
211
 
212
  return $actions;
17
  global $status, $page;
18
 
19
  $args = [
20
+ 'singular' => __( 'Blacklist', 'zero-spam' ),
21
+ 'plural' => __( 'Blacklist IPs', 'zero-spam' ),
22
  'ajax' => true
23
  ];
24
  parent::__construct( $args );
29
  // Render a checkbox instead of text
30
  $columns = [
31
  'cb' => '<input type="checkbox" />',
32
+ 'last_updated' => __( 'Last Updated', 'zero-spam' ),
33
+ 'user_ip' => __( 'IP Address', 'zero-spam' ),
34
+ 'service' => __( 'Service', 'zero-spam' ),
35
+ 'attempts' => __( 'Attempts', 'zero-spam' ),
36
+ 'details' => __( 'Details', 'zero-spam' )
37
  ];
38
 
39
  return $columns;
60
  ?>
61
  <div class="alignleft actions">
62
  <?php
63
+ echo '<label class="screen-reader-text" for="filter-by-service">' . __( 'Filter by service', 'zero-spam' ) . '</label>';
64
  $current_service = ! empty( $_REQUEST['service'] ) ? sanitize_text_field( $_REQUEST['service'] ) : false;
65
  ?>
66
  <select name="service" id="filter-by-service">
67
+ <option value=""><?php _e( 'All services', 'zero-spam' ); ?></option>
68
+ <option<?php if ( $current_service == 'botscout' ): ?> selected="selected" <?php endif; ?> value="botscout"><?php _e( 'BotScout', 'zero-spam' ); ?></option>
69
+ <option<?php if ( $current_service == 'stopforumspam' ): ?> selected="selected" <?php endif; ?> value="stopforumspam"><?php _e( 'Stop Forum Spam', 'zero-spam' ); ?></option>
70
+ <option<?php if ( $current_service == 'zerospam' ): ?> selected="selected" <?php endif; ?> value="zerospam"><?php _e( 'Zero Spam', 'zero-spam' ); ?></option>
71
  </select>
72
  <?php
73
  submit_button( __( 'Filter' ), '', 'filter_action', false );
116
  if ( empty( $item->blacklist_data ) ) { return __( 'No details available.', 'wpzerospam' ); }
117
  ob_start();
118
  ?>
119
+ <button class="button action wpzerospam-details-trigger" data-id="<?php echo $item->blacklist_id; ?>"><?php _e( 'View', 'zero-spam' ); ?></button>
120
  <div class="wpzerospam-details-modal" id="wpzerospam-details-modal-<?php echo $item->blacklist_id; ?>">
121
  <div class="wpzerospam-details-modal-inner">
122
  <?php
123
  $item->blacklist_data = json_decode( $item->blacklist_data, true );
124
 
125
  echo '<div class="wpzerospam-details-item">';
126
+ echo '<div class="wpzerospam-details-label">' . __( 'Detected Spam IP', 'zero-spam' ) . '</div>';
127
  echo '<div class="wpzerospam-details-data">' . '<a href="https://zerospam.org/ip-lookup/' . urlencode( $item->user_ip ) .'" target="_blank" rel="noopener noreferrer">' . $item->user_ip . '</a>' . '</div>';
128
  echo '</div>';
129
 
130
  echo '<div class="wpzerospam-details-item">';
131
+ echo '<div class="wpzerospam-details-label">' . __( 'Last Updated', 'zero-spam' ) . '</div>';
132
  echo '<div class="wpzerospam-details-data">' . date( 'M j, Y g:ia' , strtotime( $item->last_updated ) ) . '</div>';
133
  echo '</div>';
134
 
135
  echo '<div class="wpzerospam-details-item">';
136
+ echo '<div class="wpzerospam-details-label">' . __( 'Service', 'zero-spam' ) . '</div>';
137
  echo '<div class="wpzerospam-details-data">';
138
  switch( $item->blacklist_service ) {
139
  case 'stopforumspam':
157
  switch( $key ):
158
  case 'appears':
159
  echo '<div class="wpzerospam-details-item">';
160
+ echo '<div class="wpzerospam-details-label">' . __( 'Appears', 'zero-spam' ) . '</div>';
161
  echo '<div class="wpzerospam-details-data">' . $value . '</div>';
162
  echo '</div>';
163
  break;
164
  case 'confidence':
165
  echo '<div class="wpzerospam-details-item">';
166
+ echo '<div class="wpzerospam-details-label">' . __( 'Confidence', 'zero-spam' ) . '</div>';
167
  echo '<div class="wpzerospam-details-data">' . $value . '%</div>';
168
  echo '</div>';
169
  break;
170
  case 'frequency':
171
  echo '<div class="wpzerospam-details-item">';
172
+ echo '<div class="wpzerospam-details-label">' . __( 'Frequency', 'zero-spam' ) . '</div>';
173
  echo '<div class="wpzerospam-details-data">' . $value . '</div>';
174
  echo '</div>';
175
  break;
176
  case 'lastseen':
177
  echo '<div class="wpzerospam-details-item">';
178
+ echo '<div class="wpzerospam-details-label">' . __( 'Last Seen', 'zero-spam' ) . '</div>';
179
  echo '<div class="wpzerospam-details-data">' . $value . '</div>';
180
  echo '</div>';
181
  break;
182
  case 'asn':
183
  echo '<div class="wpzerospam-details-item">';
184
+ echo '<div class="wpzerospam-details-label">' . __( 'ASN', 'zero-spam' ) . '</div>';
185
  echo '<div class="wpzerospam-details-data">' . $value . '</div>';
186
  echo '</div>';
187
  break;
205
  // Register bulk actions
206
  function get_bulk_actions() {
207
  $actions = [
208
+ 'delete' => __( 'Delete', 'zero-spam' ),
209
+ 'delete_all' => __( 'Delete All Entries', 'zero-spam' )
210
  ];
211
 
212
  return $actions;
classes/class-wpzerospam-blocked-ip-table.php CHANGED
@@ -17,8 +17,8 @@ class WPZeroSpam_Blocked_IP_Table extends WP_List_Table {
17
  global $status, $page;
18
 
19
  $args = [
20
- 'singular' => __( 'Blocked IP', 'wpzerospam' ),
21
- 'plural' => __( 'Blocked IPs', 'wpzerospam' ),
22
  'ajax' => true
23
  ];
24
  parent::__construct( $args );
@@ -29,13 +29,13 @@ class WPZeroSpam_Blocked_IP_Table extends WP_List_Table {
29
  // Render a checkbox instead of text
30
  $columns = [
31
  'cb' => '<input type="checkbox" />',
32
- 'user_ip' => __( 'IP Address', 'wpzerospam' ),
33
- 'blocked_type' => __( 'Type', 'wpzerospam' ),
34
- 'date_added' => __( 'Date Added', 'wpzerospam' ),
35
- 'start_block' => __( 'Start Date', 'wpzerospam' ),
36
- 'end_block' => __( 'End Date', 'wpzerospam' ),
37
- 'reason' => __( 'Reason', 'wpzerospam' ),
38
- 'attempts' => __( 'Attempts', 'wpzerospam' ),
39
  ];
40
 
41
  return $columns;
@@ -64,16 +64,16 @@ class WPZeroSpam_Blocked_IP_Table extends WP_List_Table {
64
  ?>
65
  <div class="alignleft actions">
66
  <?php
67
- echo '<label class="screen-reader-text" for="filter-by-type">' . __( 'Filter by type' ) . '</label>';
68
  $current_type = ! empty( $_REQUEST['type'] ) ? sanitize_text_field( $_REQUEST['type'] ) : false;
69
  ?>
70
  <select name="type" id="filter-by-type">
71
- <option value=""><?php _e( 'All types', 'wpzerospam' ); ?></option>
72
- <option<?php if ( $current_type == 'permanent' ): ?> selected="selected" <?php endif; ?> value="permanent"><?php _e( 'Permanent', 'wpzerospam' ); ?></option>
73
- <option<?php if ( $current_type == 'temporary' ): ?> selected="selected" <?php endif; ?> value="temporary"><?php _e( 'Temporary', 'wpzerospam' ); ?></option>
74
  </select>
75
  <?php
76
- submit_button( __( 'Filter' ), '', 'filter_action', false );
77
  ?>
78
  </div>
79
  <?php
@@ -100,10 +100,10 @@ class WPZeroSpam_Blocked_IP_Table extends WP_List_Table {
100
  case 'blocked_type':
101
  switch( $item->blocked_type ) {
102
  case 'permanent':
103
- return '<span class="wpzerospam-blocked">Permanent</span>';
104
  break;
105
  case 'temporary':
106
- return '<span class="wpzerospam-warning">Temporary</span>';
107
  break;
108
  default:
109
  return $item->blocked_type;
@@ -133,10 +133,20 @@ class WPZeroSpam_Blocked_IP_Table extends WP_List_Table {
133
 
134
  switch( $item->reason ) {
135
  case 'comment (permanently auto-blocked)':
136
- return __( 'Comment <span class="wpzerospam-small">(<strong>permanently</strong> auto-blocked)</span>', 'wpzerospam' );
 
 
 
 
 
137
  break;
138
  case 'comment (auto-blocked)':
139
- return __( 'Comment <span class="wpzerospam-small">(auto-blocked)</span>', 'wpzerospam' );
 
 
 
 
 
140
  break;
141
  default:
142
  return $item->reason;
@@ -151,8 +161,8 @@ class WPZeroSpam_Blocked_IP_Table extends WP_List_Table {
151
  // Register bulk actions
152
  function get_bulk_actions() {
153
  $actions = [
154
- 'delete' => __( 'Delete', 'wpzerospam' ),
155
- 'delete_all' => __( 'Delete All Entries', 'wpzerospam' )
156
  ];
157
 
158
  return $actions;
17
  global $status, $page;
18
 
19
  $args = [
20
+ 'singular' => __( 'Blocked IP', 'zero-spam' ),
21
+ 'plural' => __( 'Blocked IPs', 'zero-spam' ),
22
  'ajax' => true
23
  ];
24
  parent::__construct( $args );
29
  // Render a checkbox instead of text
30
  $columns = [
31
  'cb' => '<input type="checkbox" />',
32
+ 'user_ip' => __( 'IP Address', 'zero-spam' ),
33
+ 'blocked_type' => __( 'Type', 'zero-spam' ),
34
+ 'date_added' => __( 'Date Added', 'zero-spam' ),
35
+ 'start_block' => __( 'Start Date', 'zero-spam' ),
36
+ 'end_block' => __( 'End Date', 'zero-spam' ),
37
+ 'reason' => __( 'Reason', 'zero-spam' ),
38
+ 'attempts' => __( 'Attempts', 'zero-spam' ),
39
  ];
40
 
41
  return $columns;
64
  ?>
65
  <div class="alignleft actions">
66
  <?php
67
+ echo '<label class="screen-reader-text" for="filter-by-type">' . __( 'Filter by type', 'zero-spam' ) . '</label>';
68
  $current_type = ! empty( $_REQUEST['type'] ) ? sanitize_text_field( $_REQUEST['type'] ) : false;
69
  ?>
70
  <select name="type" id="filter-by-type">
71
+ <option value=""><?php _e( 'All types', 'zero-spam' ); ?></option>
72
+ <option<?php if ( $current_type == 'permanent' ): ?> selected="selected" <?php endif; ?> value="permanent"><?php _e( 'Permanent', 'zero-spam' ); ?></option>
73
+ <option<?php if ( $current_type == 'temporary' ): ?> selected="selected" <?php endif; ?> value="temporary"><?php _e( 'Temporary', 'zero-spam' ); ?></option>
74
  </select>
75
  <?php
76
+ submit_button( __( 'Filter', 'zero-spam' ), '', 'filter_action', false );
77
  ?>
78
  </div>
79
  <?php
100
  case 'blocked_type':
101
  switch( $item->blocked_type ) {
102
  case 'permanent':
103
+ return '<span class="wpzerospam-blocked">' . __( 'Permanent', 'zero-spam' ) . '</span>';
104
  break;
105
  case 'temporary':
106
+ return '<span class="wpzerospam-warning">' . __( 'Temporary', 'zero-spam' ) . '</span>';
107
  break;
108
  default:
109
  return $item->blocked_type;
133
 
134
  switch( $item->reason ) {
135
  case 'comment (permanently auto-blocked)':
136
+ return sprintf(
137
+ wp_kses(
138
+ __( 'Comment <span class="wpzerospam-small">(<strong>permanently</strong> auto-blocked)</span>', 'zero-spam' ),
139
+ [ 'span' => [ 'class' => [] ], 'strong' => [] ]
140
+ )
141
+ );
142
  break;
143
  case 'comment (auto-blocked)':
144
+ return sprintf(
145
+ wp_kses(
146
+ __( 'Comment <span class="wpzerospam-small">(auto-blocked)</span>', 'zero-spam' ),
147
+ [ 'span' => [ 'class' => [] ] ]
148
+ )
149
+ );
150
  break;
151
  default:
152
  return $item->reason;
161
  // Register bulk actions
162
  function get_bulk_actions() {
163
  $actions = [
164
+ 'delete' => __( 'Delete', 'zero-spam' ),
165
+ 'delete_all' => __( 'Delete All Entries', 'zero-spam' )
166
  ];
167
 
168
  return $actions;
classes/class-wpzerospam-log-table.php CHANGED
@@ -17,8 +17,8 @@ class WPZeroSpam_Log_Table extends WP_List_Table {
17
  global $status, $page;
18
 
19
  $args = [
20
- 'singular' => __( 'Spam Detection', 'wpzerospam' ),
21
- 'plural' => __( 'Spam Detections', 'wpzerospam' ),
22
  'ajax' => true
23
  ];
24
  parent::__construct( $args );
@@ -29,14 +29,14 @@ class WPZeroSpam_Log_Table extends WP_List_Table {
29
  // Render a checkbox instead of text
30
  $columns = [
31
  'cb' => '<input type="checkbox" />',
32
- 'date_recorded' => __( 'Date', 'wpzerospam' ),
33
- 'log_type' => __( 'Type', 'wpzerospam' ),
34
- 'user_ip' => __( 'IP Address', 'wpzerospam' ),
35
- 'country' => __( 'Country', 'wpzerospam' ),
36
- 'region' => __( 'Region', 'wpzerospam' ),
37
- 'city' => __( 'City', 'wpzerospam' ),
38
- 'details' => __( 'Details', 'wpzerospam' ),
39
- 'actions' => __( 'Block IP', 'wpzerospam' ),
40
  ];
41
 
42
  return $columns;
@@ -65,18 +65,18 @@ class WPZeroSpam_Log_Table extends WP_List_Table {
65
  ?>
66
  <div class="alignleft actions">
67
  <?php
68
- echo '<label class="screen-reader-text" for="filter-by-type">' . __( 'Filter by type' ) . '</label>';
69
  $options = wpzerospam_types();
70
  $current_type = ! empty( $_REQUEST['type'] ) ? sanitize_text_field( $_REQUEST['type'] ) : false;
71
  ?>
72
  <select name="type" id="filter-by-type">
73
- <option value=""><?php _e( 'All types', 'wpzerospam' ); ?></option>
74
  <?php foreach( $options as $key => $value ): ?>
75
  <option<?php if ( $current_type == $key ): ?> selected="selected" <?php endif; ?> value="<?php echo $key; ?>"><?php echo $value; ?></option>
76
  <?php endforeach; ?>
77
  </select>
78
  <?php
79
- submit_button( __( 'Filter' ), '', 'filter_action', false );
80
  ?>
81
  </div>
82
  <?php
@@ -96,9 +96,9 @@ class WPZeroSpam_Log_Table extends WP_List_Table {
96
  switch( $column_name ) {
97
  case 'actions':
98
  if ( wpzerospam_is_blocked( $item->user_ip ) ) {
99
- return '<span class="wpzerospam-blocked">' . __( 'Blocked', 'wpzerospam' ) . '</span>';
100
  } else {
101
- return '<a class="button" href="' . admin_url( 'admin.php?page=wordpress-zero-spam-blocked-ips&ip=' . $item->user_ip ) . '">' . __( 'Block IP', 'wpzerospam' ) . '</a>';
102
  }
103
  break;
104
  case 'log_id':
@@ -137,83 +137,66 @@ class WPZeroSpam_Log_Table extends WP_List_Table {
137
  return $item->city;
138
  break;
139
  case 'details':
140
- if ( empty( $item->submission_data ) ) { return __( 'No details available.', 'wpzerospam' ); }
141
  ob_start();
142
  ?>
143
- <button class="button action wpzerospam-details-trigger" data-id="<?php echo $item->log_id; ?>"><?php _e( 'View', 'wpzerospam' ); ?></button>
144
  <div class="wpzerospam-details-modal" id="wpzerospam-details-modal-<?php echo $item->log_id; ?>">
145
  <div class="wpzerospam-details-modal-inner">
146
  <?php
147
  echo '<div class="wpzerospam-details-item">';
148
- echo '<div class="wpzerospam-details-label">' . __( 'Detected Spam IP', 'wpzerospam' ) . '</div>';
149
  echo '<div class="wpzerospam-details-data">' . '<a href="https://whatismyipaddress.com/ip/' . $item->user_ip .'" target="_blank" rel="noopener noreferrer">' . $item->user_ip . '</a></div>';
150
  echo '</div>';
151
 
152
  echo '<div class="wpzerospam-details-item">';
153
- echo '<div class="wpzerospam-details-label">' . __( 'Page URL', 'wpzerospam' ) . '</div>';
154
  echo '<div class="wpzerospam-details-data"><a href="' . esc_url( $item->page_url ) . '" target="_blank" rel="noreferrer noopener">' . $item->page_url . '</a></div>';
155
  echo '</div>';
156
 
157
  echo '<div class="wpzerospam-details-item">';
158
- echo '<div class="wpzerospam-details-label">' . __( 'Date', 'wpzerospam' ) . '</div>';
159
  echo '<div class="wpzerospam-details-data">' . date( 'M j, Y g:ia' , strtotime( $item->date_recorded ) ) . '</div>';
160
  echo '</div>';
161
 
162
  echo '<div class="wpzerospam-details-item">';
163
- echo '<div class="wpzerospam-details-label">' . __( 'Type', 'wpzerospam' ) . '</div>';
164
  echo '<div class="wpzerospam-details-data">' . wpzerospam_types( $item->log_type ) . '</div>';
165
  echo '</div>';
166
 
167
  if ( $item->country ) {
168
  echo '<div class="wpzerospam-details-item">';
169
- echo '<div class="wpzerospam-details-label">' . __( 'Country', 'wpzerospam' ) . '</div>';
170
  echo '<div class="wpzerospam-details-data">' . wpzerospam_get_location( $item->country ) . '</div>';
171
  echo '</div>';
172
  }
173
 
174
  if ( $item->region ) {
175
  echo '<div class="wpzerospam-details-item">';
176
- echo '<div class="wpzerospam-details-label">' . __( 'Region', 'wpzerospam' ) . '</div>';
177
  echo '<div class="wpzerospam-details-data">' . wpzerospam_get_location( $item->country, $item->region ) . '</div>';
178
  echo '</div>';
179
  }
180
 
181
  if ( $item->city ) {
182
  echo '<div class="wpzerospam-details-item">';
183
- echo '<div class="wpzerospam-details-label">' . __( 'City', 'wpzerospam' ) . '</div>';
184
  echo '<div class="wpzerospam-details-data">' . $item->city . '</div>';
185
  echo '</div>';
186
  }
187
 
188
  if ( ! empty( $item->submission_data ) ) {
189
  $submission_data = json_decode( $item->submission_data, true );
 
190
  foreach( $submission_data as $key => $value ):
191
  if ( ! $value ) { continue; }
192
 
193
  do_action( 'wpzerospam_admin_submission_data_items', $key, $value );
194
 
195
  switch( $key ):
196
- case 'sanitized_user_login':
197
- echo '<div class="wpzerospam-details-item">';
198
- echo '<div class="wpzerospam-details-label">' . __( 'Sanitized User Login', 'wpzerospam' ) . '</div>';
199
- echo '<div class="wpzerospam-details-data">' . $value . '</div>';
200
- echo '</div>';
201
- break;
202
- case 'user_email':
203
- echo '<div class="wpzerospam-details-item">';
204
- echo '<div class="wpzerospam-details-label">' . __( 'User Email', 'wpzerospam' ) . '</div>';
205
- echo '<div class="wpzerospam-details-data">' . $value . '</div>';
206
- echo '</div>';
207
- break;
208
- case 'errors':
209
- echo '<div class="wpzerospam-details-item">';
210
- echo '<div class="wpzerospam-details-label">' . __( 'Errors', 'wpzerospam' ) . '</div>';
211
- echo '<div class="wpzerospam-details-data">' . json_encode( $value ) . '</div>';
212
- echo '</div>';
213
- break;
214
  case 'reason':
215
  echo '<div class="wpzerospam-details-item">';
216
- echo '<div class="wpzerospam-details-label">' . __( 'Reason', 'wpzerospam' ) . '</div>';
217
  echo '<div class="wpzerospam-details-data">' . $value . '</div>';
218
  echo '</div>';
219
  break;
@@ -221,31 +204,31 @@ class WPZeroSpam_Log_Table extends WP_List_Table {
221
  // Formidable fields
222
  case 'frm_action':
223
  echo '<div class="wpzerospam-details-item">';
224
- echo '<div class="wpzerospam-details-label">' . __( 'Form Action', 'wpzerospam' ) . '</div>';
225
  echo '<div class="wpzerospam-details-data">' . $value . '</div>';
226
  echo '</div>';
227
  break;
228
  case 'form_id':
229
  echo '<div class="wpzerospam-details-item">';
230
- echo '<div class="wpzerospam-details-label">' . __( 'Form ID', 'wpzerospam' ) . '</div>';
231
  echo '<div class="wpzerospam-details-data">' . $value . '</div>';
232
  echo '</div>';
233
  break;
234
  case 'form_key':
235
  echo '<div class="wpzerospam-details-item">';
236
- echo '<div class="wpzerospam-details-label">' . __( 'Form Key', 'wpzerospam' ) . '</div>';
237
  echo '<div class="wpzerospam-details-data">' . $value . '</div>';
238
  echo '</div>';
239
  break;
240
  case 'item_key':
241
  echo '<div class="wpzerospam-details-item">';
242
- echo '<div class="wpzerospam-details-label">' . __( 'Item Key', 'wpzerospam' ) . '</div>';
243
  echo '<div class="wpzerospam-details-data">' . $value . '</div>';
244
  echo '</div>';
245
  break;
246
  case 'item_meta':
247
  echo '<div class="wpzerospam-details-item">';
248
- echo '<div class="wpzerospam-details-label">' . __( 'Form Values', 'wpzerospam' ) . '</div>';
249
  if ( is_array( $value ) ) {
250
  echo '<div class="wpzerospam-details-data">' . implode( ", ", array_filter( $value ) ) . '</div>';
251
  } else {
@@ -255,7 +238,7 @@ class WPZeroSpam_Log_Table extends WP_List_Table {
255
  break;
256
  case '_wp_http_referer':
257
  echo '<div class="wpzerospam-details-item">';
258
- echo '<div class="wpzerospam-details-label">' . __( 'Source', 'wpzerospam' ) . '</div>';
259
  if ( $value ) {
260
  $source_url = esc_url( site_url( $value ) );
261
  echo '<div class="wpzerospam-details-data"><a href="' . $source_url . '" target="_blank" rel="noopener noreferrer">' . $source_url . '</a></div>';
@@ -266,10 +249,13 @@ class WPZeroSpam_Log_Table extends WP_List_Table {
266
  break;
267
 
268
  default:
269
- echo '<div class="wpzerospam-details-item wpzerospam-details-item-unknown">';
270
- echo '<div class="wpzerospam-details-label">' . $key . '</div>';
271
- echo '<div class="wpzerospam-details-data">' . json_encode( $value ) . '</div>';
272
- echo '</div>';
 
 
 
273
  endswitch;
274
  endforeach;
275
  };
@@ -285,8 +271,8 @@ class WPZeroSpam_Log_Table extends WP_List_Table {
285
  // Register bulk actions
286
  function get_bulk_actions() {
287
  $actions = [
288
- 'delete' => __( 'Delete Selected', 'wpzerospam' ) ,
289
- 'delete_all' => __( 'Delete All Entries', 'wpzerospam' )
290
  ];
291
 
292
  return $actions;
17
  global $status, $page;
18
 
19
  $args = [
20
+ 'singular' => __( 'Spam Detection', 'zero-spam' ),
21
+ 'plural' => __( 'Spam Detections', 'zero-spam' ),
22
  'ajax' => true
23
  ];
24
  parent::__construct( $args );
29
  // Render a checkbox instead of text
30
  $columns = [
31
  'cb' => '<input type="checkbox" />',
32
+ 'date_recorded' => __( 'Date', 'zero-spam' ),
33
+ 'log_type' => __( 'Type', 'zero-spam' ),
34
+ 'user_ip' => __( 'IP Address', 'zero-spam' ),
35
+ 'country' => __( 'Country', 'zero-spam' ),
36
+ 'region' => __( 'Region', 'zero-spam' ),
37
+ 'city' => __( 'City', 'zero-spam' ),
38
+ 'details' => __( 'Details', 'zero-spam' ),
39
+ 'actions' => __( 'Block IP', 'zero-spam' ),
40
  ];
41
 
42
  return $columns;
65
  ?>
66
  <div class="alignleft actions">
67
  <?php
68
+ echo '<label class="screen-reader-text" for="filter-by-type">' . __( 'Filter by type', 'zero-spam' ) . '</label>';
69
  $options = wpzerospam_types();
70
  $current_type = ! empty( $_REQUEST['type'] ) ? sanitize_text_field( $_REQUEST['type'] ) : false;
71
  ?>
72
  <select name="type" id="filter-by-type">
73
+ <option value=""><?php _e( 'All types', 'zero-spam' ); ?></option>
74
  <?php foreach( $options as $key => $value ): ?>
75
  <option<?php if ( $current_type == $key ): ?> selected="selected" <?php endif; ?> value="<?php echo $key; ?>"><?php echo $value; ?></option>
76
  <?php endforeach; ?>
77
  </select>
78
  <?php
79
+ submit_button( __( 'Filter', 'zero-spam' ), '', 'filter_action', false );
80
  ?>
81
  </div>
82
  <?php
96
  switch( $column_name ) {
97
  case 'actions':
98
  if ( wpzerospam_is_blocked( $item->user_ip ) ) {
99
+ return '<span class="wpzerospam-blocked">' . __( 'Blocked', 'zero-spam' ) . '</span>';
100
  } else {
101
+ return '<a class="button" href="' . admin_url( 'admin.php?page=wordpress-zero-spam-blocked-ips&ip=' . $item->user_ip ) . '">' . __( 'Block IP', 'zero-spam' ) . '</a>';
102
  }
103
  break;
104
  case 'log_id':
137
  return $item->city;
138
  break;
139
  case 'details':
140
+ if ( empty( $item->submission_data ) ) { return __( 'No details available.', 'zero-spam' ); }
141
  ob_start();
142
  ?>
143
+ <button class="button action wpzerospam-details-trigger" data-id="<?php echo $item->log_id; ?>"><?php _e( 'View', 'zero-spam' ); ?></button>
144
  <div class="wpzerospam-details-modal" id="wpzerospam-details-modal-<?php echo $item->log_id; ?>">
145
  <div class="wpzerospam-details-modal-inner">
146
  <?php
147
  echo '<div class="wpzerospam-details-item">';
148
+ echo '<div class="wpzerospam-details-label">' . __( 'Detected Spam IP', 'zero-spam' ) . '</div>';
149
  echo '<div class="wpzerospam-details-data">' . '<a href="https://whatismyipaddress.com/ip/' . $item->user_ip .'" target="_blank" rel="noopener noreferrer">' . $item->user_ip . '</a></div>';
150
  echo '</div>';
151
 
152
  echo '<div class="wpzerospam-details-item">';
153
+ echo '<div class="wpzerospam-details-label">' . __( 'Page URL', 'zero-spam' ) . '</div>';
154
  echo '<div class="wpzerospam-details-data"><a href="' . esc_url( $item->page_url ) . '" target="_blank" rel="noreferrer noopener">' . $item->page_url . '</a></div>';
155
  echo '</div>';
156
 
157
  echo '<div class="wpzerospam-details-item">';
158
+ echo '<div class="wpzerospam-details-label">' . __( 'Date', 'zero-spam' ) . '</div>';
159
  echo '<div class="wpzerospam-details-data">' . date( 'M j, Y g:ia' , strtotime( $item->date_recorded ) ) . '</div>';
160
  echo '</div>';
161
 
162
  echo '<div class="wpzerospam-details-item">';
163
+ echo '<div class="wpzerospam-details-label">' . __( 'Type', 'zero-spam' ) . '</div>';
164
  echo '<div class="wpzerospam-details-data">' . wpzerospam_types( $item->log_type ) . '</div>';
165
  echo '</div>';
166
 
167
  if ( $item->country ) {
168
  echo '<div class="wpzerospam-details-item">';
169
+ echo '<div class="wpzerospam-details-label">' . __( 'Country', 'zero-spam' ) . '</div>';
170
  echo '<div class="wpzerospam-details-data">' . wpzerospam_get_location( $item->country ) . '</div>';
171
  echo '</div>';
172
  }
173
 
174
  if ( $item->region ) {
175
  echo '<div class="wpzerospam-details-item">';
176
+ echo '<div class="wpzerospam-details-label">' . __( 'Region', 'zero-spam' ) . '</div>';
177
  echo '<div class="wpzerospam-details-data">' . wpzerospam_get_location( $item->country, $item->region ) . '</div>';
178
  echo '</div>';
179
  }
180
 
181
  if ( $item->city ) {
182
  echo '<div class="wpzerospam-details-item">';
183
+ echo '<div class="wpzerospam-details-label">' . __( 'City', 'zero-spam' ) . '</div>';
184
  echo '<div class="wpzerospam-details-data">' . $item->city . '</div>';
185
  echo '</div>';
186
  }
187
 
188
  if ( ! empty( $item->submission_data ) ) {
189
  $submission_data = json_decode( $item->submission_data, true );
190
+
191
  foreach( $submission_data as $key => $value ):
192
  if ( ! $value ) { continue; }
193
 
194
  do_action( 'wpzerospam_admin_submission_data_items', $key, $value );
195
 
196
  switch( $key ):
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
197
  case 'reason':
198
  echo '<div class="wpzerospam-details-item">';
199
+ echo '<div class="wpzerospam-details-label">' . __( 'Reason', 'zero-spam' ) . '</div>';
200
  echo '<div class="wpzerospam-details-data">' . $value . '</div>';
201
  echo '</div>';
202
  break;
204
  // Formidable fields
205
  case 'frm_action':
206
  echo '<div class="wpzerospam-details-item">';
207
+ echo '<div class="wpzerospam-details-label">' . __( 'Form Action', 'zero-spam' ) . '</div>';
208
  echo '<div class="wpzerospam-details-data">' . $value . '</div>';
209
  echo '</div>';
210
  break;
211
  case 'form_id':
212
  echo '<div class="wpzerospam-details-item">';
213
+ echo '<div class="wpzerospam-details-label">' . __( 'Form ID', 'zero-spam' ) . '</div>';
214
  echo '<div class="wpzerospam-details-data">' . $value . '</div>';
215
  echo '</div>';
216
  break;
217
  case 'form_key':
218
  echo '<div class="wpzerospam-details-item">';
219
+ echo '<div class="wpzerospam-details-label">' . __( 'Form Key', 'zero-spam' ) . '</div>';
220
  echo '<div class="wpzerospam-details-data">' . $value . '</div>';
221
  echo '</div>';
222
  break;
223
  case 'item_key':
224
  echo '<div class="wpzerospam-details-item">';
225
+ echo '<div class="wpzerospam-details-label">' . __( 'Item Key', 'zero-spam' ) . '</div>';
226
  echo '<div class="wpzerospam-details-data">' . $value . '</div>';
227
  echo '</div>';
228
  break;
229
  case 'item_meta':
230
  echo '<div class="wpzerospam-details-item">';
231
+ echo '<div class="wpzerospam-details-label">' . __( 'Form Values', 'zero-spam' ) . '</div>';
232
  if ( is_array( $value ) ) {
233
  echo '<div class="wpzerospam-details-data">' . implode( ", ", array_filter( $value ) ) . '</div>';
234
  } else {
238
  break;
239
  case '_wp_http_referer':
240
  echo '<div class="wpzerospam-details-item">';
241
+ echo '<div class="wpzerospam-details-label">' . __( 'Source', 'zero-spam' ) . '</div>';
242
  if ( $value ) {
243
  $source_url = esc_url( site_url( $value ) );
244
  echo '<div class="wpzerospam-details-data"><a href="' . $source_url . '" target="_blank" rel="noopener noreferrer">' . $source_url . '</a></div>';
249
  break;
250
 
251
  default:
252
+ $defined_submission_data = apply_filters( 'wpzerospam_defined_submission_data', [] );
253
+ if ( ! in_array( $key, $defined_submission_data ) ) {
254
+ echo '<div class="wpzerospam-details-item wpzerospam-details-item-unknown">';
255
+ echo '<div class="wpzerospam-details-label">' . $key . '</div>';
256
+ echo '<div class="wpzerospam-details-data">' . json_encode( $value ) . '</div>';
257
+ echo '</div>';
258
+ }
259
  endswitch;
260
  endforeach;
261
  };
271
  // Register bulk actions
272
  function get_bulk_actions() {
273
  $actions = [
274
+ 'delete' => __( 'Delete Selected', 'zero-spam' ) ,
275
+ 'delete_all' => __( 'Delete All Entries', 'zero-spam' )
276
  ];
277
 
278
  return $actions;
inc/admin.php CHANGED
@@ -38,8 +38,8 @@ if ( ! function_exists( 'wpzerospam_details_item') ) {
38
 
39
  function wpzerospam_admin_menu() {
40
  add_menu_page(
41
- __( 'WordPress Zero Spam Dashboard', 'wpzerospam' ),
42
- __( 'WP Zero Spam', 'wpzerospam' ),
43
  'manage_options',
44
  'wordpress-zero-spam',
45
  'wpzerospam_dashboard',
@@ -48,8 +48,8 @@ function wpzerospam_admin_menu() {
48
 
49
  add_submenu_page(
50
  'wordpress-zero-spam',
51
- __( 'WordPress Zero Spam Dashboard', 'wpzerospam' ),
52
- __( 'Dashboard', 'wpzerospam' ),
53
  'manage_options',
54
  'wordpress-zero-spam',
55
  'wpzerospam_dashboard'
@@ -57,8 +57,8 @@ function wpzerospam_admin_menu() {
57
 
58
  add_submenu_page(
59
  'wordpress-zero-spam',
60
- __( 'Spam Detections', 'wpzerospam' ),
61
- __( 'Spam Detections', 'wpzerospam' ),
62
  'manage_options',
63
  'wordpress-zero-spam-detections',
64
  'wpzerospam_spam_detections_page'
@@ -66,8 +66,8 @@ function wpzerospam_admin_menu() {
66
 
67
  add_submenu_page(
68
  'wordpress-zero-spam',
69
- __( 'Blocked IP Addresses', 'wpzerospam' ),
70
- __( 'Blocked IPs', 'wpzerospam' ),
71
  'manage_options',
72
  'wordpress-zero-spam-blocked-ips',
73
  'wpzerospam_blocked_ips_page'
@@ -75,8 +75,8 @@ function wpzerospam_admin_menu() {
75
 
76
  add_submenu_page(
77
  'wordpress-zero-spam',
78
- __( 'Blacklisted IPs', 'wpzerospam' ),
79
- __( 'Blacklisted IPs', 'wpzerospam' ),
80
  'manage_options',
81
  'wordpress-zero-spam-blacklisted',
82
  'wpzerospam_blacklist_page'
@@ -84,8 +84,8 @@ function wpzerospam_admin_menu() {
84
 
85
  add_submenu_page(
86
  'wordpress-zero-spam',
87
- __( 'WordPress Zero Spam Settings', 'wpzerospam' ),
88
- __( 'Settings', 'wpzerospam' ),
89
  'manage_options',
90
  'wordpress-zero-spam-settings',
91
  'wpzerospam_options_page'
@@ -115,7 +115,7 @@ function wpzerospam_spam_detections_page() {
115
  <form id="log-table" method="post">
116
  <?php wp_nonce_field( 'wpzerospam_nonce', 'wpzerospam_nonce' ); ?>
117
  <input type="hidden" name="paged" value="1" />
118
- <?php $table_data->search_box( __( 'Search IPs', 'wpzerospam' ), 'search-ip' ); ?>
119
  <?php $table_data->display(); ?>
120
  </form>
121
  </div>
@@ -144,7 +144,7 @@ function wpzerospam_blacklist_page() {
144
  <form id="blacklist-table" method="post">
145
  <?php wp_nonce_field( 'wpzerospam_nonce', 'wpzerospam_nonce' ); ?>
146
  <input type="hidden" name="paged" value="1" />
147
- <?php $table_data->search_box( __( 'Search IPs', 'wpzerospam' ), 'search-ip' ); ?>
148
  <?php $table_data->display(); ?>
149
  </form>
150
  </div>
@@ -218,23 +218,23 @@ function wpzerospam_blocked_ips_page() {
218
  <?php
219
  switch( $_GET['error'] ):
220
  case 1:
221
- _e( 'Please enter a valid IP address.', 'wpzerospam' );
222
  break;
223
  case 2:
224
- _e( 'Please select a valid type.', 'wpzerospam' );
225
  break;
226
  case 3:
227
- _e( 'Please select a date & time when the temporary block should end.', 'wpzerospam' );
228
  break;
229
  endswitch;
230
  ?>
231
  </strong></p>
232
- <button type="button" class="notice-dismiss"><span class="screen-reader-text">Dismiss this notice.</span></button>
233
  </div>
234
  <?php elseif ( ! empty( $_GET['success'] ) ): ?>
235
  <div class="notice notice-success is-dismissible">
236
  <p><strong><?php _e( 'The blocked IP has been successfully added.', 'wpzerospam' ); ?></strong></p>
237
- <button type="button" class="notice-dismiss"><span class="screen-reader-text">Dismiss this notice.</span></button>
238
  </div>
239
  <?php endif; ?>
240
  <form method="post" action="<?php echo admin_url( 'admin.php' ); ?>">
@@ -242,7 +242,7 @@ function wpzerospam_blocked_ips_page() {
242
  <div class="wpzerospam-callout wpzerospam-add-ip-container<?php if( ! empty( $_REQUEST['ip'] ) ): ?> wpzerospam-add-ip-container-highlight<?php endif; ?>">
243
  <h2><?php _e( 'Add Blocked IP', 'wpzerospam' ); ?></h2>
244
  <div class="wpzerospam-add-ip-field">
245
- <label for="blocked-ip"><?php _e( 'IP Address', 'wpzerospam' ); ?></label>
246
  <input
247
  type="text"
248
  id="blocked-ip"
@@ -252,26 +252,26 @@ function wpzerospam_blocked_ips_page() {
252
  />
253
  </div>
254
  <div class="wpzerospam-add-ip-field">
255
- <label for="blocked-type"><?php _e( 'Type', 'wpzerospam' ); ?></label>
256
  <select id="blocked-type" name="blocked_type">
257
- <option value="temporary"><?php _e( 'Temporary', 'wpzerospam' ); ?></option>
258
- <option value="permanent"><?php _e( 'Permanent', 'wpzerospam' ); ?></option>
259
  </select>
260
  </div>
261
  <div class="wpzerospam-add-ip-field" id="wpzerospam-add-ip-field-reason">
262
- <label for="blocked-reason"><?php _e( 'Reason', 'wpzerospam' ); ?></label>
263
- <input type="text" id="blocked-reason" name="blocked_reason" value="" placeholder="<?php _e( 'e.g. Spammed form', 'wpzerospam' ); ?>" />
264
  </div>
265
  <div class="wpzerospam-add-ip-field" id="wpzerospam-add-ip-field-start-date">
266
- <label for="blocked-start-date"><?php _e( 'Start Date', 'wpzerospam' ); ?></label>
267
- <input type="datetime-local" id="blocked-start-date" name="blocked_start_date" value="" placeholder="<?php _e( 'Optional', 'wpzerospam' ); ?>" />
268
  </div>
269
  <div class="wpzerospam-add-ip-field" id="wpzerospam-add-ip-field-end-date">
270
- <label for="blocked-end-date"><?php _e( 'End Date', 'wpzerospam' ); ?></label>
271
- <input type="datetime-local" id="blocked-end-date" name="blocked_end_date" value="" placeholder="<?php _e( 'Optional', 'wpzerospam' ); ?>" />
272
  </div>
273
  <div class="wpzerospam-add-ip-field" id="wpzerospam-add-ip-field-submit">
274
- <input type="submit" class="button button-primary" value="<?php _e( 'Add Blocked IP', 'wpzerospam' ); ?>" />
275
  </div>
276
  </div>
277
  </form>
@@ -290,7 +290,7 @@ function wpzerospam_blocked_ips_page() {
290
  <form id="blocked-table" method="post">
291
  <?php wp_nonce_field( 'wpzerospam_nonce', 'wpzerospam_nonce' ); ?>
292
  <input type="hidden" name="paged" value="1" />
293
- <?php $table_data->search_box( __( 'Search IPs', 'wpzerospam' ), 'search-ip' ); ?>
294
  <?php $table_data->display(); ?>
295
  </form>
296
  </div>
@@ -349,7 +349,6 @@ function wpzerospam_options_page() {
349
 
350
  function wpzerospam_validate_options( $input ) {
351
  if ( empty( $input['log_spam'] ) ) { $input['log_spam'] = 'disabled'; }
352
- if ( empty( $input['verify_registrations'] ) ) { $input['verify_registrations'] = 'disabled'; }
353
  if ( empty( $input['log_blocked_ips'] ) ) { $input['log_blocked_ips'] = 'disabled'; }
354
  if ( empty( $input['auto_block_ips'] ) ) { $input['auto_block_ips'] = 'disabled'; }
355
  if ( empty( $input['auto_block_period'] ) ) { $input['auto_block_period'] = 0; }
@@ -377,10 +376,6 @@ function wpzerospam_validate_options( $input ) {
377
  $input['ip_whitelist'] = $cleaned_whitelist;
378
  }
379
 
380
- if ( empty( $input['verify_cf7'] ) ) {
381
- $input['verify_cf7'] = 'disabled';
382
- }
383
-
384
  if ( empty( $input['verify_bp_registrations'] ) ) {
385
  $input['verify_bp_registrations'] = 'disabled';
386
  }
@@ -406,7 +401,7 @@ function wpzerospam_validate_options( $input ) {
406
  }
407
 
408
  if ( empty( $input['blocked_message'] ) ) {
409
- $input['blocked_message'] = 'You have been blocked from visiting this site by WordPress Zero Spam due to detected spam activity.';
410
  }
411
 
412
  $input = apply_filters( 'wpzerospam_admin_validation', $input );
@@ -438,293 +433,322 @@ function wpzerospam_admin_init() {
438
 
439
  register_setting( 'wpzerospam', 'wpzerospam', 'wpzerospam_validate_options' );
440
 
441
- add_settings_section( 'wpzerospam_general_settings', __( 'General Settings', 'wpzerospam' ), 'wpzerospam_general_settings_cb', 'wpzerospam' );
442
- add_settings_section( 'wpzerospam_autoblocks', __( 'Auto-block Settings', 'wpzerospam' ), 'wpzerospam_autoblock_settings_cb', 'wpzerospam' );
443
- add_settings_section( 'wpzerospam_onsite', __( 'On-site Spam Prevention', 'wpzerospam' ), 'wpzerospam_onsite_cb', 'wpzerospam' );
444
- add_settings_section( 'wpzerospam_spam_checks', __( 'Integrations & Third-party APIs', 'wpzerospam' ), 'wpzerospam_spam_checks_cb', 'wpzerospam' );
445
 
446
  // Cookie expiration
447
- add_settings_field( 'cookie_expiration', __( 'Cookie Expiration', 'wpzerospam' ), 'wpzerospam_field_cb', 'wpzerospam', 'wpzerospam_general_settings', [
448
  'label_for' => 'cookie_expiration',
449
  'type' => 'number',
450
- 'desc' => 'Number of days until a user\'s cookie is expired. Helps boost site performance so access & blacklist checks aren\'t sent each page visit. <strong>Minimum recommend is 7 days</strong>.',
 
 
 
451
  'class' => 'small-text',
452
  'placeholder' => '7',
453
- 'suffix' => __( 'days', 'wpzerospam' )
454
  ]);
455
 
456
  // Determines is spam detections should be shared with WordPress Zero Spam
457
- add_settings_field( 'share_detections', __( 'Share Spam Detections', 'wpzerospam' ), 'wpzerospam_field_cb', 'wpzerospam', 'wpzerospam_general_settings', [
458
  'label_for' => 'share_detections',
459
  'type' => 'checkbox',
460
  'multi' => false,
461
- 'desc' => 'Help support WordPress Zero Spam and strenghten its ability to detect spammers by sharing spam detections. The only data that\'s shared is the IP address, type & site where the spam was detected. <strong>Absolutely no personal data is shared.</strong>',
 
 
 
462
  'options' => [
463
- 'enabled' => __( 'Enabled', 'wpzerospam' )
464
  ]
465
  ]);
466
 
467
  // Determines is spam detected IPs should automatically be blocked
468
- add_settings_field( 'auto_block_ips', __( 'Auto-block IPs', 'wpzerospam' ), 'wpzerospam_field_cb', 'wpzerospam', 'wpzerospam_autoblocks', [
469
  'label_for' => 'auto_block_ips',
470
  'type' => 'checkbox',
471
  'multi' => false,
472
- 'desc' => 'Auto-blocks IPs addresses that trigger a spam detection.',
473
  'options' => [
474
- 'enabled' => __( 'Enabled', 'wpzerospam' )
475
  ]
476
  ]);
477
 
478
  if ( 'enabled' == $options['auto_block_ips'] ) {
479
  // Number of minutes a IP should be blocked after a auto-block
480
- add_settings_field( 'auto_block_period', __( 'Auto-block Period', 'wpzerospam' ), 'wpzerospam_field_cb', 'wpzerospam', 'wpzerospam_autoblocks', [
481
  'label_for' => 'auto_block_period',
482
  'type' => 'number',
483
- 'desc' => 'Number of minutes a user will be blocked from viewing the site after being auto-blocked.',
484
  'class' => 'small-text',
485
  'placeholder' => '30',
486
- 'suffix' => __( 'minutes', 'wpzerospam' )
487
  ]);
488
  }
489
 
490
  // Number of spam attempts before the IP is permanently blocked
491
- add_settings_field( 'auto_block_permanently', __( 'Permanently Auto-block', 'wpzerospam' ), 'wpzerospam_field_cb', 'wpzerospam', 'wpzerospam_autoblocks', [
492
  'label_for' => 'auto_block_permanently',
493
  'type' => 'number',
494
- 'desc' => 'Number of spam detections before an IP is permanently blocked.',
495
  'class' => 'small-text',
496
  'placeholder' => 3
497
  ]);
498
 
499
  // API timeout
500
- add_settings_field( 'api_timeout', __( 'API Timeout', 'wpzerospam' ), 'wpzerospam_field_cb', 'wpzerospam', 'wpzerospam_spam_checks', [
501
  'label_for' => 'api_timeout',
502
  'type' => 'number',
503
- 'desc' => 'Number of seconds to allow an API to return a response.<br /><strong>WARNING:</strong> Setting this too high could cause your site to load slowly. Setting too low may not allow an API enough time to respond with a result. <strong>Recommended is 5 seconds.</strong>',
 
 
 
504
  'class' => 'small-text',
505
  'placeholder' => '30',
506
- 'suffix' => __( 'seconds', 'wpzerospam' )
507
  ]);
508
 
509
  if ( 'enabled' == $options['log_spam'] ) {
510
  // Redirect URL for spam detections
511
- add_settings_field( 'ipstack_api', __( 'ipstack API Key', 'wpzerospam' ), 'wpzerospam_field_cb', 'wpzerospam', 'wpzerospam_spam_checks', [
512
  'label_for' => 'ipstack_api',
513
  'type' => 'text',
514
- 'placeholder' => __( 'Enter your ipstack API key.', 'wpzerospam' ),
515
  'class' => 'regular-text',
516
- 'desc' => 'Enter your <a href="https://ipstack.com/" target="_blank">ipstack API key</a> to enable location-based statistics. Don\'t have an API key? <a href="https://ipstack.com/signup/free" target="_blank" rel="noopener noreferrer"><strong>Get one for free!</strong></a>',
 
 
 
 
 
 
 
517
  ]);
518
  }
519
 
520
  // Enables the ability to check IPs against BotScout blacklists.
521
- add_settings_field( 'botscout_api', __( 'BotScout API Key', 'wpzerospam' ), 'wpzerospam_field_cb', 'wpzerospam', 'wpzerospam_spam_checks', [
522
  'label_for' => 'botscout_api',
523
  'type' => 'text',
524
  'class' => 'regular-text',
525
- 'placeholder' => __( 'Enter your free BotScout API key.', 'wpzerospam' ),
526
- 'desc' => 'Enter your BotScout API key to check user IPs against <a href="https://botscout.com/" target="_blank" rel="noopener noreferrer">BotScout</a>\'s blacklist. Don\'t have an API key? <a href="https://botscout.com/getkey.htm" target="_blank" rel="noopener noreferrer"><strong>Get one for free!</strong></a>'
 
 
 
 
 
 
 
527
  ]);
528
 
529
  // BotScout count minimum
530
- add_settings_field( 'botscout_count_min', __( 'BotScout Count Minimum', 'wpzerospam' ), 'wpzerospam_field_cb', 'wpzerospam', 'wpzerospam_spam_checks', [
531
  'label_for' => 'botscout_count_min',
532
  'type' => 'number',
533
- 'desc' => 'Minimum <a href="https://botscout.com/api.htm" target="_blank" rel="noopener noreferrer">count</a> an IP must meet before being marked as spam/malicious.<br /><strong>WARNING:</strong> Setting this too low could cause users to be blocked that shouldn\'t be, <strong>recommended is 5</strong>.',
 
 
 
 
 
 
534
  'class' => 'small-text',
535
  'placeholder' => '20',
536
  ]);
537
 
538
  // Enables the ability to check IPs against Stop Forum Spam blacklists.
539
- add_settings_field( 'stop_forum_spam', __( 'Stop Forum Spam', 'wpzerospam' ), 'wpzerospam_field_cb', 'wpzerospam', 'wpzerospam_spam_checks', [
540
  'label_for' => 'stop_forum_spam',
541
  'type' => 'checkbox',
542
  'multi' => false,
543
- 'desc' => 'Checks user IPs against <a href="https://www.stopforumspam.com/" target="_blank" rel="noopener noreferrer">Stop Forum Spam</a>\'s blacklist.',
 
 
 
 
 
 
544
  'options' => [
545
- 'enabled' => __( 'Enabled', 'wpzerospam' )
546
  ]
547
  ]);
548
 
549
  // StopForumSpam confidence minimum
550
- add_settings_field( 'stopforumspam_confidence_min', __( 'Stop Forum Spam Confidence Minimum', 'wpzerospam' ), 'wpzerospam_field_cb', 'wpzerospam', 'wpzerospam_spam_checks', [
551
  'label_for' => 'stopforumspam_confidence_min',
552
  'type' => 'number',
553
- 'desc' => 'Minimum <a href="https://www.stopforumspam.com/usage" target="_blank" rel="noopener noreferrer">confidence score</a> an IP must meet before being marked as spam/malicious.<br /><strong>WARNING:</strong> Setting this too low could cause users to be blocked that shouldn\'t be, <strong>recommended is 20%</strong>.',
 
 
 
 
 
 
554
  'class' => 'small-text',
555
  'placeholder' => '20',
556
- 'suffix' => __( '%', 'wpzerospam' )
557
  ]);
558
 
559
  // How to handle blocks
560
- add_settings_field( 'block_handler', __( 'Blocked IPs', 'wpzerospam' ), 'wpzerospam_field_cb', 'wpzerospam', 'wpzerospam_general_settings', [
561
  'label_for' => 'block_handler',
562
  'type' => 'radio',
563
- 'desc' => 'Determines how blocked IPs are handled when they attempt to visit the site.',
564
  'options' => [
565
- 'redirect' => __( 'Redirect user', 'wpzerospam' ),
566
- '403' => __( 'Display a <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/403" target="_blank"><code>403 Forbidden</code></a> error', 'wpzerospam' )
 
 
 
 
 
 
567
  ]
568
  ]);
569
 
570
  if ( 'redirect' == $options['block_handler'] ) {
571
  // Redirect URL for blocked users
572
- add_settings_field( 'blocked_redirect_url', __( 'Redirect for Blocked Users', 'wpzerospam' ), 'wpzerospam_field_cb', 'wpzerospam', 'wpzerospam_general_settings', [
573
  'label_for' => 'blocked_redirect_url',
574
  'type' => 'url',
575
  'class' => 'regular-text',
576
- 'desc' => 'URL blocked users will be taken to.',
577
  'placeholder' => 'e.g. https://google.com'
578
  ]);
579
  } else {
580
  // Blocked message
581
- add_settings_field( 'blocked_message', __( 'Blocked Message', 'wpzerospam' ), 'wpzerospam_field_cb', 'wpzerospam', 'wpzerospam_general_settings', [
582
  'label_for' => 'blocked_message',
583
  'type' => 'text',
584
  'class' => 'large-text',
585
- 'desc' => 'The message that will be displayed to a blocked user.',
586
- 'placeholder' => __( 'You have been blocked from visiting this site by WordPress Zero Spam due to detected spam activity.', 'wpzerospam' )
587
  ]);
588
  }
589
 
590
  // How to handle spam detections
591
- add_settings_field( 'spam_handler', __( 'Spam Detections', 'wpzerospam' ), 'wpzerospam_field_cb', 'wpzerospam', 'wpzerospam_general_settings', [
592
  'label_for' => 'spam_handler',
593
  'type' => 'radio',
594
- 'desc' => 'Determines how users are handled when spam is detected.',
595
  'options' => [
596
- 'redirect' => __( 'Redirect user', 'wpzerospam' ),
597
- '403' => __( 'Display a <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/403" target="_blank"><code>403 Forbidden</code></a> error', 'wpzerospam' )
 
 
 
 
 
 
598
  ]
599
  ]);
600
 
601
  if ( 'redirect' == $options['spam_handler'] ) {
602
  // Redirect URL for spam detections
603
- add_settings_field( 'spam_redirect_url', __( 'Redirect for Spam', 'wpzerospam' ), 'wpzerospam_field_cb', 'wpzerospam', 'wpzerospam_general_settings', [
604
  'label_for' => 'spam_redirect_url',
605
  'type' => 'url',
606
  'class' => 'regular-text',
607
- 'desc' => 'URL users will be taken to when a spam submission is detected.',
608
  'placeholder' => 'e.g. https://google.com'
609
  ]);
610
  } else {
611
  // Spam message
612
- add_settings_field( 'spam_message', __( 'Spam Detection Message', 'wpzerospam' ), 'wpzerospam_field_cb', 'wpzerospam', 'wpzerospam_general_settings', [
613
  'label_for' => 'spam_message',
614
  'type' => 'text',
615
  'class' => 'large-text',
616
- 'desc' => 'The message that will be displayed when spam is detected.',
617
- 'placeholder' => __( 'There was a problem with your submission. Please go back and try again.', 'wpzerospam' )
618
  ]);
619
  }
620
 
621
  // Toggle logging of blocked IPs
622
- add_settings_field( 'log_blocked_ips', __( 'Log Blocked IPs', 'wpzerospam' ), 'wpzerospam_field_cb', 'wpzerospam', 'wpzerospam_general_settings', [
623
  'label_for' => 'log_blocked_ips',
624
  'type' => 'checkbox',
625
  'multi' => false,
626
- 'desc' => 'Enables logging of when IPs are blocked from accessing the site.',
627
  'options' => [
628
- 'enabled' => __( 'Enabled', 'wpzerospam' )
629
  ]
630
  ]);
631
 
632
  // Log spam detections
633
- add_settings_field( 'log_spam', __( 'Log Spam Detections', 'wpzerospam' ), 'wpzerospam_field_cb', 'wpzerospam', 'wpzerospam_general_settings', [
634
  'label_for' => 'log_spam',
635
  'type' => 'checkbox',
636
  'multi' => false,
637
- 'desc' => 'Enables logging of spam detections and provides an admin interface to view statistics.',
638
  'options' => [
639
- 'enabled' => __( 'Enabled', 'wpzerospam' )
640
  ]
641
  ]);
642
 
643
- do_action( 'wpzerospam_admin_fields' );
644
-
645
- // Registration spam check
646
- add_settings_field( 'verify_registrations', __( 'Verify Registrations', 'wpzerospam' ), 'wpzerospam_field_cb', 'wpzerospam', 'wpzerospam_spam_checks', [
647
- 'label_for' => 'verify_registrations',
648
- 'type' => 'checkbox',
649
- 'multi' => false,
650
- 'desc' => 'Enables spam detection for site registrations.',
651
- 'options' => [
652
- 'enabled' => __( 'Enabled', 'wpzerospam' )
653
- ]
654
- ]);
655
-
656
- // Contact Form 7 spam check
657
- if ( is_plugin_active( 'contact-form-7/wp-contact-form-7.php' ) ) {
658
- add_settings_field( 'verify_cf7', __( 'Verify CF7 Submissions', 'wpzerospam' ), 'wpzerospam_field_cb', 'wpzerospam', 'wpzerospam_spam_checks', [
659
- 'label_for' => 'verify_cf7',
660
- 'type' => 'checkbox',
661
- 'multi' => false,
662
- 'desc' => 'Enables spam detection for Contact Form 7 submissions.',
663
- 'options' => [
664
- 'enabled' => __( 'Enabled', 'wpzerospam' )
665
- ]
666
- ]);
667
- }
668
 
669
  // BuddyPress registrations spam check
670
  if ( function_exists( 'bp_is_active' ) ) {
671
- add_settings_field( 'verify_bp_registrations', __( 'Verify BuddyPress Registrations', 'wpzerospam' ), 'wpzerospam_field_cb', 'wpzerospam', 'wpzerospam_spam_checks', [
672
  'label_for' => 'verify_bp_registrations',
673
  'type' => 'checkbox',
674
  'multi' => false,
675
- 'desc' => 'Enables spam detection for BuddyPress registrations.',
676
  'options' => [
677
- 'enabled' => __( 'Enabled', 'wpzerospam' )
678
  ]
679
  ]);
680
  }
681
 
682
  // WPForms spam check
683
  if ( is_plugin_active( 'wpforms/wpforms.php' ) || is_plugin_active( 'wpforms-lite/wpforms.php' ) ) {
684
- add_settings_field( 'verify_wpforms', __( 'Verify WPForms Submissions', 'wpzerospam' ), 'wpzerospam_field_cb', 'wpzerospam', 'wpzerospam_spam_checks', [
685
  'label_for' => 'verify_wpforms',
686
  'type' => 'checkbox',
687
  'multi' => false,
688
- 'desc' => 'Enables spam detection for WPForms submissions.',
689
  'options' => [
690
- 'enabled' => __( 'Enabled', 'wpzerospam' )
691
  ]
692
  ]);
693
  }
694
 
695
  // Fluent Form spam check
696
  if ( is_plugin_active( 'fluentform/fluentform.php' ) ) {
697
- add_settings_field( 'verify_fluentform', __( 'Verify Fluent Form Submissions', 'wpzerospam' ), 'wpzerospam_field_cb', 'wpzerospam', 'wpzerospam_spam_checks', [
698
  'label_for' => 'verify_fluentform',
699
  'type' => 'checkbox',
700
  'multi' => false,
701
- 'desc' => 'Enables spam detection for Fluent Form submissions.',
702
  'options' => [
703
- 'enabled' => __( 'Enabled', 'wpzerospam' )
704
  ]
705
  ]);
706
  }
707
 
708
  // Formidable forms spam check
709
  if ( is_plugin_active( 'formidable/formidable.php' ) ) {
710
- add_settings_field( 'verify_formidable', __( 'Verify Formidable Form Submissions', 'wpzerospam' ), 'wpzerospam_field_cb', 'wpzerospam', 'wpzerospam_spam_checks', [
711
  'label_for' => 'verify_formidable',
712
  'type' => 'checkbox',
713
  'multi' => false,
714
- 'desc' => 'Enables spam detection for Formidable form submissions.',
715
  'options' => [
716
- 'enabled' => __( 'Enabled', 'wpzerospam' )
717
  ]
718
  ]);
719
  }
720
 
721
  // IP whitelist
722
- add_settings_field( 'ip_whitelist', __( 'IP Whitelist', 'wpzerospam' ), 'wpzerospam_field_cb', 'wpzerospam', 'wpzerospam_general_settings', [
723
  'label_for' => 'ip_whitelist',
724
  'type' => 'textarea',
725
  'class' => 'large-text',
726
- 'desc' => 'Enter IPs that should be whitelisted (IPs that should never be blocked), one per line.',
727
- 'placeholder' => __( 'e.g. xxx.xxx.x.x', 'wpzerospam' )
728
  ]);
729
  }
730
  add_action( 'admin_init', 'wpzerospam_admin_init' );
38
 
39
  function wpzerospam_admin_menu() {
40
  add_menu_page(
41
+ __( 'WordPress Zero Spam Dashboard', 'zero-spam' ),
42
+ __( 'WP Zero Spam', 'zero-spam' ),
43
  'manage_options',
44
  'wordpress-zero-spam',
45
  'wpzerospam_dashboard',
48
 
49
  add_submenu_page(
50
  'wordpress-zero-spam',
51
+ __( 'WordPress Zero Spam Dashboard', 'zero-spam' ),
52
+ __( 'Dashboard', 'zero-spam' ),
53
  'manage_options',
54
  'wordpress-zero-spam',
55
  'wpzerospam_dashboard'
57
 
58
  add_submenu_page(
59
  'wordpress-zero-spam',
60
+ __( 'Spam Detections', 'zero-spam' ),
61
+ __( 'Spam Detections', 'zero-spam' ),
62
  'manage_options',
63
  'wordpress-zero-spam-detections',
64
  'wpzerospam_spam_detections_page'
66
 
67
  add_submenu_page(
68
  'wordpress-zero-spam',
69
+ __( 'Blocked IP Addresses', 'zero-spam' ),
70
+ __( 'Blocked IPs', 'zero-spam' ),
71
  'manage_options',
72
  'wordpress-zero-spam-blocked-ips',
73
  'wpzerospam_blocked_ips_page'
75
 
76
  add_submenu_page(
77
  'wordpress-zero-spam',
78
+ __( 'Blacklisted IPs', 'zero-spam' ),
79
+ __( 'Blacklisted IPs', 'zero-spam' ),
80
  'manage_options',
81
  'wordpress-zero-spam-blacklisted',
82
  'wpzerospam_blacklist_page'
84
 
85
  add_submenu_page(
86
  'wordpress-zero-spam',
87
+ __( 'WordPress Zero Spam Settings', 'zero-spam' ),
88
+ __( 'Settings', 'zero-spam' ),
89
  'manage_options',
90
  'wordpress-zero-spam-settings',
91
  'wpzerospam_options_page'
115
  <form id="log-table" method="post">
116
  <?php wp_nonce_field( 'wpzerospam_nonce', 'wpzerospam_nonce' ); ?>
117
  <input type="hidden" name="paged" value="1" />
118
+ <?php $table_data->search_box( __( 'Search IPs', 'zero-spam' ), 'search-ip' ); ?>
119
  <?php $table_data->display(); ?>
120
  </form>
121
  </div>
144
  <form id="blacklist-table" method="post">
145
  <?php wp_nonce_field( 'wpzerospam_nonce', 'wpzerospam_nonce' ); ?>
146
  <input type="hidden" name="paged" value="1" />
147
+ <?php $table_data->search_box( __( 'Search IPs', 'zero-spam' ), 'search-ip' ); ?>
148
  <?php $table_data->display(); ?>
149
  </form>
150
  </div>
218
  <?php
219
  switch( $_GET['error'] ):
220
  case 1:
221
+ _e( 'Please enter a valid IP address.', 'zero-spam' );
222
  break;
223
  case 2:
224
+ _e( 'Please select a valid type.', 'zero-spam' );
225
  break;
226
  case 3:
227
+ _e( 'Please select a date & time when the temporary block should end.', 'zero-spam' );
228
  break;
229
  endswitch;
230
  ?>
231
  </strong></p>
232
+ <button type="button" class="notice-dismiss"><span class="screen-reader-text"><?php _e( 'Dismiss this notice.', 'zero-spam' ); ?></span></button>
233
  </div>
234
  <?php elseif ( ! empty( $_GET['success'] ) ): ?>
235
  <div class="notice notice-success is-dismissible">
236
  <p><strong><?php _e( 'The blocked IP has been successfully added.', 'wpzerospam' ); ?></strong></p>
237
+ <button type="button" class="notice-dismiss"><span class="screen-reader-text"><?php _e( 'Dismiss this notice.', 'zero-spam' ); ?>.</span></button>
238
  </div>
239
  <?php endif; ?>
240
  <form method="post" action="<?php echo admin_url( 'admin.php' ); ?>">
242
  <div class="wpzerospam-callout wpzerospam-add-ip-container<?php if( ! empty( $_REQUEST['ip'] ) ): ?> wpzerospam-add-ip-container-highlight<?php endif; ?>">
243
  <h2><?php _e( 'Add Blocked IP', 'wpzerospam' ); ?></h2>
244
  <div class="wpzerospam-add-ip-field">
245
+ <label for="blocked-ip"><?php _e( 'IP Address', 'zero-spam' ); ?></label>
246
  <input
247
  type="text"
248
  id="blocked-ip"
252
  />
253
  </div>
254
  <div class="wpzerospam-add-ip-field">
255
+ <label for="blocked-type"><?php _e( 'Type', 'zero-spam' ); ?></label>
256
  <select id="blocked-type" name="blocked_type">
257
+ <option value="temporary"><?php _e( 'Temporary', 'zero-spam' ); ?></option>
258
+ <option value="permanent"><?php _e( 'Permanent', 'zero-spam' ); ?></option>
259
  </select>
260
  </div>
261
  <div class="wpzerospam-add-ip-field" id="wpzerospam-add-ip-field-reason">
262
+ <label for="blocked-reason"><?php _e( 'Reason', 'zero-spam' ); ?></label>
263
+ <input type="text" id="blocked-reason" name="blocked_reason" value="" placeholder="<?php _e( 'e.g. Spammed form', 'zero-spam' ); ?>" />
264
  </div>
265
  <div class="wpzerospam-add-ip-field" id="wpzerospam-add-ip-field-start-date">
266
+ <label for="blocked-start-date"><?php _e( 'Start Date', 'zero-spam' ); ?></label>
267
+ <input type="datetime-local" id="blocked-start-date" name="blocked_start_date" value="" placeholder="<?php _e( 'Optional', 'zero-spam' ); ?>" />
268
  </div>
269
  <div class="wpzerospam-add-ip-field" id="wpzerospam-add-ip-field-end-date">
270
+ <label for="blocked-end-date"><?php _e( 'End Date', 'zero-spam' ); ?></label>
271
+ <input type="datetime-local" id="blocked-end-date" name="blocked_end_date" value="" placeholder="<?php _e( 'Optional', 'zero-spam' ); ?>" />
272
  </div>
273
  <div class="wpzerospam-add-ip-field" id="wpzerospam-add-ip-field-submit">
274
+ <input type="submit" class="button button-primary" value="<?php _e( 'Add Blocked IP', 'zero-spam' ); ?>" />
275
  </div>
276
  </div>
277
  </form>
290
  <form id="blocked-table" method="post">
291
  <?php wp_nonce_field( 'wpzerospam_nonce', 'wpzerospam_nonce' ); ?>
292
  <input type="hidden" name="paged" value="1" />
293
+ <?php $table_data->search_box( __( 'Search IPs', 'zero-spam' ), 'search-ip' ); ?>
294
  <?php $table_data->display(); ?>
295
  </form>
296
  </div>
349
 
350
  function wpzerospam_validate_options( $input ) {
351
  if ( empty( $input['log_spam'] ) ) { $input['log_spam'] = 'disabled'; }
 
352
  if ( empty( $input['log_blocked_ips'] ) ) { $input['log_blocked_ips'] = 'disabled'; }
353
  if ( empty( $input['auto_block_ips'] ) ) { $input['auto_block_ips'] = 'disabled'; }
354
  if ( empty( $input['auto_block_period'] ) ) { $input['auto_block_period'] = 0; }
376
  $input['ip_whitelist'] = $cleaned_whitelist;
377
  }
378
 
 
 
 
 
379
  if ( empty( $input['verify_bp_registrations'] ) ) {
380
  $input['verify_bp_registrations'] = 'disabled';
381
  }
401
  }
402
 
403
  if ( empty( $input['blocked_message'] ) ) {
404
+ $input['blocked_message'] = __( 'You have been blocked from visiting this site by WordPress Zero Spam due to detected spam activity.', 'zero-spam' );
405
  }
406
 
407
  $input = apply_filters( 'wpzerospam_admin_validation', $input );
433
 
434
  register_setting( 'wpzerospam', 'wpzerospam', 'wpzerospam_validate_options' );
435
 
436
+ add_settings_section( 'wpzerospam_general_settings', __( 'General Settings', 'zero-spam' ), 'wpzerospam_general_settings_cb', 'wpzerospam' );
437
+ add_settings_section( 'wpzerospam_autoblocks', __( 'Auto-block Settings', 'zero-spam' ), 'wpzerospam_autoblock_settings_cb', 'wpzerospam' );
438
+ add_settings_section( 'wpzerospam_onsite', __( 'On-site Spam Prevention', 'zero-spam' ), 'wpzerospam_onsite_cb', 'wpzerospam' );
439
+ add_settings_section( 'wpzerospam_spam_checks', __( 'Integrations & Third-party APIs', 'zero-spam' ), 'wpzerospam_spam_checks_cb', 'wpzerospam' );
440
 
441
  // Cookie expiration
442
+ add_settings_field( 'cookie_expiration', __( 'Cookie Expiration', 'zero-spam' ), 'wpzerospam_field_cb', 'wpzerospam', 'wpzerospam_general_settings', [
443
  'label_for' => 'cookie_expiration',
444
  'type' => 'number',
445
+ 'desc' => wp_kses(
446
+ __( 'Number of days until a user\'s cookie is expired. Helps boost site performance so access & blacklist checks aren\'t sent each page visit. <strong>Minimum recommend is 7 days</strong>.', 'zero-spam' ),
447
+ [ 'strong' => [] ]
448
+ ),
449
  'class' => 'small-text',
450
  'placeholder' => '7',
451
+ 'suffix' => __( 'days', 'zero-spam' )
452
  ]);
453
 
454
  // Determines is spam detections should be shared with WordPress Zero Spam
455
+ add_settings_field( 'share_detections', __( 'Share Spam Detections', 'zero-spam' ), 'wpzerospam_field_cb', 'wpzerospam', 'wpzerospam_general_settings', [
456
  'label_for' => 'share_detections',
457
  'type' => 'checkbox',
458
  'multi' => false,
459
+ 'desc' => wp_kses(
460
+ __( 'Help support WordPress Zero Spam and strenghten its ability to detect spammers by sharing spam detections. The only data that\'s shared is the IP address, type & site where the spam was detected. <strong>Absolutely no personal data is shared.</strong>.', 'zero-spam' ),
461
+ [ 'strong' => [] ]
462
+ ),
463
  'options' => [
464
+ 'enabled' => __( 'Enabled', 'zero-spam' )
465
  ]
466
  ]);
467
 
468
  // Determines is spam detected IPs should automatically be blocked
469
+ add_settings_field( 'auto_block_ips', __( 'Auto-block IPs', 'zero-spam' ), 'wpzerospam_field_cb', 'wpzerospam', 'wpzerospam_autoblocks', [
470
  'label_for' => 'auto_block_ips',
471
  'type' => 'checkbox',
472
  'multi' => false,
473
+ 'desc' => __( 'Auto-blocks IPs addresses that trigger a spam detection.', 'zero-spam' ),
474
  'options' => [
475
+ 'enabled' => __( 'Enabled', 'zero-spam' )
476
  ]
477
  ]);
478
 
479
  if ( 'enabled' == $options['auto_block_ips'] ) {
480
  // Number of minutes a IP should be blocked after a auto-block
481
+ add_settings_field( 'auto_block_period', __( 'Auto-block Period', 'zero-spam' ), 'wpzerospam_field_cb', 'wpzerospam', 'wpzerospam_autoblocks', [
482
  'label_for' => 'auto_block_period',
483
  'type' => 'number',
484
+ 'desc' => __( 'Number of minutes a user will be blocked from viewing the site after being auto-blocked.', 'zero-spam' ),
485
  'class' => 'small-text',
486
  'placeholder' => '30',
487
+ 'suffix' => __( 'minutes', 'zero-spam' )
488
  ]);
489
  }
490
 
491
  // Number of spam attempts before the IP is permanently blocked
492
+ add_settings_field( 'auto_block_permanently', __( 'Permanently Auto-block', 'zero-spam' ), 'wpzerospam_field_cb', 'wpzerospam', 'wpzerospam_autoblocks', [
493
  'label_for' => 'auto_block_permanently',
494
  'type' => 'number',
495
+ 'desc' => __( 'Number of spam detections before an IP is permanently blocked.', 'zero-spam' ),
496
  'class' => 'small-text',
497
  'placeholder' => 3
498
  ]);
499
 
500
  // API timeout
501
+ add_settings_field( 'api_timeout', __( 'API Timeout', 'zero-spam' ), 'wpzerospam_field_cb', 'wpzerospam', 'wpzerospam_spam_checks', [
502
  'label_for' => 'api_timeout',
503
  'type' => 'number',
504
+ 'desc' => wp_kses(
505
+ __( 'Number of seconds to allow an API to return a response.<br /><strong>WARNING:</strong> Setting this too high could cause your site to load slowly. Setting too low may not allow an API enough time to respond with a result. <strong>Recommended is 5 seconds.</strong>.', 'zero-spam' ),
506
+ [ 'strong' => [], 'br' => [] ]
507
+ ),
508
  'class' => 'small-text',
509
  'placeholder' => '30',
510
+ 'suffix' => __( 'seconds', 'zero-spam' )
511
  ]);
512
 
513
  if ( 'enabled' == $options['log_spam'] ) {
514
  // Redirect URL for spam detections
515
+ add_settings_field( 'ipstack_api', __( 'ipstack API Key', 'zero-spam' ), 'wpzerospam_field_cb', 'wpzerospam', 'wpzerospam_spam_checks', [
516
  'label_for' => 'ipstack_api',
517
  'type' => 'text',
518
+ 'placeholder' => __( 'Enter your ipstack API key.', 'zero-spam' ),
519
  'class' => 'regular-text',
520
+ 'desc' => sprintf(
521
+ wp_kses(
522
+ __( 'Enter your <a href="%s" target="_blank" rel="noopener noreferrer">ipstack API key</a> to enable location-based statistics. Don\'t have an API key? <a href="%s" target="_blank" rel="noopener noreferrer"><strong>Get one for free!</strong></a>', 'zero-spam' ),
523
+ [ 'strong' => [], 'a' => [ 'target' => [], 'href' => [], 'rel' => [] ] ]
524
+ ),
525
+ esc_url( 'https://ipstack.com/' ),
526
+ esc_url( 'https://ipstack.com/signup/free' )
527
+ )
528
  ]);
529
  }
530
 
531
  // Enables the ability to check IPs against BotScout blacklists.
532
+ add_settings_field( 'botscout_api', __( 'BotScout API Key', 'zero-spam' ), 'wpzerospam_field_cb', 'wpzerospam', 'wpzerospam_spam_checks', [
533
  'label_for' => 'botscout_api',
534
  'type' => 'text',
535
  'class' => 'regular-text',
536
+ 'placeholder' => __( 'Enter your free BotScout API key.', 'zero-spam' ),
537
+ 'desc' => sprintf(
538
+ wp_kses(
539
+ __( 'Enter your BotScout API key to check user IPs against <a href="%s" target="_blank" rel="noopener noreferrer">BotScout</a>\'s blacklist. Don\'t have an API key? <a href="%s" target="_blank" rel="noopener noreferrer"><strong>Get one for free!</strong></a>', 'zero-spam' ),
540
+ [ 'strong' => [], 'a' => [ 'target' => [], 'href' => [], 'rel' => [] ] ]
541
+ ),
542
+ esc_url( 'https://botscout.com/' ),
543
+ esc_url( 'https://botscout.com/getkey.htm' )
544
+ )
545
  ]);
546
 
547
  // BotScout count minimum
548
+ add_settings_field( 'botscout_count_min', __( 'BotScout Count Minimum', 'zero-spam' ), 'wpzerospam_field_cb', 'wpzerospam', 'wpzerospam_spam_checks', [
549
  'label_for' => 'botscout_count_min',
550
  'type' => 'number',
551
+ 'desc' => sprintf(
552
+ wp_kses(
553
+ __( 'Minimum <a href="%s" target="_blank" rel="noopener noreferrer">count</a> an IP must meet before being marked as spam/malicious.<br /><strong>WARNING:</strong> Setting this too low could cause users to be blocked that shouldn\'t be, <strong>recommended is 5</strong>.', 'zero-spam' ),
554
+ [ 'strong' => [], 'a' => [ 'target' => [], 'href' => [], 'rel' => [] ], 'br' => [] ]
555
+ ),
556
+ esc_url( 'https://botscout.com/api.htm' )
557
+ ),
558
  'class' => 'small-text',
559
  'placeholder' => '20',
560
  ]);
561
 
562
  // Enables the ability to check IPs against Stop Forum Spam blacklists.
563
+ add_settings_field( 'stop_forum_spam', __( 'Stop Forum Spam', 'zero-spam' ), 'wpzerospam_field_cb', 'wpzerospam', 'wpzerospam_spam_checks', [
564
  'label_for' => 'stop_forum_spam',
565
  'type' => 'checkbox',
566
  'multi' => false,
567
+ 'desc' => sprintf(
568
+ wp_kses(
569
+ __( 'Checks user IPs against <a href="%s" target="_blank" rel="noopener noreferrer">Stop Forum Spam</a>\'s blacklist.', 'zero-spam' ),
570
+ [ 'strong' => [], 'a' => [ 'target' => [], 'href' => [], 'rel' => [] ] ]
571
+ ),
572
+ esc_url( 'https://www.stopforumspam.com/' )
573
+ ),
574
  'options' => [
575
+ 'enabled' => __( 'Enabled', 'zero-spam' )
576
  ]
577
  ]);
578
 
579
  // StopForumSpam confidence minimum
580
+ add_settings_field( 'stopforumspam_confidence_min', __( 'Stop Forum Spam Confidence Minimum', 'zero-spam' ), 'wpzerospam_field_cb', 'wpzerospam', 'wpzerospam_spam_checks', [
581
  'label_for' => 'stopforumspam_confidence_min',
582
  'type' => 'number',
583
+ 'desc' => sprintf(
584
+ wp_kses(
585
+ __( 'Minimum <a href="%s" target="_blank" rel="noopener noreferrer">confidence score</a> an IP must meet before being marked as spam/malicious.<br /><strong>WARNING:</strong> Setting this too low could cause users to be blocked that shouldn\'t be, <strong>recommended is 20%%</strong>.', 'zero-spam' ),
586
+ [ 'strong' => [], 'a' => [ 'target' => [], 'href' => [], 'rel' => [] ], 'br' => [] ]
587
+ ),
588
+ esc_url( 'https://www.stopforumspam.com/usage' )
589
+ ),
590
  'class' => 'small-text',
591
  'placeholder' => '20',
592
+ 'suffix' => '%'
593
  ]);
594
 
595
  // How to handle blocks
596
+ add_settings_field( 'block_handler', __( 'Blocked IPs', 'zero-spam' ), 'wpzerospam_field_cb', 'wpzerospam', 'wpzerospam_general_settings', [
597
  'label_for' => 'block_handler',
598
  'type' => 'radio',
599
+ 'desc' => __( 'Determines how blocked IPs are handled when they attempt to visit the site.', 'zero-spam' ),
600
  'options' => [
601
+ 'redirect' => __( 'Redirect user', 'zero-spam' ),
602
+ '403' => sprintf(
603
+ wp_kses(
604
+ __( 'Display a <a href="%s" target="_blank" rel="noreferrer noopener"><code>403 Forbidden</code></a> error', 'zero-spam' ),
605
+ [ 'code' => [], 'a' => [ 'target' => [], 'href' => [], 'rel' => [] ] ]
606
+ ),
607
+ esc_url( 'https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/403' )
608
+ )
609
  ]
610
  ]);
611
 
612
  if ( 'redirect' == $options['block_handler'] ) {
613
  // Redirect URL for blocked users
614
+ add_settings_field( 'blocked_redirect_url', __( 'Redirect for Blocked Users', 'zero-spam' ), 'wpzerospam_field_cb', 'wpzerospam', 'wpzerospam_general_settings', [
615
  'label_for' => 'blocked_redirect_url',
616
  'type' => 'url',
617
  'class' => 'regular-text',
618
+ 'desc' => __( 'URL blocked users will be taken to.', 'zero-spam' ),
619
  'placeholder' => 'e.g. https://google.com'
620
  ]);
621
  } else {
622
  // Blocked message
623
+ add_settings_field( 'blocked_message', __( 'Blocked Message', 'zero-spam' ), 'wpzerospam_field_cb', 'wpzerospam', 'wpzerospam_general_settings', [
624
  'label_for' => 'blocked_message',
625
  'type' => 'text',
626
  'class' => 'large-text',
627
+ 'desc' => __( 'The message that will be displayed to a blocked user.', 'zero-spam' ),
628
+ 'placeholder' => __( 'You have been blocked from visiting this site by WordPress Zero Spam due to detected spam activity.', 'zero-spam' )
629
  ]);
630
  }
631
 
632
  // How to handle spam detections
633
+ add_settings_field( 'spam_handler', __( 'Spam Detections', 'zero-spam' ), 'wpzerospam_field_cb', 'wpzerospam', 'wpzerospam_general_settings', [
634
  'label_for' => 'spam_handler',
635
  'type' => 'radio',
636
+ 'desc' => __( 'Determines how users are handled when spam is detected.', 'zero-spam' ),
637
  'options' => [
638
+ 'redirect' => __( 'Redirect user', 'zero-spam' ),
639
+ '403' => sprintf(
640
+ wp_kses(
641
+ __( 'Display a <a href="%s" target="_blank" rel="noreferrer noopener"><code>403 Forbidden</code></a> error', 'zero-spam' ),
642
+ [ 'code' => [], 'a' => [ 'target' => [], 'href' => [], 'rel' => [] ] ]
643
+ ),
644
+ esc_url( 'https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/403' )
645
+ )
646
  ]
647
  ]);
648
 
649
  if ( 'redirect' == $options['spam_handler'] ) {
650
  // Redirect URL for spam detections
651
+ add_settings_field( 'spam_redirect_url', __( 'Redirect for Spam', 'zero-spam' ), 'wpzerospam_field_cb', 'wpzerospam', 'wpzerospam_general_settings', [
652
  'label_for' => 'spam_redirect_url',
653
  'type' => 'url',
654
  'class' => 'regular-text',
655
+ 'desc' => __( 'URL users will be taken to when a spam submission is detected.', 'zero-spam' ),
656
  'placeholder' => 'e.g. https://google.com'
657
  ]);
658
  } else {
659
  // Spam message
660
+ add_settings_field( 'spam_message', __( 'Spam Detection Message', 'zero-spam' ), 'wpzerospam_field_cb', 'wpzerospam', 'wpzerospam_general_settings', [
661
  'label_for' => 'spam_message',
662
  'type' => 'text',
663
  'class' => 'large-text',
664
+ 'desc' => __( 'The message that will be displayed when spam is detected.', 'zero-spam' ),
665
+ 'placeholder' => __( 'There was a problem with your submission. Please go back and try again.', 'zero-spam' )
666
  ]);
667
  }
668
 
669
  // Toggle logging of blocked IPs
670
+ add_settings_field( 'log_blocked_ips', __( 'Log Blocked IPs', 'zero-spam' ), 'wpzerospam_field_cb', 'wpzerospam', 'wpzerospam_general_settings', [
671
  'label_for' => 'log_blocked_ips',
672
  'type' => 'checkbox',
673
  'multi' => false,
674
+ 'desc' => __( 'Enables logging of when IPs are blocked from accessing the site.', 'zero-spam' ),
675
  'options' => [
676
+ 'enabled' => __( 'Enabled', 'zero-spam' )
677
  ]
678
  ]);
679
 
680
  // Log spam detections
681
+ add_settings_field( 'log_spam', __( 'Log Spam Detections', 'zero-spam' ), 'wpzerospam_field_cb', 'wpzerospam', 'wpzerospam_general_settings', [
682
  'label_for' => 'log_spam',
683
  'type' => 'checkbox',
684
  'multi' => false,
685
+ 'desc' => __( 'Enables logging of spam detections and provides an admin interface to view statistics.', 'zero-spam' ),
686
  'options' => [
687
+ 'enabled' => __( 'Enabled', 'zero-spam' )
688
  ]
689
  ]);
690
 
691
+ do_action( 'wpzerospam_admin_options' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
692
 
693
  // BuddyPress registrations spam check
694
  if ( function_exists( 'bp_is_active' ) ) {
695
+ add_settings_field( 'verify_bp_registrations', __( 'Verify BuddyPress Registrations', 'zero-spam' ), 'wpzerospam_field_cb', 'wpzerospam', 'wpzerospam_spam_checks', [
696
  'label_for' => 'verify_bp_registrations',
697
  'type' => 'checkbox',
698
  'multi' => false,
699
+ 'desc' => __( 'Enables spam detection for BuddyPress registrations.', 'zero-spam' ),
700
  'options' => [
701
+ 'enabled' => __( 'Enabled', 'zero-spam' )
702
  ]
703
  ]);
704
  }
705
 
706
  // WPForms spam check
707
  if ( is_plugin_active( 'wpforms/wpforms.php' ) || is_plugin_active( 'wpforms-lite/wpforms.php' ) ) {
708
+ add_settings_field( 'verify_wpforms', __( 'Verify WPForms Submissions', 'zero-spam' ), 'wpzerospam_field_cb', 'wpzerospam', 'wpzerospam_spam_checks', [
709
  'label_for' => 'verify_wpforms',
710
  'type' => 'checkbox',
711
  'multi' => false,
712
+ 'desc' => __( 'Enables spam detection for WPForms submissions.'. 'zero-spam' ),
713
  'options' => [
714
+ 'enabled' => __( 'Enabled', 'zero-spam' )
715
  ]
716
  ]);
717
  }
718
 
719
  // Fluent Form spam check
720
  if ( is_plugin_active( 'fluentform/fluentform.php' ) ) {
721
+ add_settings_field( 'verify_fluentform', __( 'Verify Fluent Form Submissions', 'zero-spam' ), 'wpzerospam_field_cb', 'wpzerospam', 'wpzerospam_spam_checks', [
722
  'label_for' => 'verify_fluentform',
723
  'type' => 'checkbox',
724
  'multi' => false,
725
+ 'desc' => __( 'Enables spam detection for Fluent Form submissions.', 'zero-spam' ),
726
  'options' => [
727
+ 'enabled' => __( 'Enabled', 'zero-spam' )
728
  ]
729
  ]);
730
  }
731
 
732
  // Formidable forms spam check
733
  if ( is_plugin_active( 'formidable/formidable.php' ) ) {
734
+ add_settings_field( 'verify_formidable', __( 'Verify Formidable Form Submissions', 'zero-spam' ), 'wpzerospam_field_cb', 'wpzerospam', 'wpzerospam_spam_checks', [
735
  'label_for' => 'verify_formidable',
736
  'type' => 'checkbox',
737
  'multi' => false,
738
+ 'desc' => __( 'Enables spam detection for Formidable form submissions.', 'zero-spam' ),
739
  'options' => [
740
+ 'enabled' => __( 'Enabled', 'zero-spam' )
741
  ]
742
  ]);
743
  }
744
 
745
  // IP whitelist
746
+ add_settings_field( 'ip_whitelist', __( 'IP Whitelist', 'zero-spam' ), 'wpzerospam_field_cb', 'wpzerospam', 'wpzerospam_general_settings', [
747
  'label_for' => 'ip_whitelist',
748
  'type' => 'textarea',
749
  'class' => 'large-text',
750
+ 'desc' => __( 'Enter IPs that should be whitelisted (IPs that should never be blocked), one per line.', 'zero-spam' ),
751
+ 'placeholder' => __( 'e.g. xxx.xxx.x.x', 'zero-spam' )
752
  ]);
753
  }
754
  add_action( 'admin_init', 'wpzerospam_admin_init' );
inc/helpers.php CHANGED
@@ -819,7 +819,6 @@ if ( ! function_exists( 'wpzerospam_plugin_integration_enabled' ) ) {
819
  $options = wpzerospam_options();
820
 
821
  $integrations = [
822
- 'cf7' => 'contact-form-7/wp-contact-form-7.php',
823
  'fluentform' => 'fluentform/fluentform.php',
824
  'wpforms' => [ 'wpforms/wpforms.php', 'wpforms-lite/wpforms.php' ],
825
  'formidable' => 'formidable/formidable.php',
819
  $options = wpzerospam_options();
820
 
821
  $integrations = [
 
822
  'fluentform' => 'fluentform/fluentform.php',
823
  'wpforms' => [ 'wpforms/wpforms.php', 'wpforms-lite/wpforms.php' ],
824
  'formidable' => 'formidable/formidable.php',
inc/install.php ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Install plugin tables
4
+ */
5
+ function wpzerospam_install() {
6
+ global $wpdb;
7
+
8
+ $charset_collate = $wpdb->get_charset_collate();
9
+ $installed_db_version = get_option( 'wpzerospam_db_version' );
10
+
11
+ if ( $installed_db_version != WORDPRESS_ZERO_SPAM_DB_VERSION ) {
12
+ $log_table = wpzerospam_tables( 'log' );
13
+ $blocked_table = wpzerospam_tables( 'blocked' );
14
+ $blacklist_table = wpzerospam_tables( 'blacklist' );
15
+
16
+ $sql = "CREATE TABLE $log_table (
17
+ log_id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
18
+ log_type VARCHAR(255) NOT NULL,
19
+ user_ip VARCHAR(39) NOT NULL,
20
+ date_recorded DATETIME NOT NULL,
21
+ page_url VARCHAR(255) NULL DEFAULT NULL,
22
+ submission_data LONGTEXT NULL DEFAULT NULL,
23
+ country VARCHAR(2) NULL DEFAULT NULL,
24
+ region VARCHAR(255) NULL DEFAULT NULL,
25
+ city VARCHAR(255) NULL DEFAULT NULL,
26
+ latitude VARCHAR(255) NULL DEFAULT NULL,
27
+ longitude VARCHAR(255) NULL DEFAULT NULL,
28
+ PRIMARY KEY (`log_id`)) $charset_collate;";
29
+
30
+ $sql .= "CREATE TABLE $blocked_table (
31
+ blocked_id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
32
+ blocked_type ENUM('permanent','temporary') NOT NULL DEFAULT 'temporary',
33
+ user_ip VARCHAR(39) NOT NULL,
34
+ date_added DATETIME NOT NULL,
35
+ start_block DATETIME NULL DEFAULT NULL,
36
+ end_block DATETIME NULL DEFAULT NULL,
37
+ reason VARCHAR(255) NULL DEFAULT NULL,
38
+ attempts BIGINT UNSIGNED NOT NULL,
39
+ PRIMARY KEY (`blocked_id`)) $charset_collate;";
40
+
41
+ $sql .= "CREATE TABLE $blacklist_table (
42
+ blacklist_id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
43
+ user_ip VARCHAR(39) NOT NULL,
44
+ last_updated DATETIME NOT NULL,
45
+ blacklist_service VARCHAR(255) NULL DEFAULT NULL,
46
+ attempts BIGINT UNSIGNED NOT NULL,
47
+ blacklist_data LONGTEXT NULL DEFAULT NULL,
48
+ PRIMARY KEY (`blacklist_id`)) $charset_collate;";
49
+
50
+ require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
51
+ dbDelta( $sql );
52
+
53
+ if ( $wpdb->get_var( $wpdb->prepare( "SHOW TABLES LIKE %s", $blocked_table ) ) === $blocked_table ) {
54
+ $wpdb->query( "DELETE t1 FROM $blocked_table AS t1 JOIN $blocked_table AS t2 ON t2.blocked_id = t1.blocked_id WHERE t1.blocked_id < t2.blocked_id AND t1.user_ip = t2.user_ip" );
55
+ }
56
+
57
+ if ( $wpdb->get_var( $wpdb->prepare( "SHOW TABLES LIKE %s", $blacklist_table ) ) === $blacklist_table ) {
58
+ $wpdb->query( "DELETE t1 FROM $blacklist_table AS t1 JOIN $blacklist_table AS t2 ON t2.blacklist_id = t1.blacklist_id WHERE t1.blacklist_id < t2.blacklist_id AND t1.user_ip = t2.user_ip" );
59
+ }
60
+
61
+ update_option( 'wpzerospam_db_version', WORDPRESS_ZERO_SPAM_DB_VERSION );
62
+ }
63
+ }
64
+ register_activation_hook( WORDPRESS_ZERO_SPAM, 'wpzerospam_install' );
65
+
66
+ /**
67
+ * Check to ensure the database tables have been installed
68
+ */
69
+ function wpzerospam_db_check() {
70
+ load_plugin_textdomain( 'zero-spam', FALSE, basename( dirname( WORDPRESS_ZERO_SPAM ) ) . '/languages/' );
71
+
72
+ if ( get_site_option( 'wpzerospam_db_version' ) != WORDPRESS_ZERO_SPAM_DB_VERSION ) {
73
+ wpzerospam_install();
74
+ }
75
+ }
76
+ add_action( 'plugins_loaded', 'wpzerospam_db_check' );
inc/uninstall.php ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Handles uninstalling the plugin
4
+ */
5
+ if ( ! function_exists( 'wpzerospam_uninstall' ) ) {
6
+ function wpzerospam_uninstall() {
7
+ global $wpdb;
8
+
9
+ if ( is_multisite() ) {
10
+ $blogs = $wpdb->get_results( "SELECT blog_id FROM {$wpdb->blogs}", ARRAY_A );
11
+
12
+ if ( $blogs ) {
13
+ foreach ( $blogs as $blog ) {
14
+ switch_to_blog( $blog['blog_id'] );
15
+
16
+ delete_option( 'wpzerospam' );
17
+ delete_option( 'wpzerospam_key' );
18
+ delete_option( 'wpzerospam_honeypot' );
19
+ delete_option( 'wpzerospam_db_version' );
20
+ delete_option( 'wpzerospam_update_version' );
21
+
22
+ $tables = wpzerospam_tables();
23
+ foreach( $tables as $key => $table ) {
24
+ $wpdb->query( "DROP TABLE IF EXISTS $table" );
25
+ }
26
+ }
27
+ restore_current_blog();
28
+ }
29
+ } else {
30
+ delete_option( 'wpzerospam' );
31
+ delete_option( 'wpzerospam_key' );
32
+ delete_option( 'wpzerospam_honeypot' );
33
+ delete_option( 'wpzerospam_db_version' );
34
+ delete_option( 'wpzerospam_update_version' );
35
+
36
+ $tables = wpzerospam_tables();
37
+ foreach( $tables as $key => $table ) {
38
+ $wpdb->query( "DROP TABLE IF EXISTS $table" );
39
+ }
40
+ }
41
+ }
42
+ }
43
+ register_uninstall_hook( WORDPRESS_ZERO_SPAM, 'wpzerospam_uninstall' );
inc/utilities.php CHANGED
@@ -111,10 +111,9 @@ if ( ! function_exists( 'wpzerospam_options' ) ) {
111
  if ( empty( $options['spam_handler'] ) ) { $options['spam_handler'] = '403'; }
112
  if ( empty( $options['block_handler'] ) ) { $options['block_handler'] = '403'; }
113
  if ( empty( $options['spam_redirect_url'] ) ) { $options['spam_redirect_url'] = 'https://www.google.com'; }
114
- if ( empty( $options['spam_message'] ) ) { $options['spam_message'] = __( 'There was a problem with your submission. Please go back and try again.', 'wpzerospam' ); }
115
- if ( empty( $options['blocked_message'] ) ) { $options['blocked_message'] = __( 'You have been blocked from visiting this site by WordPress Zero Spam due to detected spam activity.', 'wpzerospam' ); }
116
  if ( empty( $options['log_spam'] ) ) { $options['log_spam'] = 'disabled'; }
117
- if ( empty( $options['verify_registrations'] ) ) { $options['verify_registrations'] = 'enabled'; }
118
  if ( empty( $options['log_blocked_ips'] ) ) { $options['log_blocked_ips'] = 'disabled'; }
119
  if ( empty( $options['auto_block_permanently'] ) ) { $options['auto_block_permanently'] = 3; }
120
  if ( empty( $options['botscout_api'] ) ) { $options['botscout_api'] = false; }
@@ -124,10 +123,6 @@ if ( ! function_exists( 'wpzerospam_options' ) ) {
124
  if ( empty( $options['botscout_count_min'] ) ) { $options['botscout_count_min'] = 5; }
125
  if ( empty( $options['cookie_expiration'] ) ) { $options['cookie_expiration'] = 7; }
126
 
127
- if ( empty( $options['verify_cf7'] ) ) {
128
- $options['verify_cf7'] = 'enabled';
129
- }
130
-
131
  if ( empty( $options['share_detections'] ) ) {
132
  $options['share_detections'] = 'enabled';
133
  }
@@ -152,7 +147,7 @@ if ( ! function_exists( 'wpzerospam_options' ) ) {
152
  $options['stop_forum_spam'] = 'enabled';
153
  }
154
 
155
- $options = apply_filters( 'wpzerospam_admin_fields_default', $options );
156
 
157
  return $options;
158
  }
111
  if ( empty( $options['spam_handler'] ) ) { $options['spam_handler'] = '403'; }
112
  if ( empty( $options['block_handler'] ) ) { $options['block_handler'] = '403'; }
113
  if ( empty( $options['spam_redirect_url'] ) ) { $options['spam_redirect_url'] = 'https://www.google.com'; }
114
+ if ( empty( $options['spam_message'] ) ) { $options['spam_message'] = __( 'There was a problem with your submission. Please go back and try again.', 'zero-spam' ); }
115
+ if ( empty( $options['blocked_message'] ) ) { $options['blocked_message'] = __( 'You have been blocked from visiting this site by WordPress Zero Spam due to detected spam activity.', 'zero-spam' ); }
116
  if ( empty( $options['log_spam'] ) ) { $options['log_spam'] = 'disabled'; }
 
117
  if ( empty( $options['log_blocked_ips'] ) ) { $options['log_blocked_ips'] = 'disabled'; }
118
  if ( empty( $options['auto_block_permanently'] ) ) { $options['auto_block_permanently'] = 3; }
119
  if ( empty( $options['botscout_api'] ) ) { $options['botscout_api'] = false; }
123
  if ( empty( $options['botscout_count_min'] ) ) { $options['botscout_count_min'] = 5; }
124
  if ( empty( $options['cookie_expiration'] ) ) { $options['cookie_expiration'] = 7; }
125
 
 
 
 
 
126
  if ( empty( $options['share_detections'] ) ) {
127
  $options['share_detections'] = 'enabled';
128
  }
147
  $options['stop_forum_spam'] = 'enabled';
148
  }
149
 
150
+ $options = apply_filters( 'wpzerospam_admin_options_defaults', $options );
151
 
152
  return $options;
153
  }
integrations/buddypress/buddypress.php CHANGED
@@ -10,7 +10,7 @@
10
  * Add the 'bp_registration' spam type
11
  */
12
  add_filter( 'wpzerospam_types', function( $types ) {
13
- $types = array_merge( $types, [ 'bp_registration' => 'BuddyPress Registration' ] );
14
  return $types;
15
  });
16
 
10
  * Add the 'bp_registration' spam type
11
  */
12
  add_filter( 'wpzerospam_types', function( $types ) {
13
+ $types = array_merge( $types, [ 'bp_registration' => __( 'BuddyPress Registration', 'zero-spam' ) ] );
14
  return $types;
15
  });
16
 
integrations/comments/comments.php CHANGED
@@ -16,40 +16,40 @@
16
  if ( ! function_exists( 'wpzerospam_comments_admin_fields' ) ) {
17
  function wpzerospam_comments_admin_fields() {
18
  // Option to strips links in comments
19
- add_settings_field( 'strip_comment_links', __( 'Strip Comment Links', 'wpzerospam' ), 'wpzerospam_field_cb', 'wpzerospam', 'wpzerospam_onsite', [
20
  'label_for' => 'strip_comment_links',
21
  'type' => 'checkbox',
22
  'multi' => false,
23
- 'desc' => 'Spambots commonly post spam links in comments. Enable this option to strip links from comments.',
24
  'options' => [
25
- 'enabled' => __( 'Enabled', 'wpzerospam' )
26
  ]
27
  ]);
28
 
29
  // Option to remove author links
30
- add_settings_field( 'strip_comment_author_links', __( 'Strip Comment Author Links', 'wpzerospam' ), 'wpzerospam_field_cb', 'wpzerospam', 'wpzerospam_onsite', [
31
  'label_for' => 'strip_comment_author_links',
32
  'type' => 'checkbox',
33
  'multi' => false,
34
- 'desc' => 'Spammers are well-known at injecting malicious links in the comment author website field, this option disables it.',
35
  'options' => [
36
- 'enabled' => __( 'Enabled', 'wpzerospam' )
37
  ]
38
  ]);
39
 
40
  // Add option to enable/disable comment form submission protection.
41
- add_settings_field( 'verify_comments', __( 'Detect Comment Spam', 'wpzerospam' ), 'wpzerospam_field_cb', 'wpzerospam', 'wpzerospam_spam_checks', [
42
  'label_for' => 'verify_comments',
43
  'type' => 'checkbox',
44
  'multi' => false,
45
- 'desc' => 'Enables comment form submission protection.',
46
  'options' => [
47
- 'enabled' => __( 'Enabled', 'wpzerospam' )
48
  ]
49
  ]);
50
  }
51
  }
52
- add_action( 'wpzerospam_admin_fields', 'wpzerospam_comments_admin_fields' );
53
 
54
  /**
55
  * Add validation to the comment form submission protection admin fields.
@@ -69,8 +69,8 @@ if ( ! function_exists( 'wpzerospam_comments_admin_validation' ) ) {
69
  }
70
  add_filter( 'wpzerospam_admin_validation', 'wpzerospam_comments_admin_validation' );
71
 
72
- if ( ! function_exists( 'wpzerospam_comment_admin_fields_default' ) ) {
73
- function wpzerospam_comment_admin_fields_default( $defaults ) {
74
  if ( empty( $defaults['verify_comments'] ) ) { $defaults['verify_comments'] = 'enabled'; }
75
  if ( empty( $defaults['strip_comment_links'] ) ) { $defaults['strip_comment_links'] = 'disabled'; }
76
  if ( empty( $defaults['strip_comment_author_links'] ) ) { $defaults['strip_comment_author_links'] = 'disabled'; }
@@ -78,10 +78,10 @@ if ( ! function_exists( 'wpzerospam_comment_admin_fields_default' ) ) {
78
  return $defaults;
79
  }
80
  }
81
- add_filter( 'wpzerospam_admin_fields_default', 'wpzerospam_comment_admin_fields_default' );
82
 
83
- if ( ! function_exists( 'wpzerospam_comment_admin_submission_data_item' ) ) {
84
- function wpzerospam_comment_admin_submission_data_item( $key, $value ) {
85
  switch( $key ) {
86
  case 'comment_post_ID':
87
  $post = get_post( $value );
@@ -90,25 +90,25 @@ if ( ! function_exists( 'wpzerospam_comment_admin_submission_data_item' ) ) {
90
  } else {
91
  $item_value = 'N/A';
92
  }
93
- echo wpzerospam_admin_details_item( __( 'Comment Post', 'wpzerospam' ), $item_value );
94
  break;
95
  case 'comment_author':
96
- echo wpzerospam_admin_details_item( __( 'Author', 'wpzerospam' ), $value );
97
  break;
98
  case 'comment_author_email':
99
- echo wpzerospam_admin_details_item( __( 'Email', 'wpzerospam' ), $value );
100
  break;
101
  case 'comment_author_url':
102
- echo wpzerospam_admin_details_item( __( 'Website', 'wpzerospam' ), $value );
103
  break;
104
  case 'comment_content':
105
- echo wpzerospam_admin_details_item( __( 'Comment', 'wpzerospam' ), sanitize_text_field( $value ) );
106
  break;
107
  case 'comment_type':
108
- echo wpzerospam_admin_details_item( __( 'Comment Type', 'wpzerospam' ), $value );
109
  break;
110
  case 'comment_parent':
111
- echo wpzerospam_admin_details_item( __( 'Comment Parent ID', 'wpzerospam' ), '<a href="' . get_comment_link( $value ) . '">' . $value . '</a>' );
112
  break;
113
  case 'comment_as_submitted':
114
  foreach( $value as $k => $v ):
@@ -116,39 +116,39 @@ if ( ! function_exists( 'wpzerospam_comment_admin_submission_data_item' ) ) {
116
  switch( $k ):
117
  case 'comment_author':
118
  if ( empty( $author_shown ) ) {
119
- echo wpzerospam_admin_details_item( __( 'Author', 'wpzerospam' ), $v );
120
  }
121
  break;
122
  case 'comment_author_email':
123
  if ( empty( $author_email ) ) {
124
- echo wpzerospam_admin_details_item( __( 'Email', 'wpzerospam' ), $v );
125
  }
126
  break;
127
  case 'comment_author_url':
128
  if ( empty( $author_url ) ) {
129
- echo wpzerospam_admin_details_item( __( 'Website', 'wpzerospam' ), $v );
130
  }
131
  break;
132
  case 'comment_content':
133
- echo wpzerospam_admin_details_item( __( 'Comment', 'wpzerospam' ), sanitize_text_field( $v ) );
134
  break;
135
  case 'user_ip':
136
- echo wpzerospam_admin_details_item( __( 'User IP', 'wpzerospam' ), '<a href="https://zerospam.org/ip-lookup/' . urlencode( $v ) .'" target="_blank" rel="noopener noreferrer">' . $v . '</a>' );
137
  break;
138
  case 'user_agent':
139
- echo wpzerospam_admin_details_item( __( 'User Agent', 'wpzerospam' ), $v );
140
  break;
141
  case 'blog':
142
- echo wpzerospam_admin_details_item( __( 'Site', 'wpzerospam' ), $v );
143
  break;
144
  case 'blog_lang':
145
- echo wpzerospam_admin_details_item( __( 'Site Language', 'wpzerospam' ), $v );
146
  break;
147
  case 'blog_charset':
148
- echo wpzerospam_admin_details_item( __( 'Site Charset', 'wpzerospam' ), $v );
149
  break;
150
  case 'permalink':
151
- echo wpzerospam_admin_details_item( __( 'Permalink', 'wpzerospam' ), '<a href="' . $v . '" target="_blank">' . $v . '</a>' );
152
  break;
153
  default:
154
  echo wpzerospam_admin_details_item( $k, $v );
@@ -156,15 +156,33 @@ if ( ! function_exists( 'wpzerospam_comment_admin_submission_data_item' ) ) {
156
  endforeach;
157
  break;
158
  case 'akismet_result':
159
- echo wpzerospam_admin_details_item( __( 'Akismet Result', 'wpzerospam' ), $value );
160
  break;
161
  case 'akismet_pro_tip':
162
- echo wpzerospam_admin_details_item( __( 'Akismet Pro Tip', 'wpzerospam' ), $value );
163
  break;
164
  }
165
  }
166
  }
167
- add_action( 'wpzerospam_admin_submission_data_items', 'wpzerospam_comment_admin_submission_data_item', 10, 2 );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
168
 
169
  /**
170
  * Runs the comment form spam detections.
@@ -180,6 +198,9 @@ if ( ! function_exists( 'wpzerospam_comments_after_setup_theme' ) ) {
180
  function wpzerospam_comments_after_setup_theme() {
181
  $options = wpzerospam_options();
182
 
 
 
 
183
  // Determines is author links should be stripped.
184
  if ( 'enabled' == $options['strip_comment_author_links'] ) {
185
  add_filter( 'get_comment_author_link', 'wpzerospam_remove_comment_author_link', 10, 3 );
@@ -199,9 +220,6 @@ if ( ! function_exists( 'wpzerospam_comments_after_setup_theme' ) ) {
199
  // Check if detecting comments is enabled & user is unauthenticated.
200
  if ( 'enabled' != $options['verify_comments'] || is_user_logged_in() ) { return false; }
201
 
202
- // Add the 'comment' spam type.
203
- add_filter( 'wpzerospam_types', 'wpzerospam_comments_types' );
204
-
205
  // Add the 'honeypot' field to the comment form.
206
  add_filter( 'comment_form_defaults', 'wpzerospam_comments_form_defaults' );
207
 
@@ -283,7 +301,7 @@ if ( ! function_exists( 'wpzerospam_remove_author_url_field' ) ) {
283
  */
284
  if ( ! function_exists( 'wpzerospam_comments_types' ) ) {
285
  function wpzerospam_comments_types( $types ) {
286
- $types = array_merge( $types, [ 'comment' => __( 'Comment', 'wpzerospam' ) ] );
287
 
288
  return $types;
289
  }
16
  if ( ! function_exists( 'wpzerospam_comments_admin_fields' ) ) {
17
  function wpzerospam_comments_admin_fields() {
18
  // Option to strips links in comments
19
+ add_settings_field( 'strip_comment_links', __( 'Strip Comment Links', 'zero-spam' ), 'wpzerospam_field_cb', 'wpzerospam', 'wpzerospam_onsite', [
20
  'label_for' => 'strip_comment_links',
21
  'type' => 'checkbox',
22
  'multi' => false,
23
+ 'desc' => __( 'Spambots commonly post spam links in comments. Enable this option to strip links from comments.', 'zero-spam' ),
24
  'options' => [
25
+ 'enabled' => __( 'Enabled', 'zero-spam' )
26
  ]
27
  ]);
28
 
29
  // Option to remove author links
30
+ add_settings_field( 'strip_comment_author_links', __( 'Strip Comment Author Links', 'zero-spam' ), 'wpzerospam_field_cb', 'wpzerospam', 'wpzerospam_onsite', [
31
  'label_for' => 'strip_comment_author_links',
32
  'type' => 'checkbox',
33
  'multi' => false,
34
+ 'desc' => __( 'Spammers are well-known at injecting malicious links in the comment author website field, this option disables it.', 'zero-spam' ),
35
  'options' => [
36
+ 'enabled' => __( 'Enabled', 'zero-spam' )
37
  ]
38
  ]);
39
 
40
  // Add option to enable/disable comment form submission protection.
41
+ add_settings_field( 'verify_comments', __( 'Detect Spam/Malicious Comments', 'zero-spam' ), 'wpzerospam_field_cb', 'wpzerospam', 'wpzerospam_spam_checks', [
42
  'label_for' => 'verify_comments',
43
  'type' => 'checkbox',
44
  'multi' => false,
45
+ 'desc' => __( 'Monitors comments for malicious links and automated spambot submissions.', 'zero-spam' ),
46
  'options' => [
47
+ 'enabled' => __( 'Enabled', 'zero-spam' )
48
  ]
49
  ]);
50
  }
51
  }
52
+ add_action( 'wpzerospam_admin_options', 'wpzerospam_comments_admin_fields' );
53
 
54
  /**
55
  * Add validation to the comment form submission protection admin fields.
69
  }
70
  add_filter( 'wpzerospam_admin_validation', 'wpzerospam_comments_admin_validation' );
71
 
72
+ if ( ! function_exists( 'wpzerospam_comments_admin_fields_default' ) ) {
73
+ function wpzerospam_comments_admin_fields_default( $defaults ) {
74
  if ( empty( $defaults['verify_comments'] ) ) { $defaults['verify_comments'] = 'enabled'; }
75
  if ( empty( $defaults['strip_comment_links'] ) ) { $defaults['strip_comment_links'] = 'disabled'; }
76
  if ( empty( $defaults['strip_comment_author_links'] ) ) { $defaults['strip_comment_author_links'] = 'disabled'; }
78
  return $defaults;
79
  }
80
  }
81
+ add_filter( 'wpzerospam_admin_option_defaults', 'wpzerospam_comments_admin_fields_default' );
82
 
83
+ if ( ! function_exists( 'wpzerospam_comments_admin_submission_data_item' ) ) {
84
+ function wpzerospam_comments_admin_submission_data_item( $key, $value ) {
85
  switch( $key ) {
86
  case 'comment_post_ID':
87
  $post = get_post( $value );
90
  } else {
91
  $item_value = 'N/A';
92
  }
93
+ echo wpzerospam_admin_details_item( __( 'Comment Post', 'zero-spam' ), $item_value );
94
  break;
95
  case 'comment_author':
96
+ echo wpzerospam_admin_details_item( __( 'Author', 'zero-spam' ), $value );
97
  break;
98
  case 'comment_author_email':
99
+ echo wpzerospam_admin_details_item( __( 'Email', 'zero-spam' ), $value );
100
  break;
101
  case 'comment_author_url':
102
+ echo wpzerospam_admin_details_item( __( 'Website', 'zero-spam' ), $value );
103
  break;
104
  case 'comment_content':
105
+ echo wpzerospam_admin_details_item( __( 'Comment', 'zero-spam' ), sanitize_text_field( $value ) );
106
  break;
107
  case 'comment_type':
108
+ echo wpzerospam_admin_details_item( __( 'Comment Type', 'zero-spam' ), $value );
109
  break;
110
  case 'comment_parent':
111
+ echo wpzerospam_admin_details_item( __( 'Comment Parent ID', 'zero-spam' ), '<a href="' . get_comment_link( $value ) . '">' . $value . '</a>' );
112
  break;
113
  case 'comment_as_submitted':
114
  foreach( $value as $k => $v ):
116
  switch( $k ):
117
  case 'comment_author':
118
  if ( empty( $author_shown ) ) {
119
+ echo wpzerospam_admin_details_item( __( 'Author', 'zero-spam' ), $v );
120
  }
121
  break;
122
  case 'comment_author_email':
123
  if ( empty( $author_email ) ) {
124
+ echo wpzerospam_admin_details_item( __( 'Email', 'zero-spam' ), $v );
125
  }
126
  break;
127
  case 'comment_author_url':
128
  if ( empty( $author_url ) ) {
129
+ echo wpzerospam_admin_details_item( __( 'Website', 'zero-spam' ), $v );
130
  }
131
  break;
132
  case 'comment_content':
133
+ echo wpzerospam_admin_details_item( __( 'Comment', 'zero-spam' ), sanitize_text_field( $v ) );
134
  break;
135
  case 'user_ip':
136
+ echo wpzerospam_admin_details_item( __( 'User IP', 'zero-spam' ), '<a href="https://zerospam.org/ip-lookup/' . urlencode( $v ) .'" target="_blank" rel="noopener noreferrer">' . $v . '</a>' );
137
  break;
138
  case 'user_agent':
139
+ echo wpzerospam_admin_details_item( __( 'User Agent', 'zero-spam' ), $v );
140
  break;
141
  case 'blog':
142
+ echo wpzerospam_admin_details_item( __( 'Site', 'zero-spam' ), $v );
143
  break;
144
  case 'blog_lang':
145
+ echo wpzerospam_admin_details_item( __( 'Site Language', 'zero-spam' ), $v );
146
  break;
147
  case 'blog_charset':
148
+ echo wpzerospam_admin_details_item( __( 'Site Charset', 'zero-spam' ), $v );
149
  break;
150
  case 'permalink':
151
+ echo wpzerospam_admin_details_item( __( 'Permalink', 'zero-spam' ), '<a href="' . $v . '" target="_blank">' . $v . '</a>' );
152
  break;
153
  default:
154
  echo wpzerospam_admin_details_item( $k, $v );
156
  endforeach;
157
  break;
158
  case 'akismet_result':
159
+ echo wpzerospam_admin_details_item( __( 'Akismet Result', 'zero-spam' ), $value );
160
  break;
161
  case 'akismet_pro_tip':
162
+ echo wpzerospam_admin_details_item( __( 'Akismet Pro Tip', 'zero-spam' ), $value );
163
  break;
164
  }
165
  }
166
  }
167
+ add_action( 'wpzerospam_admin_submission_data_items', 'wpzerospam_comments_admin_submission_data_item', 10, 2 );
168
+
169
+ if ( ! function_exists( 'wpzerospam_comments_defined_submission_data' ) ) {
170
+ function wpzerospam_comments_defined_submission_data( $submission_data_keys ) {
171
+ $submission_data_keys[] = 'comment_post_ID';
172
+ $submission_data_keys[] = 'comment_author';
173
+ $submission_data_keys[] = 'comment_author_email';
174
+ $submission_data_keys[] = 'comment_author_url';
175
+ $submission_data_keys[] = 'comment_content';
176
+ $submission_data_keys[] = 'comment_type';
177
+ $submission_data_keys[] = 'comment_parent';
178
+ $submission_data_keys[] = 'comment_as_submitted';
179
+ $submission_data_keys[] = 'akismet_result';
180
+ $submission_data_keys[] = 'akismet_pro_tip';
181
+
182
+ return $submission_data_keys;
183
+ }
184
+ }
185
+ add_filter( 'wpzerospam_defined_submission_data', 'wpzerospam_comments_defined_submission_data', 10, 1 );
186
 
187
  /**
188
  * Runs the comment form spam detections.
198
  function wpzerospam_comments_after_setup_theme() {
199
  $options = wpzerospam_options();
200
 
201
+ // Add the 'comment' spam type.
202
+ add_filter( 'wpzerospam_types', 'wpzerospam_comments_types' );
203
+
204
  // Determines is author links should be stripped.
205
  if ( 'enabled' == $options['strip_comment_author_links'] ) {
206
  add_filter( 'get_comment_author_link', 'wpzerospam_remove_comment_author_link', 10, 3 );
220
  // Check if detecting comments is enabled & user is unauthenticated.
221
  if ( 'enabled' != $options['verify_comments'] || is_user_logged_in() ) { return false; }
222
 
 
 
 
223
  // Add the 'honeypot' field to the comment form.
224
  add_filter( 'comment_form_defaults', 'wpzerospam_comments_form_defaults' );
225
 
301
  */
302
  if ( ! function_exists( 'wpzerospam_comments_types' ) ) {
303
  function wpzerospam_comments_types( $types ) {
304
+ $types = array_merge( $types, [ 'comment' => __( 'Comment', 'zero-spam' ) ] );
305
 
306
  return $types;
307
  }
integrations/contact-form-7/contact-form-7.php CHANGED
@@ -7,28 +7,178 @@
7
  */
8
 
9
  /**
10
- * Add the 'cf7' spam type
 
 
 
 
11
  */
12
- add_filter( 'wpzerospam_types', function( $types ) {
13
- $types = array_merge( $types, [ 'cf7' => 'Contact Form 7' ] );
14
- return $types;
15
- });
 
 
 
 
 
 
 
 
 
 
 
 
16
 
17
  /**
18
- * Validation for CF7 submissions
 
 
 
 
19
  */
20
- if ( ! function_exists( 'wpzerospam_wpcf7_validate' ) ) {
21
- function wpzerospam_wpcf7_validate( $result ) {
22
- if ( is_user_logged_in() || wpzerospam_key_check() ) {
23
- return $result;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
 
26
- do_action( 'wpzerospam_cf7_spam' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
 
28
- wpzerospam_spam_detected( 'cf7', $result );
29
  }
30
  }
31
- add_action( 'wpcf7_validate', 'wpzerospam_wpcf7_validate' );
32
 
33
  /**
34
  * Enqueue the CF7 form JS
7
  */
8
 
9
  /**
10
+ * Adds admin settings for CF7 protection.
11
+ *
12
+ * @since 4.9.12
13
+ *
14
+ * @return void
15
  */
16
+ if ( ! function_exists( 'wpzerospam_cf7_admin_fields' ) ) {
17
+ function wpzerospam_cf7_admin_fields() {
18
+ if ( is_plugin_active( 'contact-form-7/wp-contact-form-7.php' ) ) {
19
+ add_settings_field( 'verify_cf7', __( 'Detect Spam/Malicious CF7 Submissions', 'zero-spam' ), 'wpzerospam_field_cb', 'wpzerospam', 'wpzerospam_spam_checks', [
20
+ 'label_for' => 'verify_cf7',
21
+ 'type' => 'checkbox',
22
+ 'multi' => false,
23
+ 'desc' => __( 'Monitors CF7 for malicious or automated spambot submissions.', 'zero-spam' ),
24
+ 'options' => [
25
+ 'enabled' => __( 'Enabled', 'zero-spam' )
26
+ ]
27
+ ]);
28
+ }
29
+ }
30
+ }
31
+ add_action( 'wpzerospam_admin_options', 'wpzerospam_cf7_admin_fields' );
32
 
33
  /**
34
+ * Add validation to the CF7 form protection admin fields.
35
+ *
36
+ * @since 4.9.12
37
+ *
38
+ * @param array $fields Array on available admin fields.
39
  */
40
+ if ( ! function_exists( 'wpzerospam_cf7_admin_validation' ) ) {
41
+ function wpzerospam_cf7_admin_validation( $fields ) {
42
+ if ( empty( $fields['verify_cf7'] ) ) { $fields['verify_cf7'] = 'disabled'; }
43
+
44
+ return $fields;
45
+ }
46
+ }
47
+ add_filter( 'wpzerospam_admin_validation', 'wpzerospam_cf7_admin_validation' );
48
+
49
+ if ( ! function_exists( 'wpzerospam_cf7_admin_fields_default' ) ) {
50
+ function wpzerospam_cf7_admin_fields_default( $defaults ) {
51
+ if ( empty( $defaults['verify_cf7'] ) ) { $defaults['verify_cf7'] = 'enabled'; }
52
+
53
+ return $defaults;
54
+ }
55
+ }
56
+ add_filter( 'wpzerospam_admin_option_defaults', 'wpzerospam_cf7_admin_fields_default' );
57
+
58
+ if ( ! function_exists( 'zero_spam_wpcf7_admin_submission_data_item' ) ) {
59
+ function zero_spam_wpcf7_admin_submission_data_item( $key, $value ) {
60
+ switch( $key ) {
61
+ case '_wpcf7':
62
+ echo wpzerospam_admin_details_item( __( 'CF7 ID', 'zero-spam' ), $value );
63
+ break;
64
+ case '_wpcf7_version':
65
+ echo wpzerospam_admin_details_item( __( 'CF7 Version', 'zero-spam' ), $value );
66
+ break;
67
+ case '_wpcf7_locale':
68
+ echo wpzerospam_admin_details_item( __( 'CF7 Language', 'zero-spam' ), json_encode( $value ) );
69
+ break;
70
+ case '_wpcf7_container_post':
71
+ echo wpzerospam_admin_details_item( __( 'CF7 Referrer Post ID', 'zero-spam' ), json_encode( $value ) );
72
+ break;
73
+ case '_wpcf7_unit_tag':
74
+ echo wpzerospam_admin_details_item( __( 'CF7 Unit Tag', 'zero-spam' ), json_encode( $value ) );
75
+ break;
76
  }
77
+ }
78
+ }
79
+ add_action( 'wpzerospam_admin_submission_data_items', 'zero_spam_wpcf7_admin_submission_data_item', 10, 2 );
80
+
81
+ if ( ! function_exists( 'wpzerospam_wpcf7_defined_submission_data' ) ) {
82
+ function wpzerospam_wpcf7_defined_submission_data( $submission_data_keys ) {
83
+ $submission_data_keys[] = '_wpcf7';
84
+ $submission_data_keys[] = '_wpcf7_version';
85
+ $submission_data_keys[] = '_wpcf7_locale';
86
+ $submission_data_keys[] = '_wpcf7_container_post';
87
+ $submission_data_keys[] = '_wpcf7_unit_tag';
88
+
89
+ return $submission_data_keys;
90
+ }
91
+ }
92
+ add_filter( 'wpzerospam_defined_submission_data', 'wpzerospam_wpcf7_defined_submission_data', 10, 1 );
93
+
94
+ /*
95
+ * Runs the CF7 form spam detections.
96
+ *
97
+ * Runs all action & filter hooks needed for monitoring CF7 for
98
+ * spam (when enabled via the 'Detect Spam/Malicious CF7 Submissions' option).
99
+ *
100
+ * @since 4.9.12
101
+ *
102
+ * @return void
103
+ */
104
+ if ( ! function_exists( 'wpzerospam_cf7_after_setup_theme' ) ) {
105
+ function wpzerospam_cf7_after_setup_theme() {
106
+ // Check if site registrations are enabled
107
+ $options = wpzerospam_options();
108
 
109
+ // Add the 'cf7' spam type.
110
+ add_filter( 'wpzerospam_types', 'wpzerospam_wpcf7_type' );
111
+
112
+ // Check if detecting registration spam is enabled & user is unauthenticated.
113
+ if ( 'enabled' != $options['verify_cf7'] || is_user_logged_in() ) { return false; }
114
+
115
+ // Add the 'honeypot' field to the CF7 form.
116
+ add_filter( 'wpcf7_form_elements', 'zero_spam_wpcf7_form_elements', 10, 1 );
117
+
118
+ // Preprocess CF7 form submissions.
119
+ add_filter( 'wpcf7_validate', 'wpzerospam_wpcf7_preprocess_submission', 10, 2 );
120
+ }
121
+ }
122
+ add_action( 'after_setup_theme', 'wpzerospam_cf7_after_setup_theme' );
123
+
124
+ /**
125
+ * Adds the 'cf7' spam type.
126
+ *
127
+ * @param array An array of the current spam types.
128
+ * @return array The resulting current spam types.
129
+ */
130
+ if ( ! function_exists( 'wpzerospam_wpcf7_type' ) ) {
131
+ function wpzerospam_wpcf7_type( $types ) {
132
+ $types = array_merge( $types, [ 'cf7' => __( 'Contact Form 7', 'zero-spam' ) ] );
133
+
134
+ return $types;
135
+ }
136
+ }
137
+
138
+ /**
139
+ * Adds the honeypot field to CF7 forms.
140
+ *
141
+ * @since 4.9.12
142
+ *
143
+ * @param sting HTML for the form.
144
+ * @return string The modified form HTML.
145
+ */
146
+ function zero_spam_wpcf7_form_elements( $this_form_do_shortcode ) {
147
+ $this_form_do_shortcode .= wpzerospam_honeypot_field();
148
+
149
+ return $this_form_do_shortcode;
150
+ };
151
+
152
+ /**
153
+ * Preprocess CF7 submissions.
154
+ *
155
+ * @since 4.9.12
156
+ *
157
+ * @param object $result CF7 result object.
158
+ * @param object $tags CF7 tags object.
159
+ * @return object A CF7 object.
160
+ */
161
+ if ( ! function_exists( 'wpzerospam_wpcf7_preprocess_submission' ) ) {
162
+ function wpzerospam_wpcf7_preprocess_submission( $result, $tags ) {
163
+ $options = wpzerospam_options();
164
+ $honeypot = wpzerospam_get_honeypot();
165
+
166
+ if (
167
+ // First, check the 'honeypot' field.
168
+ ( ! isset( $_REQUEST[ $honeypot ] ) || $_REQUEST[ $honeypot ] ) ||
169
+ // Next, check the 'wpzerospam_key' field.
170
+ ( empty( $_REQUEST['wpzerospam_key'] ) || wpzerospam_get_key() != $_REQUEST['wpzerospam_key'] )
171
+ ) {
172
+ // Spam registration selected.
173
+ do_action( 'wpzerospam_cf7_spam', $_REQUEST );
174
+ wpzerospam_spam_detected( 'cf7', $_REQUEST, false );
175
+
176
+ $result->invalidate( $tags[0], $options['spam_message'] );
177
+ }
178
 
179
+ return $result;
180
  }
181
  }
 
182
 
183
  /**
184
  * Enqueue the CF7 form JS
integrations/fluentform/fluentform.php CHANGED
@@ -10,7 +10,7 @@
10
  * Add the 'fluentform' spam type
11
  */
12
  add_filter( 'wpzerospam_types', function( $types ) {
13
- $types = array_merge( $types, [ 'fluentform' => 'Fluent Forms' ] );
14
  return $types;
15
  });
16
 
10
  * Add the 'fluentform' spam type
11
  */
12
  add_filter( 'wpzerospam_types', function( $types ) {
13
+ $types = array_merge( $types, [ 'fluentform' => __( 'Fluent Forms', 'zero-spam' ) ] );
14
  return $types;
15
  });
16
 
integrations/formidable/formidable.php CHANGED
@@ -12,7 +12,7 @@
12
  * @since 4.9.0
13
  */
14
  add_filter( 'wpzerospam_types', function( $types ) {
15
- $types = array_merge( $types, [ 'formidable' => 'Formidable Forms' ] );
16
  return $types;
17
  });
18
 
12
  * @since 4.9.0
13
  */
14
  add_filter( 'wpzerospam_types', function( $types ) {
15
+ $types = array_merge( $types, [ 'formidable' => __( 'Formidable Forms', 'zero-spam' ) ] );
16
  return $types;
17
  });
18
 
integrations/registrations/registrations.php CHANGED
@@ -7,38 +7,176 @@
7
  */
8
 
9
  /**
10
- * Add the 'registration' spam type
 
 
 
 
11
  */
12
- add_filter( 'wpzerospam_types', function( $types ) {
13
- $types = array_merge( $types, [ 'registration' => 'Registration' ] );
14
- return $types;
15
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
16
 
17
  /**
18
- * Preprocess registration fields
 
 
 
 
19
  */
20
- if ( ! function_exists( 'wpzerospam_preprocess_registration' ) ) {
21
- function wpzerospam_preprocess_registration( $errors, $sanitized_user_login, $user_email ) {
22
- $options = wpzerospam_options();
23
- if ( 'enabled' != $options['verify_registrations'] ) { return $errors; }
24
 
25
- if ( ! wpzerospam_key_check() ) {
26
- // Spam registration detected
27
- do_action( 'wpzerospam_registration_spam', $errors, $sanitized_user_login, $user_email );
 
28
 
29
- $data = [
30
- 'errors' => $errors,
31
- 'sanitized_user_login' => $sanitized_user_login,
32
- 'user_email' => $user_email
33
- ];
 
 
 
 
 
 
 
 
 
 
 
34
 
35
- wpzerospam_spam_detected( 'registration', $data );
 
 
 
 
 
 
 
 
 
 
 
36
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
 
38
- return $errors;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39
  }
40
  }
41
- add_filter( 'registration_errors', 'wpzerospam_preprocess_registration', 10, 3 );
42
 
43
  /**
44
  * Enqueue the registration form JS
7
  */
8
 
9
  /**
10
+ * Adds admin settings for registration protection.
11
+ *
12
+ * @since 4.9.12
13
+ *
14
+ * @return void
15
  */
16
+ if ( ! function_exists( 'wpzerospam_registrations_admin_fields' ) ) {
17
+ function wpzerospam_registrations_admin_fields() {
18
+ if ( get_option( 'users_can_register' ) ) {
19
+ // Registration spam check
20
+ add_settings_field( 'verify_registrations', __( 'Detect Spam/Malicious Registrations', 'zero-spam' ), 'wpzerospam_field_cb', 'wpzerospam', 'wpzerospam_spam_checks', [
21
+ 'label_for' => 'verify_registrations',
22
+ 'type' => 'checkbox',
23
+ 'multi' => false,
24
+ 'desc' => __( 'Monitors registrations for malicious or automated spambot submissions.', 'zero-spam' ),
25
+ 'options' => [
26
+ 'enabled' => __( 'Enabled', 'zero-spam' )
27
+ ]
28
+ ]);
29
+ }
30
+ }
31
+ }
32
+ add_action( 'wpzerospam_admin_options', 'wpzerospam_registrations_admin_fields' );
33
 
34
  /**
35
+ * Add validation to the registration form protection admin fields.
36
+ *
37
+ * @since 4.9.12
38
+ *
39
+ * @param array $fields Array on available admin fields.
40
  */
41
+ if ( ! function_exists( 'wpzerospam_registrations_admin_validation' ) ) {
42
+ function wpzerospam_registrations_admin_validation( $fields ) {
43
+ if ( empty( $fields['verify_registrations'] ) ) { $fields['verify_registrations'] = 'disabled'; }
 
44
 
45
+ return $fields;
46
+ }
47
+ }
48
+ add_filter( 'wpzerospam_admin_validation', 'wpzerospam_registrations_admin_validation' );
49
 
50
+ /**
51
+ * Sets the default admin option fields for registrations.
52
+ *
53
+ * @since 4.9.12
54
+ *
55
+ * @param array $defaults Array of WPZS admin option fields.
56
+ * @return array The modified array of the WPZS admin option fields.
57
+ */
58
+ if ( ! function_exists( 'wpzerospam_registrations_admin_fields_default' ) ) {
59
+ function wpzerospam_registrations_admin_fields_default( $defaults ) {
60
+ if ( empty( $defaults['verify_registrations'] ) ) { $defaults['verify_registrations'] = 'enabled'; }
61
+
62
+ return $defaults;
63
+ }
64
+ }
65
+ add_filter( 'wpzerospam_admin_option_defaults', 'wpzerospam_registrations_admin_fields_default' );
66
 
67
+ if ( ! function_exists( 'wpzerospam_registrations_admin_submission_data_item' ) ) {
68
+ function wpzerospam_registrations_admin_submission_data_item( $key, $value ) {
69
+ switch( $key ) {
70
+ case 'sanitized_user_login':
71
+ echo wpzerospam_admin_details_item( __( 'Sanitized User Login', 'zero-spam' ), $value );
72
+ break;
73
+ case 'user_email':
74
+ echo wpzerospam_admin_details_item( __( 'User Email', 'zero-spam' ), $value );
75
+ break;
76
+ case 'errors':
77
+ echo wpzerospam_admin_details_item( __( 'Errors', 'zero-spam' ), json_encode( $value ) );
78
+ break;
79
  }
80
+ }
81
+ }
82
+ add_action( 'wpzerospam_admin_submission_data_items', 'wpzerospam_registrations_admin_submission_data_item', 10, 2 );
83
+
84
+ if ( ! function_exists( 'wpzerospamregistrations_defined_submission_data' ) ) {
85
+ function wpzerospamregistrations_defined_submission_data( $submission_data_keys ) {
86
+ $submission_data_keys[] = 'sanitized_user_login';
87
+ $submission_data_keys[] = 'user_email';
88
+ $submission_data_keys[] = 'errors';
89
+
90
+ return $submission_data_keys;
91
+ }
92
+ }
93
+ add_filter( 'wpzerospam_defined_submission_data', 'wpzerospamregistrations_defined_submission_data', 10, 1 );
94
+
95
+ /*
96
+ * Runs the registration form spam detections.
97
+ *
98
+ * Runs all action & filter hooks needed for monitoring registrations for
99
+ * spam (when enabled via the 'Detect Registration Spam' option).
100
+ *
101
+ * @since 4.9.12
102
+ *
103
+ * @return void
104
+ */
105
+ if ( ! function_exists( 'wpzerospam_registrations_after_setup_theme' ) ) {
106
+ function wpzerospam_registrations_after_setup_theme() {
107
+ // Add the 'registration' spam type.
108
+ add_filter( 'wpzerospam_types', 'wpzerospam_registrations_types' );
109
 
110
+ // Check if site registrations are enabled
111
+ if ( ! get_option( 'users_can_register' ) ) { return false; }
112
+
113
+ $options = wpzerospam_options();
114
+
115
+ // Check if detecting registration spam is enabled & user is unauthenticated.
116
+ if ( 'enabled' != $options['verify_registrations'] || is_user_logged_in() ) { return false; }
117
+
118
+ // Add the 'honeypot' field to the registration form.
119
+ add_action( 'register_form', 'wpzerospam_registrations_form' );
120
+
121
+ // Preprocess registration submissions.
122
+ add_action( 'register_post', 'wpzerospam_registrations_preprocess', 10, 3 );
123
+ }
124
+ }
125
+ add_action( 'after_setup_theme', 'wpzerospam_registrations_after_setup_theme' );
126
+
127
+ /**
128
+ * Adds the 'registration' spam type.
129
+ *
130
+ * @param array An array of the current spam types.
131
+ * @return array The resulting current spam types.
132
+ */
133
+ if ( ! function_exists( 'wpzerospam_registrations_types' ) ) {
134
+ function wpzerospam_registrations_types( $types ) {
135
+ $types = array_merge( $types, [ 'registration' => __( 'Registration', 'zero-spam' ) ] );
136
+
137
+ return $types;
138
+ }
139
+ }
140
+
141
+ /**
142
+ * Add a 'honeypot' field to the registration form.
143
+ *
144
+ * @since 4.9.12
145
+ *
146
+ * @link https://codex.wordpress.org/Plugin_API/Action_Reference/register_form
147
+ *
148
+ * @return string HTML to append to the registration form.
149
+ */
150
+ if ( ! function_exists( 'wpzerospam_registrations_form' ) ) {
151
+ function wpzerospam_registrations_form( $defaults ) {
152
+ echo wpzerospam_honeypot_field();
153
+ }
154
+ }
155
+
156
+ /**
157
+ * Preprocess registration form submissions.
158
+ */
159
+ if ( ! function_exists( 'wpzerospam_registrations_preprocess' ) ) {
160
+ function wpzerospam_registrations_preprocess( $sanitized_user_login, $user_email, $errors ) {
161
+ $options = wpzerospam_options();
162
+ $honeypot = wpzerospam_get_honeypot();
163
+
164
+ if (
165
+ // First, check the 'honeypot' field.
166
+ ( ! isset( $_REQUEST[ $honeypot ] ) || $_REQUEST[ $honeypot ] ) ||
167
+ // Next, check the 'wpzerospam_key' field.
168
+ ( empty( $_REQUEST['wpzerospam_key'] ) || wpzerospam_get_key() != $_REQUEST['wpzerospam_key'] )
169
+ ) {
170
+ // Spam registration selected.
171
+ do_action( 'wpzerospam_registration_spam', $errors, $sanitized_user_login, $user_email );
172
+ wpzerospam_spam_detected( 'registration', [
173
+ 'sanitized_user_login' => $sanitized_user_login,
174
+ 'user_email' => $user_email,
175
+ 'errors' => $errors
176
+ ]);
177
+ }
178
  }
179
  }
 
180
 
181
  /**
182
  * Enqueue the registration form JS
integrations/wpforms/wpforms.php CHANGED
@@ -10,7 +10,7 @@
10
  * Add the 'wpform' spam type
11
  */
12
  add_filter( 'wpzerospam_types', function( $types ) {
13
- $types = array_merge( $types, [ 'wpform' => 'WPForms' ] );
14
  return $types;
15
  });
16
 
@@ -37,7 +37,7 @@ if ( ! function_exists( 'wpzerospam_wpforms_process_before' ) ) {
37
  add_action( 'wpforms_process_before', 'wpzerospam_wpforms_process_before', 10, 2 );
38
 
39
  /**
40
- * Enqueue the CF7 form JS
41
  */
42
  if ( ! function_exists( 'wpzerospam_wpforms' ) ) {
43
  function wpzerospam_wpforms() {
10
  * Add the 'wpform' spam type
11
  */
12
  add_filter( 'wpzerospam_types', function( $types ) {
13
+ $types = array_merge( $types, [ 'wpform' => __( 'WPForms', 'zero-spam' ) ] );
14
  return $types;
15
  });
16
 
37
  add_action( 'wpforms_process_before', 'wpzerospam_wpforms_process_before', 10, 2 );
38
 
39
  /**
40
+ * Enqueue the WPForms form JS
41
  */
42
  if ( ! function_exists( 'wpzerospam_wpforms' ) ) {
43
  function wpzerospam_wpforms() {
languages/zero-spam-fr_FR.pot ADDED
@@ -0,0 +1,685 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #, fuzzy
2
+ msgid ""
3
+ msgstr ""
4
+ "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
5
+ "Project-Id-Version: WordPress Zero Spam\n"
6
+ "POT-Creation-Date: 2020-08-07 10:12-0500\n"
7
+ "PO-Revision-Date: 2020-08-07 10:10-0500\n"
8
+ "Last-Translator: \n"
9
+ "Language-Team: \n"
10
+ "MIME-Version: 1.0\n"
11
+ "Content-Type: text/plain; charset=UTF-8\n"
12
+ "Content-Transfer-Encoding: 8bit\n"
13
+ "X-Generator: Poedit 2.4\n"
14
+ "X-Poedit-Basepath: ..\n"
15
+ "X-Poedit-Flags-xgettext: --add-comments=translators:\n"
16
+ "X-Poedit-WPHeader: wordpress-zero-spam.php\n"
17
+ "X-Poedit-SourceCharset: UTF-8\n"
18
+ "X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
19
+ "esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;"
20
+ "_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
21
+ "X-Poedit-SearchPath-0: .\n"
22
+ "X-Poedit-SearchPathExcluded-0: *.min.js\n"
23
+
24
+ #: classes/class-wpzerospam-blacklisted-table.php:20
25
+ msgid "Blacklist"
26
+ msgstr ""
27
+
28
+ #: classes/class-wpzerospam-blacklisted-table.php:21
29
+ msgid "Blacklist IPs"
30
+ msgstr ""
31
+
32
+ #: classes/class-wpzerospam-blacklisted-table.php:32
33
+ #: classes/class-wpzerospam-blacklisted-table.php:131
34
+ msgid "Last Updated"
35
+ msgstr ""
36
+
37
+ #: classes/class-wpzerospam-blacklisted-table.php:33
38
+ #: classes/class-wpzerospam-blocked-ip-table.php:32
39
+ #: classes/class-wpzerospam-log-table.php:34 inc/admin.php:245
40
+ msgid "IP Address"
41
+ msgstr ""
42
+
43
+ #: classes/class-wpzerospam-blacklisted-table.php:34
44
+ #: classes/class-wpzerospam-blacklisted-table.php:136
45
+ msgid "Service"
46
+ msgstr ""
47
+
48
+ #: classes/class-wpzerospam-blacklisted-table.php:35
49
+ #: classes/class-wpzerospam-blocked-ip-table.php:38
50
+ msgid "Attempts"
51
+ msgstr ""
52
+
53
+ #: classes/class-wpzerospam-blacklisted-table.php:36
54
+ #: classes/class-wpzerospam-log-table.php:38
55
+ msgid "Details"
56
+ msgstr ""
57
+
58
+ #: classes/class-wpzerospam-blacklisted-table.php:63
59
+ msgid "Filter by service"
60
+ msgstr ""
61
+
62
+ #: classes/class-wpzerospam-blacklisted-table.php:67
63
+ msgid "All services"
64
+ msgstr ""
65
+
66
+ #: classes/class-wpzerospam-blacklisted-table.php:68
67
+ msgid "BotScout"
68
+ msgstr ""
69
+
70
+ #: classes/class-wpzerospam-blacklisted-table.php:69 inc/admin.php:539
71
+ msgid "Stop Forum Spam"
72
+ msgstr ""
73
+
74
+ #: classes/class-wpzerospam-blacklisted-table.php:70
75
+ msgid "Zero Spam"
76
+ msgstr ""
77
+
78
+ #: classes/class-wpzerospam-blacklisted-table.php:73
79
+ #: classes/class-wpzerospam-blocked-ip-table.php:76
80
+ #: classes/class-wpzerospam-log-table.php:79
81
+ msgid "Filter"
82
+ msgstr ""
83
+
84
+ #: classes/class-wpzerospam-blacklisted-table.php:116
85
+ #: classes/class-wpzerospam-log-table.php:140
86
+ msgid "No details available."
87
+ msgstr ""
88
+
89
+ #: classes/class-wpzerospam-blacklisted-table.php:119
90
+ #: classes/class-wpzerospam-log-table.php:143
91
+ msgid "View"
92
+ msgstr ""
93
+
94
+ #: classes/class-wpzerospam-blacklisted-table.php:126
95
+ #: classes/class-wpzerospam-log-table.php:148
96
+ msgid "Detected Spam IP"
97
+ msgstr ""
98
+
99
+ #: classes/class-wpzerospam-blacklisted-table.php:160
100
+ msgid "Appears"
101
+ msgstr ""
102
+
103
+ #: classes/class-wpzerospam-blacklisted-table.php:166
104
+ msgid "Confidence"
105
+ msgstr ""
106
+
107
+ #: classes/class-wpzerospam-blacklisted-table.php:172
108
+ msgid "Frequency"
109
+ msgstr ""
110
+
111
+ #: classes/class-wpzerospam-blacklisted-table.php:178
112
+ msgid "Last Seen"
113
+ msgstr ""
114
+
115
+ #: classes/class-wpzerospam-blacklisted-table.php:184
116
+ msgid "ASN"
117
+ msgstr ""
118
+
119
+ #: classes/class-wpzerospam-blacklisted-table.php:208
120
+ #: classes/class-wpzerospam-blocked-ip-table.php:154
121
+ msgid "Delete"
122
+ msgstr ""
123
+
124
+ #: classes/class-wpzerospam-blacklisted-table.php:209
125
+ #: classes/class-wpzerospam-blocked-ip-table.php:155
126
+ #: classes/class-wpzerospam-log-table.php:289
127
+ msgid "Delete All Entries"
128
+ msgstr ""
129
+
130
+ #: classes/class-wpzerospam-blocked-ip-table.php:20
131
+ msgid "Blocked IP"
132
+ msgstr ""
133
+
134
+ #: classes/class-wpzerospam-blocked-ip-table.php:21 inc/admin.php:70
135
+ #: inc/admin.php:560
136
+ msgid "Blocked IPs"
137
+ msgstr ""
138
+
139
+ #: classes/class-wpzerospam-blocked-ip-table.php:33
140
+ #: classes/class-wpzerospam-log-table.php:33
141
+ #: classes/class-wpzerospam-log-table.php:163 inc/admin.php:255
142
+ msgid "Type"
143
+ msgstr ""
144
+
145
+ #: classes/class-wpzerospam-blocked-ip-table.php:34
146
+ msgid "Date Added"
147
+ msgstr ""
148
+
149
+ #: classes/class-wpzerospam-blocked-ip-table.php:35 inc/admin.php:266
150
+ msgid "Start Date"
151
+ msgstr ""
152
+
153
+ #: classes/class-wpzerospam-blocked-ip-table.php:36 inc/admin.php:270
154
+ msgid "End Date"
155
+ msgstr ""
156
+
157
+ #: classes/class-wpzerospam-blocked-ip-table.php:37
158
+ #: classes/class-wpzerospam-log-table.php:216 inc/admin.php:262
159
+ msgid "Reason"
160
+ msgstr ""
161
+
162
+ #: classes/class-wpzerospam-blocked-ip-table.php:67
163
+ #: classes/class-wpzerospam-log-table.php:68
164
+ msgid "Filter by type"
165
+ msgstr ""
166
+
167
+ #: classes/class-wpzerospam-blocked-ip-table.php:71
168
+ #: classes/class-wpzerospam-log-table.php:73
169
+ msgid "All types"
170
+ msgstr ""
171
+
172
+ #: classes/class-wpzerospam-blocked-ip-table.php:72 inc/admin.php:258
173
+ msgid "Permanent"
174
+ msgstr ""
175
+
176
+ #: classes/class-wpzerospam-blocked-ip-table.php:73 inc/admin.php:257
177
+ msgid "Temporary"
178
+ msgstr ""
179
+
180
+ #: classes/class-wpzerospam-blocked-ip-table.php:136
181
+ msgid ""
182
+ "Comment <span class=\"wpzerospam-small\">(<strong>permanently</strong> auto-"
183
+ "blocked)</span>"
184
+ msgstr ""
185
+
186
+ #: classes/class-wpzerospam-blocked-ip-table.php:139
187
+ msgid "Comment <span class=\"wpzerospam-small\">(auto-blocked)</span>"
188
+ msgstr ""
189
+
190
+ #: classes/class-wpzerospam-log-table.php:20
191
+ msgid "Spam Detection"
192
+ msgstr ""
193
+
194
+ #: classes/class-wpzerospam-log-table.php:21 inc/admin.php:60 inc/admin.php:61
195
+ #: inc/admin.php:591 templates/map.php:97
196
+ msgid "Spam Detections"
197
+ msgstr ""
198
+
199
+ #: classes/class-wpzerospam-log-table.php:32
200
+ #: classes/class-wpzerospam-log-table.php:158
201
+ msgid "Date"
202
+ msgstr ""
203
+
204
+ #: classes/class-wpzerospam-log-table.php:35
205
+ #: classes/class-wpzerospam-log-table.php:169
206
+ msgid "Country"
207
+ msgstr ""
208
+
209
+ #: classes/class-wpzerospam-log-table.php:36
210
+ #: classes/class-wpzerospam-log-table.php:176
211
+ msgid "Region"
212
+ msgstr ""
213
+
214
+ #: classes/class-wpzerospam-log-table.php:37
215
+ #: classes/class-wpzerospam-log-table.php:183
216
+ msgid "City"
217
+ msgstr ""
218
+
219
+ #: classes/class-wpzerospam-log-table.php:39
220
+ #: classes/class-wpzerospam-log-table.php:101 templates/ip-list.php:63
221
+ msgid "Block IP"
222
+ msgstr ""
223
+
224
+ #: classes/class-wpzerospam-log-table.php:99 templates/ip-list.php:60
225
+ msgid "Blocked"
226
+ msgstr ""
227
+
228
+ #: classes/class-wpzerospam-log-table.php:153
229
+ msgid "Page URL"
230
+ msgstr ""
231
+
232
+ #: classes/class-wpzerospam-log-table.php:198
233
+ msgid "Sanitized User Login"
234
+ msgstr ""
235
+
236
+ #: classes/class-wpzerospam-log-table.php:204
237
+ msgid "User Email"
238
+ msgstr ""
239
+
240
+ #: classes/class-wpzerospam-log-table.php:210
241
+ msgid "Errors"
242
+ msgstr ""
243
+
244
+ #: classes/class-wpzerospam-log-table.php:224
245
+ msgid "Form Action"
246
+ msgstr ""
247
+
248
+ #: classes/class-wpzerospam-log-table.php:230
249
+ msgid "Form ID"
250
+ msgstr ""
251
+
252
+ #: classes/class-wpzerospam-log-table.php:236
253
+ msgid "Form Key"
254
+ msgstr ""
255
+
256
+ #: classes/class-wpzerospam-log-table.php:242
257
+ msgid "Item Key"
258
+ msgstr ""
259
+
260
+ #: classes/class-wpzerospam-log-table.php:248
261
+ msgid "Form Values"
262
+ msgstr ""
263
+
264
+ #: classes/class-wpzerospam-log-table.php:258
265
+ msgid "Source"
266
+ msgstr ""
267
+
268
+ #: classes/class-wpzerospam-log-table.php:288
269
+ msgid "Delete Selected"
270
+ msgstr ""
271
+
272
+ #: inc/admin.php:41 inc/admin.php:51
273
+ msgid "WordPress Zero Spam Dashboard"
274
+ msgstr ""
275
+
276
+ #: inc/admin.php:42
277
+ msgid "WP Zero Spam"
278
+ msgstr ""
279
+
280
+ #: inc/admin.php:52
281
+ msgid "Dashboard"
282
+ msgstr ""
283
+
284
+ #: inc/admin.php:69
285
+ msgid "Blocked IP Addresses"
286
+ msgstr ""
287
+
288
+ #: inc/admin.php:78 inc/admin.php:79
289
+ msgid "Blacklisted IPs"
290
+ msgstr ""
291
+
292
+ #: inc/admin.php:87
293
+ msgid "WordPress Zero Spam Settings"
294
+ msgstr ""
295
+
296
+ #: inc/admin.php:88 inc/admin.php:422
297
+ msgid "Settings"
298
+ msgstr ""
299
+
300
+ #: inc/admin.php:118 inc/admin.php:147 inc/admin.php:293
301
+ msgid "Search IPs"
302
+ msgstr ""
303
+
304
+ #: inc/admin.php:221
305
+ msgid "Please enter a valid IP address."
306
+ msgstr ""
307
+
308
+ #: inc/admin.php:224
309
+ msgid "Please select a valid type."
310
+ msgstr ""
311
+
312
+ #: inc/admin.php:227
313
+ msgid "Please select a date & time when the temporary block should end."
314
+ msgstr ""
315
+
316
+ #: inc/admin.php:236
317
+ msgid "The blocked IP has been successfully added."
318
+ msgstr ""
319
+
320
+ #: inc/admin.php:243 inc/admin.php:274
321
+ msgid "Add Blocked IP"
322
+ msgstr ""
323
+
324
+ #: inc/admin.php:263
325
+ msgid "e.g. Spammed form"
326
+ msgstr ""
327
+
328
+ #: inc/admin.php:267 inc/admin.php:271
329
+ msgid "Optional"
330
+ msgstr ""
331
+
332
+ #: inc/admin.php:314
333
+ msgid "Statistics"
334
+ msgstr ""
335
+
336
+ #: inc/admin.php:441
337
+ msgid "General Settings"
338
+ msgstr ""
339
+
340
+ #: inc/admin.php:442
341
+ msgid "Auto-block Settings"
342
+ msgstr ""
343
+
344
+ #: inc/admin.php:443
345
+ msgid "On-site Spam Prevention"
346
+ msgstr ""
347
+
348
+ #: inc/admin.php:444
349
+ msgid "Integrations & Third-party APIs"
350
+ msgstr ""
351
+
352
+ #: inc/admin.php:447
353
+ msgid "Cookie Expiration"
354
+ msgstr ""
355
+
356
+ #: inc/admin.php:453
357
+ msgid "days"
358
+ msgstr ""
359
+
360
+ #: inc/admin.php:457
361
+ msgid "Share Spam Detections"
362
+ msgstr ""
363
+
364
+ #: inc/admin.php:463 inc/admin.php:474 inc/admin.php:545 inc/admin.php:628
365
+ #: inc/admin.php:639 inc/admin.php:652 inc/admin.php:664 inc/admin.php:677
366
+ #: inc/admin.php:690 inc/admin.php:703 inc/admin.php:716
367
+ #: integrations/comments/comments.php:25 integrations/comments/comments.php:36
368
+ #: integrations/comments/comments.php:47
369
+ msgid "Enabled"
370
+ msgstr ""
371
+
372
+ #: inc/admin.php:468
373
+ msgid "Auto-block IPs"
374
+ msgstr ""
375
+
376
+ #: inc/admin.php:480
377
+ msgid "Auto-block Period"
378
+ msgstr ""
379
+
380
+ #: inc/admin.php:486
381
+ msgid "minutes"
382
+ msgstr ""
383
+
384
+ #: inc/admin.php:491
385
+ msgid "Permanently Auto-block"
386
+ msgstr ""
387
+
388
+ #: inc/admin.php:500
389
+ msgid "API Timeout"
390
+ msgstr ""
391
+
392
+ #: inc/admin.php:506
393
+ msgid "seconds"
394
+ msgstr ""
395
+
396
+ #: inc/admin.php:511
397
+ msgid "ipstack API Key"
398
+ msgstr ""
399
+
400
+ #: inc/admin.php:514
401
+ msgid "Enter your ipstack API key."
402
+ msgstr ""
403
+
404
+ #: inc/admin.php:521
405
+ msgid "BotScout API Key"
406
+ msgstr ""
407
+
408
+ #: inc/admin.php:525
409
+ msgid "Enter your free BotScout API key."
410
+ msgstr ""
411
+
412
+ #: inc/admin.php:530
413
+ msgid "BotScout Count Minimum"
414
+ msgstr ""
415
+
416
+ #: inc/admin.php:550
417
+ msgid "Stop Forum Spam Confidence Minimum"
418
+ msgstr ""
419
+
420
+ #: inc/admin.php:556
421
+ msgid "%"
422
+ msgstr ""
423
+
424
+ #: inc/admin.php:565 inc/admin.php:596
425
+ msgid "Redirect user"
426
+ msgstr ""
427
+
428
+ #: inc/admin.php:566 inc/admin.php:597
429
+ msgid ""
430
+ "Display a <a href=\"https://developer.mozilla.org/en-US/docs/Web/HTTP/"
431
+ "Status/403\" target=\"_blank\"><code>403 Forbidden</code></a> error"
432
+ msgstr ""
433
+
434
+ #: inc/admin.php:572
435
+ msgid "Redirect for Blocked Users"
436
+ msgstr ""
437
+
438
+ #: inc/admin.php:581
439
+ msgid "Blocked Message"
440
+ msgstr ""
441
+
442
+ #: inc/admin.php:586 inc/utilities.php:115
443
+ msgid ""
444
+ "You have been blocked from visiting this site by WordPress Zero Spam due to "
445
+ "detected spam activity."
446
+ msgstr ""
447
+
448
+ #: inc/admin.php:603
449
+ msgid "Redirect for Spam"
450
+ msgstr ""
451
+
452
+ #: inc/admin.php:612
453
+ msgid "Spam Detection Message"
454
+ msgstr ""
455
+
456
+ #: inc/admin.php:617 inc/utilities.php:114
457
+ msgid "There was a problem with your submission. Please go back and try again."
458
+ msgstr ""
459
+
460
+ #: inc/admin.php:622
461
+ msgid "Log Blocked IPs"
462
+ msgstr ""
463
+
464
+ #: inc/admin.php:633
465
+ msgid "Log Spam Detections"
466
+ msgstr ""
467
+
468
+ #: inc/admin.php:646
469
+ msgid "Verify Registrations"
470
+ msgstr ""
471
+
472
+ #: inc/admin.php:658
473
+ msgid "Verify CF7 Submissions"
474
+ msgstr ""
475
+
476
+ #: inc/admin.php:671
477
+ msgid "Verify BuddyPress Registrations"
478
+ msgstr ""
479
+
480
+ #: inc/admin.php:684
481
+ msgid "Verify WPForms Submissions"
482
+ msgstr ""
483
+
484
+ #: inc/admin.php:697
485
+ msgid "Verify Fluent Form Submissions"
486
+ msgstr ""
487
+
488
+ #: inc/admin.php:710
489
+ msgid "Verify Formidable Form Submissions"
490
+ msgstr ""
491
+
492
+ #: inc/admin.php:722
493
+ msgid "IP Whitelist"
494
+ msgstr ""
495
+
496
+ #: inc/admin.php:727
497
+ msgid "e.g. xxx.xxx.x.x"
498
+ msgstr ""
499
+
500
+ #: inc/utilities.php:324
501
+ msgid "Access Blocked"
502
+ msgstr ""
503
+
504
+ #: integrations/comments/comments.php:19
505
+ msgid "Strip Comment Links"
506
+ msgstr ""
507
+
508
+ #: integrations/comments/comments.php:30
509
+ msgid "Strip Comment Author Links"
510
+ msgstr ""
511
+
512
+ #: integrations/comments/comments.php:41
513
+ msgid "Detect Comment Spam"
514
+ msgstr ""
515
+
516
+ #: integrations/comments/comments.php:93
517
+ msgid "Comment Post"
518
+ msgstr ""
519
+
520
+ #: integrations/comments/comments.php:96 integrations/comments/comments.php:119
521
+ msgid "Author"
522
+ msgstr ""
523
+
524
+ #: integrations/comments/comments.php:99 integrations/comments/comments.php:124
525
+ msgid "Email"
526
+ msgstr ""
527
+
528
+ #: integrations/comments/comments.php:102
529
+ #: integrations/comments/comments.php:129
530
+ msgid "Website"
531
+ msgstr ""
532
+
533
+ #: integrations/comments/comments.php:105
534
+ #: integrations/comments/comments.php:133
535
+ #: integrations/comments/comments.php:286
536
+ msgid "Comment"
537
+ msgstr ""
538
+
539
+ #: integrations/comments/comments.php:108
540
+ msgid "Comment Type"
541
+ msgstr ""
542
+
543
+ #: integrations/comments/comments.php:111
544
+ msgid "Comment Parent ID"
545
+ msgstr ""
546
+
547
+ #: integrations/comments/comments.php:136
548
+ msgid "User IP"
549
+ msgstr ""
550
+
551
+ #: integrations/comments/comments.php:139
552
+ msgid "User Agent"
553
+ msgstr ""
554
+
555
+ #: integrations/comments/comments.php:142
556
+ msgid "Site"
557
+ msgstr ""
558
+
559
+ #: integrations/comments/comments.php:145
560
+ msgid "Site Language"
561
+ msgstr ""
562
+
563
+ #: integrations/comments/comments.php:148
564
+ msgid "Site Charset"
565
+ msgstr ""
566
+
567
+ #: integrations/comments/comments.php:151
568
+ msgid "Permalink"
569
+ msgstr ""
570
+
571
+ #: integrations/comments/comments.php:159
572
+ msgid "Akismet Result"
573
+ msgstr ""
574
+
575
+ #: integrations/comments/comments.php:162
576
+ msgid "Akismet Pro Tip"
577
+ msgstr ""
578
+
579
+ #: templates/callout.php:12
580
+ msgid ""
581
+ "Are you a fan of the <a href=\"https://benmarshall.me/wordpress-zero-spam/?"
582
+ "utm_source=wordpress_zero_spam&utm_medium=settings_page&utm_campaign=admin\" "
583
+ "target=\"_blank\">WordPress Zero Spam</a> plugin? Show your support."
584
+ msgstr ""
585
+
586
+ #: templates/callout.php:13
587
+ msgid ""
588
+ "Help support the continued development of the WordPress Zero Spam plugin by "
589
+ "<a href=\"https://benmarshall.me/donate?"
590
+ "utm_source=wordpress_zero_spam&utm_medium=settings_page&utm_campaign=admin\" "
591
+ "target=\"_blank\">donating today</a>. Your donation goes towards the time it "
592
+ "takes to develop new features &amp; updates, but also helps provide pro bono "
593
+ "work for nonprofits. <a href=\"https://benmarshall.me/donate?"
594
+ "utm_source=wordpress_zero_spam&utm_medium=settings_page&utm_campaign=admin\" "
595
+ "target=\"_blank\">Learn more</a>."
596
+ msgstr ""
597
+
598
+ #: templates/callout.php:14
599
+ msgid "For the latest updates,"
600
+ msgstr ""
601
+
602
+ #: templates/callout.php:14
603
+ msgid "follow us on Twitter"
604
+ msgstr ""
605
+
606
+ #: templates/callout.php:14
607
+ msgid "Facebook"
608
+ msgstr ""
609
+
610
+ #: templates/callout.php:14
611
+ msgid "or"
612
+ msgstr ""
613
+
614
+ #: templates/callout.php:14
615
+ msgid "visit our website"
616
+ msgstr ""
617
+
618
+ #: templates/callout.php:17
619
+ msgid "Submit Bug/Feature Request"
620
+ msgstr ""
621
+
622
+ #: templates/callout.php:18
623
+ msgid "Fork on Github"
624
+ msgstr ""
625
+
626
+ #: templates/callout.php:19
627
+ msgid "Show your Support &mdash; Donate"
628
+ msgstr ""
629
+
630
+ #: templates/callout.php:23
631
+ msgid "Your IP Address:"
632
+ msgstr ""
633
+
634
+ #: templates/countries-pie-chart.php:12
635
+ msgid "Most Spam by Country"
636
+ msgstr ""
637
+
638
+ #: templates/countries-pie-chart.php:67 templates/ip-list.php:71
639
+ #: templates/regions-pie-chart.php:82 templates/spam-line-chart.php:58
640
+ msgid "No data to report yet."
641
+ msgstr ""
642
+
643
+ #: templates/ip-list.php:12
644
+ msgid "Most Spam by IP Address"
645
+ msgstr ""
646
+
647
+ #: templates/map.php:11
648
+ msgid "Spam Detections World Map"
649
+ msgstr ""
650
+
651
+ #: templates/map.php:103
652
+ msgid "<strong>Enter your <a href=\""
653
+ msgstr ""
654
+
655
+ #: templates/regions-pie-chart.php:12
656
+ msgid "Most Spam by Region"
657
+ msgstr ""
658
+
659
+ #: templates/spam-line-chart.php:10
660
+ msgid "Spam by Date"
661
+ msgstr ""
662
+
663
+ #. Plugin Name of the plugin/theme
664
+ msgid "WordPress Zero Spam"
665
+ msgstr ""
666
+
667
+ #. Plugin URI of the plugin/theme
668
+ msgid "https://benmarshall.me/wordpress-zero-spam"
669
+ msgstr ""
670
+
671
+ #. Description of the plugin/theme
672
+ msgid ""
673
+ "Tired of all the useless and bloated WordPress spam plugins? The WordPress "
674
+ "Zero Spam plugin makes blocking spam a cinch. <strong>Just install, activate "
675
+ "and say goodbye to spam.</strong> Based on work by <a href=\"http://"
676
+ "davidwalsh.name/wordpress-comment-spam\" target=\"_blank\">David Walsh</a>."
677
+ msgstr ""
678
+
679
+ #. Author of the plugin/theme
680
+ msgid "Ben Marshall"
681
+ msgstr ""
682
+
683
+ #. Author URI of the plugin/theme
684
+ msgid "https://benmarshall.me"
685
+ msgstr ""
languages/zero-spam-it_IT.pot ADDED
@@ -0,0 +1,875 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #, fuzzy
2
+ msgid ""
3
+ msgstr ""
4
+ "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
5
+ "Project-Id-Version: WordPress Zero Spam\n"
6
+ "POT-Creation-Date: 2020-08-07 13:08-0500\n"
7
+ "PO-Revision-Date: 2020-08-07 13:06-0500\n"
8
+ "Last-Translator: \n"
9
+ "Language-Team: \n"
10
+ "MIME-Version: 1.0\n"
11
+ "Content-Type: text/plain; charset=UTF-8\n"
12
+ "Content-Transfer-Encoding: 8bit\n"
13
+ "X-Generator: Poedit 2.4\n"
14
+ "X-Poedit-Basepath: ..\n"
15
+ "X-Poedit-Flags-xgettext: --add-comments=translators:\n"
16
+ "X-Poedit-WPHeader: wordpress-zero-spam.php\n"
17
+ "X-Poedit-SourceCharset: UTF-8\n"
18
+ "X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
19
+ "esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;"
20
+ "_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
21
+ "X-Poedit-SearchPath-0: .\n"
22
+ "X-Poedit-SearchPathExcluded-0: *.min.js\n"
23
+
24
+ #: classes/class-wpzerospam-blacklisted-table.php:20
25
+ msgid "Blacklist"
26
+ msgstr ""
27
+
28
+ #: classes/class-wpzerospam-blacklisted-table.php:21
29
+ msgid "Blacklist IPs"
30
+ msgstr ""
31
+
32
+ #: classes/class-wpzerospam-blacklisted-table.php:32
33
+ #: classes/class-wpzerospam-blacklisted-table.php:131
34
+ msgid "Last Updated"
35
+ msgstr ""
36
+
37
+ #: classes/class-wpzerospam-blacklisted-table.php:33
38
+ #: classes/class-wpzerospam-blocked-ip-table.php:32
39
+ #: classes/class-wpzerospam-log-table.php:34 inc/admin.php:245
40
+ msgid "IP Address"
41
+ msgstr ""
42
+
43
+ #: classes/class-wpzerospam-blacklisted-table.php:34
44
+ #: classes/class-wpzerospam-blacklisted-table.php:136
45
+ msgid "Service"
46
+ msgstr ""
47
+
48
+ #: classes/class-wpzerospam-blacklisted-table.php:35
49
+ #: classes/class-wpzerospam-blocked-ip-table.php:38
50
+ msgid "Attempts"
51
+ msgstr ""
52
+
53
+ #: classes/class-wpzerospam-blacklisted-table.php:36
54
+ #: classes/class-wpzerospam-log-table.php:38
55
+ msgid "Details"
56
+ msgstr ""
57
+
58
+ #: classes/class-wpzerospam-blacklisted-table.php:63
59
+ msgid "Filter by service"
60
+ msgstr ""
61
+
62
+ #: classes/class-wpzerospam-blacklisted-table.php:67
63
+ msgid "All services"
64
+ msgstr ""
65
+
66
+ #: classes/class-wpzerospam-blacklisted-table.php:68
67
+ msgid "BotScout"
68
+ msgstr ""
69
+
70
+ #: classes/class-wpzerospam-blacklisted-table.php:69 inc/admin.php:568
71
+ msgid "Stop Forum Spam"
72
+ msgstr ""
73
+
74
+ #: classes/class-wpzerospam-blacklisted-table.php:70
75
+ msgid "Zero Spam"
76
+ msgstr ""
77
+
78
+ #: classes/class-wpzerospam-blacklisted-table.php:73
79
+ #: classes/class-wpzerospam-blocked-ip-table.php:76
80
+ #: classes/class-wpzerospam-log-table.php:79
81
+ msgid "Filter"
82
+ msgstr ""
83
+
84
+ #: classes/class-wpzerospam-blacklisted-table.php:116
85
+ #: classes/class-wpzerospam-log-table.php:140
86
+ msgid "No details available."
87
+ msgstr ""
88
+
89
+ #: classes/class-wpzerospam-blacklisted-table.php:119
90
+ #: classes/class-wpzerospam-log-table.php:143
91
+ msgid "View"
92
+ msgstr ""
93
+
94
+ #: classes/class-wpzerospam-blacklisted-table.php:126
95
+ #: classes/class-wpzerospam-log-table.php:148
96
+ msgid "Detected Spam IP"
97
+ msgstr ""
98
+
99
+ #: classes/class-wpzerospam-blacklisted-table.php:160
100
+ msgid "Appears"
101
+ msgstr ""
102
+
103
+ #: classes/class-wpzerospam-blacklisted-table.php:166
104
+ msgid "Confidence"
105
+ msgstr ""
106
+
107
+ #: classes/class-wpzerospam-blacklisted-table.php:172
108
+ msgid "Frequency"
109
+ msgstr ""
110
+
111
+ #: classes/class-wpzerospam-blacklisted-table.php:178
112
+ msgid "Last Seen"
113
+ msgstr ""
114
+
115
+ #: classes/class-wpzerospam-blacklisted-table.php:184
116
+ msgid "ASN"
117
+ msgstr ""
118
+
119
+ #: classes/class-wpzerospam-blacklisted-table.php:208
120
+ #: classes/class-wpzerospam-blocked-ip-table.php:164
121
+ msgid "Delete"
122
+ msgstr ""
123
+
124
+ #: classes/class-wpzerospam-blacklisted-table.php:209
125
+ #: classes/class-wpzerospam-blocked-ip-table.php:165
126
+ #: classes/class-wpzerospam-log-table.php:289
127
+ msgid "Delete All Entries"
128
+ msgstr ""
129
+
130
+ #: classes/class-wpzerospam-blocked-ip-table.php:20
131
+ msgid "Blocked IP"
132
+ msgstr ""
133
+
134
+ #: classes/class-wpzerospam-blocked-ip-table.php:21 inc/admin.php:70
135
+ #: inc/admin.php:601
136
+ msgid "Blocked IPs"
137
+ msgstr ""
138
+
139
+ #: classes/class-wpzerospam-blocked-ip-table.php:33
140
+ #: classes/class-wpzerospam-log-table.php:33
141
+ #: classes/class-wpzerospam-log-table.php:163 inc/admin.php:255
142
+ msgid "Type"
143
+ msgstr ""
144
+
145
+ #: classes/class-wpzerospam-blocked-ip-table.php:34
146
+ msgid "Date Added"
147
+ msgstr ""
148
+
149
+ #: classes/class-wpzerospam-blocked-ip-table.php:35 inc/admin.php:266
150
+ msgid "Start Date"
151
+ msgstr ""
152
+
153
+ #: classes/class-wpzerospam-blocked-ip-table.php:36 inc/admin.php:270
154
+ msgid "End Date"
155
+ msgstr ""
156
+
157
+ #: classes/class-wpzerospam-blocked-ip-table.php:37
158
+ #: classes/class-wpzerospam-log-table.php:216 inc/admin.php:262
159
+ msgid "Reason"
160
+ msgstr ""
161
+
162
+ #: classes/class-wpzerospam-blocked-ip-table.php:67
163
+ #: classes/class-wpzerospam-log-table.php:68
164
+ msgid "Filter by type"
165
+ msgstr ""
166
+
167
+ #: classes/class-wpzerospam-blocked-ip-table.php:71
168
+ #: classes/class-wpzerospam-log-table.php:73
169
+ msgid "All types"
170
+ msgstr ""
171
+
172
+ #: classes/class-wpzerospam-blocked-ip-table.php:72
173
+ #: classes/class-wpzerospam-blocked-ip-table.php:103 inc/admin.php:258
174
+ msgid "Permanent"
175
+ msgstr ""
176
+
177
+ #: classes/class-wpzerospam-blocked-ip-table.php:73
178
+ #: classes/class-wpzerospam-blocked-ip-table.php:106 inc/admin.php:257
179
+ msgid "Temporary"
180
+ msgstr ""
181
+
182
+ #: classes/class-wpzerospam-blocked-ip-table.php:138
183
+ msgid ""
184
+ "Comment <span class=\"wpzerospam-small\">(<strong>permanently</strong> auto-"
185
+ "blocked)</span>"
186
+ msgstr ""
187
+
188
+ #: classes/class-wpzerospam-blocked-ip-table.php:146
189
+ msgid "Comment <span class=\"wpzerospam-small\">(auto-blocked)</span>"
190
+ msgstr ""
191
+
192
+ #: classes/class-wpzerospam-log-table.php:20
193
+ msgid "Spam Detection"
194
+ msgstr ""
195
+
196
+ #: classes/class-wpzerospam-log-table.php:21 inc/admin.php:60 inc/admin.php:61
197
+ #: inc/admin.php:638 templates/map.php:97
198
+ msgid "Spam Detections"
199
+ msgstr ""
200
+
201
+ #: classes/class-wpzerospam-log-table.php:32
202
+ #: classes/class-wpzerospam-log-table.php:158
203
+ msgid "Date"
204
+ msgstr ""
205
+
206
+ #: classes/class-wpzerospam-log-table.php:35
207
+ #: classes/class-wpzerospam-log-table.php:169
208
+ msgid "Country"
209
+ msgstr ""
210
+
211
+ #: classes/class-wpzerospam-log-table.php:36
212
+ #: classes/class-wpzerospam-log-table.php:176
213
+ msgid "Region"
214
+ msgstr ""
215
+
216
+ #: classes/class-wpzerospam-log-table.php:37
217
+ #: classes/class-wpzerospam-log-table.php:183
218
+ msgid "City"
219
+ msgstr ""
220
+
221
+ #: classes/class-wpzerospam-log-table.php:39
222
+ #: classes/class-wpzerospam-log-table.php:101 templates/ip-list.php:63
223
+ msgid "Block IP"
224
+ msgstr ""
225
+
226
+ #: classes/class-wpzerospam-log-table.php:99 templates/ip-list.php:60
227
+ msgid "Blocked"
228
+ msgstr ""
229
+
230
+ #: classes/class-wpzerospam-log-table.php:153
231
+ msgid "Page URL"
232
+ msgstr ""
233
+
234
+ #: classes/class-wpzerospam-log-table.php:198
235
+ msgid "Sanitized User Login"
236
+ msgstr ""
237
+
238
+ #: classes/class-wpzerospam-log-table.php:204
239
+ msgid "User Email"
240
+ msgstr ""
241
+
242
+ #: classes/class-wpzerospam-log-table.php:210
243
+ msgid "Errors"
244
+ msgstr ""
245
+
246
+ #: classes/class-wpzerospam-log-table.php:224
247
+ msgid "Form Action"
248
+ msgstr ""
249
+
250
+ #: classes/class-wpzerospam-log-table.php:230
251
+ msgid "Form ID"
252
+ msgstr ""
253
+
254
+ #: classes/class-wpzerospam-log-table.php:236
255
+ msgid "Form Key"
256
+ msgstr ""
257
+
258
+ #: classes/class-wpzerospam-log-table.php:242
259
+ msgid "Item Key"
260
+ msgstr ""
261
+
262
+ #: classes/class-wpzerospam-log-table.php:248
263
+ msgid "Form Values"
264
+ msgstr ""
265
+
266
+ #: classes/class-wpzerospam-log-table.php:258
267
+ msgid "Source"
268
+ msgstr ""
269
+
270
+ #: classes/class-wpzerospam-log-table.php:288
271
+ msgid "Delete Selected"
272
+ msgstr ""
273
+
274
+ #: inc/admin.php:41 inc/admin.php:51
275
+ msgid "WordPress Zero Spam Dashboard"
276
+ msgstr ""
277
+
278
+ #: inc/admin.php:42
279
+ msgid "WP Zero Spam"
280
+ msgstr ""
281
+
282
+ #: inc/admin.php:52
283
+ msgid "Dashboard"
284
+ msgstr ""
285
+
286
+ #: inc/admin.php:69
287
+ msgid "Blocked IP Addresses"
288
+ msgstr ""
289
+
290
+ #: inc/admin.php:78 inc/admin.php:79
291
+ msgid "Blacklisted IPs"
292
+ msgstr ""
293
+
294
+ #: inc/admin.php:87
295
+ msgid "WordPress Zero Spam Settings"
296
+ msgstr ""
297
+
298
+ #: inc/admin.php:88 inc/admin.php:422
299
+ msgid "Settings"
300
+ msgstr ""
301
+
302
+ #: inc/admin.php:118 inc/admin.php:147 inc/admin.php:293
303
+ msgid "Search IPs"
304
+ msgstr ""
305
+
306
+ #: inc/admin.php:221
307
+ msgid "Please enter a valid IP address."
308
+ msgstr ""
309
+
310
+ #: inc/admin.php:224
311
+ msgid "Please select a valid type."
312
+ msgstr ""
313
+
314
+ #: inc/admin.php:227
315
+ msgid "Please select a date & time when the temporary block should end."
316
+ msgstr ""
317
+
318
+ #: inc/admin.php:232 inc/admin.php:237
319
+ msgid "Dismiss this notice."
320
+ msgstr ""
321
+
322
+ #: inc/admin.php:236
323
+ msgid "The blocked IP has been successfully added."
324
+ msgstr ""
325
+
326
+ #: inc/admin.php:243 inc/admin.php:274
327
+ msgid "Add Blocked IP"
328
+ msgstr ""
329
+
330
+ #: inc/admin.php:263
331
+ msgid "e.g. Spammed form"
332
+ msgstr ""
333
+
334
+ #: inc/admin.php:267 inc/admin.php:271
335
+ msgid "Optional"
336
+ msgstr ""
337
+
338
+ #: inc/admin.php:314
339
+ msgid "Statistics"
340
+ msgstr ""
341
+
342
+ #: inc/admin.php:409 inc/admin.php:633 inc/utilities.php:115
343
+ msgid ""
344
+ "You have been blocked from visiting this site by WordPress Zero Spam due to "
345
+ "detected spam activity."
346
+ msgstr ""
347
+
348
+ #: inc/admin.php:441
349
+ msgid "General Settings"
350
+ msgstr ""
351
+
352
+ #: inc/admin.php:442
353
+ msgid "Auto-block Settings"
354
+ msgstr ""
355
+
356
+ #: inc/admin.php:443
357
+ msgid "On-site Spam Prevention"
358
+ msgstr ""
359
+
360
+ #: inc/admin.php:444
361
+ msgid "Integrations & Third-party APIs"
362
+ msgstr ""
363
+
364
+ #: inc/admin.php:447
365
+ msgid "Cookie Expiration"
366
+ msgstr ""
367
+
368
+ #: inc/admin.php:451
369
+ msgid ""
370
+ "Number of days until a user's cookie is expired. Helps boost site "
371
+ "performance so access & blacklist checks aren't sent each page visit. "
372
+ "<strong>Minimum recommend is 7 days</strong>."
373
+ msgstr ""
374
+
375
+ #: inc/admin.php:456
376
+ msgid "days"
377
+ msgstr ""
378
+
379
+ #: inc/admin.php:460
380
+ msgid "Share Spam Detections"
381
+ msgstr ""
382
+
383
+ #: inc/admin.php:465
384
+ msgid ""
385
+ "Help support WordPress Zero Spam and strenghten its ability to detect "
386
+ "spammers by sharing spam detections. The only data that's shared is the IP "
387
+ "address, type & site where the spam was detected. <strong>Absolutely no "
388
+ "personal data is shared.</strong>."
389
+ msgstr ""
390
+
391
+ #: inc/admin.php:469 inc/admin.php:480 inc/admin.php:580 inc/admin.php:681
392
+ #: inc/admin.php:692 inc/admin.php:705 inc/admin.php:717 inc/admin.php:730
393
+ #: inc/admin.php:743 inc/admin.php:756 inc/admin.php:769
394
+ #: integrations/comments/comments.php:25 integrations/comments/comments.php:36
395
+ #: integrations/comments/comments.php:47
396
+ msgid "Enabled"
397
+ msgstr ""
398
+
399
+ #: inc/admin.php:474
400
+ msgid "Auto-block IPs"
401
+ msgstr ""
402
+
403
+ #: inc/admin.php:478
404
+ msgid "Auto-blocks IPs addresses that trigger a spam detection."
405
+ msgstr ""
406
+
407
+ #: inc/admin.php:486
408
+ msgid "Auto-block Period"
409
+ msgstr ""
410
+
411
+ #: inc/admin.php:489
412
+ msgid ""
413
+ "Number of minutes a user will be blocked from viewing the site after being "
414
+ "auto-blocked."
415
+ msgstr ""
416
+
417
+ #: inc/admin.php:492
418
+ msgid "minutes"
419
+ msgstr ""
420
+
421
+ #: inc/admin.php:497
422
+ msgid "Permanently Auto-block"
423
+ msgstr ""
424
+
425
+ #: inc/admin.php:500
426
+ msgid "Number of spam detections before an IP is permanently blocked."
427
+ msgstr ""
428
+
429
+ #: inc/admin.php:506
430
+ msgid "API Timeout"
431
+ msgstr ""
432
+
433
+ #: inc/admin.php:510
434
+ msgid ""
435
+ "Number of seconds to allow an API to return a response.<br /><strong>WARNING:"
436
+ "</strong> Setting this too high could cause your site to load slowly. "
437
+ "Setting too low may not allow an API enough time to respond with a result. "
438
+ "<strong>Recommended is 5 seconds.</strong>."
439
+ msgstr ""
440
+
441
+ #: inc/admin.php:515
442
+ msgid "seconds"
443
+ msgstr ""
444
+
445
+ #: inc/admin.php:520
446
+ msgid "ipstack API Key"
447
+ msgstr ""
448
+
449
+ #: inc/admin.php:523
450
+ msgid "Enter your ipstack API key."
451
+ msgstr ""
452
+
453
+ #: inc/admin.php:527
454
+ #, php-format
455
+ msgid ""
456
+ "Enter your <a href=\"%s\" target=\"_blank\" rel=\"noopener noreferrer"
457
+ "\">ipstack API key</a> to enable location-based statistics. Don't have an "
458
+ "API key? <a href=\"%s\" target=\"_blank\" rel=\"noopener noreferrer"
459
+ "\"><strong>Get one for free!</strong></a>"
460
+ msgstr ""
461
+
462
+ #: inc/admin.php:537
463
+ msgid "BotScout API Key"
464
+ msgstr ""
465
+
466
+ #: inc/admin.php:541
467
+ msgid "Enter your free BotScout API key."
468
+ msgstr ""
469
+
470
+ #: inc/admin.php:544
471
+ #, php-format
472
+ msgid ""
473
+ "Enter your BotScout API key to check user IPs against <a href=\"%s\" target="
474
+ "\"_blank\" rel=\"noopener noreferrer\">BotScout</a>'s blacklist. Don't have "
475
+ "an API key? <a href=\"%s\" target=\"_blank\" rel=\"noopener noreferrer"
476
+ "\"><strong>Get one for free!</strong></a>"
477
+ msgstr ""
478
+
479
+ #: inc/admin.php:553
480
+ msgid "BotScout Count Minimum"
481
+ msgstr ""
482
+
483
+ #: inc/admin.php:558
484
+ #, php-format
485
+ msgid ""
486
+ "Minimum <a href=\"%s\" target=\"_blank\" rel=\"noopener noreferrer\">count</"
487
+ "a> an IP must meet before being marked as spam/malicious.<br /"
488
+ "><strong>WARNING:</strong> Setting this too low could cause users to be "
489
+ "blocked that shouldn't be, <strong>recommended is 5</strong>."
490
+ msgstr ""
491
+
492
+ #: inc/admin.php:574
493
+ #, php-format
494
+ msgid ""
495
+ "Checks user IPs against <a href=\"%s\" target=\"_blank\" rel=\"noopener "
496
+ "noreferrer\">Stop Forum Spam</a>'s blacklist."
497
+ msgstr ""
498
+
499
+ #: inc/admin.php:585
500
+ msgid "Stop Forum Spam Confidence Minimum"
501
+ msgstr ""
502
+
503
+ #: inc/admin.php:590
504
+ #, php-format
505
+ msgid ""
506
+ "Minimum <a href=\"%s\" target=\"_blank\" rel=\"noopener noreferrer"
507
+ "\">confidence score</a> an IP must meet before being marked as spam/"
508
+ "malicious.<br /><strong>WARNING:</strong> Setting this too low could cause "
509
+ "users to be blocked that shouldn't be, <strong>recommended is 20%%</strong>."
510
+ msgstr ""
511
+
512
+ #: inc/admin.php:604
513
+ msgid ""
514
+ "Determines how blocked IPs are handled when they attempt to visit the site."
515
+ msgstr ""
516
+
517
+ #: inc/admin.php:606 inc/admin.php:643
518
+ msgid "Redirect user"
519
+ msgstr ""
520
+
521
+ #: inc/admin.php:609 inc/admin.php:646
522
+ #, php-format
523
+ msgid ""
524
+ "Display a <a href=\"%s\" target=\"_blank\" rel=\"noreferrer noopener"
525
+ "\"><code>403 Forbidden</code></a> error"
526
+ msgstr ""
527
+
528
+ #: inc/admin.php:619
529
+ msgid "Redirect for Blocked Users"
530
+ msgstr ""
531
+
532
+ #: inc/admin.php:623
533
+ msgid "URL blocked users will be taken to."
534
+ msgstr ""
535
+
536
+ #: inc/admin.php:628
537
+ msgid "Blocked Message"
538
+ msgstr ""
539
+
540
+ #: inc/admin.php:632
541
+ msgid "The message that will be displayed to a blocked user."
542
+ msgstr ""
543
+
544
+ #: inc/admin.php:641
545
+ msgid "Determines how users are handled when spam is detected."
546
+ msgstr ""
547
+
548
+ #: inc/admin.php:656
549
+ msgid "Redirect for Spam"
550
+ msgstr ""
551
+
552
+ #: inc/admin.php:660
553
+ msgid "URL users will be taken to when a spam submission is detected."
554
+ msgstr ""
555
+
556
+ #: inc/admin.php:665
557
+ msgid "Spam Detection Message"
558
+ msgstr ""
559
+
560
+ #: inc/admin.php:669
561
+ msgid "The message that will be displayed when spam is detected."
562
+ msgstr ""
563
+
564
+ #: inc/admin.php:670 inc/utilities.php:114
565
+ msgid "There was a problem with your submission. Please go back and try again."
566
+ msgstr ""
567
+
568
+ #: inc/admin.php:675
569
+ msgid "Log Blocked IPs"
570
+ msgstr ""
571
+
572
+ #: inc/admin.php:679
573
+ msgid "Enables logging of when IPs are blocked from accessing the site."
574
+ msgstr ""
575
+
576
+ #: inc/admin.php:686
577
+ msgid "Log Spam Detections"
578
+ msgstr ""
579
+
580
+ #: inc/admin.php:690
581
+ msgid ""
582
+ "Enables logging of spam detections and provides an admin interface to view "
583
+ "statistics."
584
+ msgstr ""
585
+
586
+ #: inc/admin.php:699
587
+ msgid "Verify Registrations"
588
+ msgstr ""
589
+
590
+ #: inc/admin.php:703
591
+ msgid "Enables spam detection for site registrations."
592
+ msgstr ""
593
+
594
+ #: inc/admin.php:711
595
+ msgid "Verify CF7 Submissions"
596
+ msgstr ""
597
+
598
+ #: inc/admin.php:715
599
+ msgid "Enables spam detection for Contact Form 7 submissions."
600
+ msgstr ""
601
+
602
+ #: inc/admin.php:724
603
+ msgid "Verify BuddyPress Registrations"
604
+ msgstr ""
605
+
606
+ #: inc/admin.php:728
607
+ msgid "Enables spam detection for BuddyPress registrations."
608
+ msgstr ""
609
+
610
+ #: inc/admin.php:737
611
+ msgid "Verify WPForms Submissions"
612
+ msgstr ""
613
+
614
+ #: inc/admin.php:741
615
+ msgid "Enables spam detection for WPForms submissions.zero-spam"
616
+ msgstr ""
617
+
618
+ #: inc/admin.php:750
619
+ msgid "Verify Fluent Form Submissions"
620
+ msgstr ""
621
+
622
+ #: inc/admin.php:754
623
+ msgid "Enables spam detection for Fluent Form submissions."
624
+ msgstr ""
625
+
626
+ #: inc/admin.php:763
627
+ msgid "Verify Formidable Form Submissions"
628
+ msgstr ""
629
+
630
+ #: inc/admin.php:767
631
+ msgid "Enables spam detection for Formidable form submissions."
632
+ msgstr ""
633
+
634
+ #: inc/admin.php:775
635
+ msgid "IP Whitelist"
636
+ msgstr ""
637
+
638
+ #: inc/admin.php:779
639
+ msgid ""
640
+ "Enter IPs that should be whitelisted (IPs that should never be blocked), one "
641
+ "per line."
642
+ msgstr ""
643
+
644
+ #: inc/admin.php:780
645
+ msgid "e.g. xxx.xxx.x.x"
646
+ msgstr ""
647
+
648
+ #: inc/utilities.php:324
649
+ msgid "Access Blocked"
650
+ msgstr ""
651
+
652
+ #: integrations/buddypress/buddypress.php:13
653
+ msgid "BuddyPress Registration"
654
+ msgstr ""
655
+
656
+ #: integrations/comments/comments.php:19
657
+ msgid "Strip Comment Links"
658
+ msgstr ""
659
+
660
+ #: integrations/comments/comments.php:23
661
+ msgid ""
662
+ "Spambots commonly post spam links in comments. Enable this option to strip "
663
+ "links from comments."
664
+ msgstr ""
665
+
666
+ #: integrations/comments/comments.php:30
667
+ msgid "Strip Comment Author Links"
668
+ msgstr ""
669
+
670
+ #: integrations/comments/comments.php:34
671
+ msgid ""
672
+ "Spammers are well-known at injecting malicious links in the comment author "
673
+ "website field, this option disables it."
674
+ msgstr ""
675
+
676
+ #: integrations/comments/comments.php:41
677
+ msgid "Detect Comment Spam"
678
+ msgstr ""
679
+
680
+ #: integrations/comments/comments.php:45
681
+ msgid "Enables comment form submission protection."
682
+ msgstr ""
683
+
684
+ #: integrations/comments/comments.php:93
685
+ msgid "Comment Post"
686
+ msgstr ""
687
+
688
+ #: integrations/comments/comments.php:96 integrations/comments/comments.php:119
689
+ msgid "Author"
690
+ msgstr ""
691
+
692
+ #: integrations/comments/comments.php:99 integrations/comments/comments.php:124
693
+ msgid "Email"
694
+ msgstr ""
695
+
696
+ #: integrations/comments/comments.php:102
697
+ #: integrations/comments/comments.php:129
698
+ msgid "Website"
699
+ msgstr ""
700
+
701
+ #: integrations/comments/comments.php:105
702
+ #: integrations/comments/comments.php:133
703
+ #: integrations/comments/comments.php:286
704
+ msgid "Comment"
705
+ msgstr ""
706
+
707
+ #: integrations/comments/comments.php:108
708
+ msgid "Comment Type"
709
+ msgstr ""
710
+
711
+ #: integrations/comments/comments.php:111
712
+ msgid "Comment Parent ID"
713
+ msgstr ""
714
+
715
+ #: integrations/comments/comments.php:136
716
+ msgid "User IP"
717
+ msgstr ""
718
+
719
+ #: integrations/comments/comments.php:139
720
+ msgid "User Agent"
721
+ msgstr ""
722
+
723
+ #: integrations/comments/comments.php:142
724
+ msgid "Site"
725
+ msgstr ""
726
+
727
+ #: integrations/comments/comments.php:145
728
+ msgid "Site Language"
729
+ msgstr ""
730
+
731
+ #: integrations/comments/comments.php:148
732
+ msgid "Site Charset"
733
+ msgstr ""
734
+
735
+ #: integrations/comments/comments.php:151
736
+ msgid "Permalink"
737
+ msgstr ""
738
+
739
+ #: integrations/comments/comments.php:159
740
+ msgid "Akismet Result"
741
+ msgstr ""
742
+
743
+ #: integrations/comments/comments.php:162
744
+ msgid "Akismet Pro Tip"
745
+ msgstr ""
746
+
747
+ #: integrations/contact-form-7/contact-form-7.php:13
748
+ msgid "Contact Form 7"
749
+ msgstr ""
750
+
751
+ #: integrations/fluentform/fluentform.php:13
752
+ msgid "Fluent Forms"
753
+ msgstr ""
754
+
755
+ #: integrations/formidable/formidable.php:15
756
+ msgid "Formidable Forms"
757
+ msgstr ""
758
+
759
+ #: integrations/registrations/registrations.php:13
760
+ msgid "Registration"
761
+ msgstr ""
762
+
763
+ #: integrations/wpforms/wpforms.php:13
764
+ msgid "WPForms"
765
+ msgstr ""
766
+
767
+ #: templates/callout.php:15
768
+ #, php-format
769
+ msgid ""
770
+ "Help support the <a href=\"%s\" target=\"_blank\" rel=\"noopener noreferrer"
771
+ "\">WordPress Zero Spam</a> plugin."
772
+ msgstr ""
773
+
774
+ #: templates/callout.php:24
775
+ #, php-format
776
+ msgid ""
777
+ "Support the continued development of the WPZS by <a href=\"%s\" target="
778
+ "\"_blank\" rel=\"noopener noreferrer\">donating today</a>. Donation goes "
779
+ "towards the time it takes to develop new features &amp; updates, but also "
780
+ "helps provide pro bono work for nonprofits. <a href=\"%s\" target=\"_blank\" "
781
+ "rel=\"noopener noreferrer\">Learn more</a>."
782
+ msgstr ""
783
+
784
+ #: templates/callout.php:34
785
+ #, php-format
786
+ msgid ""
787
+ "<strong>Integrate Zero Spam in any application. </strong> Use the <a href="
788
+ "\"%s\" target=\"_blank\" rel=\"noopener noreferrer\">Zero Spam Blacklist "
789
+ "API</a> to easily put a stop to spam on any site or application."
790
+ msgstr ""
791
+
792
+ #: templates/callout.php:42
793
+ msgid "Submit Bug/Feature Request"
794
+ msgstr ""
795
+
796
+ #: templates/callout.php:43
797
+ msgid "Follow us on Twitter"
798
+ msgstr ""
799
+
800
+ #: templates/callout.php:44
801
+ msgid "Like us on Facebook"
802
+ msgstr ""
803
+
804
+ #: templates/callout.php:45
805
+ msgid "Learn more about Zero Spam"
806
+ msgstr ""
807
+
808
+ #: templates/callout.php:46
809
+ msgid "Fork on Github"
810
+ msgstr ""
811
+
812
+ #: templates/callout.php:47
813
+ msgid "Show your Support &mdash; Donate"
814
+ msgstr ""
815
+
816
+ #: templates/callout.php:51
817
+ msgid "Your IP Address:"
818
+ msgstr ""
819
+
820
+ #: templates/countries-pie-chart.php:12
821
+ msgid "Most Spam by Country"
822
+ msgstr ""
823
+
824
+ #: templates/countries-pie-chart.php:67 templates/ip-list.php:71
825
+ #: templates/regions-pie-chart.php:82 templates/spam-line-chart.php:58
826
+ msgid "No data to report yet."
827
+ msgstr ""
828
+
829
+ #: templates/ip-list.php:12
830
+ msgid "Most Spam by IP Address"
831
+ msgstr ""
832
+
833
+ #: templates/map.php:11
834
+ msgid "Spam Detections World Map"
835
+ msgstr ""
836
+
837
+ #: templates/map.php:106
838
+ #, php-format
839
+ msgid ""
840
+ "<strong>Enter your <a href=\"%s\" target=\"_blank\" rel=\"noopener noreferrer"
841
+ "\">ipstack API Key</a></strong> to enable the world mp view of spam "
842
+ "detections."
843
+ msgstr ""
844
+
845
+ #: templates/regions-pie-chart.php:12
846
+ msgid "Most Spam by Region"
847
+ msgstr ""
848
+
849
+ #: templates/spam-line-chart.php:10
850
+ msgid "Spam by Date"
851
+ msgstr ""
852
+
853
+ #. Plugin Name of the plugin/theme
854
+ msgid "WordPress Zero Spam"
855
+ msgstr ""
856
+
857
+ #. Plugin URI of the plugin/theme
858
+ msgid "https://benmarshall.me/wordpress-zero-spam"
859
+ msgstr ""
860
+
861
+ #. Description of the plugin/theme
862
+ msgid ""
863
+ "Tired of all the useless and bloated WordPress spam plugins? The WordPress "
864
+ "Zero Spam plugin makes blocking spam a cinch. <strong>Just install, activate "
865
+ "and say goodbye to spam.</strong> Based on work by <a href=\"http://"
866
+ "davidwalsh.name/wordpress-comment-spam\" target=\"_blank\">David Walsh</a>."
867
+ msgstr ""
868
+
869
+ #. Author of the plugin/theme
870
+ msgid "Ben Marshall"
871
+ msgstr ""
872
+
873
+ #. Author URI of the plugin/theme
874
+ msgid "https://benmarshall.me"
875
+ msgstr ""
readme.txt CHANGED
@@ -5,7 +5,7 @@ Donate link: https://benmarshall.me/donate/?utm_source=wordpress_zero_spam&utm_m
5
  Requires at least: 5.2
6
  Tested up to: 5.4.2
7
  Requires PHP: 7.1
8
- Stable tag: 4.9.11
9
  License: GNU GPLv3
10
  License URI: https://choosealicense.com/licenses/gpl-3.0/
11
 
@@ -49,17 +49,40 @@ In addition, it integrates with other popular plugins to provide all around prot
49
 
50
  WordPress Zero Spam is great at blocking spam &mdash; as a site owner there's more you can do to [stop WordPress spam](https://benmarshall.me/stop-wordpress-spam/) in its tracks.
51
 
52
- = Issues/Feature Requests =
53
 
54
- **Something not working as expected?** I wanna hear about it. Have an idea on how to improve the plugin? I'm all ears.
55
 
56
- * [Submit an issue or feature request](https://github.com/bmarshall511/wordpress-zero-spam/issues) on GitHub
57
- * [Contact me directly](https://benmarshall.me/contact/?utm_source=wordpress.org&utm_medium=plugin&utm_campaign=wordpress_zero_spam) on my site
58
- * [Follow me](https://twitter.com/bmarshall0511) on Twitter
59
 
60
- = Show Your Support =
61
 
62
- **WordPress Zero Spam is free &mdash; completely free & always will be.** No premium versions or addons you've gotta buy to access additional features. Help support it's development by [donating](https://benmarshall.me/donate/?utm_source=wordpress.org&utm_medium=plugin&utm_campaign=wordpress_zero_spam) today.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
63
 
64
  == Installation ==
65
 
@@ -127,6 +150,13 @@ Yes. One of the many techniques WordPress Zero Spam employs requires JavaScript
127
 
128
  == Changelog ==
129
 
 
 
 
 
 
 
 
130
  = 4.9.11 =
131
 
132
  * Optimization - Converted the WPZS JS to be a jQuery plugin to initialize and manage easier.
5
  Requires at least: 5.2
6
  Tested up to: 5.4.2
7
  Requires PHP: 7.1
8
+ Stable tag: 4.9.12
9
  License: GNU GPLv3
10
  License URI: https://choosealicense.com/licenses/gpl-3.0/
11
 
49
 
50
  WordPress Zero Spam is great at blocking spam &mdash; as a site owner there's more you can do to [stop WordPress spam](https://benmarshall.me/stop-wordpress-spam/) in its tracks.
51
 
52
+ = Multilingual Supported =
53
 
54
+ We’ve integrated multi language support within the framework of our plugin, so you get a translated dashboard out of the box, and developer options to add even more languages.
55
 
56
+ = Developer API =
 
 
57
 
58
+ WordPress Zero Spam is free and open source. It’s the perfect solution to stopping spam and can be extended and integrated further. It was created and developed with the developer in mind, and we have already seen some truly remarkable addons already developed.
59
 
60
+ To help you get started and learn just how to integrate with WordPress Zero Spam, visit the [plugin's documentation](https://benmarshall.me/wordpress-zero-spam/?utm_source=wordpress.org&utm_medium=plugin&utm_campaign=wordpress_zero_spam).
61
+
62
+ = Translations =
63
+
64
+ * [French](https://translate.wordpress.org/locale/fr/default/wp-plugins/zero-spam/) – (fr_FR)
65
+ * [Italian](https://translate.wordpress.org/locale/it/default/wp-plugins/zero-spam/) – (it_IT)
66
+
67
+ = Be a contributor =
68
+
69
+ If you want to contribute, go to the [WordPress Zero Spam GitHub Repository](https://github.com/bmarshall511/wordpress-zero-spam) and see where you can help. You can also add a new language via [translate.wordpress.org](https://translate.wordpress.org/projects/wp-plugins/zero-spam/).
70
+
71
+ = Documentation and Support =
72
+
73
+ * For documentation and tutorials, view the [documentation](https://benmarshall.me/wordpress-zero-spam/?utm_source=wordpress.org&utm_medium=plugin&utm_campaign=wordpress_zero_spam).
74
+ * If you have any more questions, visit our support on the [Plugin’s Forum](https://wordpress.org/support/plugin/zero-spam/).
75
+ * For more information, FAQs and API documentation, check out [Zero Spam](https://zerospam.org/?utm_source=wordpress.org&utm_medium=plugin&utm_campaign=wordpress_zero_spam).
76
+
77
+ = WordPress Zero Spam needs your support =
78
+
79
+ **WordPress Zero Spam is free — completely free & always will be.** It is hard to continue development and support for this free plugin without contributions from users like you. If you enjoy using WordPress Zero Spam and find it useful, please consider making a [donation](https://benmarshall.me/donate/?utm_source=wordpress.org&utm_medium=plugin&utm_campaign=wordpress_zero_spam). Your donation will help encourage and support the plugin’s continued development and better user support.
80
+
81
+ You can also show your support by:
82
+
83
+ * liking our [Facebook Page](https://www.facebook.com/zerospamorg/);
84
+ * following us on [Twitter](https://www.facebook.com/zerospamorg);
85
+ * or rating us on [WordPress](https://wordpress.org/support/plugin/zero-spam/reviews/?filter=5/#new-post) 🙂.
86
 
87
  == Installation ==
88
 
150
 
151
  == Changelog ==
152
 
153
+ = 4.9.12 =
154
+
155
+ * Enhancement - Added support for the French & Italian languages. See [#207](https://github.com/bmarshall511/wordpress-zero-spam/issues/207).
156
+ * Enhancement - Strengthened spam detection for registrations using a 'honeypot' field.
157
+ * Enhancement - Strengthened spam detection for Contact Form 7 using a 'honeypot' field.
158
+ * Fix - Fix for Contact Form 7 protection not firing.
159
+
160
  = 4.9.11 =
161
 
162
  * Optimization - Converted the WPZS JS to be a jQuery plugin to initialize and manage easier.
templates/callout.php CHANGED
@@ -9,15 +9,43 @@
9
 
10
  <div class="wpzerospam-callout">
11
  <div class="wpzerospam-callout-content">
12
- <h2><?php _e( 'Are you a fan of the <a href="https://benmarshall.me/wordpress-zero-spam/?utm_source=wordpress_zero_spam&utm_medium=settings_page&utm_campaign=admin" target="_blank">WordPress Zero Spam</a> plugin? Show your support.', 'wpzerospam' ); ?></h2>
13
- <p><?php _e( 'Help support the continued development of the WordPress Zero Spam plugin by <a href="https://benmarshall.me/donate?utm_source=wordpress_zero_spam&utm_medium=settings_page&utm_campaign=admin" target="_blank">donating today</a>. Your donation goes towards the time it takes to develop new features &amp; updates, but also helps provide pro bono work for nonprofits. <a href="https://benmarshall.me/donate?utm_source=wordpress_zero_spam&utm_medium=settings_page&utm_campaign=admin" target="_blank">Learn more</a>.', 'wpzerospam' ); ?></p>
14
- <p><strong><?php _e( 'For the latest updates,', 'wpzerospam' ); ?></strong> <a href="https://twitter.com/ZeroSpamOrg" target="_blank" rel="noopener noreferrer"><?php _e( 'follow us on Twitter', 'wpzerospam' ); ?></a>, <a href="https://www.facebook.com/zerospamorg/" target="_blank" rel="noopener noreferrer"><?php _e( 'Facebook', 'wpzerospam' ); ?></a>, <?php _e( 'or', 'wpzerospam' ); ?> <a href="https://zerospam.org/" target="_blank" rel="noopener noreferrer"><?php _e( 'visit our website', 'wpzerospam' ); ?></a>.</p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
  </div>
16
  <div class="wpzerospam-callout-actions">
17
- <a href="https://github.com/bmarshall511/wordpress-zero-spam/issues" class="button" target="_blank"><?php _e( 'Submit Bug/Feature Request' ); ?></a>
18
- <a href="https://github.com/bmarshall511/wordpress-zero-spam" class="button" target="_blank"><?php _e( 'Fork on Github' ); ?></a>
19
- <a href="https://benmarshall.me/donate?utm_source=wordpress_zero_spam&utm_medium=settings_page&utm_campaign=admin" class="button button-primary" target="_blank"><?php _e( 'Show your Support &mdash; Donate' ); ?></a>
 
 
 
20
  </div>
21
  </div>
22
 
23
- <p style="font-size: 1rem;"><strong><?php _e( 'Your IP Address:', 'wpzerospam' ); ?>:</strong> <code><?php echo wpzerospam_ip(); ?></code></p>
9
 
10
  <div class="wpzerospam-callout">
11
  <div class="wpzerospam-callout-content">
12
+ <h2><?php
13
+ echo sprintf(
14
+ wp_kses(
15
+ __( 'Help support the <a href="%s" target="_blank" rel="noopener noreferrer">WordPress Zero Spam</a> plugin.', 'zero-spam' ),
16
+ [ 'a' => [ 'target' => [], 'href' => [], 'rel' => [] ] ]
17
+ ),
18
+ esc_url( 'https://benmarshall.me/wordpress-zero-spam/?utm_source=wordpress_zero_spam&utm_medium=settings_page&utm_campaign=donation' )
19
+ );
20
+ ?></h2>
21
+ <p><?php
22
+ echo sprintf(
23
+ wp_kses(
24
+ __( 'Support the continued development of the WPZS by <a href="%s" target="_blank" rel="noopener noreferrer">donating today</a>. Donation goes towards the time it takes to develop new features &amp; updates, but also helps provide pro bono work for nonprofits. <a href="%s" target="_blank" rel="noopener noreferrer">Learn more</a>.', 'zero-spam' ),
25
+ [ 'a' => [ 'target' => [], 'href' => [], 'rel' => [] ] ]
26
+ ),
27
+ esc_url( 'https://benmarshall.me/donate/?utm_source=wordpress_zero_spam&utm_medium=settings_page&utm_campaign=donation' ),
28
+ esc_url( 'https://benmarshall.me/donate/?utm_source=wordpress_zero_spam&utm_medium=settings_page&utm_campaign=donation' )
29
+ );
30
+ ?></p>
31
+ <p><?php
32
+ echo sprintf(
33
+ wp_kses(
34
+ __( '<strong>Integrate Zero Spam in any application</strong> with the <a href="%s" target="_blank" rel="noopener noreferrer">Zero Spam Blacklist API</a>.', 'zero-spam' ),
35
+ [ 'strong' => [], 'a' => [ 'target' => [], 'href' => [], 'rel' => [] ] ]
36
+ ),
37
+ esc_url( 'https://zerospam.org/spam-blacklist-api/' )
38
+ );
39
+ ?></p>
40
  </div>
41
  <div class="wpzerospam-callout-actions">
42
+ <a href="https://github.com/bmarshall511/wordpress-zero-spam/issues" class="button" target="_blank"><?php _e( 'Submit Bug/Feature Request', 'zero-spam' ); ?></a>
43
+ <a href="https://twitter.com/ZeroSpamOrg" class="button" target="_blank"><?php _e( 'Follow us on Twitter', 'zero-spam' ); ?></a>
44
+ <a href="https://www.facebook.com/zerospamorg/" class="button" target="_blank"><?php _e( 'Like us on Facebook', 'zero-spam' ); ?></a>
45
+ <a href="https://zerospam.org/" class="button" target="_blank"><?php _e( 'Learn more about Zero Spam', 'zero-spam' ); ?></a>
46
+ <a href="https://github.com/bmarshall511/wordpress-zero-spam" class="button" target="_blank"><?php _e( 'Fork on Github', 'zero-spam' ); ?></a>
47
+ <a href="https://benmarshall.me/donate?utm_source=wordpress_zero_spam&utm_medium=settings_page&utm_campaign=admin" class="button button-primary" target="_blank"><?php _e( 'Show your Support &mdash; Donate', 'zero-spam' ); ?></a>
48
  </div>
49
  </div>
50
 
51
+ <p><strong><?php _e( 'Your IP Address:', 'zero-spam' ); ?>:</strong> <code><?php echo wpzerospam_ip(); ?></code></p>
templates/countries-pie-chart.php CHANGED
@@ -9,7 +9,7 @@
9
  $chart_limit = 10;
10
  ?>
11
  <div class="wpzerospam-box wpzerospam-box-countries-pie">
12
- <h3><?php _e( 'Most Spam by Country', 'wpzerospam' ); ?></h3>
13
  <div class="inside">
14
  <?php
15
  if ( $log ):
@@ -64,7 +64,7 @@ $chart_limit = 10;
64
  });
65
  </script>
66
  <?php else: ?>
67
- <?php _e( 'No data to report yet.', 'wpzerospam' ); ?>
68
  <?php endif; ?>
69
  </div>
70
  </div>
9
  $chart_limit = 10;
10
  ?>
11
  <div class="wpzerospam-box wpzerospam-box-countries-pie">
12
+ <h3><?php _e( 'Most Spam by Country', 'zero-spam' ); ?></h3>
13
  <div class="inside">
14
  <?php
15
  if ( $log ):
64
  });
65
  </script>
66
  <?php else: ?>
67
+ <?php _e( 'No data to report yet.', 'zero-spam' ); ?>
68
  <?php endif; ?>
69
  </div>
70
  </div>
templates/ip-list.php CHANGED
@@ -9,7 +9,7 @@
9
  $chart_limit = 20;
10
  ?>
11
  <div class="wpzerospam-box wpzerospam-box-ip-list">
12
- <h3><?php _e( 'Most Spam by IP Address', 'wpzerospam' ); ?></h3>
13
  <div class="inside">
14
  <?php
15
  if ( $log ):
@@ -57,10 +57,10 @@ $chart_limit = 20;
57
  </span>
58
  <span class="wpzerospam-list-cell wpzerospam-list-cell-action">
59
  <?php if ( wpzerospam_is_blocked( $ip ) ): ?>
60
- <span class="wpzerospam-blocked"><?php _e( 'Blocked', 'wpzerospam' ); ?></span>
61
  <?php else: ?>
62
  <a href="<?php echo admin_url( 'admin.php?page=wordpress-zero-spam-blocked-ips&ip=' . $ip ); ?>">
63
- <?php _e( 'Block IP', 'wpzerospam' ); ?>
64
  </a>
65
  <?php endif; ?>
66
  </span>
@@ -68,7 +68,7 @@ $chart_limit = 20;
68
  <?php endforeach; ?>
69
  </ol>
70
  <?php else: ?>
71
- <?php _e( 'No data to report yet.', 'wpzerospam' ); ?>
72
  <?php endif; ?>
73
  </div>
74
  </div>
9
  $chart_limit = 20;
10
  ?>
11
  <div class="wpzerospam-box wpzerospam-box-ip-list">
12
+ <h3><?php _e( 'Most Spam by IP Address', 'zero-spam' ); ?></h3>
13
  <div class="inside">
14
  <?php
15
  if ( $log ):
57
  </span>
58
  <span class="wpzerospam-list-cell wpzerospam-list-cell-action">
59
  <?php if ( wpzerospam_is_blocked( $ip ) ): ?>
60
+ <span class="wpzerospam-blocked"><?php _e( 'Blocked', 'zero-spam' ); ?></span>
61
  <?php else: ?>
62
  <a href="<?php echo admin_url( 'admin.php?page=wordpress-zero-spam-blocked-ips&ip=' . $ip ); ?>">
63
+ <?php _e( 'Block IP', 'zero-spam' ); ?>
64
  </a>
65
  <?php endif; ?>
66
  </span>
68
  <?php endforeach; ?>
69
  </ol>
70
  <?php else: ?>
71
+ <?php _e( 'No data to report yet.', 'zero-spam' ); ?>
72
  <?php endif; ?>
73
  </div>
74
  </div>
templates/map.php CHANGED
@@ -8,7 +8,7 @@
8
  $options = wpzerospam_options();
9
  ?>
10
  <div class="wpzerospam-box wpzerospam-box-map">
11
- <h3><?php _e( 'Spam Detections World Map', 'wpzerospam' ); ?></h3>
12
  <div class="inside">
13
  <?php if ( $options['ipstack_api'] ): ?>
14
  <?php
@@ -94,13 +94,21 @@ $options = wpzerospam_options();
94
  label.html( names[index] );
95
  },
96
  onRegionTipShow: function(e, el, code){
97
- el.html( el.html() + ' (<?php _e( 'Spam Detections', 'wpzerospam' ); ?>: ' + regionsData[code] + ')' );
98
  }
99
  });
100
  });
101
  </script>
102
  <?php else: ?>
103
- <p><?php _e( '<strong>Enter your <a href="' . admin_url( 'admin.php?page=wordpress-zero-spam-settings' ) . '">ipstack API Key</a></strong> to enable the world mp view of spam detections.', 'wpzerospam' ); ?></p>
 
 
 
 
 
 
 
 
104
  <?php endif; ?>
105
  </div>
106
  </div>
8
  $options = wpzerospam_options();
9
  ?>
10
  <div class="wpzerospam-box wpzerospam-box-map">
11
+ <h3><?php _e( 'Spam Detections World Map', 'zero-spam' ); ?></h3>
12
  <div class="inside">
13
  <?php if ( $options['ipstack_api'] ): ?>
14
  <?php
94
  label.html( names[index] );
95
  },
96
  onRegionTipShow: function(e, el, code){
97
+ el.html( el.html() + ' (<?php _e( 'Spam Detections', 'zero-spam' ); ?>: ' + regionsData[code] + ')' );
98
  }
99
  });
100
  });
101
  </script>
102
  <?php else: ?>
103
+ <p><?php
104
+ echo sprintf(
105
+ wp_kses(
106
+ __( '<strong>Enter your <a href="%s" target="_blank" rel="noopener noreferrer">ipstack API Key</a></strong> to enable the world mp view of spam detections.', 'zero-spam' ),
107
+ [ 'strong' => [], 'a' => [ 'target' => [], 'href' => [], 'rel' => [] ] ]
108
+ ),
109
+ admin_url( 'admin.php?page=wordpress-zero-spam-settings' )
110
+ );
111
+ ?></p>
112
  <?php endif; ?>
113
  </div>
114
  </div>
templates/regions-pie-chart.php CHANGED
@@ -9,7 +9,7 @@
9
  $chart_limit = 10;
10
  ?>
11
  <div class="wpzerospam-box wpzerospam-box-countries-pie">
12
- <h3><?php _e( 'Most Spam by Region', 'wpzerospam' ); ?></h3>
13
  <div class="inside">
14
  <?php
15
  if ( $log ):
@@ -79,7 +79,7 @@ $chart_limit = 10;
79
  });
80
  </script>
81
  <?php else: ?>
82
- <?php _e( 'No data to report yet.', 'wpzerospam' ); ?>
83
  <?php endif; ?>
84
  </div>
85
  </div>
9
  $chart_limit = 10;
10
  ?>
11
  <div class="wpzerospam-box wpzerospam-box-countries-pie">
12
+ <h3><?php _e( 'Most Spam by Region', 'zero-spam' ); ?></h3>
13
  <div class="inside">
14
  <?php
15
  if ( $log ):
79
  });
80
  </script>
81
  <?php else: ?>
82
+ <?php _e( 'No data to report yet.', 'zero-spam' ); ?>
83
  <?php endif; ?>
84
  </div>
85
  </div>
templates/spam-line-chart.php CHANGED
@@ -7,7 +7,7 @@
7
  */
8
  ?>
9
  <div class="wpzerospam-box wpzerospam-box-line-chart">
10
- <h3><?php _e( 'Spam by Date', 'wpzerospam' ); ?></h3>
11
  <div class="inside">
12
  <?php
13
  if ( $log ):
@@ -55,7 +55,7 @@
55
  });
56
  </script>
57
  <?php else: ?>
58
- <?php _e( 'No data to report yet.', 'wpzerospam' ); ?>
59
  <?php endif; ?>
60
  </div>
61
  </div>
7
  */
8
  ?>
9
  <div class="wpzerospam-box wpzerospam-box-line-chart">
10
+ <h3><?php _e( 'Spam by Date', 'zero-spam' ); ?></h3>
11
  <div class="inside">
12
  <?php
13
  if ( $log ):
55
  });
56
  </script>
57
  <?php else: ?>
58
+ <?php _e( 'No data to report yet.', 'zero-spam' ); ?>
59
  <?php endif; ?>
60
  </div>
61
  </div>
wordpress-zero-spam.php CHANGED
@@ -13,12 +13,13 @@
13
  * Plugin Name: WordPress Zero Spam
14
  * Plugin URI: https://benmarshall.me/wordpress-zero-spam
15
  * Description: Tired of all the useless and bloated WordPress spam plugins? The WordPress Zero Spam plugin makes blocking spam a cinch. <strong>Just install, activate and say goodbye to spam.</strong> Based on work by <a href="http://davidwalsh.name/wordpress-comment-spam" target="_blank">David Walsh</a>.
16
- * Version: 4.9.11
17
  * Requires at least: 5.2
18
  * Requires PHP: 7.2
19
  * Author: Ben Marshall
20
  * Author URI: https://benmarshall.me
21
- * Text Domain: wpzerospam
 
22
  * License: GPL v2 or later
23
  * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
24
  */
@@ -31,121 +32,80 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
31
  // Define plugin constants
32
  define( 'WORDPRESS_ZERO_SPAM', __FILE__ );
33
  define( 'WORDPRESS_ZERO_SPAM_DB_VERSION', '0.5' );
34
- define( 'WORDPRESS_ZERO_SPAM_VERSION', '4.9.11' );
35
 
36
  /**
37
- * Utility helper functions
38
  */
39
  require plugin_dir_path( WORDPRESS_ZERO_SPAM ) . 'inc/utilities.php';
40
 
41
  /**
42
- * Helpers
43
  */
44
  require plugin_dir_path( WORDPRESS_ZERO_SPAM ) . 'inc/helpers.php';
45
 
46
  /**
47
- * Plugin updates
48
  */
49
  require plugin_dir_path( WORDPRESS_ZERO_SPAM ) . 'inc/updates.php';
50
 
51
  /**
52
- * Install plugin tables
53
  */
54
- function wpzerospam_install() {
55
- global $wpdb;
56
-
57
- $charset_collate = $wpdb->get_charset_collate();
58
- $installed_db_version = get_option( 'wpzerospam_db_version' );
59
-
60
- if ( $installed_db_version != WORDPRESS_ZERO_SPAM_DB_VERSION ) {
61
- $log_table = wpzerospam_tables( 'log' );
62
- $blocked_table = wpzerospam_tables( 'blocked' );
63
- $blacklist_table = wpzerospam_tables( 'blacklist' );
64
-
65
- $sql = "CREATE TABLE $log_table (
66
- log_id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
67
- log_type VARCHAR(255) NOT NULL,
68
- user_ip VARCHAR(39) NOT NULL,
69
- date_recorded DATETIME NOT NULL,
70
- page_url VARCHAR(255) NULL DEFAULT NULL,
71
- submission_data LONGTEXT NULL DEFAULT NULL,
72
- country VARCHAR(2) NULL DEFAULT NULL,
73
- region VARCHAR(255) NULL DEFAULT NULL,
74
- city VARCHAR(255) NULL DEFAULT NULL,
75
- latitude VARCHAR(255) NULL DEFAULT NULL,
76
- longitude VARCHAR(255) NULL DEFAULT NULL,
77
- PRIMARY KEY (`log_id`)) $charset_collate;";
78
-
79
- $sql .= "CREATE TABLE $blocked_table (
80
- blocked_id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
81
- blocked_type ENUM('permanent','temporary') NOT NULL DEFAULT 'temporary',
82
- user_ip VARCHAR(39) NOT NULL,
83
- date_added DATETIME NOT NULL,
84
- start_block DATETIME NULL DEFAULT NULL,
85
- end_block DATETIME NULL DEFAULT NULL,
86
- reason VARCHAR(255) NULL DEFAULT NULL,
87
- attempts BIGINT UNSIGNED NOT NULL,
88
- PRIMARY KEY (`blocked_id`)) $charset_collate;";
89
-
90
- $sql .= "CREATE TABLE $blacklist_table (
91
- blacklist_id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
92
- user_ip VARCHAR(39) NOT NULL,
93
- last_updated DATETIME NOT NULL,
94
- blacklist_service VARCHAR(255) NULL DEFAULT NULL,
95
- attempts BIGINT UNSIGNED NOT NULL,
96
- blacklist_data LONGTEXT NULL DEFAULT NULL,
97
- PRIMARY KEY (`blacklist_id`)) $charset_collate;";
98
-
99
- require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
100
- dbDelta( $sql );
101
-
102
- if ( $wpdb->get_var( $wpdb->prepare( "SHOW TABLES LIKE %s", $blocked_table ) ) === $blocked_table ) {
103
- $wpdb->query( "DELETE t1 FROM $blocked_table AS t1 JOIN $blocked_table AS t2 ON t2.blocked_id = t1.blocked_id WHERE t1.blocked_id < t2.blocked_id AND t1.user_ip = t2.user_ip" );
104
- }
105
-
106
- if ( $wpdb->get_var( $wpdb->prepare( "SHOW TABLES LIKE %s", $blacklist_table ) ) === $blacklist_table ) {
107
- $wpdb->query( "DELETE t1 FROM $blacklist_table AS t1 JOIN $blacklist_table AS t2 ON t2.blacklist_id = t1.blacklist_id WHERE t1.blacklist_id < t2.blacklist_id AND t1.user_ip = t2.user_ip" );
108
- }
109
-
110
- update_option( 'wpzerospam_db_version', WORDPRESS_ZERO_SPAM_DB_VERSION );
111
- }
112
- }
113
- register_activation_hook( WORDPRESS_ZERO_SPAM, 'wpzerospam_install' );
114
 
115
  /**
116
- * Check to ensure the database tables have been installed
117
  */
118
- function wpzerospam_db_check() {
119
- if ( get_site_option( 'wpzerospam_db_version' ) != WORDPRESS_ZERO_SPAM_DB_VERSION ) {
120
- wpzerospam_install();
121
- }
122
- }
123
- add_action( 'plugins_loaded', 'wpzerospam_db_check' );
124
 
125
  /**
126
- * Plugin scripts
127
  */
128
  require plugin_dir_path( WORDPRESS_ZERO_SPAM ) . 'inc/scripts.php';
129
 
130
  /**
131
- * Admin interface & functionality
132
  */
133
  require plugin_dir_path( WORDPRESS_ZERO_SPAM ) . 'inc/admin.php';
134
 
135
  /**
136
- * Action & filter hooks for enhanced site security
137
  */
138
  require plugin_dir_path( WORDPRESS_ZERO_SPAM ) . 'inc/security.php';
139
 
140
  /**
141
- * Below are the includes for individual spam check integrations
 
 
 
 
142
  */
143
- require plugin_dir_path( WORDPRESS_ZERO_SPAM ) . 'integrations/comments/comments.php';
144
- require plugin_dir_path( WORDPRESS_ZERO_SPAM ) . 'integrations/registrations/registrations.php';
145
-
146
- if ( wpzerospam_plugin_integration_enabled( 'cf7' ) ) {
147
- require plugin_dir_path( WORDPRESS_ZERO_SPAM ) . 'integrations/contact-form-7/contact-form-7.php';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
148
  }
 
 
 
 
 
149
 
150
  if ( wpzerospam_plugin_integration_enabled( 'bp_registrations' ) ) {
151
  require plugin_dir_path( WORDPRESS_ZERO_SPAM ) . 'integrations/buddypress/buddypress.php';
@@ -184,46 +144,3 @@ if ( ! function_exists( 'wpzerospam_template_redirect' ) ) {
184
  }
185
  }
186
  add_action( 'template_redirect', 'wpzerospam_template_redirect' );
187
-
188
- /**
189
- * Handles uninstalling the plugin
190
- */
191
- if ( ! function_exists( 'wpzerospam_uninstall' ) ) {
192
- function wpzerospam_uninstall() {
193
- global $wpdb;
194
-
195
- if ( is_multisite() ) {
196
- $blogs = $wpdb->get_results( "SELECT blog_id FROM {$wpdb->blogs}", ARRAY_A );
197
-
198
- if ( $blogs ) {
199
- foreach ( $blogs as $blog ) {
200
- switch_to_blog( $blog['blog_id'] );
201
-
202
- delete_option( 'wpzerospam' );
203
- delete_option( 'wpzerospam_key' );
204
- delete_option( 'wpzerospam_honeypot' );
205
- delete_option( 'wpzerospam_db_version' );
206
- delete_option( 'wpzerospam_update_version' );
207
-
208
- $tables = wpzerospam_tables();
209
- foreach( $tables as $key => $table ) {
210
- $wpdb->query( "DROP TABLE IF EXISTS $table" );
211
- }
212
- }
213
- restore_current_blog();
214
- }
215
- } else {
216
- delete_option( 'wpzerospam' );
217
- delete_option( 'wpzerospam_key' );
218
- delete_option( 'wpzerospam_honeypot' );
219
- delete_option( 'wpzerospam_db_version' );
220
- delete_option( 'wpzerospam_update_version' );
221
-
222
- $tables = wpzerospam_tables();
223
- foreach( $tables as $key => $table ) {
224
- $wpdb->query( "DROP TABLE IF EXISTS $table" );
225
- }
226
- }
227
- }
228
- }
229
- register_uninstall_hook( WORDPRESS_ZERO_SPAM, 'wpzerospam_uninstall' );
13
  * Plugin Name: WordPress Zero Spam
14
  * Plugin URI: https://benmarshall.me/wordpress-zero-spam
15
  * Description: Tired of all the useless and bloated WordPress spam plugins? The WordPress Zero Spam plugin makes blocking spam a cinch. <strong>Just install, activate and say goodbye to spam.</strong> Based on work by <a href="http://davidwalsh.name/wordpress-comment-spam" target="_blank">David Walsh</a>.
16
+ * Version: 4.9.12
17
  * Requires at least: 5.2
18
  * Requires PHP: 7.2
19
  * Author: Ben Marshall
20
  * Author URI: https://benmarshall.me
21
+ * Text Domain: zero-spam
22
+ * Domain Path: /languages
23
  * License: GPL v2 or later
24
  * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
25
  */
32
  // Define plugin constants
33
  define( 'WORDPRESS_ZERO_SPAM', __FILE__ );
34
  define( 'WORDPRESS_ZERO_SPAM_DB_VERSION', '0.5' );
35
+ define( 'WORDPRESS_ZERO_SPAM_VERSION', '4.9.12' );
36
 
37
  /**
38
+ * Utility helper functions.
39
  */
40
  require plugin_dir_path( WORDPRESS_ZERO_SPAM ) . 'inc/utilities.php';
41
 
42
  /**
43
+ * Helpers.
44
  */
45
  require plugin_dir_path( WORDPRESS_ZERO_SPAM ) . 'inc/helpers.php';
46
 
47
  /**
48
+ * Plugin updates.
49
  */
50
  require plugin_dir_path( WORDPRESS_ZERO_SPAM ) . 'inc/updates.php';
51
 
52
  /**
53
+ * Install & upgrade functionality.
54
  */
55
+ require plugin_dir_path( WORDPRESS_ZERO_SPAM ) . 'inc/install.php';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56
 
57
  /**
58
+ * Uninstall functionality.
59
  */
60
+ require plugin_dir_path( WORDPRESS_ZERO_SPAM ) . 'inc/uninstall.php';
 
 
 
 
 
61
 
62
  /**
63
+ * Plugin CSS & JS scripts.
64
  */
65
  require plugin_dir_path( WORDPRESS_ZERO_SPAM ) . 'inc/scripts.php';
66
 
67
  /**
68
+ * Admin interface & functionality.
69
  */
70
  require plugin_dir_path( WORDPRESS_ZERO_SPAM ) . 'inc/admin.php';
71
 
72
  /**
73
+ * Action & filter hooks for enhanced site security.
74
  */
75
  require plugin_dir_path( WORDPRESS_ZERO_SPAM ) . 'inc/security.php';
76
 
77
  /**
78
+ * Initializes the plugin.
79
+ *
80
+ * @since 4.9.12
81
+ *
82
+ * @return void
83
  */
84
+ if ( ! function_exists( 'zero_spam_setup' ) ) {
85
+ function zero_spam_setup() {
86
+ /**
87
+ * Include the WPZS core comments integration.
88
+ */
89
+ require plugin_dir_path( WORDPRESS_ZERO_SPAM ) . 'integrations/comments/comments.php';
90
+
91
+ /**
92
+ * Include the WPZS core registration integration.
93
+ */
94
+ require plugin_dir_path( WORDPRESS_ZERO_SPAM ) . 'integrations/registrations/registrations.php';
95
+
96
+ /**
97
+ * Include the WPZS Contact Form 7 integration if it's active.
98
+ */
99
+ if ( class_exists( 'WPCF7' ) ) {
100
+ require plugin_dir_path( WORDPRESS_ZERO_SPAM ) . 'integrations/contact-form-7/contact-form-7.php';
101
+ }
102
+ }
103
  }
104
+ add_action( 'plugins_loaded', 'zero_spam_setup' );
105
+
106
+
107
+
108
+
109
 
110
  if ( wpzerospam_plugin_integration_enabled( 'bp_registrations' ) ) {
111
  require plugin_dir_path( WORDPRESS_ZERO_SPAM ) . 'integrations/buddypress/buddypress.php';
144
  }
145
  }
146
  add_action( 'template_redirect', 'wpzerospam_template_redirect' );