WordPress Email Marketing Plugin – WP Email Capture - Version 3.9.3

Version Description

  • Tested with 6.0
  • Made compatible with Moosend
  • Fixed a notice bug in the recaptcha which meant it would not work for certain forms with WP_DEBUG switched on
Download this release

Release Info

Developer rhyswynne
Plugin Icon 128x128 WordPress Email Marketing Plugin – WP Email Capture
Version 3.9.3
Comparing to
See all releases

Code changes from version 3.9.2 to 3.9.3

Files changed (4) hide show
  1. inc/img/moosend-image.png +0 -0
  2. inc/options.php +503 -485
  3. readme.txt +16 -11
  4. wp-email-capture.php +2 -2
inc/img/moosend-image.png ADDED
Binary file
inc/options.php CHANGED
@@ -4,12 +4,13 @@
4
  * Set up the WP Email Capture Menus
5
  * @return void
6
  */
7
- function wp_email_capture_menus() {
 
8
  $avatar = WP_EMAIL_CAPTURE_URL . '/images/wpemailcapture-dashicon.png';
9
  //add_options_page( __( 'WP Email Capture Options', 'wp-email-capture' ), 'WP Email Capture', 'activate_plugins', 'wpemailcaptureoptions', 'wp_email_capture_options' );
10
- add_menu_page(__('WP Email Capture'),__('WP Email Capture','wp-email-capture'), 'activate_plugins', 'wpemailcapture', 'wp_email_capture_dashboard',$avatar,85);
11
- add_submenu_page('wpemailcapture',__('Settings'), __('Settings','wp-email-capture'), 'activate_plugins', 'wpemailcapturefreesettings', 'wp_email_capture_free_options');
12
- add_submenu_page('wpemailcapture',__('Help'), __('Help','wp-email-capture'), 'activate_plugins', 'wpemailcapturefreehelp', 'wp_email_capture_free_help');
13
  }
14
 
15
 
@@ -19,12 +20,22 @@ function wp_email_capture_menus() {
19
  * @todo Build this
20
  * @return void
21
  */
22
- function wp_email_capture_dashboard() {
 
23
 
24
  $extensionstopush = array(
25
  array(
26
- 'name' => __('WP Email Capture - Redirect If Present', 'WPEC' ),
27
- 'description' => __( 'Redirect signups to the final page, rather than show an error, should they not be present'),
 
 
 
 
 
 
 
 
 
28
  'price' => '20',
29
  'purchaseurl' => 'https://www.wpemailcapture.com/checkout/?edd_action=add_to_cart&download_id=4153&utm_source=plugin-dashboard-extensions&utm_medium=plugin&utm_campaign=wpemailcaptur',
30
  'infourl' => 'https://www.wpemailcapture.com/downloads/wp-email-capture-returning-user-redirect/?utm_source=plugin-dashboard-extensions&utm_medium=plugin&utm_campaign=wpemailcapture',
@@ -32,222 +43,220 @@ function wp_email_capture_dashboard() {
32
  'slug' => 'wpemailcaptureredirectifpresent'
33
  ),
34
  array(
35
- 'name' => __('WP Email Capture - Akismet Integration', 'WPEC' ),
36
- 'description' => __( 'Integrate WP Email Capture with <a href="https://akismet.com/">Akismet</a>'),
37
  'price' => '20',
38
  'purchaseurl' => 'https://www.wpemailcapture.com/checkout/?edd_action=add_to_cart&download_id=2823&utm_source=plugin-dashboard-extensions&utm_medium=plugin&utm_campaign=wpemailcaptur',
39
  'infourl' => 'https://www.wpemailcapture.com/downloads/wp-email-capture-akismet-integration/?utm_source=plugin-dashboard-extensions&utm_medium=plugin&utm_campaign=wpemailcaptur',
40
  'imageurl' => WP_EMAIL_CAPTURE_URL . '/inc/img/akismet-image.gif',
41
  'slug' => 'wpemailcaptureakismetintegration'
42
- ),
43
  array(
44
- 'name' => __('WP Email Capture - Drip Integration', 'WPEC' ),
45
- 'description' => __( 'Integrate WP Email Capture with <a href="https://www.wpemailcapture.com/recommends/drip/?utm_source=plugin-dashboard-extensions&utm_medium=plugin&utm_campaign=wpemailcaptur">Drip</a>'),
46
  'price' => '15',
47
  'purchaseurl' => 'https://www.wpemailcapture.com/checkout/?edd_action=add_to_cart&download_id=2415&utm_source=plugin-dashboard-extensions&utm_medium=plugin&utm_campaign=wpemailcaptur',
48
  'infourl' => 'https://www.wpemailcapture.com/downloads/wp-email-capture-drip-integration/?utm_source=plugin-dashboard-extensions&utm_medium=plugin&utm_campaign=wpemailcapture',
49
  'imageurl' => WP_EMAIL_CAPTURE_URL . '/inc/img/drip-image.png',
50
  'slug' => 'wpemailcapturedripintegration'
51
- )
52
- );
53
 
54
  $compatibleservices = array(
55
 
56
  array(
57
  'name' => 'Aweber',
58
  'url' => 'https://www.wpemailcapture.com/recommends/aweber/'
59
- ),
60
-
 
 
 
61
  array(
62
  'name' => 'Constant Contact',
63
  'url' => 'https://www.wpemailcapture.com/recommends/constant-contact/'
64
- ),
65
 
66
  array(
67
  'name' => 'Mailchimp',
68
  'url' => 'https://www.wpemailcapture.com/recommends/mailchimp/'
69
- ),
70
 
71
  array(
72
  'name' => 'Madmimi',
73
  'url' => 'https://www.wpemailcapture.com/recommends/madmimi/'
74
- ),
75
-
76
- );
77
-
78
- ?>
79
- <div class="wrap about-wrap wpec-about-wrap">
80
-
81
- <h1><?php _e( 'Welcome to WP Email Capture!', 'wp-email-capture' ); ?></h1>
82
 
83
- <div class="about-text">
84
- <?php _e( 'Start collecting email subscribers today!', 'wp-email-capture' ); ?><br/>
85
- </div>
86
 
87
- <h2 class="nav-tab-wrapper" id="wpemailcapture-tabs">
88
- <a class="nav-tab" href="#dashboard" id="dashboard-tab"><?php _e( 'Dashboard', 'wp-email-capture' ); ?></a>
89
- <a class="nav-tab" href="#changelog" id="changelog-tab"><?php _e( 'Changelog', 'wp-email-capture' ); ?></a>
90
- <a class="nav-tab" href="#credits" id="credits-tab"><?php _e( 'Credits', 'wp-email-capture' ); ?></a>
91
- </h2>
92
 
93
- <?php
94
 
95
- if ( array_key_exists( 'wpecupgrade', $_GET ) ) {
96
- $activedashboard = "";
97
- $activeupgrade = " active";
98
- } else {
99
- $activedashboard = " active";
100
- $activeupgrade = "";
101
- }
102
-
103
- ?>
104
- <div id="dashboard" class="wpemailcapture-tab <?php echo $activedashboard; ?>">
105
- <h2><?php _e( 'Welcome to WP Email Capture', 'wp-email-capture' ); ?></h2>
106
-
107
- <h3><?php _e( 'New in 3.9 - reCAPTCHA Integration', 'wp-email-capture' ); ?></h3>
108
 
109
- <p><?php _e( 'Version 3.9 will allow you to protect your blog from spam, using reCAPTCHA integration.', 'wp-email-capture' ); ?></p>
110
- <p><?php _e( 'Grab a key from Google and use reCAPTCHA v3 to grade your signups, block those that are troublesome, and allowing those that are genuine.', 'wp-email-capture' ); ?></p>
 
 
 
111
 
112
- <p><a class="non-nav-tab" href="#changelog" id="changelog-tab"><?php _e( 'Read the changelog', 'wp-email-capture'); ?></a></p>
113
 
114
- <?php
 
 
 
 
 
 
115
 
116
- do_action( 'wp_email_capture_dashboard_premium_upsell' );
 
 
117
 
118
- ?>
119
 
120
- <h2><?php _e( 'Extensions', 'wp-email-capture' ); ?></h2>
121
- <table class="extensions">
122
- <tr>
123
- <?php
124
 
125
- $loop = 0;
126
 
127
- foreach ( $extensionstopush as $extension ) {
128
 
129
- if ( $loop == 3 ) {
130
- ?>
131
- </tr>
132
- <tr>
133
- <?php
134
- }
135
- ?>
136
- <td align="center">
137
- <h3><?php echo $extension['name'] ?></h3>
138
- <img src="<?php echo $extension['imageurl']; ?>">
139
- <p><?php echo $extension['description']; ?></p>
140
- <p>
141
- <a class="button-primary" href="<?php echo $extension['purchaseurl']; ?>"><?php echo "$" . $extension['price'] . ".00"; ?> <?php _e( 'Buy Now', 'WPEC' ); ?></a>
142
- <a class="button-secondary" href="<?php echo $extension['infourl'];?>"><?php _e( 'More Info', 'WPEC' ); ?></a>
143
- </p>
144
- </td>
145
- <?php
146
 
147
- }
148
- ?>
149
- </tr>
150
- </table>
151
 
152
- <h2><?php _e( 'Compatible Services', 'wp-email-capture' ); ?></h2>
153
- <p><?php _e( 'WP Email Capture email lists are compatible with the following marketing services.', 'wp-email-capture' ); ?></p>
154
- <ul>
155
  <?php
156
 
157
  $loop = 0;
158
 
159
- foreach ( $compatibleservices as $service ) {
160
- ?>
161
- <li><a href="<?php echo $service['url']; ?>?utm_source=plugin-dashboard-compatibleservices&utm_medium=plugin&utm_campaign=wpemailcapture"><?php echo $service['name']; ?></a></li>
162
- <?php
163
-
164
- }
165
  ?>
166
- </ul>
167
-
168
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
169
 
170
- <div id="changelog" class="wpemailcapture-tab <?php echo $activeupgrade; ?>">
171
- <h2><?php _e( 'Changelog', 'wp-email-capture' ); ?></h2>
 
 
172
 
 
 
 
173
  <?php
174
 
175
- $changelog = wp_email_capture_get_changelog_array();
176
 
177
- if ( !empty ( $changelog ) ) {
178
-
179
- foreach ( $changelog as $version ) {
 
180
 
181
- $title = "";
 
 
182
 
183
- if ( array_key_exists( 'version', $version ) ) {
184
 
185
- $title .= sprintf( __( 'Version %s', 'wp-email-capture' ), $version['version'] );
 
186
 
187
- }
188
 
189
- if ( array_key_exists( 'title', $version ) ) {
190
 
191
- $title .= " - " . $version['title'];
192
 
193
- }
194
 
195
- if ( $title ) {
196
 
197
- echo '<h3>' . $title . '</h3>';
198
 
199
- }
 
200
 
201
- if ( array_key_exists( 'intro', $version ) ) {
202
 
203
- echo '<p>' . $version['intro'] . '</p>';
 
204
 
205
- }
206
 
207
- if ( array_key_exists( 'list', $version ) ) {
 
208
 
209
- echo '<ul>';
210
 
211
- foreach ( $version['list'] as $listitem ) {
 
212
 
213
- echo '<li>' . $listitem . '</li>';
214
 
215
- }
216
 
217
- echo '</ul>';
218
 
 
219
  }
 
 
220
  }
221
  }
222
- ?>
 
223
 
224
- </div>
225
-
226
- <div id="credits" class="wpemailcapture-tab">
227
- <h2><?php _e( 'Credits', 'wp-email-capture' ); ?></h2>
228
- <p><?php _e( 'This plugin has been helped and improved by the following people', 'wp-email-capture' ); ?></p>
229
- <ul>
230
- <li><?php echo sprintf( __( '<strong>3.1:</strong> <a href="%s" target="_blank">Hassan Raza</a>','wp-email-capture' ), 'http://hassan-raza.com/' ); ?></li>
231
- </ul>
232
- <h3><?php _e('Translations', 'wp-email-capture' ); ?></h3>
233
- <ul>
234
- <li><?php echo sprintf( __( '<strong>French Translation:</strong> <a href="%s" target="_blank">Olivier</a> & <a href="%s" target="_blank">Andrew Patton</a> <a href="%s" target="_blank">(@andpatton)</a>.','wp-email-capture' ), 'http://www.ticket-system.net/', 'http://www.acusti.ca/', 'http://twitter.com/andpatton' ); ?></li>
235
- <li><?php echo sprintf( __( '<strong>German Translation:</strong> <a href="%s" target="_blank">Stephan</a>, <a href="%s" target="_blank">Marc Nilius</a> <a href="%s" target="_blank">(@libertello)</a>, Ov3rFly &amp; <a href="%s">Lars Kasper</a>', 'wp-email-capture' ), 'http://www.computersniffer.com/', 'http://www.libertello.de/', 'http://twitter.com/libertello', 'http://larskasper.de/' ); ?></li>
236
- <li><?php echo sprintf( __( '<strong>Brazilian Portugese Translation:</strong> <a href="%s" target="_blank">Nick Lima</a> <a href="%s" target="_blank">(@nick_linux)</a>', 'wp-email-capture' ), 'http://www.nicklima.com.br', 'http://twitter.com/nick_linux' ); ?></li>
237
- <li><?php echo sprintf( __( '<strong>Dutch Translation:</strong> <a href="%s" target="_blank">Sander</a>', 'wp-email-capture' ), 'http://www.zanderz.net/' ); ?></li>
238
- <li><?php echo sprintf( __( '<strong>Hungarian Translation:</strong> <a href="%s" target="_blank">Surbma</a>', 'wp-email-capture' ), 'http://surbma.hu/' ); ?></li>
239
- <li><?php echo sprintf( __( '<strong>Spanish Translation:</strong> <a href="%s" target="_blank">David Bravo</a>' , 'wp-email-capture' ), 'http://dimensionmultimedia.com' ); ?></li>
240
- <li><?php echo sprintf( __( '<strong>Italian Translation:</strong> <a href="%s" target="_blank">Giuseppe Marino</a>' , 'wp-email-capture' ), 'http://it.gravatar.com/gpmarino' ); ?></li>
241
- <li><?php echo sprintf( __( '<strong>Serbian Translation:</strong> <a href="%s" target="_blank">Borisa Djuraskovic</a>' , 'wp-email-capture' ), 'http://www.webhostinghub.com/' ); ?></li>
242
- <li><?php echo sprintf( __( '<strong>Croatian Translation:</strong> <a href="%s" target="_blank">Lem Treursić</a>' , 'wp-email-capture' ), 'http://grafika-dizajn.com/' ); ?></li>
243
- </ul>
244
- <h3><?php _e( 'Contribute?', 'wp-email-capture' ); ?></h3>
245
- <h4><?php echo sprintf( __( 'If you want to help, you can contribute a fix or report a bug on our <a href="%s" target="_blank">Github</a>', 'wp-email-capture' ), 'https://github.com/rhyswynne/wp-email-capture' ); ?></h4>
246
- </div>
247
  </div>
248
- <?php
249
 
250
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
251
 
252
 
253
  /**
@@ -255,167 +264,170 @@ function wp_email_capture_dashboard() {
255
  *
256
  * @return void
257
  */
258
- function wp_email_capture_free_options() {
 
259
 
260
  echo '<div class="wrap">
261
  <div style="width:70%;float:left;clear:both;" class="postbox-container">
262
  <div class="metabox-holder"><div class="meta-box-sortables">
263
- <h2>'.__( 'WP Email Capture Options', 'wp-email-capture' ).'</h2>
264
- <h3>'.__( 'Options', 'wp-email-capture' ).'</h3>';
265
 
266
- ?>
267
 
268
- <?php settings_errors(); ?>
269
 
270
- <form method="post" action="options.php">
271
 
272
- <?php wp_nonce_field( 'update-options' ); ?>
273
 
274
- <?php settings_fields( 'wp-email-capture-group' ); ?>
275
 
276
- <table class="form-table">
277
 
278
- <tbody>
279
 
280
- <tr valign="top">
281
 
282
- <th scope="row" style="width:400px"><?php _e( 'Subscription Page URL (full web address ie: http://www.domain.com/this-page/)', 'wp-email-capture' ); ?></th>
283
 
284
- <td><input type="text" name="wp_email_capture_signup" class="regular-text code" value="<?php echo get_option( 'wp_email_capture_signup' ); ?>" /></td>
285
 
286
- </tr>
287
 
288
- <tr valign="top">
289
 
290
- <th scope="row" style="width:400px"><label for="wp_email_capture_redirection"><?php _e( 'Confirmation Page URL (full web address ie: http://www.domain.com/this-other-page/)', 'wp-email-capture' ); ?></label></th>
291
 
292
- <td><input type="text" name="wp_email_capture_redirection" class="regular-text code" value="<?php echo get_option( 'wp_email_capture_redirection' ); ?>" /></td>
293
 
294
- </tr>
295
 
296
- <tr valign="top">
297
 
298
- <th scope="row" style="width:400px"><label for="wp_email_capture_from"><?php _e( 'From Which Email Address', 'wp-email-capture' ); ?></label></th>
299
 
300
- <td><input type="text" name="wp_email_capture_from" class="regular-text code" value="<?php echo get_option( 'wp_email_capture_from' ); ?>" /></td>
301
 
302
- </tr>
303
 
304
- <tr valign="top">
305
 
306
- <th scope="row" style="width:400px"><label for="wp_email_capture_from_name"><?php _e( 'From Which Name', 'wp-email-capture' ); ?></label></th>
307
 
308
- <td><input type="text" name="wp_email_capture_from_name" class="regular-text code" value="<?php echo get_option( 'wp_email_capture_from_name' ); ?>" /></td>
309
 
310
- </tr>
311
 
312
- <tr valign="top">
313
 
314
- <th scope="row" style="width:400px"><?php _e( 'Subject of Email', 'wp-email-capture' ); ?></th>
315
 
316
- <td><input type="text" name="wp_email_capture_subject" class="regular-text code" value="<?php echo get_option( 'wp_email_capture_subject' ); ?>" /></td>
317
 
318
- </tr>
319
 
320
- <tr valign="top">
321
 
322
- <th scope="row" style="width:400px"><label for="wp_email_capture_body"><?php _e( 'Body of Email', 'wp-email-capture' ); ?><br>
323
- <?php _e( '(use %NAME% to use the form\'s &quot;Name&quot; field in their welcome email)', 'wp-email-capture' ); ?></label>
324
- </th>
325
 
326
- <td><textarea name="wp_email_capture_body" style="width: 25em;"><?php echo get_option( 'wp_email_capture_body' ); ?></textarea></td>
327
 
328
- </tr>
329
 
330
- <tr valign="top">
331
 
332
- <th scope="row" style="width:400px"><label><?php _e( 'Link to us (optional, but appreciated)', 'wp-email-capture' ); ?></label></th>
333
 
334
- <td>
335
- <input type="checkbox" name="wp_email_capture_link" value="1" <?php checked( get_option( 'wp_email_capture_link' ), 1 ); ?> id="wp_email_capture_link_checkbox" />
336
- <?php $prechecked = get_option( 'wp_email_capture_link' ) == 1 ? "wp_email_capture_admin_discount_active" : ""; ?>
337
- </td>
338
 
339
- </tr>
340
 
341
- <tr class="wp_email_capture_admin_discount <?php echo $prechecked; ?>">
342
- <td colspan="2">
343
- <?php printf( __( 'Thanks for linking to us! As a thank you, use code <strong>LINK20</strong> to get 20&#37; off <a href="%s">WP Email Capture Premium</a>, or any extension from the <a href="%s">WP Email Capture Shop</a>.', 'wp-email-capture' ), 'https://www.wpemailcapture.com/premium/?utm_source=plugin-options&utm_medium=plugin&utm_term=checkedlink&utm_campaign=wpemailcapture', 'https://www.wpemailcapture.com/downloads/?utm_source=plugin-options&utm_medium=plugin&utm_term=checkedlink&utm_campaign=wpemailcapture' ); ?>
344
- </td>
345
- </tr>
346
 
347
- <tr valign="top">
348
 
349
- <th scope="row" style="width:400px"><label><?php _e( 'Make The "Name" field a required field?', 'wp-email-capture' ); ?></label></th>
350
 
351
 
352
 
353
- <td><input type="checkbox" name="wp_email_capture_name_required" value="1" <?php checked( get_option( 'wp_email_capture_name_required' ), 1 ); ?> /></td>
354
 
355
- </tr>
356
 
357
- <tr valign="top">
358
 
359
- <th scope="row" style="width:400px"><?php _e( 'Delimeter (leave blank for a comma)', 'wp-email-capture' ); ?></th>
360
 
361
- <td><input type="text" name="wp_email_capture_name_delimeter" class="regular-text code" value="<?php echo get_option( 'wp_email_capture_name_delimeter' ); ?>" /></td>
362
 
363
- </tr>
364
 
365
- <tr valign="top">
366
 
367
- <th scope="row" style="width:400px"><?php _e( 'Send HTML email?', 'wp-email-capture' ); ?></th>
368
 
369
- <td><input type="checkbox" name="wp_email_capture_send_email_html" value="1" <?php checked( get_option( 'wp_email_capture_send_email_html' ), 1 ); ?> /></td>
370
 
371
- </tr>
372
 
373
- <tr valign="top">
374
 
375
- <th scope="row" style="width:400px"><?php _e( 'Disable Headers', 'wp-email-capture' ); ?></th>
376
 
377
- <td><input type="checkbox" name="wp_email_capture_disabled_headers" value="1" <?php checked( get_option( 'wp_email_capture_disabled_headers' ), 1 ); ?> /><br/>
378
- <span class="description"><?php _e( 'If you are having problems with sending emails (such as with Amazon SES), disable this','wp-email-capture' ); ?></span></td>
 
379
 
380
- </tr>
381
 
382
- <tr valign="top">
383
 
384
- <th scope="row" style="width:400px"><?php _e( 'Use Default Styling', 'wp-email-capture' ); ?></th>
385
 
386
- <td><input type="checkbox" name="wp_email_capture_default_styling" value="1" <?php checked( get_option( 'wp_email_capture_default_styling' ), 1 ); ?> /><br/>
387
- <span class="description"><?php _e( 'If you want to have some easy styling on your forms, check this box. Otherwise leave it unchecked if your theme already styles forms','wp-email-capture' ); ?></span></td>
 
388
 
389
- </tr>
390
 
391
- <?php do_action( 'wp_email_capture_added_free_options' ); ?>
392
 
393
- </tbody>
394
 
395
- </table>
396
 
397
- <h2><?php _e( 'reCAPTCHA Settings', 'wp-email-capture' ); ?></h2>
398
 
399
- <?php _e('We can use <a href="https://www.google.com/recaptcha/about/">reCAPTCHA</a> (v3) for free (<a href="https://www.wpemailcapture.com/downloads/wp-email-capture-akismet-integration/" target="_blank">Akismet is avialable here</a>). Add your keys below.','WPEC'); ?>
400
- <table class="form-table">
401
- <tbody>
402
 
403
- <tr valign="top">
404
 
405
- <th scope="row" style="width:400px"><?php _e( 'reCAPTCHA Site Key', 'wp-email-capture' ); ?></th>
406
 
407
- <td><input type="text" name="wp_email_capture_recaptcha_client_api_key" class="regular-text code" value="<?php echo get_option( 'wp_email_capture_recaptcha_client_api_key' ); ?>" /></td>
408
 
409
- </tr>
410
 
411
- <tr valign="top">
412
 
413
- <th scope="row" style="width:400px"><?php _e( 'reCAPTCHA Secret Key', 'wp-email-capture' ); ?></th>
414
 
415
- <td><input type="text" name="wp_email_capture_recaptcha_server_api_key" class="regular-text code" value="<?php echo get_option( 'wp_email_capture_recaptcha_server_api_key' ); ?>" /></td>
416
 
417
- </tr>
418
- <?php /*
419
  <tr valign="top">
420
 
421
  <th scope="row" style="width:400px"><?php _e( 'reCAPTCHA Type', 'wp-email-capture' ); ?></th>
@@ -429,92 +441,92 @@ function wp_email_capture_free_options() {
429
  <label for="disable">Disable</label>
430
  </td>
431
 
432
- </tr> */?>
433
 
434
 
435
 
436
 
437
- </tbody>
438
- </table>
439
 
440
- <h2><?php _e( 'GDPR Settings', 'wp-email-capture' ); ?></h2>
441
 
442
- <table class="form-table">
443
 
444
- <tbody>
445
 
446
- <tr valign="top">
447
 
448
- <th scope="row" style="width:400px"><?php _e( 'Enable GDPR Settings', 'wp-email-capture' ); ?></th>
449
- <td><input type="checkbox" id="wp_email_capture_enable_gdpr" name="wp_email_capture_enable_gdpr" value="1" <?php checked( get_option( 'wp_email_capture_enable_gdpr' ), 1 ); ?> /><br/><span class="description"><?php _e( 'If you wish to enable GDPR settings, please check this box.','wp-email-capture' ); ?></span></td>
450
- </tr>
451
 
452
- </tbody>
453
 
454
- </table>
455
 
456
- <?php
457
 
458
- if ( get_option( 'wp_email_capture_enable_gdpr' ) ) {
459
- $hiddengdpr = '';
460
- } else {
461
- $hiddengdpr = 'style="display:none;"';
462
- }
463
 
464
- ?>
465
- <div class="gdpr-table" <?php echo $hiddengdpr; ?>>
466
- <table class="form-table">
467
 
468
- <tbody>
469
 
470
- <tr valign="top">
471
 
472
- <th scope="row" style="width:400px"><?php _e( 'How long do you want to keep data on your servers?', 'wp-email-capture' ); ?></th>
473
 
474
- <td>
475
- <input type="text" name="wp_email_capture_number_for_privacy" id="wp_email_capture_number_for_privacy" class="regular-text code" value="<?php echo get_option( 'wp_email_capture_number_for_privacy' ); ?>" />
476
 
477
- <select name="wp_email_capture_unit_for_privacy" id="wp_email_capture_unit_for_privacy">
478
- <option value="days" <?php selected( get_option( 'wp_email_capture_unit_for_privacy' ), 'days' ); ?>><?php _e( 'Days', 'wp-email-capture' ); ?></option>
479
- <option value="weeks" <?php selected( get_option( 'wp_email_capture_unit_for_privacy' ), 'weeks' ); ?>><?php _e( 'Weeks', 'wp-email-capture' ); ?></option>
480
- <option value="months" <?php selected( get_option( 'wp_email_capture_unit_for_privacy' ), 'months' ); ?>><?php _e( 'Months', 'wp-email-capture' ); ?></option>
481
- </select>
482
 
483
- <br/><span class="description"><?php _e( 'When visitors submit their email details, the plugin stores users data in the database. You can choose to automatically delete this data after a certain amount of days. Leave blank or "0" to not delete data.','wp-email-capture' ); ?></span>
484
- </td>
485
 
486
- </tr>
487
 
488
- <tr valign="top">
489
 
490
- <th scope="row" style="width:400px"><?php _e( 'Privacy Policy', 'wp-email-capture' ); ?></th>
491
 
492
- <td>
493
 
494
- <?php
495
 
496
- $addedstring = "";
497
 
498
- if ( get_option( 'wp_email_capture_number_for_privacy' ) ) {
499
- $number = get_option( 'wp_email_capture_number_for_privacy' );
500
- $unit = get_option( 'wp_email_capture_unit_for_privacy' );
501
- $addedstring = sprintf( __( 'We hold this data for a maximum of %s %s, at which point it is deleted.', 'wp-email-capture' ), $number, $unit );
502
- }
503
 
504
- ?>
505
 
506
- <p class="notice notice-error save-to-change" style="display:none;"><?php _e( 'Save the page to update the text in the below box.', 'wp-email-capture' ); ?></p>
507
 
508
- <textarea disabled style="min-width:100%;height:200px;" id="copyrightnotice"><?php _e( 'We use a WordPress plugin called WP Email Capture to aid management of our email marketing list. Should you wish to subscribe to our newsletter, we collect the following data.', 'wp-email-capture'); ?>
509
 
510
- <?php _e( 'Your Name (or what you chose to address yourself as). This is used for simple personalisation purposes.', 'wp-email-capture'); ?>
511
 
512
- <?php _e( 'Your Email Address. This is used to contact you and include you in our newsletter.', 'wp-email-capture'); ?>
513
 
514
- <?php _e( 'The date of signup. This is so we can reference when to delete your data at a later date.', 'wp-email-capture'); ?>
515
  <?php
516
 
517
- if ( $addedstring && $number && $unit ) {
518
  echo $addedstring;
519
  }
520
 
@@ -522,89 +534,89 @@ function wp_email_capture_free_options() {
522
 
523
  </textarea>
524
 
525
- <button class="button-secondary" id="copytext" type="button"><?php _e( 'Copy Privacy Policy text to clipboard', 'wp-email-capture' ); ?></button>
526
- <br/><span class="description"><?php _e( 'Copy and paste this text to your Privacy Policy, as this details how WP Email Capture handles data. We try and add this to your Privacy Policy automatically, but if we are unable to do so, we add it here.','wp-email-capture' ); ?></span>
527
- </td>
528
 
529
- </tr>
530
 
531
- </tbody>
532
 
533
- </table>
534
- </div>
535
 
536
- <input type="hidden" name="action" value="update" />
537
- <input type="hidden" name="page_options" value="wp_email_capture_redirection,wp_email_capture_from,wp_email_capture_subject,wp_email_capture_signup,wp_email_capture_body,wp_email_capture_from_name,wp_email_capture_link,wp_email_capture_name_required,wp_email_capture_name_delimeter,wp_email_capture_send_email_html,wp_email_capture_disabled_headers,wp_email_capture_enable_gdpr,wp_email_capture_number_of_privacy,wp_email_capture_number_of_privacy" />
538
 
539
- <p class="submit">
540
 
541
- <input type="submit" class="button-primary" value="<?php _e( 'Save Changes', 'wp-email-capture' ) ?>" />
542
 
543
- </p>
544
 
545
- </form>
546
 
547
 
548
 
549
- <?php
550
 
551
- wp_email_capture_writetable();
552
 
553
- echo '<a name="list"></a><h3>'.__( 'Export', 'wp-email-capture' ).'</h3>
554
- <form name="wp_email_capture_export" action="'. esc_url( $_SERVER['REQUEST_URI'] ) . '#list" method="post">
555
 
556
- <label>'.__( 'Use the button below to export your list as a CSV to use in software such as <a href="https://www.wpemailcapture.com/recommends/aweber" title="Email Marketing">Aweber</a> or <a href="https://www.wpemailcapture.com/recommends/constant-contact/">Constant Contact</a>', 'wp-email-capture' ).'</label>
557
  <input type="hidden" name="wp_email_capture_export" />
558
  <div class="submit">
559
- <input type="submit" value="'.__( 'Export List', 'wp-email-capture' ).'" class="button" />
560
  </div>
561
 
562
  </form>';
563
 
564
- $tempemails = wp_email_capture_count_temp();
565
- $lastsignupdatestring = wp_email_capture_get_last_singup_date();
566
 
567
- if ( $lastsignupdatestring ) {
568
- $lastsignupdate = date( "jS F, Y g:ia", strtotime( $lastsignupdatestring ) );
569
- $lastsignupdatesentance = __( ' The last attempted signup was on ' . $lastsignupdate . '.', 'wp-email-capture' );
570
- } else {
571
- $lastsignupdatesentance = "";
572
- }
573
 
574
- echo "<a name='truncate'></a><h3>".__( 'Temporary e-mails', 'wp-email-capture' )."</h3>\n";
575
 
576
- echo '<form name="wp_email_capture_truncate" action="'. esc_url( $_SERVER['REQUEST_URI'] ) . '#truncate" method="post">';
577
 
578
- echo '<label>'.__( 'There are', 'wp-email-capture' ).' '. $tempemails .__( ' e-mail addresses that have been unconfirmed.' . $lastsignupdatesentance . ' Delete them to save space below.', 'wp-email-capture' ).'</label>';
579
 
580
- echo '<input type="hidden" name="wp_email_capture_truncate"/>';
581
 
582
- echo '<div class="submit"><input type="submit" value="'.__( 'Delete Unconfirmed e-mail Addresses', 'wp-email-capture' ).'" class="button" /></div>';
583
 
584
- echo "</form>";
585
 
586
- echo "<a name='emptyallemails'></a><h3>".__( 'Delete Current List', 'wp-email-capture' )."</h3>\n";
587
 
588
- echo '<form name="wp_email_capture_delete" action="'. esc_url( $_SERVER['REQUEST_URI'] ) . '#delete" method="post">';
589
 
590
- echo '<label>'.__( 'Want to delete the entire list? Click the link below. <strong>WARNING: </strong> this will delete all confirmed emails, so make sure you have a backup.', 'wp-email-capture' ).'</label>';
591
 
592
- echo '<input type="hidden" name="wp_email_capture_delete"/>';
593
 
594
- echo '<div class="submit"><input type="submit" value="'.__( 'Delete Confirmed e-mail Addresses', 'wp-email-capture' ).'" class="button" /></div>';
595
 
596
- echo "</form>";
597
 
598
- echo '</div></div></div>';
599
 
600
- wp_email_capture_admin_sidebar( "getwpemailcapturepremiumdescription,affiliates,news,supportus" );
601
 
602
- echo '</div>';
603
- ?>
604
 
605
 
606
- <?php
607
- }
608
 
609
 
610
  /**
@@ -612,56 +624,53 @@ function wp_email_capture_free_options() {
612
  *
613
  * @return void
614
  */
615
- function wp_email_capture_options_process() { // whitelist options
616
-
617
- register_setting( 'wp-email-capture-group', 'wp_email_capture_signup' );
618
- register_setting( 'wp-email-capture-group', 'wp_email_capture_redirection' );
619
- register_setting( 'wp-email-capture-group', 'wp_email_capture_from' );
620
- register_setting( 'wp-email-capture-group', 'wp_email_capture_subject' );
621
- register_setting( 'wp-email-capture-group', 'wp_email_capture_body' );
622
- register_setting( 'wp-email-capture-group', 'wp_email_capture_link' );
623
- register_setting( 'wp-email-capture-group', 'wp_email_capture_from_name' );
624
- register_setting( 'wp-email-capture-group', 'wp_email_capture_name_required' );
625
- register_setting( 'wp-email-capture-group', 'wp_email_capture_name_delimeter' );
626
- register_setting( 'wp-email-capture-group', 'wp_email_capture_send_email_html' );
627
- register_setting( 'wp-email-capture-group', 'wp_email_capture_disabled_headers' );
628
- register_setting( 'wp-email-capture-group', 'wp_email_capture_default_styling' );
629
- register_setting( 'wp-email-capture-group', 'wp_email_capture_enable_gdpr' );
630
- register_setting( 'wp-email-capture-group', 'wp_email_capture_recaptcha_client_api_key' );
631
- register_setting( 'wp-email-capture-group', 'wp_email_capture_recaptcha_server_api_key' );
632
- register_setting( 'wp-email-capture-group', 'wp_email_capture_recaptcha_api_type' );
633
- register_setting( 'wp-email-capture-group', 'wp_email_capture_unit_for_privacy' );
634
- register_setting( 'wp-email-capture-group', 'wp_email_capture_number_for_privacy', 'wp_email_capture_check_number_is_a_number' );
635
-
636
- if ( isset( $_REQUEST['wp_email_capture_export'] ) ) {
 
637
 
638
  wp_email_capture_export();
639
-
640
  }
641
 
642
- if ( isset( $_REQUEST['wp_email_capture_deleteid'] ) ) {
643
- $wpemaildeleteid = esc_attr( $_POST['wp_email_capture_deleteid'] );
644
- wp_email_capture_deleteid( $wpemaildeleteid );
645
  }
646
 
647
 
648
- if ( isset( $_REQUEST['wp_email_capture_truncate'] ) ) {
649
 
650
  wp_email_capture_truncate();
651
-
652
  }
653
 
654
- if ( isset( $_REQUEST['wp_email_capture_delete'] ) ) {
655
 
656
  wp_email_capture_delete();
657
-
658
  }
659
 
660
  /**
661
  * Action to hook into to register any other options.
662
  */
663
- do_action( 'wp_email_capture_added_option_process' );
664
-
665
  }
666
 
667
 
@@ -670,21 +679,23 @@ function wp_email_capture_options_process() { // whitelist options
670
  *
671
  * @return void
672
  */
673
- function wp_email_capture_premium_upsell() {
674
- ?>
675
- <h3><?php _e( 'Upgrade To WP Email Capture Premium', 'wp-email-capture' ); ?></h3>
676
- <p><?php _e( 'Thanks for using the free version of WP Email Capture. We\'re incredibly greatful in you using it. Should you wish to upgrade to WP Email Capture Premium, you get a bunch of new features.', 'wp-email-capture' ); ?></p>
 
677
  <ul>
678
- <li><?php _e( '<strong>Stat tracking</strong> - track the visitors to your site and where your sign ups come from.', 'wp-email-capture' ); ?></li>
679
- <li><?php _e( '<strong>Autoresponders</strong> - Create an autoresponder email, an email sent to the user when they sign up to your site.', 'wp-email-capture' ); ?></li>
680
- <li><?php _e( '<strong>Multiple lists</strong> - Create multiple lists for your site.', 'wp-email-capture' ); ?></li>
681
- <li><?php _e( '<strong>Build External Lists</strong> - If you have a Mailchimp or Aweber account, you can use WP Email Capture to build to these services directly.', 'wp-email-capture' ); ?></li>
682
- <li><?php _e( '<strong>Custom Fields</strong> - You can capture more than just visitors name & email, add your own custom fields to capture (such as phone number or Address).', 'wp-email-capture' ); ?></li>
683
  </ul>
684
- <p><?php _e( 'You also get premium support for a whole year!', 'wp-email-capture' ); ?></p>
685
- <a href="https://www.wpemailcapture.com/premium/?utm_source=plugin-dashboard&utm_medium=plugin&utm_campaign=wpemailcapture" target="_blank"><button><?php _e( 'Click here to buy', 'wp-email-capture' ); ?></button></a>
686
- <?php
687
- } add_action( 'wp_email_capture_dashboard_premium_upsell', 'wp_email_capture_premium_upsell' );
 
688
 
689
 
690
  /**
@@ -693,25 +704,24 @@ function wp_email_capture_premium_upsell() {
693
  * @param string $input Input we are validating to make sure that it is a number.
694
  * @return mixed Validated number if true, false if not.
695
  */
696
- function wp_email_capture_check_number_is_a_number( $input ) {
 
697
 
698
  $message = null;
699
  $type = null;
700
 
701
- if ( !is_numeric( $input ) && "" !== $input ) {
702
 
703
- $message = __( 'Please make sure that the "How long do you want to keep data on your servers?" option is a number.', 'wp-email-capture' );
704
  $type = 'error';
705
-
706
  }
707
 
708
- if ( $message && 'error' == $type ) {
709
- add_settings_error( 'wp_email_capture_numeric', 'wp_email_capture_numeric', $message, $type );
710
  return "";
711
  }
712
 
713
  return $input;
714
-
715
  }
716
 
717
 
@@ -722,289 +732,297 @@ function wp_email_capture_check_number_is_a_number( $input ) {
722
  *
723
  * @return array An array of changes.
724
  */
725
- function wp_email_capture_get_changelog_array() {
 
726
 
727
  $changelog = array();
728
 
729
  $changelog[] = array(
730
- 'version' => __( '3.9', 'wp-email-capture' ),
731
  'list' => array(
732
- __( 'Added Google reCAPTCHA v3 integration', 'wp-email-capture' ),
733
- __( 'Tested to 5.6', 'wp-email-capture' ),
734
  ),
735
  );
736
 
737
  $changelog[] = array(
738
- 'version' => __( '3.8.2', 'wp-email-capture' ),
739
  'list' => array(
740
- __( 'Tested to 5.5.', 'wp-email-capture' ),
 
741
  ),
742
  );
743
 
744
  $changelog[] = array(
745
- 'version' => __( '3.8.1', 'wp-email-capture' ),
746
  'list' => array(
747
- __( 'Version with all the missing files from 3.8!', 'wp-email-capture' ),
748
  ),
749
  );
750
 
751
  $changelog[] = array(
752
- 'version' => __( '3.8', 'wp-email-capture' ),
753
  'list' => array(
754
- __( 'Added a new button to the classic editor allowing you to place the form anywhere.', 'wp-email-capture' ),
755
  ),
756
  );
757
 
758
  $changelog[] = array(
759
- 'version' => __( '3.7.3', 'wp-email-capture' ),
760
  'list' => array(
761
- __( 'Fixed a small bug in the site.', 'wp-email-capture' ),
762
  ),
763
  );
764
 
765
  $changelog[] = array(
766
- 'version' => __( '3.7.2', 'wp-email-capture' ),
767
  'list' => array(
768
- __( 'Tested to 5.3.', 'wp-email-capture' ),
769
  ),
770
  );
771
 
772
  $changelog[] = array(
773
- 'version' => __( '3.7.1', 'wp-email-capture' ),
774
  'list' => array(
775
- __( 'Corrected the “Requires at Least” as it was showing as being incompatible in the plugin store (when it is).', 'wp-email-capture' ),
776
  ),
777
  );
778
 
779
  $changelog[] = array(
780
- 'version' => __( '3.7', 'wp-email-capture' ),
781
  'list' => array(
782
- __( 'Added filter - `wp_email_capture_change_user_present_error_url`, needed for an additional plugin - WP Email Capture: Redirect If Present.', 'wp-email-capture' ),
783
- __( 'Tested with WordPress 5.2', 'wp-email-capture' ),
784
- __( 'Fixed a few CSS changes on the option pages.', 'wp-email-capture' ),
785
  ),
786
  );
787
 
788
  $changelog[] = array(
789
- 'version' => __( '3.6.6', 'wp-email-capture' ),
790
  'list' => array(
791
- __( 'Tested up to 5.1', 'wp-email-capture' ),
 
 
792
  ),
793
  );
794
 
795
  $changelog[] = array(
796
- 'version' => __( '3.6.5', 'wp-email-capture' ),
797
  'list' => array(
798
- __( 'Tested with Constant Contact so reflected help screens to mention that.', 'wp-email-capture' ),
799
  ),
800
  );
801
 
802
  $changelog[] = array(
803
- 'version' => __( '3.6.4', 'wp-email-capture' ),
804
  'list' => array(
805
- __( 'Clarified further a couple of options that people were having problems with.', 'wp-email-capture' ),
806
  ),
807
  );
808
 
809
  $changelog[] = array(
810
- 'version' => __( '3.6.3', 'wp-email-capture' ),
811
  'list' => array(
812
- __( 'Some files didn\'t manage to upload. I\'ve now pushed them live.', 'wp-email-capture' ),
813
  ),
814
  );
815
 
816
  $changelog[] = array(
817
- 'version' => __( '3.6.2', 'wp-email-capture' ),
818
  'list' => array(
819
- __( 'Fixed a bug in Gutenberg.', 'wp-email-capture' ),
820
- __( 'Checking for "register_block_type" rather than "the_gutenberg_project" in prep for 5.0', 'wp-email-capture' ),
821
  ),
822
  );
823
 
824
  $changelog[] = array(
825
- 'version' => __( '3.6.1', 'wp-email-capture' ),
826
  'list' => array(
827
- __( 'Added Gutenberg information to the help section.', 'wp-email-capture' ),
828
- __( 'Removed a spelling mistake in one of the URL\'s on the setup form.', 'wp-email-capture' ),
829
  ),
830
  );
831
 
832
  $changelog[] = array(
833
- 'version' => __( '3.6', 'wp-email-capture' ),
834
  'list' => array(
835
- __( 'Fix Gutenberg compatability bug. If you use Gutenberg, you may have to recreate your blocks, hence the version major bump. Otherwise you should be fine.', 'wp-email-capture' ),
 
 
 
 
 
 
 
 
836
  ),
837
  );
838
 
839
 
840
  $changelog[] = array(
841
- 'version' => __( '3.5.4', 'wp-email-capture' ),
842
  'list' => array(
843
- __( 'Added a note should a version of MySQL earlier than 5.6 is shared.', 'wp-email-capture' ),
844
  ),
845
  );
846
 
847
  $changelog[] = array(
848
- 'version' => __( '3.5.3', 'wp-email-capture' ),
849
  'list' => array(
850
- __( 'Fixed a bug that saving with GDPR switched off resulted in a display error (even though it was saved correctly).', 'wp-email-capture' ),
851
  ),
852
  );
853
 
854
  $changelog[] = array(
855
- 'version' => __( '3.5.2', 'wp-email-capture' ),
856
  'list' => array(
857
- __( 'A few cosmetic changes to the help pages. Could use more work but is a bit neater for now.', 'wp-email-capture' ),
858
  ),
859
  );
860
 
861
  $changelog[] = array(
862
- 'version' => __( '3.5.1', 'wp-email-capture' ),
863
  'list' => array(
864
- __( 'Fixed a bug that made the widget for WP Email Capture work.', 'wp-email-capture' ),
865
  ),
866
  );
867
 
868
  $changelog[] = array(
869
- 'version' => __( '3.5', 'wp-email-capture' ),
870
- 'intro' => __( 'This version was released to try and make WP Email Capture more compatible with the GDPR legislation.', 'wp-email-capture' ),
871
  'list' => array(
872
- __( 'Integration with WordPress GDPR checker.', 'wp-email-capture' ),
873
- __( 'You can have a checkbox on your forms, explicitly giving consent to users to sign up to your newsletter.', 'wp-email-capture' ),
874
- __( 'You can delete data after a period of time on the site.', 'wp-email-capture' ),
875
- __( 'You can search the database, allowing you to see and delete what data you have for people', 'wp-email-capture' ),
876
- __( 'Improved the changelog routine, allowing it to be updated more frequently.', 'wp-email-capture' ),
877
  ),
878
  );
879
 
880
  $changelog[] = array(
881
- 'version' => __( '3.4.2', 'wp-email-capture' ),
882
  'list' => array(
883
- __( 'Introduced "wp_email_capture_is_premium" function, to make further development easier.', 'wp-email-capture' ),
884
- __( 'Fixed a bug from Gutenberg 3.4 that called a undefined variable (blocks.source.children & blocks.source.attr).', 'wp-email-capture' ),
885
- __( 'Switched from wp.blocks.InspectorControls.TextControl to wp.components.TextControl.', 'wp-email-capture' ),
886
  ),
887
  );
888
 
889
  $changelog[] = array(
890
- 'version' => __( '3.4.1', 'wp-email-capture' ),
891
  'list' => array(
892
- __( 'Fixes a fatal error', 'wp-email-capture' ),
893
  ),
894
  );
895
 
896
  $changelog[] = array(
897
- 'version' => __( '3.4', 'wp-email-capture' ),
898
- 'intro' => __( 'This version introduced compatability with Gutenberg.', 'wp-email-capture' ),
899
  'list' => array(
900
- __( 'Added Default Styles should you wish to activate them.', 'wp-email-capture' ),
901
- __( 'Gutenberg Compatibility!', 'wp-email-capture' ),
902
  ),
903
  );
904
 
905
  $changelog[] = array(
906
- 'version' => __( '3.3.4', 'wp-email-capture' ),
907
  'list' => array(
908
- __( 'Fix a few dead links in the plugin', 'wp-email-capture' ),
909
  ),
910
  );
911
 
912
  $changelog[] = array(
913
- 'version' => __( '3.3.3', 'wp-email-capture' ),
914
  'list' => array(
915
- __( 'Fix bug in header on export (props Ov3rfly).', 'wp-email-capture' ),
916
- __( 'Tested in 4.9', 'wp-email-capture' ),
917
  ),
918
  );
919
 
920
  $changelog[] = array(
921
- 'version' => __( '3.3.2', 'wp-email-capture' ),
922
  'list' => array(
923
- __( 'Make it compatible with 4.8', 'wp-email-capture' ),
924
- __( 'Make the "Buy Link" in WP Email Capture include a coupon', 'wp-email-capture' ),
925
- __( 'Include links to compatible services on the Plugin Dashboard', 'wp-email-capture' ),
926
  ),
927
  );
928
 
929
  $changelog[] = array(
930
- 'version' => __( '3.3.1', 'wp-email-capture' ),
931
  'list' => array(
932
- __( 'Fixes a conflict with other plugins that send HTML emails.', 'wp-email-capture' ),
933
  ),
934
  );
935
 
936
  $changelog[] = array(
937
- 'version' => __( '3.3', 'wp-email-capture' ),
938
- 'intro' => __( 'This version introduced the ability to have HTML emails in WP Email Capture', 'wp-email-capture' ),
939
  'list' => array(
940
- __( 'Introduced the ability to have "HTML" enabled lists.', 'wp-email-capture' ),
941
- __( 'Introduced the ability to send emails without headers. Useful for Amazon SES.', 'wp-email-capture' ),
942
- __( 'Added a charset on export of CSV. (Props Ov3rfly)', 'wp-email-capture' ),
943
  ),
944
  );
945
 
946
  $changelog[] = array(
947
- 'version' => __( '3.2', 'wp-email-capture' ),
948
  'list' => array(
949
- sprintf( __( 'Correction in the German translation (props <a href="%s" target="_blank">Lars Kasper</a>)', 'wp-email-capture' ), 'http://larskasper.de/' ),
950
- __( 'Added a wp_email_capture_extra_checks action, that will allow people to run checks on the name/email address.', 'wp-email-capture' ),
951
- __( 'Removed some legacy code that was commented out.', 'wp-email-capture' ),
952
- __( 'Fix an encoding issue for new installs, now the tables match the database\'s encoding.', 'wp-email-capture' ),
953
- __( 'Fixed a bug for new installs that had a "The plugin generated XXX characters of unexpected output during activation.".', 'wp-email-capture' ),
954
  ),
955
  );
956
 
957
  $changelog[] = array(
958
- 'version' => __( '3.1.4', 'wp-email-capture' ),
959
  'list' => array(
960
- __( 'Fixed a bug that caused an "Unexpected Output" on some database setups.', 'wp-email-capture' ),
961
- __( 'Used UNIQUE KEY rather than PRIMARY KEY, so activation and deactivation doesn\'t cause database errors.', 'wp-email-capture' ),
962
  ),
963
  );
964
 
965
  $changelog[] = array(
966
- 'version' => __( '3.1.3', 'wp-email-capture' ),
967
  'list' => array(
968
- __( 'Added wp_email_capture_complete_before_redirect action. Allowing data to be manipulated before the redirect.', 'wp-email-capture' ),
969
- __( 'Added Extensions area of dashboard.', 'wp-email-capture' ),
970
  ),
971
  );
972
 
973
  $changelog[] = array(
974
- 'version' => __( '3.1.2', 'wp-email-capture' ),
975
  'list' => array(
976
- __( 'Reward linkers with a voucher code.', 'wp-email-capture' ),
977
- __( 'Included the "Last Temporary Signup" date, so they get know the last attempted signup.', 'wp-email-capture' ),
978
- __( 'Tested up to 4.5.', 'wp-email-capture' ),
979
  ),
980
  );
981
 
982
  $changelog[] = array(
983
- 'version' => __( '3.1.1', 'wp-email-capture' ),
984
  'list' => array(
985
- __( 'Removed a redundant file that, if hacked in, could lead to an injection of content. This file was *not* called normally but in order to remove it upgrade to this version. <strong>Update strongly required</strong>', 'wp-email-capture' ),
986
- __( 'Fixed a bug which saw a notice appear of a missing option on the upgrade and dashboard page.', 'wp-email-capture' ),
987
- __( 'Removed a double header in Dashboard widget (props Ove3rfly).', 'wp-email-capture' ),
988
- __( 'Correct textdomain used in some files (props Ov3rfly).', 'wp-email-capture' ),
989
- __( 'Removed all PHP closing tags through the site (props Ov3rfly).', 'wp-email-capture' ),
990
  ),
991
  );
992
 
993
  $changelog[] = array(
994
- 'version' => __( '3.1', 'wp-email-capture' ),
995
  'list' => array(
996
- sprintf( __( 'Removed the default widget title should widget text be blank (props <a href="%s" target="_blank">Hassan Raza</a>)', 'wp-email-capture' ), 'http://hassan-raza.com/' ),
997
- __( 'Changed word from "Update" to "Upgrade" for large lists as it was confusing people.', 'wp-email-capture' ),
998
- __( 'Changed to new Text Domain as per WordPress new internationalisation integration (wp-email-capture).', 'wp-email-capture' ),
999
  ),
1000
  );
1001
 
1002
  $changelog[] = array(
1003
- 'version' => __( '3.0', 'wp-email-capture' ),
1004
- 'title' => __( 'Code Factorisation', 'wp-email-capture' ),
1005
- 'intro' => __( 'Version 3.0 introduces a completely rewritten back end, making it faster for the average user, and allowing extensions to be added to the plugin.', 'wp-email-capture' ),
1006
  );
1007
 
1008
  return $changelog;
1009
-
1010
  }
4
  * Set up the WP Email Capture Menus
5
  * @return void
6
  */
7
+ function wp_email_capture_menus()
8
+ {
9
  $avatar = WP_EMAIL_CAPTURE_URL . '/images/wpemailcapture-dashicon.png';
10
  //add_options_page( __( 'WP Email Capture Options', 'wp-email-capture' ), 'WP Email Capture', 'activate_plugins', 'wpemailcaptureoptions', 'wp_email_capture_options' );
11
+ add_menu_page(__('WP Email Capture'), __('WP Email Capture', 'wp-email-capture'), 'activate_plugins', 'wpemailcapture', 'wp_email_capture_dashboard', $avatar, 85);
12
+ add_submenu_page('wpemailcapture', __('Settings'), __('Settings', 'wp-email-capture'), 'activate_plugins', 'wpemailcapturefreesettings', 'wp_email_capture_free_options');
13
+ add_submenu_page('wpemailcapture', __('Help'), __('Help', 'wp-email-capture'), 'activate_plugins', 'wpemailcapturefreehelp', 'wp_email_capture_free_help');
14
  }
15
 
16
 
20
  * @todo Build this
21
  * @return void
22
  */
23
+ function wp_email_capture_dashboard()
24
+ {
25
 
26
  $extensionstopush = array(
27
  array(
28
+ 'name' => __('WP Email Capture - Moosend Integration', 'WPEC'),
29
+ 'description' => __('Integrate WP Email Capture with <a href="https://www.wpemailcapture.com/recommends/moosend/?utm_source=plugin-dashboard-extensions&utm_medium=plugin&utm_campaign=wpemailcaptur">Moosend</a>'),
30
+ 'price' => '15',
31
+ 'purchaseurl' => 'https://www.wpemailcapture.com/checkout/?edd_action=add_to_cart&download_id=4577&utm_source=plugin-dashboard-extensions&utm_medium=plugin&utm_campaign=wpemailcapture',
32
+ 'infourl' => 'https://www.wpemailcapture.com/downloads/wp-email-capture-moosend-integration/?utm_source=plugin-dashboard-extensions&utm_medium=plugin&utm_campaign=wpemailcapture',
33
+ 'imageurl' => WP_EMAIL_CAPTURE_URL . '/inc/img/moosend-image.png',
34
+ 'slug' => 'wpemailcapturemoosendintegration'
35
+ ),
36
+ array(
37
+ 'name' => __('WP Email Capture - Redirect If Present', 'WPEC'),
38
+ 'description' => __('Redirect signups to the final page, rather than show an error, should they not be present'),
39
  'price' => '20',
40
  'purchaseurl' => 'https://www.wpemailcapture.com/checkout/?edd_action=add_to_cart&download_id=4153&utm_source=plugin-dashboard-extensions&utm_medium=plugin&utm_campaign=wpemailcaptur',
41
  'infourl' => 'https://www.wpemailcapture.com/downloads/wp-email-capture-returning-user-redirect/?utm_source=plugin-dashboard-extensions&utm_medium=plugin&utm_campaign=wpemailcapture',
43
  'slug' => 'wpemailcaptureredirectifpresent'
44
  ),
45
  array(
46
+ 'name' => __('WP Email Capture - Akismet Integration', 'WPEC'),
47
+ 'description' => __('Integrate WP Email Capture with <a href="https://akismet.com/">Akismet</a>'),
48
  'price' => '20',
49
  'purchaseurl' => 'https://www.wpemailcapture.com/checkout/?edd_action=add_to_cart&download_id=2823&utm_source=plugin-dashboard-extensions&utm_medium=plugin&utm_campaign=wpemailcaptur',
50
  'infourl' => 'https://www.wpemailcapture.com/downloads/wp-email-capture-akismet-integration/?utm_source=plugin-dashboard-extensions&utm_medium=plugin&utm_campaign=wpemailcaptur',
51
  'imageurl' => WP_EMAIL_CAPTURE_URL . '/inc/img/akismet-image.gif',
52
  'slug' => 'wpemailcaptureakismetintegration'
53
+ ),
54
  array(
55
+ 'name' => __('WP Email Capture - Drip Integration', 'WPEC'),
56
+ 'description' => __('Integrate WP Email Capture with <a href="https://www.wpemailcapture.com/recommends/drip/?utm_source=plugin-dashboard-extensions&utm_medium=plugin&utm_campaign=wpemailcaptur">Drip</a>'),
57
  'price' => '15',
58
  'purchaseurl' => 'https://www.wpemailcapture.com/checkout/?edd_action=add_to_cart&download_id=2415&utm_source=plugin-dashboard-extensions&utm_medium=plugin&utm_campaign=wpemailcaptur',
59
  'infourl' => 'https://www.wpemailcapture.com/downloads/wp-email-capture-drip-integration/?utm_source=plugin-dashboard-extensions&utm_medium=plugin&utm_campaign=wpemailcapture',
60
  'imageurl' => WP_EMAIL_CAPTURE_URL . '/inc/img/drip-image.png',
61
  'slug' => 'wpemailcapturedripintegration'
62
+ )
63
+ );
64
 
65
  $compatibleservices = array(
66
 
67
  array(
68
  'name' => 'Aweber',
69
  'url' => 'https://www.wpemailcapture.com/recommends/aweber/'
70
+ ),
71
+ array(
72
+ 'name' => 'Moosend',
73
+ 'url' => 'https://www.wpemailcapture.com/recommends/moosend/'
74
+ ),
75
  array(
76
  'name' => 'Constant Contact',
77
  'url' => 'https://www.wpemailcapture.com/recommends/constant-contact/'
78
+ ),
79
 
80
  array(
81
  'name' => 'Mailchimp',
82
  'url' => 'https://www.wpemailcapture.com/recommends/mailchimp/'
83
+ ),
84
 
85
  array(
86
  'name' => 'Madmimi',
87
  'url' => 'https://www.wpemailcapture.com/recommends/madmimi/'
88
+ ),
 
 
 
 
 
 
 
89
 
90
+ );
 
 
91
 
92
+ ?>
93
+ <div class="wrap about-wrap wpec-about-wrap">
 
 
 
94
 
95
+ <h1><?php _e('Welcome to WP Email Capture!', 'wp-email-capture'); ?></h1>
96
 
97
+ <div class="about-text">
98
+ <?php _e('Start collecting email subscribers today!', 'wp-email-capture'); ?><br />
99
+ </div>
 
 
 
 
 
 
 
 
 
 
100
 
101
+ <h2 class="nav-tab-wrapper" id="wpemailcapture-tabs">
102
+ <a class="nav-tab" href="#dashboard" id="dashboard-tab"><?php _e('Dashboard', 'wp-email-capture'); ?></a>
103
+ <a class="nav-tab" href="#changelog" id="changelog-tab"><?php _e('Changelog', 'wp-email-capture'); ?></a>
104
+ <a class="nav-tab" href="#credits" id="credits-tab"><?php _e('Credits', 'wp-email-capture'); ?></a>
105
+ </h2>
106
 
107
+ <?php
108
 
109
+ if (array_key_exists('wpecupgrade', $_GET)) {
110
+ $activedashboard = "";
111
+ $activeupgrade = " active";
112
+ } else {
113
+ $activedashboard = " active";
114
+ $activeupgrade = "";
115
+ }
116
 
117
+ ?>
118
+ <div id="dashboard" class="wpemailcapture-tab <?php echo $activedashboard; ?>">
119
+ <h2><?php _e('Welcome to WP Email Capture', 'wp-email-capture'); ?></h2>
120
 
121
+ <h3><?php _e('New in 3.9 - reCAPTCHA Integration', 'wp-email-capture'); ?></h3>
122
 
123
+ <p><?php _e('Version 3.9 will allow you to protect your blog from spam, using reCAPTCHA integration.', 'wp-email-capture'); ?></p>
124
+ <p><?php _e('Grab a key from Google and use reCAPTCHA v3 to grade your signups, block those that are troublesome, and allowing those that are genuine.', 'wp-email-capture'); ?></p>
 
 
125
 
126
+ <p><a class="non-nav-tab" href="#changelog" id="changelog-tab"><?php _e('Read the changelog', 'wp-email-capture'); ?></a></p>
127
 
128
+ <?php
129
 
130
+ do_action('wp_email_capture_dashboard_premium_upsell');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
131
 
132
+ ?>
 
 
 
133
 
134
+ <h2><?php _e('Extensions', 'wp-email-capture'); ?></h2>
135
+ <table class="extensions">
136
+ <tr>
137
  <?php
138
 
139
  $loop = 0;
140
 
141
+ foreach ($extensionstopush as $extension) {
142
+ $loop++;
143
+ if ($loop > 3) {
144
+ $loop = 0;
 
 
145
  ?>
146
+ </tr>
147
+ <tr>
148
+ <?php
149
+ }
150
+ ?>
151
+ <td align="center">
152
+ <h3><?php echo $extension['name'] ?></h3>
153
+ <img src="<?php echo $extension['imageurl']; ?>">
154
+ <p><?php echo $extension['description']; ?></p>
155
+ <p>
156
+ <a class="button-primary" href="<?php echo $extension['purchaseurl']; ?>"><?php echo "$" . $extension['price'] . ".00"; ?> <?php _e('Buy Now', 'WPEC'); ?></a>
157
+ <a class="button-secondary" href="<?php echo $extension['infourl']; ?>"><?php _e('More Info', 'WPEC'); ?></a>
158
+ </p>
159
+ </td>
160
+ <?php
161
 
162
+ }
163
+ ?>
164
+ </tr>
165
+ </table>
166
 
167
+ <h2><?php _e('Compatible Services', 'wp-email-capture'); ?></h2>
168
+ <p><?php _e('WP Email Capture email lists are compatible with the following marketing services.', 'wp-email-capture'); ?></p>
169
+ <ul>
170
  <?php
171
 
172
+ $loop = 0;
173
 
174
+ foreach ($compatibleservices as $service) {
175
+ ?>
176
+ <li><a href="<?php echo $service['url']; ?>?utm_source=plugin-dashboard-compatibleservices&utm_medium=plugin&utm_campaign=wpemailcapture"><?php echo $service['name']; ?></a></li>
177
+ <?php
178
 
179
+ }
180
+ ?>
181
+ </ul>
182
 
183
+ </div>
184
 
185
+ <div id="changelog" class="wpemailcapture-tab <?php echo $activeupgrade; ?>">
186
+ <h2><?php _e('Changelog', 'wp-email-capture'); ?></h2>
187
 
188
+ <?php
189
 
190
+ $changelog = wp_email_capture_get_changelog_array();
191
 
192
+ if (!empty($changelog)) {
193
 
194
+ foreach ($changelog as $version) {
195
 
196
+ $title = "";
197
 
198
+ if (array_key_exists('version', $version)) {
199
 
200
+ $title .= sprintf(__('Version %s', 'wp-email-capture'), $version['version']);
201
+ }
202
 
203
+ if (array_key_exists('title', $version)) {
204
 
205
+ $title .= " - " . $version['title'];
206
+ }
207
 
208
+ if ($title) {
209
 
210
+ echo '<h3>' . $title . '</h3>';
211
+ }
212
 
213
+ if (array_key_exists('intro', $version)) {
214
 
215
+ echo '<p>' . $version['intro'] . '</p>';
216
+ }
217
 
218
+ if (array_key_exists('list', $version)) {
219
 
220
+ echo '<ul>';
221
 
222
+ foreach ($version['list'] as $listitem) {
223
 
224
+ echo '<li>' . $listitem . '</li>';
225
  }
226
+
227
+ echo '</ul>';
228
  }
229
  }
230
+ }
231
+ ?>
232
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
233
  </div>
 
234
 
235
+ <div id="credits" class="wpemailcapture-tab">
236
+ <h2><?php _e('Credits', 'wp-email-capture'); ?></h2>
237
+ <p><?php _e('This plugin has been helped and improved by the following people', 'wp-email-capture'); ?></p>
238
+ <ul>
239
+ <li><?php echo sprintf(__('<strong>3.1:</strong> <a href="%s" target="_blank">Hassan Raza</a>', 'wp-email-capture'), 'http://hassan-raza.com/'); ?></li>
240
+ </ul>
241
+ <h3><?php _e('Translations', 'wp-email-capture'); ?></h3>
242
+ <ul>
243
+ <li><?php echo sprintf(__('<strong>French Translation:</strong> <a href="%s" target="_blank">Olivier</a> & <a href="%s" target="_blank">Andrew Patton</a> <a href="%s" target="_blank">(@andpatton)</a>.', 'wp-email-capture'), 'http://www.ticket-system.net/', 'http://www.acusti.ca/', 'http://twitter.com/andpatton'); ?></li>
244
+ <li><?php echo sprintf(__('<strong>German Translation:</strong> <a href="%s" target="_blank">Stephan</a>, <a href="%s" target="_blank">Marc Nilius</a> <a href="%s" target="_blank">(@libertello)</a>, Ov3rFly &amp; <a href="%s">Lars Kasper</a>', 'wp-email-capture'), 'http://www.computersniffer.com/', 'http://www.libertello.de/', 'http://twitter.com/libertello', 'http://larskasper.de/'); ?></li>
245
+ <li><?php echo sprintf(__('<strong>Brazilian Portugese Translation:</strong> <a href="%s" target="_blank">Nick Lima</a> <a href="%s" target="_blank">(@nick_linux)</a>', 'wp-email-capture'), 'http://www.nicklima.com.br', 'http://twitter.com/nick_linux'); ?></li>
246
+ <li><?php echo sprintf(__('<strong>Dutch Translation:</strong> <a href="%s" target="_blank">Sander</a>', 'wp-email-capture'), 'http://www.zanderz.net/'); ?></li>
247
+ <li><?php echo sprintf(__('<strong>Hungarian Translation:</strong> <a href="%s" target="_blank">Surbma</a>', 'wp-email-capture'), 'http://surbma.hu/'); ?></li>
248
+ <li><?php echo sprintf(__('<strong>Spanish Translation:</strong> <a href="%s" target="_blank">David Bravo</a>', 'wp-email-capture'), 'http://dimensionmultimedia.com'); ?></li>
249
+ <li><?php echo sprintf(__('<strong>Italian Translation:</strong> <a href="%s" target="_blank">Giuseppe Marino</a>', 'wp-email-capture'), 'http://it.gravatar.com/gpmarino'); ?></li>
250
+ <li><?php echo sprintf(__('<strong>Serbian Translation:</strong> <a href="%s" target="_blank">Borisa Djuraskovic</a>', 'wp-email-capture'), 'http://www.webhostinghub.com/'); ?></li>
251
+ <li><?php echo sprintf(__('<strong>Croatian Translation:</strong> <a href="%s" target="_blank">Lem Treursić</a>', 'wp-email-capture'), 'http://grafika-dizajn.com/'); ?></li>
252
+ </ul>
253
+ <h3><?php _e('Contribute?', 'wp-email-capture'); ?></h3>
254
+ <h4><?php echo sprintf(__('If you want to help, you can contribute a fix or report a bug on our <a href="%s" target="_blank">Github</a>', 'wp-email-capture'), 'https://github.com/rhyswynne/wp-email-capture'); ?></h4>
255
+ </div>
256
+ </div>
257
+ <?php
258
+
259
+ }
260
 
261
 
262
  /**
264
  *
265
  * @return void
266
  */
267
+ function wp_email_capture_free_options()
268
+ {
269
 
270
  echo '<div class="wrap">
271
  <div style="width:70%;float:left;clear:both;" class="postbox-container">
272
  <div class="metabox-holder"><div class="meta-box-sortables">
273
+ <h2>' . __('WP Email Capture Options', 'wp-email-capture') . '</h2>
274
+ <h3>' . __('Options', 'wp-email-capture') . '</h3>';
275
 
276
+ ?>
277
 
278
+ <?php settings_errors(); ?>
279
 
280
+ <form method="post" action="options.php">
281
 
282
+ <?php wp_nonce_field('update-options'); ?>
283
 
284
+ <?php settings_fields('wp-email-capture-group'); ?>
285
 
286
+ <table class="form-table">
287
 
288
+ <tbody>
289
 
290
+ <tr valign="top">
291
 
292
+ <th scope="row" style="width:400px"><?php _e('Subscription Page URL (full web address ie: http://www.domain.com/this-page/)', 'wp-email-capture'); ?></th>
293
 
294
+ <td><input type="text" name="wp_email_capture_signup" class="regular-text code" value="<?php echo get_option('wp_email_capture_signup'); ?>" /></td>
295
 
296
+ </tr>
297
 
298
+ <tr valign="top">
299
 
300
+ <th scope="row" style="width:400px"><label for="wp_email_capture_redirection"><?php _e('Confirmation Page URL (full web address ie: http://www.domain.com/this-other-page/)', 'wp-email-capture'); ?></label></th>
301
 
302
+ <td><input type="text" name="wp_email_capture_redirection" class="regular-text code" value="<?php echo get_option('wp_email_capture_redirection'); ?>" /></td>
303
 
304
+ </tr>
305
 
306
+ <tr valign="top">
307
 
308
+ <th scope="row" style="width:400px"><label for="wp_email_capture_from"><?php _e('From Which Email Address', 'wp-email-capture'); ?></label></th>
309
 
310
+ <td><input type="text" name="wp_email_capture_from" class="regular-text code" value="<?php echo get_option('wp_email_capture_from'); ?>" /></td>
311
 
312
+ </tr>
313
 
314
+ <tr valign="top">
315
 
316
+ <th scope="row" style="width:400px"><label for="wp_email_capture_from_name"><?php _e('From Which Name', 'wp-email-capture'); ?></label></th>
317
 
318
+ <td><input type="text" name="wp_email_capture_from_name" class="regular-text code" value="<?php echo get_option('wp_email_capture_from_name'); ?>" /></td>
319
 
320
+ </tr>
321
 
322
+ <tr valign="top">
323
 
324
+ <th scope="row" style="width:400px"><?php _e('Subject of Email', 'wp-email-capture'); ?></th>
325
 
326
+ <td><input type="text" name="wp_email_capture_subject" class="regular-text code" value="<?php echo get_option('wp_email_capture_subject'); ?>" /></td>
327
 
328
+ </tr>
329
 
330
+ <tr valign="top">
331
 
332
+ <th scope="row" style="width:400px"><label for="wp_email_capture_body"><?php _e('Body of Email', 'wp-email-capture'); ?><br>
333
+ <?php _e('(use %NAME% to use the form\'s &quot;Name&quot; field in their welcome email)', 'wp-email-capture'); ?></label>
334
+ </th>
335
 
336
+ <td><textarea name="wp_email_capture_body" style="width: 25em;"><?php echo get_option('wp_email_capture_body'); ?></textarea></td>
337
 
338
+ </tr>
339
 
340
+ <tr valign="top">
341
 
342
+ <th scope="row" style="width:400px"><label><?php _e('Link to us (optional, but appreciated)', 'wp-email-capture'); ?></label></th>
343
 
344
+ <td>
345
+ <input type="checkbox" name="wp_email_capture_link" value="1" <?php checked(get_option('wp_email_capture_link'), 1); ?> id="wp_email_capture_link_checkbox" />
346
+ <?php $prechecked = get_option('wp_email_capture_link') == 1 ? "wp_email_capture_admin_discount_active" : ""; ?>
347
+ </td>
348
 
349
+ </tr>
350
 
351
+ <tr class="wp_email_capture_admin_discount <?php echo $prechecked; ?>">
352
+ <td colspan="2">
353
+ <?php printf(__('Thanks for linking to us! As a thank you, use code <strong>LINK20</strong> to get 20&#37; off <a href="%s">WP Email Capture Premium</a>, or any extension from the <a href="%s">WP Email Capture Shop</a>.', 'wp-email-capture'), 'https://www.wpemailcapture.com/premium/?utm_source=plugin-options&utm_medium=plugin&utm_term=checkedlink&utm_campaign=wpemailcapture', 'https://www.wpemailcapture.com/downloads/?utm_source=plugin-options&utm_medium=plugin&utm_term=checkedlink&utm_campaign=wpemailcapture'); ?>
354
+ </td>
355
+ </tr>
356
 
357
+ <tr valign="top">
358
 
359
+ <th scope="row" style="width:400px"><label><?php _e('Make The "Name" field a required field?', 'wp-email-capture'); ?></label></th>
360
 
361
 
362
 
363
+ <td><input type="checkbox" name="wp_email_capture_name_required" value="1" <?php checked(get_option('wp_email_capture_name_required'), 1); ?> /></td>
364
 
365
+ </tr>
366
 
367
+ <tr valign="top">
368
 
369
+ <th scope="row" style="width:400px"><?php _e('Delimeter (leave blank for a comma)', 'wp-email-capture'); ?></th>
370
 
371
+ <td><input type="text" name="wp_email_capture_name_delimeter" class="regular-text code" value="<?php echo get_option('wp_email_capture_name_delimeter'); ?>" /></td>
372
 
373
+ </tr>
374
 
375
+ <tr valign="top">
376
 
377
+ <th scope="row" style="width:400px"><?php _e('Send HTML email?', 'wp-email-capture'); ?></th>
378
 
379
+ <td><input type="checkbox" name="wp_email_capture_send_email_html" value="1" <?php checked(get_option('wp_email_capture_send_email_html'), 1); ?> /></td>
380
 
381
+ </tr>
382
 
383
+ <tr valign="top">
384
 
385
+ <th scope="row" style="width:400px"><?php _e('Disable Headers', 'wp-email-capture'); ?></th>
386
 
387
+ <td><input type="checkbox" name="wp_email_capture_disabled_headers" value="1" <?php checked(get_option('wp_email_capture_disabled_headers'), 1); ?> /><br />
388
+ <span class="description"><?php _e('If you are having problems with sending emails (such as with Amazon SES), disable this', 'wp-email-capture'); ?></span>
389
+ </td>
390
 
391
+ </tr>
392
 
393
+ <tr valign="top">
394
 
395
+ <th scope="row" style="width:400px"><?php _e('Use Default Styling', 'wp-email-capture'); ?></th>
396
 
397
+ <td><input type="checkbox" name="wp_email_capture_default_styling" value="1" <?php checked(get_option('wp_email_capture_default_styling'), 1); ?> /><br />
398
+ <span class="description"><?php _e('If you want to have some easy styling on your forms, check this box. Otherwise leave it unchecked if your theme already styles forms', 'wp-email-capture'); ?></span>
399
+ </td>
400
 
401
+ </tr>
402
 
403
+ <?php do_action('wp_email_capture_added_free_options'); ?>
404
 
405
+ </tbody>
406
 
407
+ </table>
408
 
409
+ <h2><?php _e('reCAPTCHA Settings', 'wp-email-capture'); ?></h2>
410
 
411
+ <?php _e('We can use <a href="https://www.google.com/recaptcha/about/">reCAPTCHA</a> (v3) for free (<a href="https://www.wpemailcapture.com/downloads/wp-email-capture-akismet-integration/" target="_blank">Akismet is avialable here</a>). Add your keys below.', 'WPEC'); ?>
412
+ <table class="form-table">
413
+ <tbody>
414
 
415
+ <tr valign="top">
416
 
417
+ <th scope="row" style="width:400px"><?php _e('reCAPTCHA Site Key', 'wp-email-capture'); ?></th>
418
 
419
+ <td><input type="text" name="wp_email_capture_recaptcha_client_api_key" class="regular-text code" value="<?php echo get_option('wp_email_capture_recaptcha_client_api_key'); ?>" /></td>
420
 
421
+ </tr>
422
 
423
+ <tr valign="top">
424
 
425
+ <th scope="row" style="width:400px"><?php _e('reCAPTCHA Secret Key', 'wp-email-capture'); ?></th>
426
 
427
+ <td><input type="text" name="wp_email_capture_recaptcha_server_api_key" class="regular-text code" value="<?php echo get_option('wp_email_capture_recaptcha_server_api_key'); ?>" /></td>
428
 
429
+ </tr>
430
+ <?php /*
431
  <tr valign="top">
432
 
433
  <th scope="row" style="width:400px"><?php _e( 'reCAPTCHA Type', 'wp-email-capture' ); ?></th>
441
  <label for="disable">Disable</label>
442
  </td>
443
 
444
+ </tr> */ ?>
445
 
446
 
447
 
448
 
449
+ </tbody>
450
+ </table>
451
 
452
+ <h2><?php _e('GDPR Settings', 'wp-email-capture'); ?></h2>
453
 
454
+ <table class="form-table">
455
 
456
+ <tbody>
457
 
458
+ <tr valign="top">
459
 
460
+ <th scope="row" style="width:400px"><?php _e('Enable GDPR Settings', 'wp-email-capture'); ?></th>
461
+ <td><input type="checkbox" id="wp_email_capture_enable_gdpr" name="wp_email_capture_enable_gdpr" value="1" <?php checked(get_option('wp_email_capture_enable_gdpr'), 1); ?> /><br /><span class="description"><?php _e('If you wish to enable GDPR settings, please check this box.', 'wp-email-capture'); ?></span></td>
462
+ </tr>
463
 
464
+ </tbody>
465
 
466
+ </table>
467
 
468
+ <?php
469
 
470
+ if (get_option('wp_email_capture_enable_gdpr')) {
471
+ $hiddengdpr = '';
472
+ } else {
473
+ $hiddengdpr = 'style="display:none;"';
474
+ }
475
 
476
+ ?>
477
+ <div class="gdpr-table" <?php echo $hiddengdpr; ?>>
478
+ <table class="form-table">
479
 
480
+ <tbody>
481
 
482
+ <tr valign="top">
483
 
484
+ <th scope="row" style="width:400px"><?php _e('How long do you want to keep data on your servers?', 'wp-email-capture'); ?></th>
485
 
486
+ <td>
487
+ <input type="text" name="wp_email_capture_number_for_privacy" id="wp_email_capture_number_for_privacy" class="regular-text code" value="<?php echo get_option('wp_email_capture_number_for_privacy'); ?>" />
488
 
489
+ <select name="wp_email_capture_unit_for_privacy" id="wp_email_capture_unit_for_privacy">
490
+ <option value="days" <?php selected(get_option('wp_email_capture_unit_for_privacy'), 'days'); ?>><?php _e('Days', 'wp-email-capture'); ?></option>
491
+ <option value="weeks" <?php selected(get_option('wp_email_capture_unit_for_privacy'), 'weeks'); ?>><?php _e('Weeks', 'wp-email-capture'); ?></option>
492
+ <option value="months" <?php selected(get_option('wp_email_capture_unit_for_privacy'), 'months'); ?>><?php _e('Months', 'wp-email-capture'); ?></option>
493
+ </select>
494
 
495
+ <br /><span class="description"><?php _e('When visitors submit their email details, the plugin stores users data in the database. You can choose to automatically delete this data after a certain amount of days. Leave blank or "0" to not delete data.', 'wp-email-capture'); ?></span>
496
+ </td>
497
 
498
+ </tr>
499
 
500
+ <tr valign="top">
501
 
502
+ <th scope="row" style="width:400px"><?php _e('Privacy Policy', 'wp-email-capture'); ?></th>
503
 
504
+ <td>
505
 
506
+ <?php
507
 
508
+ $addedstring = "";
509
 
510
+ if (get_option('wp_email_capture_number_for_privacy')) {
511
+ $number = get_option('wp_email_capture_number_for_privacy');
512
+ $unit = get_option('wp_email_capture_unit_for_privacy');
513
+ $addedstring = sprintf(__('We hold this data for a maximum of %s %s, at which point it is deleted.', 'wp-email-capture'), $number, $unit);
514
+ }
515
 
516
+ ?>
517
 
518
+ <p class="notice notice-error save-to-change" style="display:none;"><?php _e('Save the page to update the text in the below box.', 'wp-email-capture'); ?></p>
519
 
520
+ <textarea disabled style="min-width:100%;height:200px;" id="copyrightnotice"><?php _e('We use a WordPress plugin called WP Email Capture to aid management of our email marketing list. Should you wish to subscribe to our newsletter, we collect the following data.', 'wp-email-capture'); ?>
521
 
522
+ <?php _e('Your Name (or what you chose to address yourself as). This is used for simple personalisation purposes.', 'wp-email-capture'); ?>
523
 
524
+ <?php _e('Your Email Address. This is used to contact you and include you in our newsletter.', 'wp-email-capture'); ?>
525
 
526
+ <?php _e('The date of signup. This is so we can reference when to delete your data at a later date.', 'wp-email-capture'); ?>
527
  <?php
528
 
529
+ if ($addedstring && $number && $unit) {
530
  echo $addedstring;
531
  }
532
 
534
 
535
  </textarea>
536
 
537
+ <button class="button-secondary" id="copytext" type="button"><?php _e('Copy Privacy Policy text to clipboard', 'wp-email-capture'); ?></button>
538
+ <br /><span class="description"><?php _e('Copy and paste this text to your Privacy Policy, as this details how WP Email Capture handles data. We try and add this to your Privacy Policy automatically, but if we are unable to do so, we add it here.', 'wp-email-capture'); ?></span>
539
+ </td>
540
 
541
+ </tr>
542
 
543
+ </tbody>
544
 
545
+ </table>
546
+ </div>
547
 
548
+ <input type="hidden" name="action" value="update" />
549
+ <input type="hidden" name="page_options" value="wp_email_capture_redirection,wp_email_capture_from,wp_email_capture_subject,wp_email_capture_signup,wp_email_capture_body,wp_email_capture_from_name,wp_email_capture_link,wp_email_capture_name_required,wp_email_capture_name_delimeter,wp_email_capture_send_email_html,wp_email_capture_disabled_headers,wp_email_capture_enable_gdpr,wp_email_capture_number_of_privacy,wp_email_capture_number_of_privacy" />
550
 
551
+ <p class="submit">
552
 
553
+ <input type="submit" class="button-primary" value="<?php _e('Save Changes', 'wp-email-capture') ?>" />
554
 
555
+ </p>
556
 
557
+ </form>
558
 
559
 
560
 
561
+ <?php
562
 
563
+ wp_email_capture_writetable();
564
 
565
+ echo '<a name="list"></a><h3>' . __('Export', 'wp-email-capture') . '</h3>
566
+ <form name="wp_email_capture_export" action="' . esc_url($_SERVER['REQUEST_URI']) . '#list" method="post">
567
 
568
+ <label>' . __('Use the button below to export your list as a CSV to use in software such as <a href="https://www.wpemailcapture.com/recommends/aweber" title="Email Marketing">Aweber</a> or <a href="https://www.wpemailcapture.com/recommends/constant-contact/">Constant Contact</a>', 'wp-email-capture') . '</label>
569
  <input type="hidden" name="wp_email_capture_export" />
570
  <div class="submit">
571
+ <input type="submit" value="' . __('Export List', 'wp-email-capture') . '" class="button" />
572
  </div>
573
 
574
  </form>';
575
 
576
+ $tempemails = wp_email_capture_count_temp();
577
+ $lastsignupdatestring = wp_email_capture_get_last_singup_date();
578
 
579
+ if ($lastsignupdatestring) {
580
+ $lastsignupdate = date("jS F, Y g:ia", strtotime($lastsignupdatestring));
581
+ $lastsignupdatesentance = __(' The last attempted signup was on ' . $lastsignupdate . '.', 'wp-email-capture');
582
+ } else {
583
+ $lastsignupdatesentance = "";
584
+ }
585
 
586
+ echo "<a name='truncate'></a><h3>" . __('Temporary e-mails', 'wp-email-capture') . "</h3>\n";
587
 
588
+ echo '<form name="wp_email_capture_truncate" action="' . esc_url($_SERVER['REQUEST_URI']) . '#truncate" method="post">';
589
 
590
+ echo '<label>' . __('There are', 'wp-email-capture') . ' ' . $tempemails . __(' e-mail addresses that have been unconfirmed.' . $lastsignupdatesentance . ' Delete them to save space below.', 'wp-email-capture') . '</label>';
591
 
592
+ echo '<input type="hidden" name="wp_email_capture_truncate"/>';
593
 
594
+ echo '<div class="submit"><input type="submit" value="' . __('Delete Unconfirmed e-mail Addresses', 'wp-email-capture') . '" class="button" /></div>';
595
 
596
+ echo "</form>";
597
 
598
+ echo "<a name='emptyallemails'></a><h3>" . __('Delete Current List', 'wp-email-capture') . "</h3>\n";
599
 
600
+ echo '<form name="wp_email_capture_delete" action="' . esc_url($_SERVER['REQUEST_URI']) . '#delete" method="post">';
601
 
602
+ echo '<label>' . __('Want to delete the entire list? Click the link below. <strong>WARNING: </strong> this will delete all confirmed emails, so make sure you have a backup.', 'wp-email-capture') . '</label>';
603
 
604
+ echo '<input type="hidden" name="wp_email_capture_delete"/>';
605
 
606
+ echo '<div class="submit"><input type="submit" value="' . __('Delete Confirmed e-mail Addresses', 'wp-email-capture') . '" class="button" /></div>';
607
 
608
+ echo "</form>";
609
 
610
+ echo '</div></div></div>';
611
 
612
+ wp_email_capture_admin_sidebar("getwpemailcapturepremiumdescription,affiliates,news,supportus");
613
 
614
+ echo '</div>';
615
+ ?>
616
 
617
 
618
+ <?php
619
+ }
620
 
621
 
622
  /**
624
  *
625
  * @return void
626
  */
627
+ function wp_email_capture_options_process()
628
+ { // whitelist options
629
+
630
+ register_setting('wp-email-capture-group', 'wp_email_capture_signup');
631
+ register_setting('wp-email-capture-group', 'wp_email_capture_redirection');
632
+ register_setting('wp-email-capture-group', 'wp_email_capture_from');
633
+ register_setting('wp-email-capture-group', 'wp_email_capture_subject');
634
+ register_setting('wp-email-capture-group', 'wp_email_capture_body');
635
+ register_setting('wp-email-capture-group', 'wp_email_capture_link');
636
+ register_setting('wp-email-capture-group', 'wp_email_capture_from_name');
637
+ register_setting('wp-email-capture-group', 'wp_email_capture_name_required');
638
+ register_setting('wp-email-capture-group', 'wp_email_capture_name_delimeter');
639
+ register_setting('wp-email-capture-group', 'wp_email_capture_send_email_html');
640
+ register_setting('wp-email-capture-group', 'wp_email_capture_disabled_headers');
641
+ register_setting('wp-email-capture-group', 'wp_email_capture_default_styling');
642
+ register_setting('wp-email-capture-group', 'wp_email_capture_enable_gdpr');
643
+ register_setting('wp-email-capture-group', 'wp_email_capture_recaptcha_client_api_key');
644
+ register_setting('wp-email-capture-group', 'wp_email_capture_recaptcha_server_api_key');
645
+ register_setting('wp-email-capture-group', 'wp_email_capture_recaptcha_api_type');
646
+ register_setting('wp-email-capture-group', 'wp_email_capture_unit_for_privacy');
647
+ register_setting('wp-email-capture-group', 'wp_email_capture_number_for_privacy', 'wp_email_capture_check_number_is_a_number');
648
+
649
+ if (isset($_REQUEST['wp_email_capture_export'])) {
650
 
651
  wp_email_capture_export();
 
652
  }
653
 
654
+ if (isset($_REQUEST['wp_email_capture_deleteid'])) {
655
+ $wpemaildeleteid = esc_attr($_POST['wp_email_capture_deleteid']);
656
+ wp_email_capture_deleteid($wpemaildeleteid);
657
  }
658
 
659
 
660
+ if (isset($_REQUEST['wp_email_capture_truncate'])) {
661
 
662
  wp_email_capture_truncate();
 
663
  }
664
 
665
+ if (isset($_REQUEST['wp_email_capture_delete'])) {
666
 
667
  wp_email_capture_delete();
 
668
  }
669
 
670
  /**
671
  * Action to hook into to register any other options.
672
  */
673
+ do_action('wp_email_capture_added_option_process');
 
674
  }
675
 
676
 
679
  *
680
  * @return void
681
  */
682
+ function wp_email_capture_premium_upsell()
683
+ {
684
+ ?>
685
+ <h3><?php _e('Upgrade To WP Email Capture Premium', 'wp-email-capture'); ?></h3>
686
+ <p><?php _e('Thanks for using the free version of WP Email Capture. We\'re incredibly greatful in you using it. Should you wish to upgrade to WP Email Capture Premium, you get a bunch of new features.', 'wp-email-capture'); ?></p>
687
  <ul>
688
+ <li><?php _e('<strong>Stat tracking</strong> - track the visitors to your site and where your sign ups come from.', 'wp-email-capture'); ?></li>
689
+ <li><?php _e('<strong>Autoresponders</strong> - Create an autoresponder email, an email sent to the user when they sign up to your site.', 'wp-email-capture'); ?></li>
690
+ <li><?php _e('<strong>Multiple lists</strong> - Create multiple lists for your site.', 'wp-email-capture'); ?></li>
691
+ <li><?php _e('<strong>Build External Lists</strong> - If you have a Mailchimp or Aweber account, you can use WP Email Capture to build to these services directly.', 'wp-email-capture'); ?></li>
692
+ <li><?php _e('<strong>Custom Fields</strong> - You can capture more than just visitors name & email, add your own custom fields to capture (such as phone number or Address).', 'wp-email-capture'); ?></li>
693
  </ul>
694
+ <p><?php _e('You also get premium support for a whole year!', 'wp-email-capture'); ?></p>
695
+ <a href="https://www.wpemailcapture.com/premium/?utm_source=plugin-dashboard&utm_medium=plugin&utm_campaign=wpemailcapture" target="_blank"><button><?php _e('Click here to buy', 'wp-email-capture'); ?></button></a>
696
+ <?php
697
+ }
698
+ add_action('wp_email_capture_dashboard_premium_upsell', 'wp_email_capture_premium_upsell');
699
 
700
 
701
  /**
704
  * @param string $input Input we are validating to make sure that it is a number.
705
  * @return mixed Validated number if true, false if not.
706
  */
707
+ function wp_email_capture_check_number_is_a_number($input)
708
+ {
709
 
710
  $message = null;
711
  $type = null;
712
 
713
+ if (!is_numeric($input) && "" !== $input) {
714
 
715
+ $message = __('Please make sure that the "How long do you want to keep data on your servers?" option is a number.', 'wp-email-capture');
716
  $type = 'error';
 
717
  }
718
 
719
+ if ($message && 'error' == $type) {
720
+ add_settings_error('wp_email_capture_numeric', 'wp_email_capture_numeric', $message, $type);
721
  return "";
722
  }
723
 
724
  return $input;
 
725
  }
726
 
727
 
732
  *
733
  * @return array An array of changes.
734
  */
735
+ function wp_email_capture_get_changelog_array()
736
+ {
737
 
738
  $changelog = array();
739
 
740
  $changelog[] = array(
741
+ 'version' => __('3.9.3', 'wp-email-capture'),
742
  'list' => array(
743
+ __('Fixed a notice bug in the recaptcha which meant it would not work for certain forms with WP_DEBUG switched on', 'wp-email-capture'),
744
+ __('Tested to 6.0', 'wp-email-capture'),
745
  ),
746
  );
747
 
748
  $changelog[] = array(
749
+ 'version' => __('3.9', 'wp-email-capture'),
750
  'list' => array(
751
+ __('Added Google reCAPTCHA v3 integration', 'wp-email-capture'),
752
+ __('Tested to 5.6', 'wp-email-capture'),
753
  ),
754
  );
755
 
756
  $changelog[] = array(
757
+ 'version' => __('3.8.2', 'wp-email-capture'),
758
  'list' => array(
759
+ __('Tested to 5.5.', 'wp-email-capture'),
760
  ),
761
  );
762
 
763
  $changelog[] = array(
764
+ 'version' => __('3.8.1', 'wp-email-capture'),
765
  'list' => array(
766
+ __('Version with all the missing files from 3.8!', 'wp-email-capture'),
767
  ),
768
  );
769
 
770
  $changelog[] = array(
771
+ 'version' => __('3.8', 'wp-email-capture'),
772
  'list' => array(
773
+ __('Added a new button to the classic editor allowing you to place the form anywhere.', 'wp-email-capture'),
774
  ),
775
  );
776
 
777
  $changelog[] = array(
778
+ 'version' => __('3.7.3', 'wp-email-capture'),
779
  'list' => array(
780
+ __('Fixed a small bug in the site.', 'wp-email-capture'),
781
  ),
782
  );
783
 
784
  $changelog[] = array(
785
+ 'version' => __('3.7.2', 'wp-email-capture'),
786
  'list' => array(
787
+ __('Tested to 5.3.', 'wp-email-capture'),
788
  ),
789
  );
790
 
791
  $changelog[] = array(
792
+ 'version' => __('3.7.1', 'wp-email-capture'),
793
  'list' => array(
794
+ __('Corrected the “Requires at Least” as it was showing as being incompatible in the plugin store (when it is).', 'wp-email-capture'),
 
 
795
  ),
796
  );
797
 
798
  $changelog[] = array(
799
+ 'version' => __('3.7', 'wp-email-capture'),
800
  'list' => array(
801
+ __('Added filter - `wp_email_capture_change_user_present_error_url`, needed for an additional plugin - WP Email Capture: Redirect If Present.', 'wp-email-capture'),
802
+ __('Tested with WordPress 5.2', 'wp-email-capture'),
803
+ __('Fixed a few CSS changes on the option pages.', 'wp-email-capture'),
804
  ),
805
  );
806
 
807
  $changelog[] = array(
808
+ 'version' => __('3.6.6', 'wp-email-capture'),
809
  'list' => array(
810
+ __('Tested up to 5.1', 'wp-email-capture'),
811
  ),
812
  );
813
 
814
  $changelog[] = array(
815
+ 'version' => __('3.6.5', 'wp-email-capture'),
816
  'list' => array(
817
+ __('Tested with Constant Contact so reflected help screens to mention that.', 'wp-email-capture'),
818
  ),
819
  );
820
 
821
  $changelog[] = array(
822
+ 'version' => __('3.6.4', 'wp-email-capture'),
823
  'list' => array(
824
+ __('Clarified further a couple of options that people were having problems with.', 'wp-email-capture'),
825
  ),
826
  );
827
 
828
  $changelog[] = array(
829
+ 'version' => __('3.6.3', 'wp-email-capture'),
830
  'list' => array(
831
+ __('Some files didn\'t manage to upload. I\'ve now pushed them live.', 'wp-email-capture'),
 
832
  ),
833
  );
834
 
835
  $changelog[] = array(
836
+ 'version' => __('3.6.2', 'wp-email-capture'),
837
  'list' => array(
838
+ __('Fixed a bug in Gutenberg.', 'wp-email-capture'),
839
+ __('Checking for "register_block_type" rather than "the_gutenberg_project" in prep for 5.0', 'wp-email-capture'),
840
  ),
841
  );
842
 
843
  $changelog[] = array(
844
+ 'version' => __('3.6.1', 'wp-email-capture'),
845
  'list' => array(
846
+ __('Added Gutenberg information to the help section.', 'wp-email-capture'),
847
+ __('Removed a spelling mistake in one of the URL\'s on the setup form.', 'wp-email-capture'),
848
+ ),
849
+ );
850
+
851
+ $changelog[] = array(
852
+ 'version' => __('3.6', 'wp-email-capture'),
853
+ 'list' => array(
854
+ __('Fix Gutenberg compatability bug. If you use Gutenberg, you may have to recreate your blocks, hence the version major bump. Otherwise you should be fine.', 'wp-email-capture'),
855
  ),
856
  );
857
 
858
 
859
  $changelog[] = array(
860
+ 'version' => __('3.5.4', 'wp-email-capture'),
861
  'list' => array(
862
+ __('Added a note should a version of MySQL earlier than 5.6 is shared.', 'wp-email-capture'),
863
  ),
864
  );
865
 
866
  $changelog[] = array(
867
+ 'version' => __('3.5.3', 'wp-email-capture'),
868
  'list' => array(
869
+ __('Fixed a bug that saving with GDPR switched off resulted in a display error (even though it was saved correctly).', 'wp-email-capture'),
870
  ),
871
  );
872
 
873
  $changelog[] = array(
874
+ 'version' => __('3.5.2', 'wp-email-capture'),
875
  'list' => array(
876
+ __('A few cosmetic changes to the help pages. Could use more work but is a bit neater for now.', 'wp-email-capture'),
877
  ),
878
  );
879
 
880
  $changelog[] = array(
881
+ 'version' => __('3.5.1', 'wp-email-capture'),
882
  'list' => array(
883
+ __('Fixed a bug that made the widget for WP Email Capture work.', 'wp-email-capture'),
884
  ),
885
  );
886
 
887
  $changelog[] = array(
888
+ 'version' => __('3.5', 'wp-email-capture'),
889
+ 'intro' => __('This version was released to try and make WP Email Capture more compatible with the GDPR legislation.', 'wp-email-capture'),
890
  'list' => array(
891
+ __('Integration with WordPress GDPR checker.', 'wp-email-capture'),
892
+ __('You can have a checkbox on your forms, explicitly giving consent to users to sign up to your newsletter.', 'wp-email-capture'),
893
+ __('You can delete data after a period of time on the site.', 'wp-email-capture'),
894
+ __('You can search the database, allowing you to see and delete what data you have for people', 'wp-email-capture'),
895
+ __('Improved the changelog routine, allowing it to be updated more frequently.', 'wp-email-capture'),
896
  ),
897
  );
898
 
899
  $changelog[] = array(
900
+ 'version' => __('3.4.2', 'wp-email-capture'),
901
  'list' => array(
902
+ __('Introduced "wp_email_capture_is_premium" function, to make further development easier.', 'wp-email-capture'),
903
+ __('Fixed a bug from Gutenberg 3.4 that called a undefined variable (blocks.source.children & blocks.source.attr).', 'wp-email-capture'),
904
+ __('Switched from wp.blocks.InspectorControls.TextControl to wp.components.TextControl.', 'wp-email-capture'),
905
  ),
906
  );
907
 
908
  $changelog[] = array(
909
+ 'version' => __('3.4.1', 'wp-email-capture'),
910
  'list' => array(
911
+ __('Fixes a fatal error', 'wp-email-capture'),
912
  ),
913
  );
914
 
915
  $changelog[] = array(
916
+ 'version' => __('3.4', 'wp-email-capture'),
917
+ 'intro' => __('This version introduced compatability with Gutenberg.', 'wp-email-capture'),
918
  'list' => array(
919
+ __('Added Default Styles should you wish to activate them.', 'wp-email-capture'),
920
+ __('Gutenberg Compatibility!', 'wp-email-capture'),
921
  ),
922
  );
923
 
924
  $changelog[] = array(
925
+ 'version' => __('3.3.4', 'wp-email-capture'),
926
  'list' => array(
927
+ __('Fix a few dead links in the plugin', 'wp-email-capture'),
928
  ),
929
  );
930
 
931
  $changelog[] = array(
932
+ 'version' => __('3.3.3', 'wp-email-capture'),
933
  'list' => array(
934
+ __('Fix bug in header on export (props Ov3rfly).', 'wp-email-capture'),
935
+ __('Tested in 4.9', 'wp-email-capture'),
936
  ),
937
  );
938
 
939
  $changelog[] = array(
940
+ 'version' => __('3.3.2', 'wp-email-capture'),
941
  'list' => array(
942
+ __('Make it compatible with 4.8', 'wp-email-capture'),
943
+ __('Make the "Buy Link" in WP Email Capture include a coupon', 'wp-email-capture'),
944
+ __('Include links to compatible services on the Plugin Dashboard', 'wp-email-capture'),
945
  ),
946
  );
947
 
948
  $changelog[] = array(
949
+ 'version' => __('3.3.1', 'wp-email-capture'),
950
  'list' => array(
951
+ __('Fixes a conflict with other plugins that send HTML emails.', 'wp-email-capture'),
952
  ),
953
  );
954
 
955
  $changelog[] = array(
956
+ 'version' => __('3.3', 'wp-email-capture'),
957
+ 'intro' => __('This version introduced the ability to have HTML emails in WP Email Capture', 'wp-email-capture'),
958
  'list' => array(
959
+ __('Introduced the ability to have "HTML" enabled lists.', 'wp-email-capture'),
960
+ __('Introduced the ability to send emails without headers. Useful for Amazon SES.', 'wp-email-capture'),
961
+ __('Added a charset on export of CSV. (Props Ov3rfly)', 'wp-email-capture'),
962
  ),
963
  );
964
 
965
  $changelog[] = array(
966
+ 'version' => __('3.2', 'wp-email-capture'),
967
  'list' => array(
968
+ sprintf(__('Correction in the German translation (props <a href="%s" target="_blank">Lars Kasper</a>)', 'wp-email-capture'), 'http://larskasper.de/'),
969
+ __('Added a wp_email_capture_extra_checks action, that will allow people to run checks on the name/email address.', 'wp-email-capture'),
970
+ __('Removed some legacy code that was commented out.', 'wp-email-capture'),
971
+ __('Fix an encoding issue for new installs, now the tables match the database\'s encoding.', 'wp-email-capture'),
972
+ __('Fixed a bug for new installs that had a "The plugin generated XXX characters of unexpected output during activation.".', 'wp-email-capture'),
973
  ),
974
  );
975
 
976
  $changelog[] = array(
977
+ 'version' => __('3.1.4', 'wp-email-capture'),
978
  'list' => array(
979
+ __('Fixed a bug that caused an "Unexpected Output" on some database setups.', 'wp-email-capture'),
980
+ __('Used UNIQUE KEY rather than PRIMARY KEY, so activation and deactivation doesn\'t cause database errors.', 'wp-email-capture'),
981
  ),
982
  );
983
 
984
  $changelog[] = array(
985
+ 'version' => __('3.1.3', 'wp-email-capture'),
986
  'list' => array(
987
+ __('Added wp_email_capture_complete_before_redirect action. Allowing data to be manipulated before the redirect.', 'wp-email-capture'),
988
+ __('Added Extensions area of dashboard.', 'wp-email-capture'),
989
  ),
990
  );
991
 
992
  $changelog[] = array(
993
+ 'version' => __('3.1.2', 'wp-email-capture'),
994
  'list' => array(
995
+ __('Reward linkers with a voucher code.', 'wp-email-capture'),
996
+ __('Included the "Last Temporary Signup" date, so they get know the last attempted signup.', 'wp-email-capture'),
997
+ __('Tested up to 4.5.', 'wp-email-capture'),
998
  ),
999
  );
1000
 
1001
  $changelog[] = array(
1002
+ 'version' => __('3.1.1', 'wp-email-capture'),
1003
  'list' => array(
1004
+ __('Removed a redundant file that, if hacked in, could lead to an injection of content. This file was *not* called normally but in order to remove it upgrade to this version. <strong>Update strongly required</strong>', 'wp-email-capture'),
1005
+ __('Fixed a bug which saw a notice appear of a missing option on the upgrade and dashboard page.', 'wp-email-capture'),
1006
+ __('Removed a double header in Dashboard widget (props Ove3rfly).', 'wp-email-capture'),
1007
+ __('Correct textdomain used in some files (props Ov3rfly).', 'wp-email-capture'),
1008
+ __('Removed all PHP closing tags through the site (props Ov3rfly).', 'wp-email-capture'),
1009
  ),
1010
  );
1011
 
1012
  $changelog[] = array(
1013
+ 'version' => __('3.1', 'wp-email-capture'),
1014
  'list' => array(
1015
+ sprintf(__('Removed the default widget title should widget text be blank (props <a href="%s" target="_blank">Hassan Raza</a>)', 'wp-email-capture'), 'http://hassan-raza.com/'),
1016
+ __('Changed word from "Update" to "Upgrade" for large lists as it was confusing people.', 'wp-email-capture'),
1017
+ __('Changed to new Text Domain as per WordPress new internationalisation integration (wp-email-capture).', 'wp-email-capture'),
1018
  ),
1019
  );
1020
 
1021
  $changelog[] = array(
1022
+ 'version' => __('3.0', 'wp-email-capture'),
1023
+ 'title' => __('Code Factorisation', 'wp-email-capture'),
1024
+ 'intro' => __('Version 3.0 introduces a completely rewritten back end, making it faster for the average user, and allowing extensions to be added to the plugin.', 'wp-email-capture'),
1025
  );
1026
 
1027
  return $changelog;
 
1028
  }
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
  === WordPress Email Marketing Plugin - WP Email Capture ===
2
  Tags: email marketing, email, mailing list, widget ready, gutenberg ready, gdpr
3
  Requires at least: 5.0
4
- Tested up to: 5.9
5
- Version: 3.9.2
6
- Stable tag: 3.9.2
7
  Contributors: rhyswynne
8
  Donate link: https://www.wpemailcapture.com/premium/?utm_source=donatelink&utm_medium=wordpressorgreadme&utm_campaign=wpemailcapture
9
 
@@ -157,14 +157,19 @@ This plugin does use widgets, so probably yes :)
157
  = How do I include the name in my emails I send to people? =
158
  Wherever you put in %NAME% (spelt exactly like that, uppercase as well), it will be replaced with the name given by the user.
159
 
160
- == Change Log ==
161
- = 3.9.2 =
162
- * Tested with 5.9
163
- * Fix a bug that reCAPTCHA wasn't working for particular forms as we load jQuery late.
164
- * Updated the main block to use more Gutenberg calls
165
-
166
- = 3.9.1 =
167
- * Tested with 5.7
 
 
 
 
 
168
 
169
  = 3.9 =
170
  * Added the ability to spam check using reCAPTCHA
1
  === WordPress Email Marketing Plugin - WP Email Capture ===
2
  Tags: email marketing, email, mailing list, widget ready, gutenberg ready, gdpr
3
  Requires at least: 5.0
4
+ Tested up to: 6.0
5
+ Version: 3.9.3
6
+ Stable tag: 3.9.3
7
  Contributors: rhyswynne
8
  Donate link: https://www.wpemailcapture.com/premium/?utm_source=donatelink&utm_medium=wordpressorgreadme&utm_campaign=wpemailcapture
9
 
157
  = How do I include the name in my emails I send to people? =
158
  Wherever you put in %NAME% (spelt exactly like that, uppercase as well), it will be replaced with the name given by the user.
159
 
160
+ == Change Log ==
161
+ = 3.9.3 =
162
+ * Tested with 6.0
163
+ * Made compatible with Moosend
164
+ * Fixed a notice bug in the recaptcha which meant it would not work for certain forms with WP_DEBUG switched on
165
+
166
+ = 3.9.2 =
167
+ * Tested with 5.9
168
+ * Fix a bug that reCAPTCHA wasn't working for particular forms as we load jQuery late.
169
+ * Updated the main block to use more Gutenberg calls
170
+
171
+ = 3.9.1 =
172
+ * Tested with 5.7
173
 
174
  = 3.9 =
175
  * Added the ability to spam check using reCAPTCHA
wp-email-capture.php CHANGED
@@ -4,7 +4,7 @@
4
  Plugin Name: WP Email Capture
5
  Plugin URI: https://www.wpemailcapture.com/?utm_source=plugin-link&utm_medium=plugin&utm_campaign=wpemailcapture
6
  Description: Captures email addresses for insertion into software such as <a href="https://www.wpemailcapture.com/recommends/aweber" title="Email Marketing">Aweber</a>, <a href="https://www.wpemailcapture.com/recommends/constant-contact/">Constant Contact</a> or <a href="https://www.wpemailcapture.com/recommends/mailchimp/">Mailchimp</a>
7
- Version: 3.9.2
8
  Author: Winwar Media
9
  Author URI: https://www.winwar.co.uk/?utm_source=author-link&utm_medium=plugin&utm_campaign=wpemailcapture
10
  */
@@ -19,7 +19,7 @@ define( 'WP_EMAIL_CAPTURE_PATH', dirname( __FILE__ ) );
19
  define( 'WP_EMAIL_CAPTURE_URL', plugins_url( '', __FILE__ ) );
20
  define( 'WP_EMAIL_CAPTURE_TEMP_MEMBERS_TABLE', $wpdb->prefix . 'wp_email_capture_temp_members' );
21
  define( 'WP_EMAIL_CAPTURE_REGISTERED_MEMBERS_TABLE', $wpdb->prefix . 'wp_email_capture_registered_members' );
22
- define( 'WP_EMAIL_CAPTURE_VERSION', '3.9.2' );
23
  define( 'WP_EMAIL_MIN_MYSQL_VERSION', '5.6' );
24
 
25
  require_once WP_EMAIL_CAPTURE_PATH . '/inc/core.php';
4
  Plugin Name: WP Email Capture
5
  Plugin URI: https://www.wpemailcapture.com/?utm_source=plugin-link&utm_medium=plugin&utm_campaign=wpemailcapture
6
  Description: Captures email addresses for insertion into software such as <a href="https://www.wpemailcapture.com/recommends/aweber" title="Email Marketing">Aweber</a>, <a href="https://www.wpemailcapture.com/recommends/constant-contact/">Constant Contact</a> or <a href="https://www.wpemailcapture.com/recommends/mailchimp/">Mailchimp</a>
7
+ Version: 3.9.3
8
  Author: Winwar Media
9
  Author URI: https://www.winwar.co.uk/?utm_source=author-link&utm_medium=plugin&utm_campaign=wpemailcapture
10
  */
19
  define( 'WP_EMAIL_CAPTURE_URL', plugins_url( '', __FILE__ ) );
20
  define( 'WP_EMAIL_CAPTURE_TEMP_MEMBERS_TABLE', $wpdb->prefix . 'wp_email_capture_temp_members' );
21
  define( 'WP_EMAIL_CAPTURE_REGISTERED_MEMBERS_TABLE', $wpdb->prefix . 'wp_email_capture_registered_members' );
22
+ define( 'WP_EMAIL_CAPTURE_VERSION', '3.9.3' );
23
  define( 'WP_EMAIL_MIN_MYSQL_VERSION', '5.6' );
24
 
25
  require_once WP_EMAIL_CAPTURE_PATH . '/inc/core.php';