WordPress Email Marketing Plugin – WP Email Capture - Version 3.8.1

Version Description

  • Version with all the missing files from 3.8!
Download this release

Release Info

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

Code changes from version 3.0.1 to 3.8.1

Files changed (51) hide show
  1. inc/admin-sidebar.php +130 -131
  2. inc/core.php +9 -2
  3. inc/css/wp-email-capture-admin-styles.css +45 -0
  4. inc/css/wp-email-capture-default-styles.css +37 -0
  5. inc/css/wp-email-capture-gutenberg-styles.css +10 -0
  6. inc/dashboard.php +26 -26
  7. inc/deprecated/pagedresults.php +3 -3
  8. inc/display.php +18 -18
  9. inc/enqueue.php +9 -6
  10. inc/exportcsv.php +7 -10
  11. inc/functions.php +281 -10
  12. inc/gdpr.php +402 -0
  13. inc/gutenberg.php +25 -0
  14. inc/help.php +103 -36
  15. inc/img/akismet-image.gif +0 -0
  16. inc/img/drip-image.png +0 -0
  17. inc/img/redirect-if-present.png +0 -0
  18. inc/img/wpemailcapture-avatar.png +0 -0
  19. inc/install.php +37 -39
  20. inc/js/admin-custom.js +60 -9
  21. inc/js/block.js +82 -0
  22. inc/js/wp_email_capture_button.js +15 -0
  23. inc/options.php +776 -212
  24. inc/process.php +94 -24
  25. inc/security.php +1 -5
  26. inc/tabledata.php +32 -14
  27. inc/tempdata.php +1 -3
  28. inc/tinymce.php +37 -0
  29. inc/tracking.php +1 -1
  30. inc/widget.php +13 -12
  31. languages/{WPEC-de_DE.mo → wp-email-capture-de_DE.mo} +0 -0
  32. languages/{WPEC-de_DE.po → wp-email-capture-de_DE.po} +2 -3
  33. languages/{WPEC-es_ES.mo → wp-email-capture-es_ES.mo} +0 -0
  34. languages/{WPEC-es_ES.po → wp-email-capture-es_ES.po} +0 -0
  35. languages/{WPEC-fr_FR.mo → wp-email-capture-fr_FR.mo} +0 -0
  36. languages/{WPEC-fr_FR.po → wp-email-capture-fr_FR.po} +0 -0
  37. languages/{WPEC-hr.mo → wp-email-capture-hr.mo} +0 -0
  38. languages/{WPEC-hr.po → wp-email-capture-hr.po} +0 -0
  39. languages/{WPEC-hu_HU.mo → wp-email-capture-hu_HU.mo} +0 -0
  40. languages/{WPEC-hu_HU.po → wp-email-capture-hu_HU.po} +0 -0
  41. languages/{WPEC-it_IT.mo → wp-email-capture-it_IT.mo} +0 -0
  42. languages/{WPEC-it_IT.po → wp-email-capture-it_IT.po} +0 -0
  43. languages/{WPEC-nl_NL.mo → wp-email-capture-nl_NL.mo} +0 -0
  44. languages/{WPEC-nl_NL.po → wp-email-capture-nl_NL.po} +0 -0
  45. languages/{WPEC-pt_BR.mo → wp-email-capture-pt_BR.mo} +0 -0
  46. languages/{WPEC-pt_BR.po → wp-email-capture-pt_BR.po} +0 -0
  47. languages/{WPEC-sr_RS.mo → wp-email-capture-sr_RS.mo} +0 -0
  48. languages/{WPEC-sr_RS.po → wp-email-capture-sr_RS.po} +0 -0
  49. readme.md +424 -0
  50. readme.txt +148 -21
  51. wp-email-capture.php +47 -30
inc/admin-sidebar.php CHANGED
@@ -7,136 +7,135 @@
7
  * @return void
8
  */
9
  function wp_email_capture_admin_sidebar( $sidestring ) {
10
- $sidebararray = explode( ',', $sidestring );
11
-
12
- echo '<div class="postbox-container" style="width:24%;padding-left:10px;float:left;"><div class="metabox-holder"><div class="meta-box-sortables">';
13
-
14
- foreach ( $sidebararray as $widgettitle ) {
15
- echo "<div id='wpemailcapture_premium". $widgettitle . "' class='postbox'>";
16
- switch ( $widgettitle ) {
17
-
18
- case 'support':
19
- echo '<h3 class="hndle"><span>'.__( 'Need Help?', 'wp-email-capture' ).'</span></h3>
20
- <div class="inside">
21
- <p>'.__( 'If you are having problems with this plugin, please read the', 'wp-email-capture' ).' <a href="http://wpemailcapture.com/free-plugin/frequently-asked-questions/?utm_source=admin-sidebar&utm_medium=plugin&utm_campaign=wpemailcapture">'.__( 'Frequently Asked Questions', 'wp-email-capture' ).'</a>, '.__( 'or alternatively', 'wp-email-capture' ).' <a href="http://wpemailcapture.com/support/?utm_source=admin-sidebar&utm_medium=plugin&utm_campaign=wpemailcapture">'.__( 'submit a support request here', 'wp-email-capture' ).'</a>.</p>
22
- </div>';
23
- break;
24
-
25
- case 'affiliates':
26
- echo '<h3 class="hndle"><span>'.__( 'Recommended Services', 'wp-email-capture' ).'</span></h3>
27
- <div class="inside">
28
- <p>'.__( 'We recommend the following services for sending out emails:-', 'wp-email-capture' ).'</p>
29
- <ul>
30
- <li><strong><a href="http://wpemailcapture.com/recommends/aweber">Aweber</a></strong></li>
31
- <li><strong><a href="http://wpemailcapture.com/recommends/mailchimp">MailChimp</a></strong></li>
32
- <li><strong><a href="http://wpemailcapture.com/recommends/madmimi">MadMimi</a></strong></li>
33
- </ul>
34
- </div>';
35
- break;
36
-
37
- case 'globaldescription':
38
- echo '<h3 class="hndle"><span>'.__( 'Global List Management', 'wp-email-capture' ).'</span></h3>
39
- <div class="inside">
40
- <p>'.__( 'This page allows you to create lists, either', 'wp-email-capture' ).' <strong>'.__( 'external lists', 'wp-email-capture' ).'</strong> '.__( '(WP Email Capture is compatible with most major email marketing software packages), or a new', 'wp-email-capture' ).' <strong>'.__( 'WP Email Capture List', 'wp-email-capture' ).'</strong>.' .__( 'You can create as many different lists as you wish', 'wp-email-capture' ).'.</p>
41
- </div>';
42
- break;
43
-
44
- case 'listdescriptionpremium':
45
- echo '<h3 class="hndle"><span>' .__( 'Add/Edit WP Email Capture List', 'wp-email-capture' ).'</span></h3>
46
- <div class="inside">
47
- <p>' .__( 'This is the page for managing WP Email Capture Lists. From this page you can:-', 'wp-email-capture' ).'</p>
48
- <ul>
49
- <li><strong>' .__( 'Make Changes To Your Lists', 'wp-email-capture' ).'</strong> - ' .__( 'such as the name and the pages redirected to on form completion', 'wp-email-capture' ).'.</li>
50
- <li><strong>' .__( 'Email Options', 'wp-email-capture' ).'</strong> - ' .__( 'such as where the email comes from and what emails sent to the subscriber contains', 'wp-email-capture' ).'.</li>
51
- <li><strong>' .__( 'Error Options', 'wp-email-capture' ).'</strong> - ' .__( 'the errors that are displayed to subscribers who incorrectly fill in the form', 'wp-email-capture' ).'.</li>
52
- <li><strong>' .__( 'Styling Options', 'wp-email-capture' ).'</strong> - ' .__( 'change the button image (or use an image), as well as what to ask the user for besides their name', 'wp-email-capture' ).'.</li>
53
- </ul>' .
54
- __( 'You can also on this page do the following', 'wp-email-capture' ). ':-' .
55
- '<ul>
56
- <li>'.__( 'Manage List Subscribers', 'wp-email-capture' ).'</li>
57
- <li>'.__( 'Delete Temporary Emails', 'wp-email-capture' ).'</li>
58
- <li>'.__( 'Empty the entire list', 'wp-email-capture' ).'</li>
59
- </ul>
60
- </div>';
61
- break;
62
-
63
- case 'getwpemailcapturepremiumdescription':
64
-
65
- $link = get_option( 'wp_email_capture_theme_affiliate_link' );
66
-
67
- if ( !$link ) {
68
-
69
- $link = "http://wpemailcapture.com/premium/?utm_source=plugin&utm_medium=banner&utm_term=2point5&utm_campaign=internalbanner";
70
-
71
- }
72
- echo '<h3 class="hndle"><span>'.__( 'Get WP Email Capture Premium', 'wp-email-capture' ).'</span></h3>
73
- <div class="inside">
74
- <p>'.__( 'Unlock the <strong>true</strong> power of WP Email Capture with the Premium version. With multiple lists, and stat tracking, WP Email Capture Premium is the missing link in your WordPress Email Marketing Puzzle', 'wp-email-capture' ).'.</p>
75
- <p style="text-align:center;"><a href="'.$link.'"><img src="'. plugins_url( 'images/WP-EC-262-x-218.png' , dirname(__FILE__) ).'" alt="WP Email Capture" style="width:100%;"></a></p>
76
- </div>';
77
- break;
78
-
79
- case 'exlistdescriptionpremium':
80
- echo '<h3 class="hndle"><span>'.__( 'Add/Edit External List', 'wp-email-capture' ).'</span></h3>
81
- <div class="inside">
82
- <p>'.__( 'This is the page for managing External lists through WP Email Capture. Simply copy & paste the code from your Email Marketing software into the page below and you can embed your newsletter subscriptions into posts, pages or sidebars easily using WP Email Capture. If you do not have an Email Marketing Service, a few are recommended below', 'wp-email-capture' ).'.</p>
83
- </div>';
84
- break;
85
-
86
- case 'donations':
87
- echo '<h3 class="hndle"><span>'.__( 'Donations', 'wp-email-capture' ).'</span></h3><div class="inside">
88
- <p>'.__( 'If you like this plugin, please consider a small donation to help with future versions and plugins.', 'wp-email-capture' ). '</p>
89
- <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
90
- <input type="hidden" name="cmd" value="_s-xclick">
91
- <input type="hidden" name="hosted_button_id" value="8590914">
92
- <input type="image" src="https://www.paypal.com/en_US/GB/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online.">
93
- <img alt="" border="0" src="https://www.paypal.com/en_GB/i/scr/pixel.gif" width="1" height="1">
94
- </form></div>';
95
- break;
96
-
97
- case 'news':
98
- $wpemailcapturefeed = wp_email_capture_fetch_rss_feed();
99
-
100
- echo '<h3 class="hndle"><span>'.__( 'Latest News', 'wp-email-capture' ).'</span></h3><div class="inside">
101
- <p>'.__( 'The latest news and tutorials from WP Email Capture', 'wp-email-capture' ).'.</p>
102
-
103
- <ul>';
104
-
105
- if ( $wpemailcapturefeed ) {
106
- foreach ( $wpemailcapturefeed as $item ) {
107
- $url = preg_replace( '/#.*/', '', esc_url( $item->get_permalink(), $protocolls=null, 'display' ) );
108
- echo '<li>
109
- <a href="'.$url.'#utm_source=wpadmin&utm_medium=sidebarwidget&utm_term=newsitem&utm_campaign=wpemailcapture">'. esc_html( $item->get_title() ) .'</a>
110
- </li>';
111
- }
112
- }
113
- echo '</ul></div>';
114
- break;
115
-
116
- case 'supportus':
117
- echo '<h3 class="hndle"><span>'.__( 'Support Us!', 'wp-email-capture' ).'</span></h3><div class="inside">
118
- <p>'.__( 'We would like you if you would not mind, doing one of the following if you are a fan of WP Email Capture', 'wp-email-capture' ).'.</p>
119
-
120
- <ul>
121
- <li><a href="http://wordpress.org/extend/plugins/wp-email-capture/">'.__( 'Rate the plugin 5* on WordPress.org', 'wp-email-capture' ).'</a></li>
122
- <li><a href="http://twitter.com/WPEmailCapture">'.__( 'Follow @WPEmailCapture on Twitter', 'wp-email-capture' ).'</a></li>
123
- <li><a href="http://facebook.com/WPEmailCapture">'.__( 'Like us on Facebook', 'wp-email-capture' ).'</a></li>
124
- </ul></div>';
125
- break;
126
-
127
- case 'becomeanaffiliate':
128
- echo '<h3 class="hndle"><span>'.__( 'Become An Affiliate!', 'wp-email-capture' ).'</span></h3><div class="inside">
129
- <p>'.__( 'Earn upto', 'wp-email-capture' ). ' <strong>$30</strong> '.__( 'per sale of WP Email Capture', 'wp-email-capture' ). '! <a href="http://wpemailcapture.com/affiliates/?utm_source=admin-sidebar&utm_medium=plugin&utm_campaign=wpemailcapture"><strong>'.__( 'Join our affilite programme today', 'wp-email-capture' ).'</strong></a>.</p></div>';
130
- break;
131
-
132
- case 'supportpage':
133
- echo '<h3 class="hndle"><span>'.__( 'WP Email Capture Options', 'wp-email-capture' ).'</span></h3><div class="inside">
134
- <p>'.__( 'On this page you can make changes that to the way in which WP Email Capture runs', 'wp-email-capture' ).'.</p></div>';
135
- break;
136
- }
137
- echo "</div>";
138
- }
139
- echo '</div></div></div>';
140
 
141
  }
142
- ?>
7
  * @return void
8
  */
9
  function wp_email_capture_admin_sidebar( $sidestring ) {
10
+ $sidebararray = explode( ',', $sidestring );
11
+
12
+ echo '<div class="postbox-container" style="width:24%;padding-left:10px;float:left;"><div class="metabox-holder"><div class="meta-box-sortables">';
13
+
14
+ foreach ( $sidebararray as $widgettitle ) {
15
+ echo "<div id='wpemailcapture_premium" . $widgettitle . "' class='postbox'>";
16
+ switch ( $widgettitle ) {
17
+
18
+ case 'support':
19
+ echo '<h3 class="hndle"><span>' . __( 'Need Help?', 'wp-email-capture' ) . '</span></h3>
20
+ <div class="inside">
21
+ <p>' . __( 'If you are having problems with this plugin, please read the', 'wp-email-capture' ) . ' <a href="https://www.wpemailcapture.com/frequently-asked-questions/?utm_source=admin-sidebar&utm_medium=plugin&utm_campaign=wpemailcapture">'. __( 'Frequently Asked Questions', 'wp-email-capture' ) . '</a>, '. __( 'or alternatively', 'wp-email-capture' ) . ' <a href="https://www.wpemailcapture.com/support/?utm_source=admin-sidebar&utm_medium=plugin&utm_campaign=wpemailcapture">' . __( 'submit a support request here', 'wp-email-capture' ) . '</a>.</p>
22
+ </div>';
23
+ break;
24
+
25
+ case 'affiliates':
26
+ echo '<h3 class="hndle"><span>'.__( 'Recommended Services', 'wp-email-capture' ).'</span></h3>
27
+ <div class="inside">
28
+ <p>'.__( 'We recommend the following services for sending out emails:-', 'wp-email-capture' ).'</p>
29
+ <ul>
30
+ <li><strong><a href="https://www.wpemailcapture.com/recommends/aweber">Aweber</a></strong></li>
31
+ <li><strong><a href="https://www.wpemailcapture.com/recommends/constant-contact">Constant Contact</a></strong></li>
32
+ <li><strong><a href="https://www.wpemailcapture.com/recommends/mailchimp">MailChimp</a></strong></li>
33
+ </ul>
34
+ </div>';
35
+ break;
36
+
37
+ case 'globaldescription':
38
+ echo '<h3 class="hndle"><span>'.__( 'Global List Management', 'wp-email-capture' ).'</span></h3>
39
+ <div class="inside">
40
+ <p>'.__( 'This page allows you to create lists, either', 'wp-email-capture' ).' <strong>'.__( 'external lists', 'wp-email-capture' ).'</strong> '.__( '(WP Email Capture is compatible with most major email marketing software packages), or a new', 'wp-email-capture' ).' <strong>'.__( 'WP Email Capture List', 'wp-email-capture' ).'</strong>.' .__( 'You can create as many different lists as you wish', 'wp-email-capture' ).'.</p>
41
+ </div>';
42
+ break;
43
+
44
+ case 'listdescriptionpremium':
45
+ echo '<h3 class="hndle"><span>' .__( 'Add/Edit WP Email Capture List', 'wp-email-capture' ).'</span></h3>
46
+ <div class="inside">
47
+ <p>' .__( 'This is the page for managing WP Email Capture Lists. From this page you can:-', 'wp-email-capture' ).'</p>
48
+ <ul>
49
+ <li><strong>' .__( 'Make Changes To Your Lists', 'wp-email-capture' ).'</strong> - ' .__( 'such as the name and the pages redirected to on form completion', 'wp-email-capture' ).'.</li>
50
+ <li><strong>' .__( 'Email Options', 'wp-email-capture' ).'</strong> - ' .__( 'such as where the email comes from and what emails sent to the subscriber contains', 'wp-email-capture' ).'.</li>
51
+ <li><strong>' .__( 'Error Options', 'wp-email-capture' ).'</strong> - ' .__( 'the errors that are displayed to subscribers who incorrectly fill in the form', 'wp-email-capture' ).'.</li>
52
+ <li><strong>' .__( 'Styling Options', 'wp-email-capture' ).'</strong> - ' .__( 'change the button image (or use an image), as well as what to ask the user for besides their name', 'wp-email-capture' ).'.</li>
53
+ </ul>' .
54
+ __( 'You can also on this page do the following', 'wp-email-capture' ). ':-' .
55
+ '<ul>
56
+ <li>'.__( 'Manage List Subscribers', 'wp-email-capture' ).'</li>
57
+ <li>'.__( 'Delete Temporary Emails', 'wp-email-capture' ).'</li>
58
+ <li>'.__( 'Empty the entire list', 'wp-email-capture' ).'</li>
59
+ </ul>
60
+ </div>';
61
+ break;
62
+
63
+ case 'getwpemailcapturepremiumdescription':
64
+
65
+ $link = get_option( 'wp_email_capture_theme_affiliate_link' );
66
+
67
+ if ( !$link ) {
68
+
69
+ $link = "https://www.wpemailcapture.com/premium/?utm_source=admin-sidebar&utm_medium=banner&utm_term=2point5&utm_campaign=internalbanner";
70
+
71
+ }
72
+ echo '<h3 class="hndle"><span>'.__( 'Get WP Email Capture Premium', 'wp-email-capture' ).'</span></h3>
73
+ <div class="inside">
74
+ <p>'.__( 'Unlock the <strong>true</strong> power of WP Email Capture with the Premium version. With multiple lists, and stat tracking, WP Email Capture Premium is the missing link in your WordPress Email Marketing Puzzle', 'wp-email-capture' ).'.</p>
75
+ <p style="text-align:center;"><a href="'.$link.'"><img src="'. plugins_url( 'images/WP-EC-262-x-218.png' , dirname(__FILE__) ).'" alt="WP Email Capture" style="width:100%;"></a></p>
76
+ </div>';
77
+ break;
78
+
79
+ case 'exlistdescriptionpremium':
80
+ echo '<h3 class="hndle"><span>'.__( 'Add/Edit External List', 'wp-email-capture' ).'</span></h3>
81
+ <div class="inside">
82
+ <p>'.__( 'This is the page for managing External lists through WP Email Capture. Simply copy & paste the code from your Email Marketing software into the page below and you can embed your newsletter subscriptions into posts, pages or sidebars easily using WP Email Capture. If you do not have an Email Marketing Service, a few are recommended below', 'wp-email-capture' ).'.</p>
83
+ </div>';
84
+ break;
85
+
86
+ case 'donations':
87
+ echo '<h3 class="hndle"><span>'.__( 'Donations', 'wp-email-capture' ).'</span></h3><div class="inside">
88
+ <p>'.__( 'If you like this plugin, please consider a small donation to help with future versions and plugins.', 'wp-email-capture' ). '</p>
89
+ <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
90
+ <input type="hidden" name="cmd" value="_s-xclick">
91
+ <input type="hidden" name="hosted_button_id" value="8590914">
92
+ <input type="image" src="https://www.paypal.com/en_US/GB/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online.">
93
+ <img alt="" border="0" src="https://www.paypal.com/en_GB/i/scr/pixel.gif" width="1" height="1">
94
+ </form></div>';
95
+ break;
96
+
97
+ case 'news':
98
+ $wpemailcapturefeed = wp_email_capture_fetch_rss_feed();
99
+
100
+ echo '<h3 class="hndle"><span>'.__( 'Latest News', 'wp-email-capture' ).'</span></h3><div class="inside">
101
+ <p>'.__( 'The latest news and tutorials from WP Email Capture', 'wp-email-capture' ).'.</p>
102
+
103
+ <ul>';
104
+
105
+ if ( $wpemailcapturefeed ) {
106
+ foreach ( $wpemailcapturefeed as $item ) {
107
+ $url = preg_replace( '/#.*/', '', esc_url( $item->get_permalink(), $protocolls = null, 'display' ) );
108
+ echo '<li>
109
+ <a href="'.$url.'?utm_source=admin-sidebar&utm_medium=sidebarwidget&utm_term=newsitem&utm_campaign=wpemailcapture">'. esc_html( $item->get_title() ) .'</a>
110
+ </li>';
111
+ }
112
+ }
113
+ echo '</ul></div>';
114
+ break;
115
+
116
+ case 'supportus':
117
+ echo '<h3 class="hndle"><span>'.__( 'Support Us!', 'wp-email-capture' ).'</span></h3><div class="inside">
118
+ <p>'.__( 'We would like you if you would not mind, doing one of the following if you are a fan of WP Email Capture', 'wp-email-capture' ).'.</p>
119
+
120
+ <ul>
121
+ <li><a href="http://wordpress.org/extend/plugins/wp-email-capture/">'.__( 'Rate the plugin 5* on WordPress.org', 'wp-email-capture' ).'</a></li>
122
+ <li><a href="http://twitter.com/WPEmailCapture">'.__( 'Follow @WPEmailCapture on Twitter', 'wp-email-capture' ).'</a></li>
123
+ <li><a href="http://facebook.com/WPEmailCapture">'.__( 'Like us on Facebook', 'wp-email-capture' ).'</a></li>
124
+ </ul></div>';
125
+ break;
126
+
127
+ case 'becomeanaffiliate':
128
+ echo '<h3 class="hndle"><span>'.__( 'Become An Affiliate!', 'wp-email-capture' ).'</span></h3><div class="inside">
129
+ <p>'.__( 'Earn upto', 'wp-email-capture' ). ' <strong>$30</strong> '.__( 'per sale of WP Email Capture', 'wp-email-capture' ). '! <a href="https://www.wpemailcapture.com/affiliate-area/?utm_source=admin-sidebar&utm_medium=plugin&utm_campaign=wpemailcapture"><strong>'.__( 'Join our affilite programme today', 'wp-email-capture' ).'</strong></a>.</p></div>';
130
+ break;
131
+
132
+ case 'supportpage':
133
+ echo '<h3 class="hndle"><span>' . __( 'WP Email Capture Options', 'wp-email-capture' ) . '</span></h3><div class="inside">
134
+ <p>' . __( 'On this page you can make changes that to the way in which WP Email Capture runs', 'wp-email-capture' ) . '.</p></div>';
135
+ break;
136
+ }
137
+ echo '</div>';
138
+ }
139
+ echo '</div></div></div>';
140
 
141
  }
 
inc/core.php CHANGED
@@ -1,4 +1,4 @@
1
- <?php
2
 
3
  require_once(WP_EMAIL_CAPTURE_PATH . '/inc/functions.php');
4
  require_once(WP_EMAIL_CAPTURE_PATH . '/inc/admin-sidebar.php');
@@ -26,7 +26,14 @@ require_once(WP_EMAIL_CAPTURE_PATH . '/inc/functions.php');
26
 
27
  require_once(WP_EMAIL_CAPTURE_PATH . '/inc/enqueue.php');
28
 
 
 
29
  //require_once(WP_EMAIL_CAPTURE_PATH . '/inc/tracking.php');
30
 
31
  require_once(WP_EMAIL_CAPTURE_PATH . '/inc/help.php');
32
- ?>
 
 
 
 
 
1
+ <?php
2
 
3
  require_once(WP_EMAIL_CAPTURE_PATH . '/inc/functions.php');
4
  require_once(WP_EMAIL_CAPTURE_PATH . '/inc/admin-sidebar.php');
26
 
27
  require_once(WP_EMAIL_CAPTURE_PATH . '/inc/enqueue.php');
28
 
29
+ require_once(WP_EMAIL_CAPTURE_PATH . '/inc/tinymce.php');
30
+
31
  //require_once(WP_EMAIL_CAPTURE_PATH . '/inc/tracking.php');
32
 
33
  require_once(WP_EMAIL_CAPTURE_PATH . '/inc/help.php');
34
+
35
+ // Gutenberg
36
+ require_once(WP_EMAIL_CAPTURE_PATH . '/inc/gutenberg.php');
37
+
38
+ // GDPR
39
+ require_once(WP_EMAIL_CAPTURE_PATH . '/inc/gdpr.php');
inc/css/wp-email-capture-admin-styles.css CHANGED
@@ -43,4 +43,49 @@
43
  color: #fff;
44
  background-color: #449d44;
45
  border-color: #398439;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
  }
43
  color: #fff;
44
  background-color: #449d44;
45
  border-color: #398439;
46
+ }
47
+
48
+ .wp_email_capture_admin_discount {
49
+ display: none;
50
+ }
51
+
52
+ .wp_email_capture_admin_discount.wp_email_capture_admin_discount_active {
53
+ display: block;
54
+ }
55
+
56
+ .wp_email_capture_help_box {
57
+ border: 1px solid #e5e5e5;
58
+ background: #fff;
59
+ margin-bottom: 20px;
60
+ }
61
+
62
+ .wp_email_capture_help_box h3.header {
63
+ border-bottom: 1px solid #eee;
64
+ font-size: 14px;
65
+ padding: 8px 12px;
66
+ margin: 0;
67
+ line-height: 1.4;
68
+ }
69
+
70
+ .wp_email_capture_help_box ul, .wp_email_capture_help_box ul li {
71
+ list-style-type: disc;
72
+ margin-left: 10px;
73
+ }
74
+
75
+ .wrap.wpec-about-wrap img {
76
+ width: initial;
77
+ max-width: 250px;
78
+ }
79
+
80
+ .wrap.wpec-about-wrap table.extensions td {
81
+ width: 33%;
82
+ vertical-align: top;
83
+ }
84
+
85
+ .wrap.wpec-about-wrap table.extensions td h3 {
86
+ height: 75px;
87
+ }
88
+
89
+ .wrap.wpec-about-wrap table.extensions td p {
90
+ height: 50px;
91
  }
inc/css/wp-email-capture-default-styles.css ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .wp-email-capture {
2
+ border: 1px solid #999;
3
+ background-color: #CCC;
4
+ padding: 10px;
5
+ margin: 0 auto;
6
+ }
7
+
8
+ .wp-email-capture input[type="text"], .wp-email-capture input[type="email"] {
9
+ width: 75%;
10
+ display: inline-block;
11
+ margin-top: 5px;
12
+ margin-bottom: 5px;
13
+ }
14
+
15
+ .wp-email-capture br {
16
+ clear: both;
17
+ }
18
+
19
+ .wp-email-capture label {
20
+ width: 25%;
21
+ display: inline-block;
22
+ padding-top: 5px;
23
+ padding-bottom: 5px;
24
+ float: left;
25
+ margin-top: 5px;
26
+ margin-bottom: 5px;
27
+ }
28
+
29
+ .wp-email-capture input.wp-email-capture-submit {
30
+ width: 100%;
31
+ clear: both;
32
+ margin-top: 5px;
33
+ margin-bottom: 5px;
34
+ padding-top: 10px;
35
+ padding-bottom: 10px;
36
+ max-width: 100%;
37
+ }
inc/css/wp-email-capture-gutenberg-styles.css ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ .wp-email-capture {
2
+ border: 1px solid #999;
3
+ background-color: #CCC;
4
+ padding: 10px;
5
+ margin: 10px auto;
6
+ }
7
+
8
+ h3.wp-email-capture-admin-form {
9
+ text-align:center;
10
+ }
inc/dashboard.php CHANGED
@@ -1,50 +1,50 @@
1
- <?php
2
-
3
-
4
  /**
5
  * Function to display the dashboard widget. Contains the last 3 subscribers, as well as some options.
6
  *
7
  * @return void
8
  */
9
  function wp_email_capture_dashboard_widget() {
10
-
11
- wp_email_capture_writetable(3, "<strong>".__('Last Three Members To Join','WPEC')."</strong><br/><br/>");
12
 
13
- $tempemails = wp_email_capture_count_temp();
14
 
15
- echo '<br/><br/><a name="list"></a><strong>'.__('Export','WPEC').'</strong>';
16
- echo '<form name="wp_email_capture_export" action="'. esc_url($_SERVER['REQUEST_URI']) . '#list" method="post">';
17
- echo '<label>'.__('Use the button below to export your list as a CSV to use in software such as','WPEC').' <a href="http://www.gospelrhys.co.uk/go/aweber.php" title="Email Marketing">Aweber</a>.</label>';
18
  echo '<input type="hidden" name="wp_email_capture_export" />';
19
- echo '<div class="submit"><input type="submit" value="'.__('Export List','WPEC').'" class="button" /></div>';
20
- echo "</form><br/><br/>";
21
 
22
- $tempemails = wp_email_capture_count_temp();
 
23
 
24
- echo "<a name='truncate'></a><strong>".__('Temporary e-mails','WPEC')."</strong>\n";
25
- echo '<form name="wp_email_capture_truncate" action="'. esc_url($_SERVER['REQUEST_URI']) . '#truncate" method="post">';
26
- echo '<label>'.__('There are','WPEC').' '. $tempemails . ' '.__('e-mail addresses that have been unconfirmed. Delete them to save space below.','WPEC').'</label>';
27
-
28
- echo '<input type="hidden" name="wp_email_capture_truncate"/>';
29
- echo '<div class="submit"><input type="submit" value="'.__('Delete Unconfirmed e-mail Addresses','WPEC').'" class="button" /></div>';
30
- echo "</form>";
31
 
 
 
 
32
 
 
 
 
33
 
34
- }
35
 
36
 
37
  /**
38
  * Wrapper function to help display the dashboard widget. Checks user privleges before adding the widget.
39
- *
40
  * @return void
41
  */
42
  function wp_email_capture_add_dashboard_widgets() {
43
 
44
- if (current_user_can( apply_filters( 'wp_email_capture_dashboard_capability', 'manage_options' ) )){
45
- wp_add_dashboard_widget('wp_email_capture_dashboard_widget', __('WP Email Capture - At A Glance','WPEC'), 'wp_email_capture_dashboard_widget');
46
  }
47
 
48
- }
49
-
50
- ?>
1
+ <?php
 
 
2
  /**
3
  * Function to display the dashboard widget. Contains the last 3 subscribers, as well as some options.
4
  *
5
  * @return void
6
  */
7
  function wp_email_capture_dashboard_widget() {
 
 
8
 
9
+ wp_email_capture_writetable( 3, '<strong>' . __( 'Last Three Members To Join', 'wp-email-capture' ) . '</strong><br/><br/>' );
10
 
11
+ echo '<br/><br/><a name="list"></a><strong>' . __( 'Export', 'wp-email-capture' ) . '</strong>';
12
+ echo '<form name="wp_email_capture_export" action="' . esc_url( $_SERVER['REQUEST_URI'] ) . '#list" method="post">';
13
+ echo '<label>' . __( 'Use the button below to export your list as a CSV to use in software such as', 'wp-email-capture' ) . ' <a href="https://www.wpemailcapture.com/recommends/aweber/" title="Email Marketing">Aweber</a>.</label>';
14
  echo '<input type="hidden" name="wp_email_capture_export" />';
15
+ echo '<div class="submit"><input type="submit" value="' . __( 'Export List', 'wp-email-capture') . '" class="button" /></div>';
16
+ echo '</form><br/><br/>';
17
 
18
+ $tempemails = wp_email_capture_count_temp();
19
+ $lastsignupdatestring = wp_email_capture_get_last_singup_date();
20
 
21
+ if ( $lastsignupdatestring ) {
22
+ $lastsignupdate = date( 'jS F, Y g:ia', strtotime( $lastsignupdatestring ) );
23
+ $lastsignupdatesentance = __( 'The last attempted signup was on ' . $lastsignupdate . '.', 'wp-email-capture' );
24
+ } else {
25
+ $lastsignupdatesentance = '';
26
+ }
 
27
 
28
+ echo "<a name='truncate'></a><strong>" . __( 'Temporary e-mails', 'wp-email-capture' ) . "</strong>\n";
29
+ echo '<form name="wp_email_capture_truncate" action="' . esc_url( $_SERVER['REQUEST_URI'] ) . '#truncate" method="post">';
30
+ 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>';
31
 
32
+ echo '<input type="hidden" name="wp_email_capture_truncate"/>';
33
+ echo '<div class="submit"><input type="submit" value="' . __( 'Delete Unconfirmed e-mail Addresses', 'wp-email-capture' ) . '" class="button" /></div>';
34
+ echo '</form>';
35
 
36
+ }
37
 
38
 
39
  /**
40
  * Wrapper function to help display the dashboard widget. Checks user privleges before adding the widget.
41
+ *
42
  * @return void
43
  */
44
  function wp_email_capture_add_dashboard_widgets() {
45
 
46
+ if ( current_user_can( apply_filters( 'wp_email_capture_dashboard_capability', 'manage_options' ) ) ) {
47
+ wp_add_dashboard_widget( 'wp_email_capture_dashboard_widget', __( 'WP Email Capture - At A Glance', 'wp-email-capture' ), 'wp_email_capture_dashboard_widget' );
48
  }
49
 
50
+ }
 
 
inc/deprecated/pagedresults.php CHANGED
@@ -24,7 +24,7 @@ class MySQLPagedResultSet
24
 
25
 
26
 
27
- $resultpage = $_GET['resultpage'];
28
 
29
 
30
 
@@ -138,7 +138,7 @@ class MySQLPagedResultSet
138
 
139
  $nav .= "<a href=\"?resultpage=".
140
 
141
- ($this->getPageNum()-1).'&'.$queryvars.'">'.__('Prev','WPEC').'</a> ';
142
 
143
  }
144
 
@@ -166,7 +166,7 @@ class MySQLPagedResultSet
166
 
167
  $nav .= "<a href=\"?resultpage=".
168
 
169
- ($this->getPageNum()+1).'&'.$queryvars.'">'.__('Next','WPEC').'</a> ';
170
 
171
  }
172
 
24
 
25
 
26
 
27
+ $resultpage = esc_attr( $_GET['resultpage'] );
28
 
29
 
30
 
138
 
139
  $nav .= "<a href=\"?resultpage=".
140
 
141
+ ($this->getPageNum()-1).'&'.$queryvars.'">'.__('Prev','wp-email-capture').'</a> ';
142
 
143
  }
144
 
166
 
167
  $nav .= "<a href=\"?resultpage=".
168
 
169
+ ($this->getPageNum()+1).'&'.$queryvars.'">'.__('Next','wp-email-capture').'</a> ';
170
 
171
  }
172
 
inc/display.php CHANGED
@@ -18,31 +18,33 @@ function wp_email_capture_form( $error = "" ) {
18
 
19
  <?php
20
 
21
- if ( null !== esc_attr( $_GET['wp_email_capture_error'] ) ) {
22
 
23
- $error = esc_attr($_GET['wp_email_capture_error']);
24
 
25
- echo "<div class='wp-email-capture-error'>".__('Error:','WPEC'). " " .$error ."</div>";
26
 
27
  }
28
 
29
  ?>
30
 
31
- <label class="wp-email-capture-name wp-email-capture-label wp-email-capture-widget-worldwide wp-email-capture-name-widget wp-email-capture-name-label wp-email-capture-name-label-widget<?php if (get_option("wp_email_capture_name_required") == 1 ) { $display .= " wp-email-capture-required"; } ?>" for="wp-email-capture-name-widget"><?php _e('Name:','WPEC'); ?></label> <input name="wp-email-capture-name" id="wp-email-capture-name-widget" type="text" class="wp-email-capture-name wp-email-capture-input wp-email-capture-widget-worldwide wp-email-capture-name-widget wp-email-capture-name-input wp-email-capture-name-input-widget" title="Name" /><br/>
32
 
33
- <label class="wp-email-capture-email wp-email-capture-label wp-email-capture-widget-worldwide wp-email-capture-email-widget wp-email-capture-email-label wp-email-capture-email-label-widget" for="wp-email-capture-email-widget"><?php _e('Email:','WPEC'); ?></label> <input name="wp-email-capture-email" id="wp-email-capture-email-widget" type="text" class="wp-email-capture-email wp-email-capture-input wp-email-capture-widget-worldwide wp-email-capture-email-widget wp-email-capture-email-input wp-email-capture-email-input-widget" title="Email" /><br/>
 
 
34
 
35
  <input type="hidden" name="wp_capture_action" value="1" />
36
 
37
- <input name="Submit" type="submit" value="<?php _e('Submit','WPEC'); ?>" class="wp-email-capture-submit wp-email-capture-widget-worldwide" />
38
 
39
  </form>
40
 
41
  </div>
42
 
43
- <?php if (get_option("wp_email_capture_link") == 1) {
44
 
45
- echo "<p style='font-size:10px;'>".__('Powered by','WPEC')." <a href='http://wpemailcapture.com/' target='_blank'>WP Email Capture</a></p>\n";
46
 
47
  }
48
 
@@ -63,11 +65,11 @@ function wp_email_capture_form_page( $atts, $error = "") {
63
  $display = "";
64
  $display .= "<div id='wp_email_capture_2' class='wp-email-capture wp-email-capture-display'><form name='wp_email_capture_display' method='post' action='" . $url ."'>\n";
65
 
66
- if (isset($_GET['wp_email_capture_error'])) {
67
 
68
  $error = esc_attr($_GET['wp_email_capture_error']);
69
 
70
- $display .= "<div class='wp-email-capture-error'>" . __('Error:','WPEC'). " " . $error ."</div>\n";
71
 
72
  }
73
 
@@ -75,17 +77,17 @@ function wp_email_capture_form_page( $atts, $error = "") {
75
 
76
  if (get_option("wp_email_capture_name_required") == 1) { $display .= " wp-email-capture-required"; }
77
 
78
- $display .= "' for='wp-email-capture-name-display'>".__('Name:','WPEC')."</label> <input name='wp-email-capture-name' id='wp-email-capture-name-display' type='text' class='wp-email-capture-name wp-email-capture-label wp-email-capture-display-worldwide wp-email-capture-name-display wp-email-capture-name-input wp-email-capture-name-input-display' title='Name' /><br/>\n";
79
 
80
- $display .= "<label class='wp-email-capture-email wp-email-capture-label wp-email-capture-display wp-email-capture-email-display wp-email-capture-email-label wp-email-capture-email-label-display' for='wp-email-capture-email-display'>".__('Email:','WPEC')."</label> <input name='wp-email-capture-email' id='wp-email-capture-email-display' type='text' class='wp-email-capture-email wp-email-capture-input wp-email-capture-display wp-email-capture-email-display wp-email-capture-email-input wp-email-capture-email-input-display' title='Email' /><br/>\n";
81
 
82
  $display .= "<input type='hidden' name='wp_capture_action' value='1' />\n";
83
 
84
- $display .= "<input name='Submit' type='submit' value='".__('Submit','WPEC')."' class='wp-email-capture-submit' /></form></div>\n";
85
 
86
- if (get_option("wp_email_capture_link") == 1) {
87
 
88
- $display .= "<p style='font-size:10px;'>".__('Powered by','WPEC')." <a href='http://wpemailcapture.com/' target='_blank'>WP Email Capture</a></p>\n";
89
  }
90
 
91
  $display = apply_filters( 'wp_email_capture_display_form', $display, $atts );
@@ -101,6 +103,4 @@ function wp_email_capture_form_page( $atts, $error = "") {
101
  */
102
  function wp_email_capture_form_process_atts( $atts ) {
103
  return wp_email_capture_form_page( $atts );
104
- }
105
-
106
- ?>
18
 
19
  <?php
20
 
21
+ if ( isset( $_GET['wp_email_capture_error'] ) ) {
22
 
23
+ $error = esc_attr( $_GET['wp_email_capture_error'] );
24
 
25
+ echo "<div class='wp-email-capture-error'>".__('Error:','wp-email-capture'). " " .$error ."</div>";
26
 
27
  }
28
 
29
  ?>
30
 
31
+ <label class="wp-email-capture-name wp-email-capture-label wp-email-capture-widget-worldwide wp-email-capture-name-widget wp-email-capture-name-label wp-email-capture-name-label-widget<?php if (get_option("wp_email_capture_name_required") == 1 ) { $display .= " wp-email-capture-required"; } ?>" for="wp-email-capture-name-widget"><?php _e('Name:','wp-email-capture'); ?></label> <input name="wp-email-capture-name" id="wp-email-capture-name-widget" type="text" class="wp-email-capture-name wp-email-capture-input wp-email-capture-widget-worldwide wp-email-capture-name-widget wp-email-capture-name-input wp-email-capture-name-input-widget" title="Name" /><br/>
32
 
33
+ <label class="wp-email-capture-email wp-email-capture-label wp-email-capture-widget-worldwide wp-email-capture-email-widget wp-email-capture-email-label wp-email-capture-email-label-widget" for="wp-email-capture-email-widget"><?php _e('Email:','wp-email-capture'); ?></label> <input name="wp-email-capture-email" id="wp-email-capture-email-widget" type="text" class="wp-email-capture-email wp-email-capture-input wp-email-capture-widget-worldwide wp-email-capture-email-widget wp-email-capture-email-input wp-email-capture-email-input-widget" title="Email" /><br/>
34
+
35
+ <?php do_action( 'wp_email_capture_form_echo_form_before_submit_button' ); ?>
36
 
37
  <input type="hidden" name="wp_capture_action" value="1" />
38
 
39
+ <input name="Submit" type="submit" value="<?php _e('Submit','wp-email-capture'); ?>" class="wp-email-capture-submit wp-email-capture-widget-worldwide" />
40
 
41
  </form>
42
 
43
  </div>
44
 
45
+ <?php if ( get_option( "wp_email_capture_link" ) == 1) {
46
 
47
+ echo "<p style='font-size:10px;'>".__('Powered by','wp-email-capture')." <a href='https://www.wpemailcapture.com/' target='_blank'>WP Email Capture</a></p>\n";
48
 
49
  }
50
 
65
  $display = "";
66
  $display .= "<div id='wp_email_capture_2' class='wp-email-capture wp-email-capture-display'><form name='wp_email_capture_display' method='post' action='" . $url ."'>\n";
67
 
68
+ if ( isset( $_GET['wp_email_capture_error'] ) ) {
69
 
70
  $error = esc_attr($_GET['wp_email_capture_error']);
71
 
72
+ $display .= "<div class='wp-email-capture-error'>" . __( 'Error:', 'wp-email-capture' ). ' ' . $error . '</div>';
73
 
74
  }
75
 
77
 
78
  if (get_option("wp_email_capture_name_required") == 1) { $display .= " wp-email-capture-required"; }
79
 
80
+ $display .= "' for='wp-email-capture-name-display'>".__('Name:','wp-email-capture')."</label> <input name='wp-email-capture-name' id='wp-email-capture-name-display' type='text' class='wp-email-capture-name wp-email-capture-label wp-email-capture-display-worldwide wp-email-capture-name-display wp-email-capture-name-input wp-email-capture-name-input-display' title='Name' /><br/>\n";
81
 
82
+ $display .= "<label class='wp-email-capture-email wp-email-capture-label wp-email-capture-display wp-email-capture-email-display wp-email-capture-email-label wp-email-capture-email-label-display' for='wp-email-capture-email-display'>".__('Email:','wp-email-capture')."</label> <input name='wp-email-capture-email' id='wp-email-capture-email-display' type='text' class='wp-email-capture-email wp-email-capture-input wp-email-capture-display wp-email-capture-email-display wp-email-capture-email-input wp-email-capture-email-input-display' title='Email' /><br/>\n";
83
 
84
  $display .= "<input type='hidden' name='wp_capture_action' value='1' />\n";
85
 
86
+ $display .= "<input name='Submit' type='submit' value='".__('Submit','wp-email-capture')."' class='wp-email-capture-submit' /></form></div>\n";
87
 
88
+ if ( get_option( "wp_email_capture_link" ) == 1) {
89
 
90
+ $display .= "<p style='font-size:10px;'>".__('Powered by','wp-email-capture')." <a href='https://www.wpemailcapture.com/' target='_blank'>WP Email Capture</a></p>\n";
91
  }
92
 
93
  $display = apply_filters( 'wp_email_capture_display_form', $display, $atts );
103
  */
104
  function wp_email_capture_form_process_atts( $atts ) {
105
  return wp_email_capture_form_page( $atts );
106
+ }
 
 
inc/enqueue.php CHANGED
@@ -6,7 +6,12 @@
6
  */
7
  function wp_email_capture_scripts() {
8
  /* Register our stylesheet. */
9
- wp_enqueue_style( 'wpemailcapturestyles', WP_EMAIL_CAPTURE_URL . '/inc/css/wp-email-capture-styles.css', array(), '1.0' );
 
 
 
 
 
10
  }
11
 
12
 
@@ -16,8 +21,6 @@ function wp_email_capture_scripts() {
16
  */
17
  function wp_email_capture_admin_scripts() {
18
  /* Register our stylesheet. */
19
- wp_enqueue_script( 'wpemailcaptureadminjs', WP_EMAIL_CAPTURE_URL . '/inc/js/admin-custom.js', array( 'jquery' ), '3.0' );
20
- wp_enqueue_style( 'wpemailcapturestyles', WP_EMAIL_CAPTURE_URL . '/inc/css/wp-email-capture-admin-styles.css', array(), '1.0' );
21
- }
22
-
23
- ?>
6
  */
7
  function wp_email_capture_scripts() {
8
  /* Register our stylesheet. */
9
+ wp_enqueue_style( 'wpemailcapturestyles', WP_EMAIL_CAPTURE_URL . '/inc/css/wp-email-capture-styles.css', array(), WP_EMAIL_CAPTURE_VERSION );
10
+
11
+ if ( 1 == get_option( 'wp_email_capture_default_styling' ) ) {
12
+ /* Register our default stylesheet. */
13
+ wp_enqueue_style( 'wpemailcapturedefaultstyles', WP_EMAIL_CAPTURE_URL . '/inc/css/wp-email-capture-default-styles.css', array(), WP_EMAIL_CAPTURE_VERSION );
14
+ }
15
  }
16
 
17
 
21
  */
22
  function wp_email_capture_admin_scripts() {
23
  /* Register our stylesheet. */
24
+ wp_enqueue_script( 'wpemailcaptureadminjs', WP_EMAIL_CAPTURE_URL . '/inc/js/admin-custom.js', array( 'jquery' ), WP_EMAIL_CAPTURE_VERSION );
25
+ wp_enqueue_style( 'wpemailcapturestyles', WP_EMAIL_CAPTURE_URL . '/inc/css/wp-email-capture-admin-styles.css', array(), WP_EMAIL_CAPTURE_VERSION );
26
+ }
 
 
inc/exportcsv.php CHANGED
@@ -10,12 +10,16 @@ function wp_email_capture_export() {
10
 
11
  global $wpdb;
12
  $delimeter = get_option( 'wp_email_capture_name_delimeter' );
 
13
 
14
  if ( !$delimeter ) {
15
  $delimeter = ",";
16
  }
17
 
18
  $csv_output = "";
 
 
 
19
  $csv_output .= __( 'Name', 'wp-email-capture' ). $delimeter .__( 'Email', 'wp-email-capture' );
20
  $csv_output .= "\n";
21
 
@@ -33,18 +37,11 @@ function wp_email_capture_export() {
33
  $file_prefix = 'WP_Email_Capture';
34
  $filename = apply_filters( 'wpec_change_csv_filename', $file_prefix."_".date( "Y-m-d_H-i", time() ));
35
 
36
- header( "Content-type: application/vnd.ms-excel" );
37
-
38
- header( "Content-disposition: csv" . date( "Y-m-d" ) . ".csv" );
39
-
40
- header( "Content-disposition: filename=".$filename.".csv" );
41
 
42
  print $csv_output;
43
 
44
  exit;
45
 
46
- }
47
-
48
-
49
-
50
- ?>
10
 
11
  global $wpdb;
12
  $delimeter = get_option( 'wp_email_capture_name_delimeter' );
13
+ $charset = get_bloginfo( 'charset' );
14
 
15
  if ( !$delimeter ) {
16
  $delimeter = ",";
17
  }
18
 
19
  $csv_output = "";
20
+ if ( strtoupper( $charset ) == 'UTF-8' ) {
21
+ $csv_output .= "\xEF\xBB\xBF"; //UTF-8 BOM;
22
+ }
23
  $csv_output .= __( 'Name', 'wp-email-capture' ). $delimeter .__( 'Email', 'wp-email-capture' );
24
  $csv_output .= "\n";
25
 
37
  $file_prefix = 'WP_Email_Capture';
38
  $filename = apply_filters( 'wpec_change_csv_filename', $file_prefix."_".date( "Y-m-d_H-i", time() ));
39
 
40
+ header( "Content-type: application/vnd.ms-excel charset=" . $charset );
41
+ header( "Content-disposition: filename=" . $filename . ".csv" );
 
 
 
42
 
43
  print $csv_output;
44
 
45
  exit;
46
 
47
+ }
 
 
 
 
inc/functions.php CHANGED
@@ -62,7 +62,7 @@ function wp_email_capture_admin_notice() {
62
  _e( 'Allow Tracking?', 'wp-email-capture' );
63
  echo '</h4>';
64
  echo '<p>';
65
- _e( 'Thank you for installing WP Email Capture. Please help us improve by allowing us to gather anonymous usage stats such as themes and plugins used on your site, to help us test.','WPEC');
66
  echo '</p>';
67
  printf ( __('<p><a href="%1$s" class="button-primary">Allow Tracking</a> <a href="%2$s" class="button-secondary">Do Not Allow Tracking</a></p>', 'wp-email-capture' ), '?wp_email_capture_tracking=1', '?wp_email_capture_tracking=2' );
68
  echo '</div>';
@@ -89,7 +89,8 @@ function wp_email_capture_admin_notice() {
89
  function wp_email_capture_admin_upsell() {
90
  global $current_user;
91
  $user_id = $current_user->ID;
92
- $upgradeurl = "http://wpemailcapture.com/premium/?utm_source=upsell&utm_medium=plugin&utm_campaign=wpemailcapture";
 
93
  $discountcode = "BIGLISTUPGRADE";
94
  $discountamount = "15%";
95
  /* Check that the user hasn't already clicked to ignore the message */
@@ -99,10 +100,10 @@ function wp_email_capture_admin_upsell() {
99
  echo '<div class="updated welcome-panel" style="padding: 23px 10px 0;">';
100
  printf( __( '<a href="%1$s" class="welcome-panel-close">Hide Notice</a>
101
  <div class="welcome-panel-content">
102
- <h3>WP Email Capture - Over 500 Emails</h3>
103
- <p>WP Email Capture has over 500 entries. Whilst the plugin is free for use forever, it does struggle a bit with very large lists.</p>
104
- <p>WP Email Caputre Premium is better suited to large lists, so please consider upgrading. As a thank you for using us for so long, use discount code <strong>%3$s</strong> for <strong>%4$s</strong> off.</p>
105
- <p><a href="%2$s" class="button button-primary button-hero"><strong>Update WP Email Capture</strong></a></p></div>' ), '?wp_email_capture_upsell_ignore=0', $upgradeurl, $discountcode, $discountamount );
106
  echo "</div>";
107
  }
108
  }
@@ -141,7 +142,7 @@ function wp_email_capture_nag_ignore() {
141
  function wp_email_capture_fetch_rss_feed() {
142
 
143
  include_once ABSPATH . WPINC . '/feed.php';
144
- $rss = fetch_feed( "http://wpemailcapture.com/feed?cat=-4" );
145
 
146
  if ( is_wp_error( $rss ) ) { return false; }
147
 
@@ -161,8 +162,8 @@ function wp_email_capture_get_number_of_registered_users() {
161
  $registered_members_table = WP_EMAIL_CAPTURE_REGISTERED_MEMBERS_TABLE;
162
  global $wpdb;
163
  $get_number_of_regs_sql = '
164
- SELECT COUNT(*)
165
- FROM ' . WP_EMAIL_CAPTURE_REGISTERED_MEMBERS_TABLE;
166
 
167
  $get_number_of_regs = $wpdb->get_var( $get_number_of_regs_sql );
168
 
@@ -170,4 +171,274 @@ function wp_email_capture_get_number_of_registered_users() {
170
 
171
  }
172
 
173
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
62
  _e( 'Allow Tracking?', 'wp-email-capture' );
63
  echo '</h4>';
64
  echo '<p>';
65
+ _e( 'Thank you for installing WP Email Capture. Please help us improve by allowing us to gather anonymous usage stats such as themes and plugins used on your site, to help us test.','wp-email-capture');
66
  echo '</p>';
67
  printf ( __('<p><a href="%1$s" class="button-primary">Allow Tracking</a> <a href="%2$s" class="button-secondary">Do Not Allow Tracking</a></p>', 'wp-email-capture' ), '?wp_email_capture_tracking=1', '?wp_email_capture_tracking=2' );
68
  echo '</div>';
89
  function wp_email_capture_admin_upsell() {
90
  global $current_user;
91
  $user_id = $current_user->ID;
92
+ $infourl = "https://www.wpemailcapture.com/premium/?utm_source=upsellinfo&utm_medium=plugin&utm_campaign=wpemailcapture";
93
+ $upgradeurl = "https://www.wpemailcapture.com/checkout/?edd_action=add_to_cart&download_id=802&discount=BIGLISTUPGRADE&utm_source=upsell&utm_medium=plugin&utm_campaign=wpemailcapture";
94
  $discountcode = "BIGLISTUPGRADE";
95
  $discountamount = "15%";
96
  /* Check that the user hasn't already clicked to ignore the message */
100
  echo '<div class="updated welcome-panel" style="padding: 23px 10px 0;">';
101
  printf( __( '<a href="%1$s" class="welcome-panel-close">Hide Notice</a>
102
  <div class="welcome-panel-content">
103
+ <h3>WP Email Capture - Over 500 Emails</h3>
104
+ <p>WP Email Capture has over 500 entries. Whilst the plugin is free for use forever, it does struggle a bit with very large lists.</p>
105
+ <p>WP Email Caputre Premium is better suited to large lists, so please consider upgrading. As a thank you for using us for so long, use discount code <strong>%3$s</strong> for <strong>%4$s</strong> off.</p>
106
+ <p><a href="%2$s" class="button button-primary button-hero"><strong>Upgrade WP Email Capture</strong></a><a href="%5$s" class="button button-secondary button-hero"><strong>More Info</strong></a></p></div>' ), '?wp_email_capture_upsell_ignore=0', $upgradeurl, $discountcode, $discountamount, $infourl );
107
  echo "</div>";
108
  }
109
  }
142
  function wp_email_capture_fetch_rss_feed() {
143
 
144
  include_once ABSPATH . WPINC . '/feed.php';
145
+ $rss = fetch_feed( "https://www.wpemailcapture.com/feed?cat=-4" );
146
 
147
  if ( is_wp_error( $rss ) ) { return false; }
148
 
162
  $registered_members_table = WP_EMAIL_CAPTURE_REGISTERED_MEMBERS_TABLE;
163
  global $wpdb;
164
  $get_number_of_regs_sql = '
165
+ SELECT COUNT(*)
166
+ FROM ' . WP_EMAIL_CAPTURE_REGISTERED_MEMBERS_TABLE;
167
 
168
  $get_number_of_regs = $wpdb->get_var( $get_number_of_regs_sql );
169
 
171
 
172
  }
173
 
174
+
175
+ /**
176
+ * Get the last date of temporary emails.
177
+ *
178
+ * @return mixed the last date of signup if known. False if not.
179
+ */
180
+ function wp_email_capture_get_last_singup_date() {
181
+
182
+ global $wpdb;
183
+ $get_last_date_sql = '
184
+ SELECT `date`
185
+ FROM ' . WP_EMAIL_CAPTURE_TEMP_MEMBERS_TABLE . '
186
+ ORDER BY `date` DESC
187
+ LIMIT 1';
188
+
189
+ $get_last_date = $wpdb->get_var( $get_last_date_sql );
190
+
191
+ if ( $get_last_date != '0000-00-00 00:00:00') {
192
+ return $get_last_date;
193
+ } else {
194
+ return false;
195
+ }
196
+
197
+ }
198
+
199
+
200
+ /**
201
+ * Set the email type to text/html
202
+ * @return string "text/html"
203
+ */
204
+ function wp_email_capture_set_html_mail_content_type() {
205
+ return 'text/html';
206
+ }
207
+
208
+
209
+ /**
210
+ * Set the email type to text/plain
211
+ *
212
+ * Happens after sending an email.
213
+ *
214
+ * - DEPRECATED 3.3 -
215
+ *
216
+ * @return string "text/plain"
217
+ */
218
+ function wp_email_capture_set_plain_content_type() {
219
+ return 'text/plain';
220
+ }
221
+
222
+
223
+ /**
224
+ * Set email to HTML, if you wish to.
225
+ *
226
+ * @return void
227
+ */
228
+ function wp_email_capture_set_email_to_html() {
229
+
230
+ if ( 1 == get_option( 'wp_email_capture_send_email_html' ) ) {
231
+ add_filter( 'wp_mail_content_type', 'wp_email_capture_set_html_mail_content_type' );
232
+ }
233
+
234
+ }
235
+
236
+
237
+ /**
238
+ * Return email to standard email.
239
+ *
240
+ * @return void
241
+ */
242
+ function wp_email_capture_set_email_to_plain() {
243
+ if ( has_filter( 'wp_mail_content_type', 'wp_email_capture_set_html_mail_content_type' ) ) {
244
+ if ( 1 == get_option( 'wp_email_capture_send_email_html' ) ) {
245
+ remove_filter( 'wp_mail_content_type', 'wp_email_capture_set_html_mail_content_type' );
246
+ }
247
+ }
248
+ }
249
+
250
+
251
+ /**
252
+ * Check if we have the premium version installed
253
+ *
254
+ * @return boolean
255
+ */
256
+ function wp_email_capture_is_premium() {
257
+ if ( function_exists( 'wp_email_capture_premium_plugins_loaded' ) ) {
258
+ return true;
259
+ } else {
260
+ return false;
261
+ }
262
+ }
263
+
264
+
265
+ /**
266
+ * Get temproart data from an email address
267
+ *
268
+ * @param string $email The email address we are using.
269
+ * @return mixed The data we have to collect, false if no data.
270
+ */
271
+ function wp_email_capture_get_data_from_email_temp( $email ) {
272
+
273
+ global $wpdb;
274
+
275
+ $select_gdpr_temp_sql = 'SELECT * FROM ' . WP_EMAIL_CAPTURE_TEMP_MEMBERS_TABLE . " WHERE email = '%s'";
276
+
277
+ $select_gdpr_array = $wpdb->get_results( $wpdb->prepare( $select_gdpr_temp_sql, $email ) );
278
+
279
+ return $select_gdpr_array;
280
+
281
+ }
282
+
283
+ /**
284
+ * Get temproart data from an email address
285
+ *
286
+ * @param string $email The email address we are using.
287
+ * @return mixed The data we have to collect.
288
+ */
289
+ function wp_email_capture_get_data_from_email_main( $email ) {
290
+
291
+ global $wpdb;
292
+
293
+ $select_gdpr_main_sql = 'SELECT * FROM ' . WP_EMAIL_CAPTURE_REGISTERED_MEMBERS_TABLE . " WHERE email = '%s'";
294
+
295
+ $select_gdpr_array = $wpdb->get_results( $wpdb->prepare( $select_gdpr_main_sql, $email ) );
296
+
297
+ return $select_gdpr_array;
298
+ }
299
+
300
+
301
+ /**
302
+ * Check If MySQL version is 5.6, if not we fire a warning
303
+ *
304
+ * @return void
305
+ */
306
+ function wp_email_capture_mysql_upsell() {
307
+
308
+ $hostingurl = 'https://www.wpemailcapture.com/wp-email-capture-premium-compatible-products/?utm_source=mysqlhelp&utm_medium=plugin&utm_campaign=wpemailcapture#hosting';
309
+
310
+ if ( ! get_option( 'dismissed-wp_email_capture_mysql_deprecated', false ) ) {
311
+
312
+ if ( ! wp_email_capture_check_db_version() ) {
313
+
314
+ printf( __( '<div class="notice notice-error notice-wp-email-mysql is-dismissible" data-notice="wp_email_capture_mysql_deprecated">
315
+ <h3>WP Email Capture - MySQL version 5.6 and above needed</h3>
316
+ <p>Thank you for installing WP Email Capture. I really appreciate it. However you have an out of date version of MySQL on your site. <strong>WP Email Capture will not work</strong>.</p>
317
+ <p>A minimum of MySQL 5.6 is needed for this plugin to work. Speak to your host to upgrade. Alternatively, you can contact any of these hosts we have found that work with WP Email Capture.</p>
318
+ <p><a href="%2$s" class="button button-primary button-hero"><strong>View Hosting Recommendations</strong></a></p></div>' ), '?wp_email_capture_mysql_ignore=0', $hostingurl );
319
+
320
+ }
321
+ }
322
+ }
323
+
324
+
325
+ /**
326
+ * Get the DB Version for the server. To see if it's valid.
327
+ *
328
+ * @return void
329
+ */
330
+ function wp_email_capture_check_db_version() {
331
+
332
+ global $wpdb;
333
+
334
+ $mysql_server_type = '';
335
+ $mysql_server_version = '';
336
+
337
+ if ( method_exists( $wpdb, 'db_version' ) ) {
338
+ if ( $wpdb->use_mysqli ) {
339
+ // phpcs:ignore WordPress.DB.RestrictedFunctions.mysql_mysqli_get_server_info
340
+ $mysql_server_type = mysqli_get_server_info( $wpdb->dbh );
341
+ } else {
342
+ // phpcs:ignore WordPress.DB.RestrictedFunctions.mysql_mysql_get_server_info
343
+ $mysql_server_type = mysql_get_server_info( $wpdb->dbh );
344
+ }
345
+
346
+ $mysql_server_version = $wpdb->get_var( 'SELECT VERSION()' );
347
+ }
348
+
349
+ if ( stristr( $mysql_server_type, 'mariadb' ) ) {
350
+ $mariadb = true;
351
+ $health_check_mysql_rec_version = '10.0';
352
+ return true;
353
+ }
354
+
355
+ $mysql_min_version_check = version_compare( WP_EMAIL_MIN_MYSQL_VERSION, $mysql_server_version, '<=' );
356
+
357
+ //set_transient( 'wp_email_capture_valid_version', $mysql_min_version_check, 14*24*HOUR_IN_SECONDS );
358
+
359
+ return $mysql_min_version_check;
360
+
361
+ }
362
+
363
+
364
+
365
+
366
+ /**
367
+ * AJAX handler to store the state of dismissible notices.
368
+ */
369
+ function ajax_notice_handler() {
370
+ // Pick up the notice "type" - passed via jQuery (the "data-notice" attribute on the notice)
371
+ $type = esc_attr( $_POST['type'] );
372
+ // Store it in the options table
373
+ update_option( 'dismissed-' . $type, TRUE );
374
+ } add_action( 'wp_ajax_dismissed_notice_handler', 'ajax_notice_handler' );
375
+
376
+ /**
377
+ * Get the GDPR Data Table
378
+ *
379
+ * @depreciated 3.5
380
+ * @param string $table The table we are looking at, used to delete the data
381
+ * @param array $results The results already obtained
382
+ * @return string
383
+ */
384
+ /* function wp_email_capture_print_gdpr_data_table( $table, $results ) {
385
+
386
+ $tablestring = '<table class="widefat fixed" cellspacing="0">
387
+ <thead>
388
+ <tr>';
389
+
390
+ // First we need to get all keys in the array.
391
+ $columns = get_object_vars( $results[0] );
392
+ $datatocheck = array();
393
+ $extravalues = array();
394
+
395
+ if ( array_key_exists( 'wp_email_capture_gdpr_email', $_POST ) ) {
396
+
397
+ $extravalues = array( 'wp_email_capture_gdpr_email' => esc_attr( $_POST['wp_email_capture_gdpr_email'] ) );
398
+
399
+ }
400
+
401
+ if ( $columns ) {
402
+ foreach ( $columns as $column => $value ) {
403
+
404
+ $tablestring .= '<td>' . ucfirst( $column ) . '</td>';
405
+ $datatocheck[] = $column;
406
+
407
+ }
408
+
409
+ $tablestring .= '<td>' . __( 'Delete', 'wp-email-capture' ) . '</td>';
410
+
411
+ }
412
+
413
+ $tablestring .= '</tr>';
414
+ $tablestring .= '<tbody>';
415
+
416
+ if ( $results ) {
417
+
418
+ foreach ( $results as $result ) {
419
+
420
+ $tablestring .= '<tr>';
421
+
422
+ foreach ( $datatocheck as $keytoadd ) {
423
+
424
+ $tablestring .= '<td>' . $result->$keytoadd . '</td>';
425
+
426
+ }
427
+
428
+
429
+
430
+ $tablestring .= '<td>' . wp_email_capture_formdelete( $result->id, '', '', $table, $extravalues ) . '</td>';
431
+
432
+ $tablestring .= '</tr>';
433
+
434
+ }
435
+
436
+ }
437
+
438
+ $tablestring .= '</tbody>';
439
+ $tablestring .= '</table>';
440
+
441
+ return $tablestring;
442
+ } */
443
+
444
+
inc/gdpr.php ADDED
@@ -0,0 +1,402 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Get the privacy policy string
5
+ *
6
+ * @return string
7
+ */
8
+ function wp_email_capture_get_privacy_policy_string() {
9
+
10
+ $privacy_policy_string = "";
11
+
12
+ if ( get_option( 'wp_email_capture_enable_gdpr' ) && get_option( 'wp_page_for_privacy_policy' ) ) {
13
+
14
+ $privacy_policy_string = '<p><input type="checkbox" value="1" name="wp-email-capture-accept-privacy-policy" />' . sprintf( __( ' I agree to the <a href="%s">Privacy Policy</a> of this website.', 'wp-email-capture' ), get_permalink( get_option( 'wp_page_for_privacy_policy' ) ) ) . '</p>';
15
+
16
+ } elseif ( get_option( 'wp_email_capture_enable_gdpr' ) && !get_option( 'wp_page_for_privacy_policy' ) ) {
17
+
18
+ $privacy_policy_string = '<p><input type="checkbox" value="1" name="wp-email-capture-accept-privacy-policy" />' . __( ' I agree to the Privacy Policy of this website.', 'wp-email-capture' ) . '</p>';
19
+
20
+ }
21
+
22
+ $privacy_policy_string = apply_filters( 'wp_email_capture_prviacy_policy_string', $privacy_policy_string );
23
+
24
+ return $privacy_policy_string;
25
+ }
26
+
27
+
28
+ /**
29
+ * Add before the submit button on the echo form the Privacy Policy
30
+ *
31
+ * @return void
32
+ */
33
+ function wp_email_capture_add_privacy_policy_before_submit_echo_form() {
34
+
35
+ echo wp_email_capture_get_privacy_policy_string();
36
+
37
+ }
38
+
39
+
40
+ /**
41
+ * Add before the submit button on the shortcode form the Privacy Policy
42
+ *
43
+ * @param string $formhtml The form HTML
44
+ * @return string The replacement HTML, with added privacy policy HTML.
45
+ */
46
+ function wp_email_capture_add_privacy_policy_before_submit_display_form( $formhtml ) {
47
+
48
+ $privacy_policy_string = wp_email_capture_get_privacy_policy_string();
49
+
50
+ $formhtml = str_replace( "<input type='hidden' name='wp_capture_action' value='1' />", $privacy_policy_string . "<input type='hidden' name='wp_capture_action' value='1' />", $formhtml );
51
+
52
+ return $formhtml;
53
+ }
54
+
55
+
56
+ /**
57
+ * GDPR Process.
58
+ *
59
+ * Checks if the user has ticked the checkbox. If not, we throw them back.
60
+ *
61
+ * @return void
62
+ */
63
+ function wp_email_capture_gdpr_process() {
64
+
65
+ $starturl = esc_url( $_SERVER['HTTP_REFERER'] );
66
+ $acceptprivacypolicy = FALSE;
67
+
68
+ if ( get_option( 'wp_email_capture_enable_gdpr' ) ) {
69
+
70
+
71
+ if ( array_key_exists( 'wp-email-capture-accept-privacy-policy', $_POST ) ) {
72
+
73
+ $acceptprivacypolicy = $_POST[ 'wp-email-capture-accept-privacy-policy' ];
74
+
75
+ }
76
+
77
+ if ( ! $acceptprivacypolicy ) {
78
+
79
+ if ( strpos( $starturl, '?' ) === false ) { $extrastring = "?"; } else { $extrastring = "&"; }
80
+
81
+ $error = urlencode( __( 'Please Accept the Privacy Policy', 'wp-email-capture' ) );
82
+ $url = $starturl . $extrastring . 'wp_email_capture_error="' . $error;
83
+ wp_redirect( $url );
84
+ die();
85
+
86
+ }
87
+
88
+ }
89
+
90
+ }
91
+
92
+
93
+ /**
94
+ * Delete records after a certain time
95
+ *
96
+ * @return void
97
+ */
98
+ function wp_email_capture_gdpr_deletion() {
99
+
100
+ if ( get_option( 'wp_email_capture_enable_gdpr' ) ) {
101
+
102
+ $unit = get_option( 'wp_email_capture_unit_for_privacy' );
103
+ $number = get_option( 'wp_email_capture_number_for_privacy' );
104
+
105
+ if ( $unit && $number > 0 ) {
106
+
107
+ $timestring = strtotime( "-" . $number . " " . $unit );
108
+ $mysqldate = date( 'Y-m-d H:i:s', $timestring );
109
+
110
+ global $wpdb;
111
+
112
+ $delete_gdpr_temp_sql = 'DELETE FROM ' . WP_EMAIL_CAPTURE_TEMP_MEMBERS_TABLE . " WHERE date < '%s'";
113
+ $delete_gdpr_main_sql = 'DELETE FROM ' . WP_EMAIL_CAPTURE_REGISTERED_MEMBERS_TABLE . " WHERE date < '%s'";
114
+
115
+ $delete_gdpr = $wpdb->query( $wpdb->prepare( $delete_gdpr_main_sql, $mysqldate ) );
116
+ $delete_gdpr_temp = $wpdb->query( $wpdb->prepare( $delete_gdpr_temp_sql, $mysqldate ) );
117
+
118
+ }
119
+ }
120
+ }
121
+
122
+
123
+
124
+ /**
125
+ * Create the hourly filter
126
+ *
127
+ * @return void
128
+ */
129
+ function wp_email_capture_gdpr_activation() {
130
+ if ( ! wp_next_scheduled( 'wp_email_capture_hourly' ) ) {
131
+ wp_schedule_event( time(), 'hourly', 'wp_email_capture_hourly' );
132
+ }
133
+ }
134
+
135
+
136
+ /**
137
+ * Add the GDPR page to WP Email Capture
138
+ * @depreciated 3.5
139
+ * @return void
140
+ */
141
+ /* function wp_email_capture_add_gdpr_page() {
142
+ add_submenu_page( 'wpemailcapture', __( 'GDPR' ), __( 'GDPR', 'wp-email-capture' ), 'activate_plugins', 'wpemailcapturegdprsettings', 'wp_email_capture_gdpr_options' );
143
+ } */
144
+
145
+ /**
146
+ * Options page for GDPR
147
+ * @depreciated 3.5
148
+ * @return void
149
+ */
150
+ /* function wp_email_capture_gdpr_options() {
151
+
152
+ ?>
153
+ <div class="wrap">
154
+
155
+ <h1><?php _e( 'GDPR Data Checker', 'wp-email-capture' ); ?></h1>
156
+
157
+ <?php
158
+
159
+ if ( isset( $_POST['wp_email_capture_deleteid'] ) ) {
160
+
161
+ $wpemaildeleteid = esc_attr( $_POST['wp_email_capture_deleteid'] );
162
+ $table = esc_attr( $_POST[ 'wp_email_capture_deletefromtable' ] );
163
+ wp_email_capture_deleteid( $wpemaildeleteid, $table );
164
+ ?>
165
+
166
+ <div class="notice notice-success is-dismissible">
167
+ <p><?php echo sprintf( __( 'Data from row ID %s have been deleted', 'wp-email-capture' ), $wpemaildeleteid ); ?></p>
168
+ </div>
169
+
170
+ <?php
171
+ }
172
+ ?>
173
+ <div class="about-text">
174
+ <?php _e( 'Please enter in the box below the email address you want to check if you have any data on.', 'wp-email-capture' ); ?><br/>
175
+ </div>
176
+
177
+ <form method="post" action="<?php esc_url( $_SERVER['REQUEST_URI'] ); ?>">
178
+
179
+ <input name="wp_email_capture_gdpr_email" type="text" /> <?php submit_button( __('Check for email address', 'wp-email-capture' ) ); ?>
180
+
181
+ </form>
182
+
183
+ <?php
184
+
185
+ if ( array_key_exists( 'wp_email_capture_gdpr_email', $_POST ) ) {
186
+
187
+ $email = esc_attr( $_POST['wp_email_capture_gdpr_email'] );
188
+
189
+ ?>
190
+ <h2><?php echo sprintf( __( 'Results for %s', 'wp-email-capture' ), $email ) ?></h1>
191
+ <?php
192
+
193
+ $emaildatatemp = wp_email_capture_get_data_from_email_temp( $email );
194
+ $emaildatamain = wp_email_capture_get_data_from_email_main( $email );
195
+
196
+ if ( !empty( $emaildatatemp ) || !empty( $emaildatamain ) ) {
197
+
198
+ $tempdata = array(
199
+ WP_EMAIL_CAPTURE_REGISTERED_MEMBERS_TABLE => $emaildatamain,
200
+ WP_EMAIL_CAPTURE_TEMP_MEMBERS_TABLE => $emaildatatemp
201
+ );
202
+
203
+ foreach ( $tempdata as $table => $results ) {
204
+ if (!empty( $results ) ) {
205
+
206
+ echo wp_email_capture_print_gdpr_data_table( $table, $results );
207
+
208
+ }
209
+ }
210
+
211
+ } else {
212
+
213
+ echo '<p>' . sprintf( __( 'We hold no data for the email address %s', 'wp-email-capture' ), $email ) . '</p>';
214
+
215
+ }
216
+ }
217
+ ?>
218
+ </div>
219
+ <?php
220
+ } */
221
+
222
+
223
+ /**
224
+ * Add Privacy Policy Content to WP Email Capture
225
+ *
226
+ * @return void
227
+ */
228
+ function wp_email_capture_add_privacy_policy_content() {
229
+
230
+ if ( ! function_exists( 'wp_add_privacy_policy_content' ) ) {
231
+ return;
232
+ }
233
+
234
+ $addedstring = '';
235
+
236
+ if ( get_option( 'wp_email_capture_number_for_privacy' ) ) {
237
+ $number = get_option( 'wp_email_capture_number_for_privacy' );
238
+ $unit = get_option( 'wp_email_capture_unit_for_privacy' );
239
+ $addedstring = sprintf( __( '
240
+
241
+ We hold this data for a maximum of %s %s, at which point it is deleted.', 'wp-email-capture' ), $number, $unit );
242
+ }
243
+
244
+ $content = __( '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:-
245
+
246
+ Your Name (or what you chose to address yourself as). This is used for simple personalisation purposes.
247
+
248
+ Your Email Address. This is used to contact you and include you in our newsletter.
249
+
250
+ The date of signup. This is so we can reference when to delete your data at a later date.',
251
+
252
+ 'wp-email-capture' ) . $addedstring;
253
+
254
+ wp_add_privacy_policy_content(
255
+ 'WP Email Capture',
256
+ wp_kses_post( wpautop( $content, false ) )
257
+ );
258
+ }
259
+
260
+
261
+ /**
262
+ * This function links into the GDPR exporter, meaning we can begin to export registered today.
263
+ *
264
+ * @param string $email_address The email address we are looking for.
265
+ * @param integer $page The page of data we are grabbing.
266
+ * @return array An array of data we will need to find.
267
+ */
268
+ function wp_email_capture_plugin_exporter( $email_address, $page = 1 ) {
269
+
270
+ $number = 500; // Limit us to avoid timing out
271
+ $page = (int) $page;
272
+
273
+ $export_items = array();
274
+ $emaildatatocheck[] = wp_email_capture_get_data_from_email_temp( $email_address );
275
+ $emaildatatocheck[] = wp_email_capture_get_data_from_email_main( $email_address );
276
+ $x = '';
277
+
278
+ foreach ( $emaildatatocheck as $emaildatatemp ) {
279
+
280
+ $datatocheck = array();
281
+ $columns = get_object_vars( $emaildatatemp[0] );
282
+
283
+ foreach ( $columns as $column => $value ) {
284
+ $datatocheck[] = $column;
285
+ }
286
+
287
+ foreach ( (array) $emaildatatemp as $emaildata ) {
288
+
289
+ $x++;
290
+
291
+ $item_id = "wp-email-capture-{$emaildata->id}";
292
+
293
+ // Core group IDs include 'comments', 'posts', etc.
294
+ // But you can add your own group IDs as needed
295
+ $group_id = 'emailcapture';
296
+
297
+ // Optional group label. Core provides these for core groups.
298
+ // If you define your own group, the first exporter to
299
+ // include a label will be used as the group label in the
300
+ // final exported report
301
+ $group_label = __( 'WP Email Capture Data' );
302
+
303
+ $data = array();
304
+
305
+ // Plugins can add as many items in the item data array as they want
306
+ foreach ( $datatocheck as $header ) {
307
+
308
+ $data[] = array(
309
+ 'name' => $header,
310
+ 'value' => $emaildata->$header,
311
+ );
312
+
313
+ }
314
+
315
+ $export_items[] = array(
316
+ 'group_id' => $group_id,
317
+ 'group_label' => $group_label,
318
+ 'item_id' => $item_id,
319
+ 'data' => $data,
320
+ );
321
+ }
322
+ }
323
+
324
+ $done = $x < $number;
325
+ return array(
326
+ 'data' => $export_items,
327
+ 'done' => $done,
328
+ );
329
+
330
+ }
331
+
332
+
333
+ /**
334
+ * Hook function adding the wp-email-capture array to the GDPR friendly plugin exporter.
335
+ *
336
+ * @param array $exporters All current Exporters
337
+ * @return array All exporters plus the WP Email Capture one.
338
+ */
339
+ function wp_email_capture_register_plugin_exporter( $exporters ) {
340
+ $exporters['wp-email-capture'] = array(
341
+ 'exporter_friendly_name' => __( 'WP Email Capture' ),
342
+ 'callback' => 'wp_email_capture_plugin_exporter',
343
+ );
344
+ return $exporters;
345
+ }
346
+
347
+
348
+ /**
349
+ * WP Email Capture Eraser function.
350
+ *
351
+ * Removes all data from the WP Email Capture tables.
352
+ *
353
+ * @param string $email_address The email address we are looking to erase.
354
+ * @param integer $page The page we are looking for.
355
+ * @return array Array containing data on how successful the erasure process has been.
356
+ */
357
+ function wp_email_capture_plugin_eraser( $email_address, $page = 1 ) {
358
+
359
+ $number = 500; // Limit us to avoid timing out
360
+ $page = (int) $page;
361
+ $items_removed = false;
362
+ $tabledata = array( WP_EMAIL_CAPTURE_TEMP_MEMBERS_TABLE, WP_EMAIL_CAPTURE_REGISTERED_MEMBERS_TABLE );
363
+
364
+ global $wpdb;
365
+
366
+ foreach ( $tabledata as $table ) {
367
+
368
+ //$delete_member_sql = "DELETE FROM $table WHERE email = '%s'";
369
+ $querysuccessful = $wpdb->delete( $table, array( 'email' => $email_address ), array( '%s' ) );
370
+
371
+ if ( false !== $querysuccessful && true !== $items_removed ) {
372
+ $items_removed = true;
373
+ $rowsremoved = $rowsremoved + $querysuccessful;
374
+ }
375
+ }
376
+
377
+ // Tell core if we have more comments to work on still
378
+ $done = $querysuccessful < $number;
379
+
380
+ return array(
381
+ 'items_removed' => $items_removed,
382
+ 'items_retained' => false, // always false in this example
383
+ 'messages' => array(), // no messages in this example
384
+ 'done' => $done,
385
+ );
386
+ }
387
+
388
+
389
+ /**
390
+ * Register the Plugin Eraser for WP Email Capture
391
+ *
392
+ * @param array $erasers All erasers.
393
+ * @return array $erasers All erasers with the WP Email Capture one.
394
+ */
395
+ function wp_email_capture_register_plugin_eraser( $erasers ) {
396
+ $erasers['wp-email-capture'] = array(
397
+ 'eraser_friendly_name' => __( 'WP Email Capture' ),
398
+ 'callback' => 'wp_email_capture_plugin_eraser',
399
+ );
400
+
401
+ return $erasers;
402
+ }
inc/gutenberg.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ defined( 'ABSPATH' ) || exit;
4
+
5
+
6
+
7
+ function wp_email_capture_enqueue_block_editor_assets() {
8
+ wp_enqueue_script(
9
+ 'wp-email-capture-gutenberg',
10
+ WP_EMAIL_CAPTURE_URL . '/inc/js/block.js',
11
+ array( 'wp-blocks', 'wp-i18n', 'wp-element', 'underscore', 'wp-editor' ),
12
+ filemtime( plugin_dir_path( __FILE__ ) . '/js/block.js' )
13
+ );
14
+ }
15
+
16
+
17
+
18
+ function wp_email_capture_enqueue_block_editor_css() {
19
+ wp_enqueue_style(
20
+ 'wp-email-capture-gutenberg-css-styles',
21
+ WP_EMAIL_CAPTURE_URL . '/inc/css/wp-email-capture-gutenberg-styles.css',
22
+ array( 'wp-blocks' ),
23
+ filemtime( plugin_dir_path( __FILE__ ) . '/css/wp-email-capture-gutenberg-styles.css' )
24
+ );
25
+ }
inc/help.php CHANGED
@@ -37,6 +37,7 @@ function wp_email_capture_free_help() {
37
  * @return void
38
  */
39
  function wp_email_capture_setup_help() {
 
40
  /**
41
  * Filter for the settings page URL for WP Email Capture
42
  *
@@ -46,27 +47,29 @@ function wp_email_capture_setup_help() {
46
  */
47
  $settingspageurl = apply_filters( 'wp_email_capture_change_settings_url', admin_url( 'admin.php?page=wpemailcapturefreesettings' ) );
48
 
49
- $furtherhelpurl = "http://wpemailcapture.com/2012/10/how-to-set-up-wp-email-capture-free/?utm_source=plugin&utm_medium=help&utm_campaign=free-setup";
50
 
51
  ?>
52
- <h3><?php echo __( 'Setup', 'wp-email-capture' ); ?></h3>
53
- <table class="form-table">
54
-
55
- <tbody>
56
-
57
- <tr valign="top">
58
- <td>
59
- <p><?php _e( 'To get WP Email Capture to work effectively, please follow the following instructions:-', 'wp-email-capture' ); ?></p>
60
- <ol>
61
- <li><?php printf( __( 'Create a page on your site for "sign up" (this page will be forwarded to when the form is just filled in, informs the users that they need to click on a link in the email. ', 'wp-email-capture' ) ); ?></li>
62
- <li><?php printf( __( 'Create a page on your site for "confirmation" (thanking them for their enquiry, links to download etc). ', 'wp-email-capture' ) ); ?></li>
63
- <li><?php printf( __( 'After creating these, fill in the settings in the <a href="%s">WP Email Capture > Settings</a> page, making sure the URL of the "sign up" page is in the "Page to redirect to on sign up" text box and the "confirmation" page URL is in the "Page to redirect to on confirmation of email address" text box.', 'wp-email-capture' ), $settingspageurl ); ?></li>
64
- </ol>
65
- <p><?php printf( __( 'Further help is available on the <a href="%s" target="_blank">WP Email Capture Support Site</a>.', 'wp-email-capture' ), $furtherhelpurl ); ?></p>
66
- </td>
67
- </tr>
68
- </tbody>
69
- </table>
 
 
70
  <?php
71
  } add_action( 'wp_email_capture_help_boxes', 'wp_email_capture_setup_help', 10 );
72
 
@@ -82,24 +85,23 @@ function wp_email_capture_options_help() {
82
  $settingspageurl = apply_filters( 'wp_email_capture_change_settings_url', admin_url( 'admin.php?page=wpemailcapturefreesettings' ) );
83
 
84
  ?>
85
-
86
- <h3><?php echo __( 'Further Options', 'wp-email-capture' ); ?></h3>
87
 
88
  <table class="form-table">
89
  <tbody>
90
  <tr valign="top">
91
  <td>
92
-
93
- <p><?php printf( __( 'On the <a href="%s">WP Email Capture Settings Page</a>, as well as being able to structure your email, you can also add the following options.', 'wp-email-capture' ), $settingspageurl ); ?></p>
94
-
95
  <p><?php printf( __( '<strong>Link to us (optional, but appreciated):</strong> This option, when ticked, adds a small, unobtrusive text link beneath the widget. Totally optional, but very appreciated as it helps support the plugin.', 'wp-email-capture' ) ); ?></p>
96
  <p><?php printf( __( '<strong>Make The "Name" field a required field?</strong> If ticked, the user will have to fill in both their name & email address. This means you get better data, but can affect conversion rates.', 'wp-email-capture' ) ); ?></p>
97
  <p><?php printf( __( '<strong>Delimeter (leave blank for a comma)</strong> This will allow you to set the delimiter used in the CSV export. Should commas be used in names, for example, you may want to change this to something like a semi-colon.', 'wp-email-capture' ) ); ?></p>
98
-
99
  </td>
100
  </tr>
101
  </tbody>
102
  </table>
 
103
 
104
  <?php
105
  } add_action( 'wp_email_capture_help_boxes', 'wp_email_capture_options_help', 20 );
@@ -115,8 +117,8 @@ function wp_email_capture_display_help() {
115
  $widgetpageurl = admin_url( 'widgets.php' );
116
 
117
  ?>
118
-
119
- <h3><?php echo __( 'Display', 'wp-email-capture' ); ?></h3>
120
 
121
  <table class="form-table">
122
  <tbody>
@@ -133,7 +135,7 @@ function wp_email_capture_display_help() {
133
  </tr>
134
  </tbody>
135
  </table>
136
-
137
  <?php
138
  } add_action( 'wp_email_capture_help_boxes', 'wp_email_capture_display_help', 30 );
139
 
@@ -147,18 +149,17 @@ function wp_email_capture_display_help() {
147
  function wp_email_capture_list_help() {
148
 
149
  $settingspageurl = apply_filters( 'wp_email_capture_change_settings_url', admin_url( 'admin.php?page=wpemailcapturefreesettings' ) );
150
- $purchasepageurl = apply_filters( 'wp_email_capture_change_purchase_url', "http://wpemailcapture.com/premium/?utm_source=help-page&utm_medium=plugin&utm_campaign=wpemailcapture" );
151
- ?>
152
 
153
- <h3><?php echo __( 'List Operations', 'wp-email-capture' ); ?></h3>
154
-
 
155
  <table class="form-table">
156
  <tbody>
157
  <tr valign="top">
158
  <td>
159
-
160
  <p><?php printf( __( 'After a while, your list should have a few subscribers. You can see the list on the <a href="%s">WP Email Capture Settings Page</a>, as well as do a few tasks as well.', 'wp-email-capture' ), $settingspageurl ); ?></p>
161
-
162
  <p><?php printf( __( '<strong>Delete [email-address]:</strong> Next to every email address is a delete button. Use this to delete any email from your list.', 'wp-email-capture' ) ); ?></p>
163
  <p><?php printf( __( '<strong>Export List:</strong> Use this to export your list to a CSV, ready for importing elsewhere.', 'wp-email-capture' ) ); ?></p>
164
  <p><?php printf( __( '<strong>Delete Unconfirmed Email Addresses:</strong> Unconfirmed email addresses are hidden in the database. Use this to delete them to reduce the space taken up by them.', 'wp-email-capture' ) ); ?></p>
@@ -167,7 +168,7 @@ function wp_email_capture_list_help() {
167
  <?php
168
 
169
  if ( $purchasepageurl ) {
170
- printf( __( '<p>WP Email Capture is only designed to be used for small (under 500 entries) lists. You can use it for more, but please consider <a href="%s" target="_blank">purchasing the premium version</a> if your list gets too big.</p>','WPEC' ), $purchasepageurl );
171
  }
172
  ?>
173
 
@@ -175,6 +176,72 @@ function wp_email_capture_list_help() {
175
  </tr>
176
  </tbody>
177
  </table>
178
-
179
  <?php
180
  } add_action( 'wp_email_capture_help_boxes', 'wp_email_capture_list_help', 40 );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
  * @return void
38
  */
39
  function wp_email_capture_setup_help() {
40
+
41
  /**
42
  * Filter for the settings page URL for WP Email Capture
43
  *
47
  */
48
  $settingspageurl = apply_filters( 'wp_email_capture_change_settings_url', admin_url( 'admin.php?page=wpemailcapturefreesettings' ) );
49
 
50
+ $furtherhelpurl = "https://www.wpemailcapture.com/2012/10/how-to-set-up-wp-email-capture-free/?utm_source=plugin&utm_medium=help&utm_campaign=wpemailcapture";
51
 
52
  ?>
53
+ <div class="wp_email_capture_help_box">
54
+ <h3 class="header"><?php echo __( 'Setup', 'wp-email-capture' ); ?></h3>
55
+ <table class="form-table">
56
+
57
+ <tbody>
58
+
59
+ <tr valign="top">
60
+ <td>
61
+ <p><?php _e( 'To get WP Email Capture to work effectively, please follow the following instructions:-', 'wp-email-capture' ); ?></p>
62
+ <ol>
63
+ <li><?php printf( __( 'Create a page on your site for "sign up" (this page will be forwarded to when the form is just filled in, informs the users that they need to click on a link in the email. ', 'wp-email-capture' ) ); ?></li>
64
+ <li><?php printf( __( 'Create a page on your site for "confirmation" (thanking them for their enquiry, links to download etc). ', 'wp-email-capture' ) ); ?></li>
65
+ <li><?php printf( __( 'After creating these, fill in the settings in the <a href="%s">WP Email Capture > Settings</a> page, making sure the URL of the "sign up" page is in the "Page to redirect to on sign up" text box and the "confirmation" page URL is in the "Page to redirect to on confirmation of email address" text box.', 'wp-email-capture' ), $settingspageurl ); ?></li>
66
+ </ol>
67
+ <p><?php printf( __( 'Further help is available on the <a href="%s" target="_blank">WP Email Capture Support Site</a>.', 'wp-email-capture' ), $furtherhelpurl ); ?></p>
68
+ </td>
69
+ </tr>
70
+ </tbody>
71
+ </table>
72
+ </div>
73
  <?php
74
  } add_action( 'wp_email_capture_help_boxes', 'wp_email_capture_setup_help', 10 );
75
 
85
  $settingspageurl = apply_filters( 'wp_email_capture_change_settings_url', admin_url( 'admin.php?page=wpemailcapturefreesettings' ) );
86
 
87
  ?>
88
+ <div class="wp_email_capture_help_box">
89
+ <h3 class="header"><?php echo __( 'Further Options', 'wp-email-capture' ); ?></h3>
90
 
91
  <table class="form-table">
92
  <tbody>
93
  <tr valign="top">
94
  <td>
95
+ <p><?php printf( __( 'On the <a href="%s">WP Email Capture Settings Page</a>, as well as being able to structure your email, you can also add the following options.', 'wp-email-capture' ), $settingspageurl ); ?></p>
 
 
96
  <p><?php printf( __( '<strong>Link to us (optional, but appreciated):</strong> This option, when ticked, adds a small, unobtrusive text link beneath the widget. Totally optional, but very appreciated as it helps support the plugin.', 'wp-email-capture' ) ); ?></p>
97
  <p><?php printf( __( '<strong>Make The "Name" field a required field?</strong> If ticked, the user will have to fill in both their name & email address. This means you get better data, but can affect conversion rates.', 'wp-email-capture' ) ); ?></p>
98
  <p><?php printf( __( '<strong>Delimeter (leave blank for a comma)</strong> This will allow you to set the delimiter used in the CSV export. Should commas be used in names, for example, you may want to change this to something like a semi-colon.', 'wp-email-capture' ) ); ?></p>
99
+ <p><?php printf( __( '<strong>Use Default Styling</strong> The plugin comes with a simple default styling that makes the plugin look neater. Use if you are not comfortable with CSS, or your theme does not style forms.', 'wp-email-capture' ) ); ?></p>
100
  </td>
101
  </tr>
102
  </tbody>
103
  </table>
104
+ </div>
105
 
106
  <?php
107
  } add_action( 'wp_email_capture_help_boxes', 'wp_email_capture_options_help', 20 );
117
  $widgetpageurl = admin_url( 'widgets.php' );
118
 
119
  ?>
120
+ <div class="wp_email_capture_help_box">
121
+ <h3 class="header"><?php echo __( 'Display', 'wp-email-capture' ); ?></h3>
122
 
123
  <table class="form-table">
124
  <tbody>
135
  </tr>
136
  </tbody>
137
  </table>
138
+ </div>
139
  <?php
140
  } add_action( 'wp_email_capture_help_boxes', 'wp_email_capture_display_help', 30 );
141
 
149
  function wp_email_capture_list_help() {
150
 
151
  $settingspageurl = apply_filters( 'wp_email_capture_change_settings_url', admin_url( 'admin.php?page=wpemailcapturefreesettings' ) );
152
+ $purchasepageurl = apply_filters( 'wp_email_capture_change_purchase_url', 'https://www.wpemailcapture.com/premium/?utm_source=help-page&utm_medium=plugin&utm_campaign=wpemailcapture' );
 
153
 
154
+ ?>
155
+ <div class="wp_email_capture_help_box">
156
+ <h3 class="header"><?php echo __( 'List Operations', 'wp-email-capture' ); ?></h3>
157
  <table class="form-table">
158
  <tbody>
159
  <tr valign="top">
160
  <td>
161
+
162
  <p><?php printf( __( 'After a while, your list should have a few subscribers. You can see the list on the <a href="%s">WP Email Capture Settings Page</a>, as well as do a few tasks as well.', 'wp-email-capture' ), $settingspageurl ); ?></p>
 
163
  <p><?php printf( __( '<strong>Delete [email-address]:</strong> Next to every email address is a delete button. Use this to delete any email from your list.', 'wp-email-capture' ) ); ?></p>
164
  <p><?php printf( __( '<strong>Export List:</strong> Use this to export your list to a CSV, ready for importing elsewhere.', 'wp-email-capture' ) ); ?></p>
165
  <p><?php printf( __( '<strong>Delete Unconfirmed Email Addresses:</strong> Unconfirmed email addresses are hidden in the database. Use this to delete them to reduce the space taken up by them.', 'wp-email-capture' ) ); ?></p>
168
  <?php
169
 
170
  if ( $purchasepageurl ) {
171
+ printf( __( '<p>WP Email Capture is only designed to be used for small (under 500 entries) lists. You can use it for more, but please consider <a href="%s" target="_blank">purchasing the premium version</a> if your list gets too big.</p>','wp-email-capture' ), $purchasepageurl );
172
  }
173
  ?>
174
 
176
  </tr>
177
  </tbody>
178
  </table>
179
+ </div>
180
  <?php
181
  } add_action( 'wp_email_capture_help_boxes', 'wp_email_capture_list_help', 40 );
182
+
183
+
184
+ /**
185
+ * Displays the help for the "List Operations" section of the help documentation.
186
+ *
187
+ * @return void
188
+ */
189
+ function wp_email_capture_gdpr_help() {
190
+
191
+ $settingspageurl = apply_filters( 'wp_email_capture_change_settings_url', admin_url( 'admin.php?page=wpemailcapturefreesettings' ) );
192
+ //$purchasepageurl = apply_filters( 'wp_email_capture_change_purchase_url', "https://www.wpemailcapture.com/premium/?utm_source=help-page&utm_medium=plugin&utm_campaign=wpemailcapture" );
193
+ ?>
194
+ <div class="wp_email_capture_help_box">
195
+ <h3 class="header"><?php echo __( 'GDPR Guidelines', 'wp-email-capture' ); ?></h3>
196
+
197
+ <table class="form-table">
198
+ <tbody>
199
+ <tr valign="top">
200
+ <td>
201
+
202
+ <p><?php printf( __( 'You will need to be running version 4.9.6 of WordPress to use the GDPR settings. Your settings are located in the <a href="%s">WP Email Capture Settings page</a> (in the GDPR section).' , 'wp-email-capture' ), $settingspageurl ); ?></p>
203
+
204
+ <p><?php printf( __( 'You can specify a privacy policy that - if present, activates a checkbox allowing signups to accept your privacy policy. Users will need to check that to sign up. You can also choose to delete responses after a number of days/weeks/months, and there is a section of text you can paste into your privacy policy too.', 'wp-email-capture' ) ); ?></p>
205
+
206
+ <p><?php printf( __( 'Should you ever receive a request to export/delete, you can use the new Export/Delete personal data, held in the Tools section.', 'wp-email-capture' ) ); ?>
207
+
208
+ </td>
209
+ </tr>
210
+ </tbody>
211
+ </table>
212
+ </div>
213
+ <?php
214
+ }
215
+
216
+
217
+
218
+ /**
219
+ * Displays the help for the "Gutenberg" section of the help documentation.
220
+ *
221
+ * @return void
222
+ */
223
+ function wp_email_capture_gutenberg_help() {
224
+ ?>
225
+ <div class="wp_email_capture_help_box">
226
+ <h3 class="header"><?php echo __( 'New WordPress Editor (Codenamed Gutenberg)', 'wp-email-capture' ); ?></h3>
227
+
228
+ <table class="form-table">
229
+ <tbody>
230
+ <tr valign="top">
231
+ <td>
232
+
233
+ <p><?php printf( __( 'If you are using the new WordPress editor (codenamed Gutenberg), you can add a WP Email Capture Gutenberg content block.' , 'wp-email-capture' ) ); ?></p>
234
+
235
+ <p><?php printf( __( 'Search for "WP Email Capture Form" to add it to your site. It is also located under "Widgets"', 'wp-email-capture' ) ); ?></p>
236
+
237
+ <p><?php printf( __( 'This widget works similar to the WP Email Capture widget, in that you can define an intro text and a title to help introduce your box.', 'wp-email-capture' ) ); ?>
238
+
239
+ <p><?php printf( __( 'There is a placeholder for where the form goes as well, this will show the form on the front end, but not on the back end.', 'wp-email-capture' ) ); ?>
240
+
241
+ </td>
242
+ </tr>
243
+ </tbody>
244
+ </table>
245
+ </div>
246
+ <?php
247
+ }
inc/img/akismet-image.gif ADDED
Binary file
inc/img/drip-image.png ADDED
Binary file
inc/img/redirect-if-present.png ADDED
Binary file
inc/img/wpemailcapture-avatar.png ADDED
Binary file
inc/install.php CHANGED
@@ -7,65 +7,63 @@
7
  */
8
  function wp_email_capture_install() {
9
 
10
- global $wpdb;
11
-
12
  global $wp_email_capture_db_version;
13
 
14
- require_once ABSPATH . 'wp-admin/includes/upgrade.php';
15
-
16
- $registered_members_table = WP_EMAIL_CAPTURE_REGISTERED_MEMBERS_TABLE;
17
-
18
- if ( $wpdb->get_var( "show tables like '$registered_members_table'" ) != $registered_members_table ) {
19
 
20
- $create_registered_members_table_sql = "
21
 
22
- CREATE TABLE " . $registered_members_table . " (
23
 
24
- id INT( 255 ) NOT NULL AUTO_INCREMENT ,
25
 
26
- name TINYTEXT NOT NULL ,
27
 
28
- email TEXT NOT NULL ,
 
29
 
30
- PRIMARY KEY (id)
31
-
32
- );";
 
 
 
 
33
 
34
  dbDelta( $create_registered_members_table_sql );
35
 
36
- }
37
-
38
- $temp_members_table_name = WP_EMAIL_CAPTURE_TEMP_MEMBERS_TABLE;
39
-
40
- if ( $wpdb->get_var( "show tables like '$temp_members_table_name'" ) != $temp_members_table_name ) {
41
-
42
- $create_temp_members_table_sql = "
 
43
 
44
- CREATE TABLE " . $temp_members_table_name . " (
45
 
46
- id INT( 255 ) NOT NULL AUTO_INCREMENT ,
47
 
48
- name TINYTEXT NOT NULL ,
 
49
 
50
- email TEXT NOT NULL ,
51
 
52
- confirm_code TEXT NOT NULL,
53
 
54
- PRIMARY KEY (id)
55
 
56
- );";
 
 
 
 
 
57
 
58
- dbDelta( $create_temp_members_table_sql );
59
 
 
 
60
  }
61
 
62
- $from = get_option( 'admin_email' );
63
- add_option( 'wp_email_capture_link', 1 );
64
- add_option( 'wp_email_capture_from', $from );
65
- add_option( "wp_email_capture_db_version", $wp_email_capture_db_version );
66
-
67
  }
68
-
69
-
70
-
71
- ?>
7
  */
8
  function wp_email_capture_install() {
9
 
 
 
10
  global $wp_email_capture_db_version;
11
 
12
+ $installed_ver = get_option( 'wp_email_capture_db_version' );
 
 
 
 
13
 
14
+ if ( $installed_ver != $wp_email_capture_db_version ) {
15
 
16
+ global $wpdb;
17
 
18
+ $charset_collate = $wpdb->get_charset_collate();
19
 
20
+ require_once ABSPATH . 'wp-admin/includes/upgrade.php';
21
 
22
+ $registered_members_table_name = WP_EMAIL_CAPTURE_REGISTERED_MEMBERS_TABLE;
23
+ $temp_members_table_name = WP_EMAIL_CAPTURE_TEMP_MEMBERS_TABLE;
24
 
25
+ $create_registered_members_table_sql =
26
+ "CREATE TABLE {$registered_members_table_name} (
27
+ id INT( 255 ) NOT NULL AUTO_INCREMENT ,
28
+ name TINYTEXT NOT NULL ,
29
+ email TEXT NOT NULL ,
30
+ date DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
31
+ UNIQUE KEY id (id)) $charset_collate ;";
32
 
33
  dbDelta( $create_registered_members_table_sql );
34
 
35
+ $create_temp_members_table_sql =
36
+ "CREATE TABLE {$temp_members_table_name} (
37
+ id INT( 255 ) NOT NULL AUTO_INCREMENT ,
38
+ name TINYTEXT NOT NULL ,
39
+ email TEXT NOT NULL ,
40
+ confirm_code TEXT NOT NULL ,
41
+ date DATETIME NOT NULL ,
42
+ UNIQUE KEY id (id)) $charset_collate;";
43
 
44
+ dbDelta( $create_temp_members_table_sql );
45
 
46
+ update_option( 'wp_email_capture_db_version', $wp_email_capture_db_version );
47
 
48
+ $from = get_option( 'admin_email' );
49
+ add_option( 'wp_email_capture_from', $from );
50
 
51
+ }
52
 
53
+ }
54
 
 
55
 
56
+ /**
57
+ * Upgrade the database to the latest free one if needed.
58
+ *
59
+ * @return void
60
+ */
61
+ function wp_email_capture_database_upgdrade() {
62
 
63
+ global $wp_email_capture_db_version;
64
 
65
+ if ( get_site_option( 'wp_email_capture_db_version' ) != $wp_email_capture_db_version ) {
66
+ wp_email_capture_install();
67
  }
68
 
 
 
 
 
 
69
  }
 
 
 
 
inc/js/admin-custom.js CHANGED
@@ -1,15 +1,66 @@
1
  jQuery(document).ready(function () {
2
  jQuery('a.nav-tab').click(function () {
3
- jQuery('.wpemailcapture-tab').removeClass('active');
4
- jQuery('.wpemailcapture-tab').removeClass('active');
5
- var id = jQuery(this).attr('href');
6
- jQuery(id).addClass('active');
7
  });
8
 
9
  jQuery('a.non-nav-tab').click(function () {
10
- jQuery('.wpemailcapture-tab').removeClass('active');
11
- jQuery('.wpemailcapture-tab').removeClass('active');
12
- var id = jQuery(this).attr('href');
13
- jQuery(id).addClass('active');
14
  });
15
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  jQuery(document).ready(function () {
2
  jQuery('a.nav-tab').click(function () {
3
+ jQuery('.wpemailcapture-tab').removeClass('active');
4
+ jQuery('.wpemailcapture-tab').removeClass('active');
5
+ var id = jQuery(this).attr('href');
6
+ jQuery(id).addClass('active');
7
  });
8
 
9
  jQuery('a.non-nav-tab').click(function () {
10
+ jQuery('.wpemailcapture-tab').removeClass('active');
11
+ jQuery('.wpemailcapture-tab').removeClass('active');
12
+ var id = jQuery(this).attr('href');
13
+ jQuery(id).addClass('active');
14
  });
15
+
16
+ jQuery('#wp_email_capture_link_checkbox').change(function() {
17
+ if(this.checked) {
18
+ jQuery('.wp_email_capture_admin_discount').show();
19
+ } else {
20
+ jQuery('.wp_email_capture_admin_discount').hide();
21
+ }
22
+ });
23
+
24
+ jQuery('#wp_email_capture_enable_gdpr').change(function () {
25
+ if (this.checked) {
26
+ jQuery('.gdpr-table').show();
27
+ } else {
28
+ jQuery('.gdpr-table').hide();
29
+ }
30
+ });
31
+
32
+ jQuery('#wp_email_capture_unit_for_privacy').change(function () {
33
+ jQuery('.save-to-change').show();
34
+ jQuery('#copytext').prop( "disabled", true );
35
+ });
36
+
37
+ jQuery('#wp_email_capture_number_for_privacy').change(function () {
38
+ jQuery('.save-to-change').show();
39
+ jQuery('#copytext').prop("disabled", true);
40
+ });
41
+
42
+ jQuery('#copytext').click( function () {
43
+ /* Select the text field */
44
+ jQuery('#copyrightnotice').prop('disabled', false);
45
+ jQuery('#copyrightnotice').select();
46
+ document.execCommand("Copy");
47
+ jQuery('#copyrightnotice').prop('disabled', true);
48
+ });
49
+
50
+ // Only listen to YOUR notices being dismissed
51
+ jQuery(document).on('click', '.notice-wp-email-mysql .notice-dismiss', function () {
52
+ // Read the "data-notice" information to track which notice
53
+ // is being dismissed and send it via AJAX
54
+ var type = jQuery(this).closest('.notice-wp-email-mysql').data('notice');
55
+ // Make an AJAX call
56
+ // Since WP 2.8 ajaxurl is always defined in the admin header and points to admin-ajax.php
57
+ jQuery.ajax(ajaxurl,
58
+ {
59
+ type: 'POST',
60
+ data: {
61
+ action: 'dismissed_notice_handler',
62
+ type: type,
63
+ }
64
+ });
65
+ });
66
+ });
inc/js/block.js ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ( function( blocks, i18n, element, _ ) {
2
+ var el = element.createElement;
3
+ var Fragment = wp.element.Fragment;
4
+ var RichText = wp.editor.RichText;
5
+
6
+ blocks.registerBlockType( 'wp-email-capture/wp-email-capture-form', {
7
+ title: i18n.__( 'WP Email Capture Form' ),
8
+ icon: 'email-alt',
9
+ category: 'widgets',
10
+ attributes: {
11
+ title: {
12
+ type: 'array',
13
+ source: 'children',
14
+ selector: 'h2',
15
+ },
16
+ subscriptiondetails: {
17
+ type: 'array',
18
+ source: 'children',
19
+ selector: '.steps',
20
+ },
21
+ },
22
+ edit: function( props ) {
23
+ var focusedEditable = props.focus ? props.focus.editable || 'title' : null;
24
+ var attributes = props.attributes;
25
+
26
+ return (
27
+ el(
28
+ Fragment,
29
+ null,
30
+ el( 'div', { className: props.className },
31
+ el( RichText, {
32
+ tagName: 'h2',
33
+ inline: true,
34
+ placeholder: i18n.__( 'WP Email Capture title…' ),
35
+ value: attributes.title,
36
+ onChange: function( value ) {
37
+ props.setAttributes( { title: value } );
38
+ },
39
+ focus: focusedEditable === 'title' ? focus : null,
40
+ onFocus: function( focus ) {
41
+ props.setFocus( _.extend( {}, focus, { editable: 'title' } ) );
42
+ },
43
+ } ),
44
+ el( RichText, {
45
+ tagName: 'p',
46
+ inline: false,
47
+ placeholder: i18n.__( 'Write your signup paragraph here…' ),
48
+ value: attributes.subscriptiondetails,
49
+ onChange: function( value ) {
50
+ props.setAttributes( { subscriptiondetails: value } );
51
+ },
52
+ focus: focusedEditable === 'subscriptiondetails' ? focus : null,
53
+ onFocus: function( focus ) {
54
+ props.setFocus( _.extend( {}, focus, { editable: 'subscriptiondetails' } ) );
55
+ },
56
+ } ),
57
+ el ('div', { className: 'wp-email-capture wp-email-capture-display' },
58
+ el( 'h3', { className: 'wp-email-capture-admin-form' }, i18n.__( 'The WP Email Capture Form Will Be Here' ) )
59
+ )
60
+ )
61
+ )
62
+ );
63
+ },
64
+ save: function( props ) {
65
+ var attributes = props.attributes;
66
+
67
+ return (
68
+ el( 'div', { className: props.className },
69
+ el( 'h2', {}, attributes.title ),
70
+ el( 'div', { className: 'steps' }, attributes.subscriptiondetails ),
71
+ el( 'div', {}, '[wp_email_capture_form]')
72
+ )
73
+ );
74
+ },
75
+ } );
76
+
77
+ } )(
78
+ window.wp.blocks,
79
+ window.wp.i18n,
80
+ window.wp.element,
81
+ window._,
82
+ );
inc/js/wp_email_capture_button.js ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function() {
2
+ tinymce.PluginManager.add('wpemailcapturebutton', function( editor, url ) {
3
+ var urlimg = url.replace("js", "img");
4
+ console.log( urlimg );
5
+ editor.addButton( 'wpemailcapturebutton', {
6
+ title: 'Add WP Email Capture Form',
7
+ image: urlimg + "/wpemailcapture-avatar.png",
8
+ //icon: 'icon dashicons-lightbulb',
9
+ onclick: function() {
10
+ ebaystring = '[wp_email_capture_form]';
11
+ editor.insertContent( ebaystring );
12
+ }
13
+ });
14
+ });
15
+ })();
inc/options.php CHANGED
@@ -5,11 +5,11 @@
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','WPEC'), 'activate_plugins', 'wpemailcapture', 'wp_email_capture_dashboard',$avatar,85);
11
- add_submenu_page('wpemailcapture',__('Settings'), __('Settings','WPEC'), 'activate_plugins', 'wpemailcapturefreesettings', 'wp_email_capture_free_options');
12
- add_submenu_page('wpemailcapture',__('Help'), __('Help','WPEC'), 'activate_plugins', 'wpemailcapturefreehelp', 'wp_email_capture_free_help');
13
  }
14
 
15
 
@@ -21,82 +21,233 @@ function wp_email_capture_menus() {
21
  */
22
  function wp_email_capture_dashboard() {
23
 
24
- ?>
25
- <div class="wrap about-wrap">
26
-
27
- <h1><?php _e( 'Welcome to WP Email Capture!', 'wp-email-capture' ); ?></h1>
28
-
29
- <div class="about-text">
30
- <?php _e( 'Start collecting email subscribers today!', 'wp-email-capture' ); ?><br/>
31
- </div>
32
-
33
- <h2 class="nav-tab-wrapper" id="wpemailcapture-tabs">
34
- <a class="nav-tab" href="#dashboard" id="dashboard-tab"><?php _e( 'Dashboard', 'wp-email-capture' ); ?></a>
35
- <a class="nav-tab" href="#changelog" id="changelog-tab"><?php _e( 'Changelog', 'wp-email-capture' ); ?></a>
36
- <a class="nav-tab" href="#credits" id="credits-tab"><?php _e( 'Credits', 'wp-email-capture' ); ?></a>
37
- </h2>
38
-
39
- <div id="dashboard" class="wpemailcapture-tab <?php if ( !esc_attr( $_GET['wpecupgrade'] ) ) { echo " active "; } ?>">
40
- <h2><?php _e( 'Welcome to WP Email Capture', 'wp-email-capture' ); ?></h2>
41
-
42
- <h3><?php _e( 'New in 3.0 - Complete Rewrite', 'wp-email-capture' ); ?></h3>
43
-
44
- <p><?php _e( '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. We also introduced two new translations and fixed a bug.', 'WPEC'); ?></p>
45
-
46
- <p><a class="non-nav-tab" href="#changelog" id="changelog-tab"><?php _e( 'Read the changelog', 'WPEC'); ?></a></p>
47
-
48
- <?php
49
-
50
- do_action( 'wp_email_capture_dashboard_premium_upsell' );
51
-
52
- ?>
53
-
54
- <?php /* <h2><?php _e( 'Extensions', 'wp-email-capture' ); ?></h2> */ ?>
55
- </div>
56
-
57
- <div id="changelog" class="wpemailcapture-tab <?php if ( esc_attr( $_GET['wpecupgrade'] ) ) { echo " active "; } ?>">
58
- <h2><?php _e( 'Changelog', 'wp-email-capture' ); ?></h2>
59
- <h3><?php _e( 'Code Refactorisation', 'wp-email-capture' ); ?></h3>
60
- <p><?php _e( '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.', 'WPEC'); ?></p>
61
- <h3><?php _e( 'Other Changes', 'wp-email-capture' ); ?></h3>
62
- <ul>
63
- <li><?php _e( 'Fixed a bug that the "Hide Notice" dismissive now works.', 'wp-email-capture' ); ?></li>
64
- <li><?php echo sprintf( __( 'Updated French Translation (thanks <a href="%s" target="_blank">Andrew</a>).', 'wp-email-capture' ), 'http://www.acusti.ca/' ); ?></li>
65
- <li><?php echo sprintf( __( 'Added Croatian Translation (thanks <a href="%s" target="_blank">Lem Treursić</a>).', 'wp-email-capture'), 'http://grafika-dizajn.com/' ); ?></li>
66
- <li><?php _e( 'Added Welcome Screen', 'wp-email-capture' ); ?></li>
67
- <li><?php _e( 'Added P tag around text widget introduction.', 'wp-email-capture' ); ?></li>
68
- <li><?php _e( 'Added better help documentation within the plugin.', 'wp-email-capture' ); ?></li>
69
- <li><?php _e( 'Added signup & confirm actions, to allow users to remove/add their own actions.', 'wp-email-capture' ); ?></li>
70
- <li><?php _e( 'Added a filter to the display form, so it can be changed.', 'wp-email-capture' ); ?></li>
71
- <li><?php echo sprintf( __( 'Add a filter for other subscription plugins (props <a href="%s" target="_blank">Dylan Kuhn</a>', 'wp-email-capture' ) , 'http://www.cyberhobo.net/' ); ?></li>
72
- <li><?php _e( 'Changed menu structure', 'wp-email-capture' ); ?></li>
73
- <li><?php _e( 'Made compatible with WordPress 4.3, with new widget structure.', 'wp-email-capture' ); ?></li>
74
- <li><?php _e( 'Made compatible with new language packs.', 'wp-email-capture' ); ?></li>
75
- </ul>
76
- </div>
77
-
78
- <div id="credits" class="wpemailcapture-tab">
79
- <h2><?php _e( 'Credits', 'wp-email-capture' ); ?></h2>
80
- <p><?php _e( 'This plugin has been helped and improved by the following people', 'wp-email-capture' ); ?></p>
81
- <h3><?php _e('Translations', 'wp-email-capture' ); ?></h3>
82
- <ul>
83
- <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>.','WPEC' ), 'http://www.ticket-system.net/', 'http://www.acusti.ca/', 'http://twitter.com/andpatton' ); ?><li>
84
- <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> &amp; Ov3rFly', 'wp-email-capture' ), 'http://www.computersniffer.com/', 'http://www.libertello.de/', 'http://twitter.com/libertello' ); ?></li>
85
- <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>
86
- <li><?php echo sprintf( __( '<strong>Dutch Translation:</strong> <a href="%s" target="_blank">Sander</a>', 'wp-email-capture' ), 'http://www.zanderz.net/' ); ?></li>
87
- <li><?php echo sprintf( __( '<strong>Hungarian Translation:</strong> <a href="%s" target="_blank">Surbma</a>', 'wp-email-capture' ), 'http://surbma.hu/' ); ?></li>
88
- <li><?php echo sprintf( __( '<strong>Spanish Translation:</strong> <a href="%s" target="_blank">David Bravo</a>' , 'wp-email-capture' ), 'http://dimensionmultimedia.com' ); ?></li>
89
- <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>
90
- <li><?php echo sprintf( __( '<strong>Serbian Translation:</strong> <a href="%s" target="_blank">Borisa Djuraskovic</a>' , 'wp-email-capture' ), 'http://www.webhostinghub.com/' ); ?></li>
91
- <li><?php echo sprintf( __( '<strong>Croatian Translation:</strong> <a href="%s" target="_blank">Lem Treursić</a>' , 'wp-email-capture' ), 'http://grafika-dizajn.com/' ); ?></li>
92
- </ul>
93
- <h3><?php _e( 'Contribute?', 'wp-email-capture' ); ?></h3>
94
- <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>
95
- </div>
96
- </div>
97
- <?php
98
-
99
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
100
 
101
 
102
  /**
@@ -106,167 +257,311 @@ function wp_email_capture_dashboard() {
106
  */
107
  function wp_email_capture_free_options() {
108
 
109
- echo '<div class="wrap">
110
- <div style="width:70%;float:left;clear:both;" class="postbox-container">
111
- <div class="metabox-holder"><div class="meta-box-sortables">
112
- <h2>'.__( 'WP Email Capture Options', 'wp-email-capture' ).'</h2>
113
- <h3>'.__( 'Options', 'wp-email-capture' ).'</h3>';
114
 
115
- ?>
116
 
117
- <form method="post" action="options.php">
118
 
119
- <?php wp_nonce_field( 'update-options' ); ?>
120
 
121
- <?php settings_fields( 'wp-email-capture-group' ); ?>
122
 
123
- <table class="form-table">
124
 
125
- <tbody>
126
 
127
- <tr valign="top">
128
 
129
- <th scope="row" style="width:400px"><?php _e( 'Page to redirect to on sign up (full web address ie: http://www.domain.com/this-page/)', 'wp-email-capture' ); ?></th>
130
 
131
- <td><input type="text" name="wp_email_capture_signup" class="regular-text code" value="<?php echo get_option( 'wp_email_capture_signup' ); ?>" /></td>
132
 
133
- </tr>
134
 
135
- <tr valign="top">
136
 
137
- <th scope="row" style="width:400px"><label for="wp_email_capture_redirection"><?php _e( 'Page to redirect to on confirmation of email address (full web address ie: http://www.domain.com/this-other-page/)', 'wp-email-capture' ); ?></label></th>
138
 
139
- <td><input type="text" name="wp_email_capture_redirection" class="regular-text code" value="<?php echo get_option( 'wp_email_capture_redirection' ); ?>" /></td>
140
 
141
- </tr>
142
 
143
- <tr valign="top">
144
 
145
- <th scope="row" style="width:400px"><label for="wp_email_capture_from"><?php _e( 'From Which Email Address', 'wp-email-capture' ); ?></label></th>
146
 
147
- <td><input type="text" name="wp_email_capture_from" class="regular-text code" value="<?php echo get_option( 'wp_email_capture_from' ); ?>" /></td>
148
 
149
- </tr>
150
 
151
- <tr valign="top">
152
 
153
- <th scope="row" style="width:400px"><label for="wp_email_capture_from_name"><?php _e( 'From Which Name', 'wp-email-capture' ); ?></label></th>
154
 
155
- <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>
156
 
157
- </tr>
158
 
159
- <tr valign="top">
160
 
161
- <th scope="row" style="width:400px"><?php _e( 'Subject of Email', 'wp-email-capture' ); ?></th>
162
 
163
- <td><input type="text" name="wp_email_capture_subject" class="regular-text code" value="<?php echo get_option( 'wp_email_capture_subject' ); ?>" /></td>
164
 
165
- </tr>
166
 
167
- <tr valign="top">
168
 
169
- <th scope="row" style="width:400px"><label for="wp_email_capture_body"><?php _e( 'Body of Email', 'wp-email-capture' ); ?><br>
170
- <?php _e( '(use %NAME% to use the form\'s &quot;Name&quot; field in their welcome email)', 'wp-email-capture' ); ?></label>
171
- </th>
172
 
173
- <td><textarea name="wp_email_capture_body" style="width: 25em;"><?php echo get_option( 'wp_email_capture_body' ); ?></textarea></td>
 
 
174
 
175
- </tr>
176
 
177
- <tr valign="top">
178
 
179
- <th scope="row" style="width:400px"><label><?php _e( 'Link to us (optional, but appreciated)', 'wp-email-capture' ); ?></label></th>
180
 
181
- <td><input type="checkbox" name="wp_email_capture_link" value="1" <?php checked( get_option( 'wp_email_capture_link' ), 1 ); ?> /></td>
182
 
183
- </tr>
 
 
 
184
 
185
- <tr valign="top">
186
 
187
- <th scope="row" style="width:400px"><label><?php _e( 'Make The "Name" field a required field?', 'wp-email-capture' ); ?></label></th>
 
 
 
 
188
 
189
- <td><input type="checkbox" name="wp_email_capture_name_required" value="1" <?php checked( get_option( 'wp_email_capture_name_required' ), 1 ); ?> /></td>
190
 
191
- </tr>
192
 
193
- <tr valign="top">
194
 
195
- <th scope="row" style="width:400px"><?php _e( 'Delimeter (leave blank for a comma)', 'wp-email-capture' ); ?></th>
196
 
197
- <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>
198
 
199
- </tr>
200
 
201
- </tbody>
202
 
203
- </table>
204
 
205
- <input type="hidden" name="action" value="update" />
206
 
207
- <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" />
208
 
209
- <p class="submit">
210
 
211
- <input type="submit" class="button-primary" value="<?php _e( 'Save Changes', 'wp-email-capture' ) ?>" />
212
 
213
- </p>
214
 
215
- </form>
216
 
 
217
 
 
218
 
219
- <?php
 
220
 
221
- wp_email_capture_writetable();
222
 
223
- echo '<a name="list"></a><h3>'.__( 'Export', 'wp-email-capture' ).'</h3>
224
- <form name="wp_email_capture_export" action="'. esc_url( $_SERVER['REQUEST_URI'] ) . '#list" method="post">
225
 
226
- <label>'.__( 'Use the button below to export your list as a CSV to use in software such as <a href="http://wpemailcapture.com/recommends/aweber" title="Email Marketing">Aweber</a> or <a href="http://wpemailcapture.com/recommends/mailchimp">Mailchimp</a>', 'wp-email-capture' ).'</label>
227
- <input type="hidden" name="wp_email_capture_export" />
228
- <div class="submit">
229
- <input type="submit" value="'.__( 'Export List', 'wp-email-capture' ).'" class="button" />
230
- </div>
231
 
232
- </form>';
 
233
 
234
- $tempemails = wp_email_capture_count_temp();
235
 
236
- echo "<a name='truncate'></a><h3>".__( 'Temporary e-mails', 'wp-email-capture' )."</h3>\n";
237
 
238
- echo '<form name="wp_email_capture_truncate" action="'. esc_url( $_SERVER['REQUEST_URI'] ) . '#truncate" method="post">';
239
 
240
- echo '<label>'.__( 'There are', 'wp-email-capture' ).' '. $tempemails . ' '.__( 'e-mail addresses that have been unconfirmed. Delete them to save space below.', 'wp-email-capture' ).'</label>';
241
 
242
- echo '<input type="hidden" name="wp_email_capture_truncate"/>';
243
 
244
- echo '<div class="submit"><input type="submit" value="'.__( 'Delete Unconfirmed e-mail Addresses', 'wp-email-capture' ).'" class="button" /></div>';
245
 
246
- echo "</form>";
247
 
248
- echo "<a name='emptyallemails'></a><h3>".__( 'Delete Current List', 'wp-email-capture' )."</h3>\n";
249
 
250
- echo '<form name="wp_email_capture_delete" action="'. esc_url( $_SERVER['REQUEST_URI'] ) . '#delete" method="post">';
 
 
251
 
252
- 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>';
253
 
254
- echo '<input type="hidden" name="wp_email_capture_delete"/>';
255
 
256
- echo '<div class="submit"><input type="submit" value="'.__( 'Delete Confirmed e-mail Addresses', 'wp-email-capture' ).'" class="button" /></div>';
257
 
258
- echo "</form>";
 
 
 
 
 
 
 
 
259
 
260
- echo '</div></div></div>';
261
 
262
- wp_email_capture_admin_sidebar( "getwpemailcapturepremiumdescription,affiliates,news,supportus" );
263
 
264
- echo '</div>';
265
- ?>
266
 
 
 
267
 
268
- <?php
269
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
270
 
271
 
272
  /**
@@ -276,75 +571,344 @@ function wp_email_capture_free_options() {
276
  */
277
  function wp_email_capture_options_process() { // whitelist options
278
 
279
- register_setting( 'wp-email-capture-group', 'wp_email_capture_signup' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
280
 
281
- register_setting( 'wp-email-capture-group', 'wp_email_capture_redirection' );
282
 
283
- register_setting( 'wp-email-capture-group', 'wp_email_capture_from' );
284
 
285
- register_setting( 'wp-email-capture-group', 'wp_email_capture_subject' );
286
 
287
- register_setting( 'wp-email-capture-group', 'wp_email_capture_body' );
 
 
 
288
 
289
- register_setting( 'wp-email-capture-group', 'wp_email_capture_link' );
290
 
291
- register_setting( 'wp-email-capture-group', 'wp_email_capture_from_name' );
292
 
293
- register_setting( 'wp-email-capture-group', 'wp_email_capture_name_required' );
294
 
295
- register_setting( 'wp-email-capture-group', 'wp_email_capture_name_delimeter' );
296
 
297
- if ( isset( $_REQUEST['wp_email_capture_export'] ) ) {
298
 
299
- wp_email_capture_export();
300
 
301
- }
302
 
303
- if ( isset( $_REQUEST['wp_email_capture_deleteid'] ) ) {
304
- $wpemaildeleteid = esc_attr( $_POST['wp_email_capture_deleteid'] );
305
- wp_email_capture_deleteid( $wpemaildeleteid );
306
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
307
 
308
 
309
- if ( isset( $_REQUEST['wp_email_capture_truncate'] ) ) {
 
 
 
 
 
 
310
 
311
- wp_email_capture_truncate();
 
312
 
313
- }
314
 
315
- if ( isset( $_REQUEST['wp_email_capture_delete'] ) ) {
 
316
 
317
- wp_email_capture_delete();
318
 
319
- }
 
 
 
320
 
321
- /**
322
- * Action to hook into to register any other options.
323
- */
324
- do_action( 'wp_email_capture_added_option_process' );
325
 
326
  }
327
 
328
 
329
  /**
330
- * Box to upsell WP Email Capture Premium
331
- *
332
- * @return void
 
 
333
  */
334
- function wp_email_capture_premium_upsell() {
335
- ?>
336
- <h3><?php _e( 'Upgrade To WP Email Capture Premium', 'wp-email-capture' ); ?></h3>
337
- <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>
338
- <ul>
339
- <li><?php _e( '<strong>Stat tracking</strong> - track the visitors to your site and where your sign ups come from.', 'wp-email-capture' ); ?></li>
340
- <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>
341
- <li><?php _e( '<strong>Multiple lists</strong> - Create multiple lists for your site.', 'wp-email-capture' ); ?></li>
342
- <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>
343
- <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>
344
- </ul>
345
- <p><?php _e( 'You also get premium support for a whole year!', 'wp-email-capture' ); ?></p>
346
- <a href="http://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>
347
- <?php
348
- } add_action( 'wp_email_capture_dashboard_premium_upsell', 'wp_email_capture_premium_upsell' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
349
 
350
- ?>
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
 
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',
31
+ 'imageurl' => WP_EMAIL_CAPTURE_URL . '/inc/img/redirect-if-present.png',
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.5 - GDPR Changes', 'wp-email-capture' ); ?></h3>
108
+
109
+ <p><?php _e( 'Version 3.5 integrates with the new WordPress Data importer and exporter, allowing you to manage the data you collect, some text to add to the privacy policy, as well as allowing the automatic deletion of data after a short period of time.', 'wp-email-capture' ); ?></p>
110
+ <p><?php _e( 'This update will not make you GDPR compatible, but will help towards it. You can delete and view data should you get a request, delete data after a certain period of time, as well as allow you to get consent via a Privacy Policy URL. The plugin users your new WordPress privacy policy, and we disclose what data we collect.', '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
  /**
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( 'GDPR Settings', 'wp-email-capture' ); ?></h2>
398
 
399
+ <table class="form-table">
400
 
401
+ <tbody>
402
 
403
+ <tr valign="top">
404
 
405
+ <th scope="row" style="width:400px"><?php _e( 'Enable GDPR Settings', 'wp-email-capture' ); ?></th>
406
+ <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>
407
+ </tr>
408
 
409
+ </tbody>
410
 
411
+ </table>
412
 
413
+ <?php
414
 
415
+ if ( get_option( 'wp_email_capture_enable_gdpr' ) ) {
416
+ $hiddengdpr = '';
417
+ } else {
418
+ $hiddengdpr = 'style="display:none;"';
419
+ }
420
+
421
+ ?>
422
+ <div class="gdpr-table" <?php echo $hiddengdpr; ?>>
423
+ <table class="form-table">
424
 
425
+ <tbody>
426
 
427
+ <tr valign="top">
428
 
429
+ <th scope="row" style="width:400px"><?php _e( 'How long do you want to keep data on your servers?', 'wp-email-capture' ); ?></th>
 
430
 
431
+ <td>
432
+ <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' ); ?>" />
433
 
434
+ <select name="wp_email_capture_unit_for_privacy" id="wp_email_capture_unit_for_privacy">
435
+ <option value="days" <?php selected( get_option( 'wp_email_capture_unit_for_privacy' ), 'days' ); ?>><?php _e( 'Days', 'wp-email-capture' ); ?></option>
436
+ <option value="weeks" <?php selected( get_option( 'wp_email_capture_unit_for_privacy' ), 'weeks' ); ?>><?php _e( 'Weeks', 'wp-email-capture' ); ?></option>
437
+ <option value="months" <?php selected( get_option( 'wp_email_capture_unit_for_privacy' ), 'months' ); ?>><?php _e( 'Months', 'wp-email-capture' ); ?></option>
438
+ </select>
439
+
440
+ <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>
441
+ </td>
442
+
443
+ </tr>
444
+
445
+ <tr valign="top">
446
+
447
+ <th scope="row" style="width:400px"><?php _e( 'Privacy Policy', 'wp-email-capture' ); ?></th>
448
+
449
+ <td>
450
+
451
+ <?php
452
+
453
+ $addedstring = "";
454
+
455
+ if ( get_option( 'wp_email_capture_number_for_privacy' ) ) {
456
+ $number = get_option( 'wp_email_capture_number_for_privacy' );
457
+ $unit = get_option( 'wp_email_capture_unit_for_privacy' );
458
+ $addedstring = sprintf( __( 'We hold this data for a maximum of %s %s, at which point it is deleted.', 'wp-email-capture' ), $number, $unit );
459
+ }
460
+
461
+ ?>
462
+
463
+ <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>
464
+
465
+ <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'); ?>
466
+
467
+ <?php _e( 'Your Name (or what you chose to address yourself as). This is used for simple personalisation purposes.', 'wp-email-capture'); ?>
468
+
469
+ <?php _e( 'Your Email Address. This is used to contact you and include you in our newsletter.', 'wp-email-capture'); ?>
470
+
471
+ <?php _e( 'The date of signup. This is so we can reference when to delete your data at a later date.', 'wp-email-capture'); ?>
472
+ <?php
473
+
474
+ if ( $addedstring && $number && $unit ) {
475
+ echo $addedstring;
476
+ }
477
+
478
+ ?>
479
+
480
+ </textarea>
481
+
482
+ <button class="button-secondary" id="copytext" type="button"><?php _e( 'Copy Privacy Policy text to clipboard', 'wp-email-capture' ); ?></button>
483
+ <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>
484
+ </td>
485
+
486
+ </tr>
487
+
488
+ </tbody>
489
+
490
+ </table>
491
+ </div>
492
+
493
+ <input type="hidden" name="action" value="update" />
494
+ <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" />
495
+
496
+ <p class="submit">
497
+
498
+ <input type="submit" class="button-primary" value="<?php _e( 'Save Changes', 'wp-email-capture' ) ?>" />
499
+
500
+ </p>
501
+
502
+ </form>
503
+
504
+
505
+
506
+ <?php
507
+
508
+ wp_email_capture_writetable();
509
+
510
+ echo '<a name="list"></a><h3>'.__( 'Export', 'wp-email-capture' ).'</h3>
511
+ <form name="wp_email_capture_export" action="'. esc_url( $_SERVER['REQUEST_URI'] ) . '#list" method="post">
512
+
513
+ <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>
514
+ <input type="hidden" name="wp_email_capture_export" />
515
+ <div class="submit">
516
+ <input type="submit" value="'.__( 'Export List', 'wp-email-capture' ).'" class="button" />
517
+ </div>
518
+
519
+ </form>';
520
+
521
+ $tempemails = wp_email_capture_count_temp();
522
+ $lastsignupdatestring = wp_email_capture_get_last_singup_date();
523
+
524
+ if ( $lastsignupdatestring ) {
525
+ $lastsignupdate = date( "jS F, Y g:ia", strtotime( $lastsignupdatestring ) );
526
+ $lastsignupdatesentance = __( ' The last attempted signup was on ' . $lastsignupdate . '.', 'wp-email-capture' );
527
+ } else {
528
+ $lastsignupdatesentance = "";
529
+ }
530
+
531
+ echo "<a name='truncate'></a><h3>".__( 'Temporary e-mails', 'wp-email-capture' )."</h3>\n";
532
+
533
+ echo '<form name="wp_email_capture_truncate" action="'. esc_url( $_SERVER['REQUEST_URI'] ) . '#truncate" method="post">';
534
+
535
+ 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>';
536
+
537
+ echo '<input type="hidden" name="wp_email_capture_truncate"/>';
538
+
539
+ echo '<div class="submit"><input type="submit" value="'.__( 'Delete Unconfirmed e-mail Addresses', 'wp-email-capture' ).'" class="button" /></div>';
540
+
541
+ echo "</form>";
542
+
543
+ echo "<a name='emptyallemails'></a><h3>".__( 'Delete Current List', 'wp-email-capture' )."</h3>\n";
544
+
545
+ echo '<form name="wp_email_capture_delete" action="'. esc_url( $_SERVER['REQUEST_URI'] ) . '#delete" method="post">';
546
+
547
+ 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>';
548
+
549
+ echo '<input type="hidden" name="wp_email_capture_delete"/>';
550
+
551
+ echo '<div class="submit"><input type="submit" value="'.__( 'Delete Confirmed e-mail Addresses', 'wp-email-capture' ).'" class="button" /></div>';
552
+
553
+ echo "</form>";
554
+
555
+ echo '</div></div></div>';
556
+
557
+ wp_email_capture_admin_sidebar( "getwpemailcapturepremiumdescription,affiliates,news,supportus" );
558
+
559
+ echo '</div>';
560
+ ?>
561
+
562
+
563
+ <?php
564
+ }
565
 
566
 
567
  /**
571
  */
572
  function wp_email_capture_options_process() { // whitelist options
573
 
574
+ register_setting( 'wp-email-capture-group', 'wp_email_capture_signup' );
575
+ register_setting( 'wp-email-capture-group', 'wp_email_capture_redirection' );
576
+ register_setting( 'wp-email-capture-group', 'wp_email_capture_from' );
577
+ register_setting( 'wp-email-capture-group', 'wp_email_capture_subject' );
578
+ register_setting( 'wp-email-capture-group', 'wp_email_capture_body' );
579
+ register_setting( 'wp-email-capture-group', 'wp_email_capture_link' );
580
+ register_setting( 'wp-email-capture-group', 'wp_email_capture_from_name' );
581
+ register_setting( 'wp-email-capture-group', 'wp_email_capture_name_required' );
582
+ register_setting( 'wp-email-capture-group', 'wp_email_capture_name_delimeter' );
583
+ register_setting( 'wp-email-capture-group', 'wp_email_capture_send_email_html' );
584
+ register_setting( 'wp-email-capture-group', 'wp_email_capture_disabled_headers' );
585
+ register_setting( 'wp-email-capture-group', 'wp_email_capture_default_styling' );
586
+ register_setting( 'wp-email-capture-group', 'wp_email_capture_enable_gdpr' );
587
+ register_setting( 'wp-email-capture-group', 'wp_email_capture_unit_for_privacy' );
588
+ register_setting( 'wp-email-capture-group', 'wp_email_capture_number_for_privacy', 'wp_email_capture_check_number_is_a_number' );
589
 
590
+ if ( isset( $_REQUEST['wp_email_capture_export'] ) ) {
591
 
592
+ wp_email_capture_export();
593
 
594
+ }
595
 
596
+ if ( isset( $_REQUEST['wp_email_capture_deleteid'] ) ) {
597
+ $wpemaildeleteid = esc_attr( $_POST['wp_email_capture_deleteid'] );
598
+ wp_email_capture_deleteid( $wpemaildeleteid );
599
+ }
600
 
 
601
 
602
+ if ( isset( $_REQUEST['wp_email_capture_truncate'] ) ) {
603
 
604
+ wp_email_capture_truncate();
605
 
606
+ }
607
 
608
+ if ( isset( $_REQUEST['wp_email_capture_delete'] ) ) {
609
 
610
+ wp_email_capture_delete();
611
 
612
+ }
613
 
614
+ /**
615
+ * Action to hook into to register any other options.
616
+ */
617
+ do_action( 'wp_email_capture_added_option_process' );
618
+
619
+ }
620
+
621
+
622
+ /**
623
+ * Box to upsell WP Email Capture Premium
624
+ *
625
+ * @return void
626
+ */
627
+ function wp_email_capture_premium_upsell() {
628
+ ?>
629
+ <h3><?php _e( 'Upgrade To WP Email Capture Premium', 'wp-email-capture' ); ?></h3>
630
+ <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>
631
+ <ul>
632
+ <li><?php _e( '<strong>Stat tracking</strong> - track the visitors to your site and where your sign ups come from.', 'wp-email-capture' ); ?></li>
633
+ <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>
634
+ <li><?php _e( '<strong>Multiple lists</strong> - Create multiple lists for your site.', 'wp-email-capture' ); ?></li>
635
+ <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>
636
+ <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>
637
+ </ul>
638
+ <p><?php _e( 'You also get premium support for a whole year!', 'wp-email-capture' ); ?></p>
639
+ <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>
640
+ <?php
641
+ } add_action( 'wp_email_capture_dashboard_premium_upsell', 'wp_email_capture_premium_upsell' );
642
 
643
 
644
+ /**
645
+ * Check if a number is numeric. If so, save. if not, display an error.
646
+ *
647
+ * @param string $input Input we are validating to make sure that it is a number.
648
+ * @return mixed Validated number if true, false if not.
649
+ */
650
+ function wp_email_capture_check_number_is_a_number( $input ) {
651
 
652
+ $message = null;
653
+ $type = null;
654
 
655
+ if ( !is_numeric( $input ) && "" !== $input ) {
656
 
657
+ $message = __( 'Please make sure that the "How long do you want to keep data on your servers?" option is a number.', 'wp-email-capture' );
658
+ $type = 'error';
659
 
660
+ }
661
 
662
+ if ( $message && 'error' == $type ) {
663
+ add_settings_error( 'wp_email_capture_numeric', 'wp_email_capture_numeric', $message, $type );
664
+ return "";
665
+ }
666
 
667
+ return $input;
 
 
 
668
 
669
  }
670
 
671
 
672
  /**
673
+ * Building the array for the changelog.
674
+ *
675
+ * Keeping out of the way for ease of use.
676
+ *
677
+ * @return array An array of changes.
678
  */
679
+ function wp_email_capture_get_changelog_array() {
680
+
681
+ $changelog = array();
682
+
683
+ $changelog[] = array(
684
+ 'version' => __( '3.7', 'wp-email-capture' ),
685
+ 'list' => array(
686
+ __( 'Added filter - `wp_email_capture_change_user_present_error_url`, needed for an additional plugin - WP Email Capture: Redirect If Present.', 'wp-email-capture' ),
687
+ __( 'Tested with WordPress 5.2', 'wp-email-capture' ),
688
+ __( 'Fixed a few CSS changes on the option pages.', 'wp-email-capture' ),
689
+ ),
690
+ );
691
+
692
+ $changelog[] = array(
693
+ 'version' => __( '3.6.6', 'wp-email-capture' ),
694
+ 'list' => array(
695
+ __( 'Tested up to 5.1', 'wp-email-capture' ),
696
+ ),
697
+ );
698
+
699
+ $changelog[] = array(
700
+ 'version' => __( '3.6.5', 'wp-email-capture' ),
701
+ 'list' => array(
702
+ __( 'Tested with Constant Contact so reflected help screens to mention that.', 'wp-email-capture' ),
703
+ ),
704
+ );
705
+
706
+ $changelog[] = array(
707
+ 'version' => __( '3.6.4', 'wp-email-capture' ),
708
+ 'list' => array(
709
+ __( 'Clarified further a couple of options that people were having problems with.', 'wp-email-capture' ),
710
+ ),
711
+ );
712
+
713
+ $changelog[] = array(
714
+ 'version' => __( '3.6.3', 'wp-email-capture' ),
715
+ 'list' => array(
716
+ __( 'Some files didn\'t manage to upload. I\'ve now pushed them live.', 'wp-email-capture' ),
717
+ ),
718
+ );
719
+
720
+ $changelog[] = array(
721
+ 'version' => __( '3.6.2', 'wp-email-capture' ),
722
+ 'list' => array(
723
+ __( 'Fixed a bug in Gutenberg.', 'wp-email-capture' ),
724
+ __( 'Checking for "register_block_type" rather than "the_gutenberg_project" in prep for 5.0', 'wp-email-capture' ),
725
+ ),
726
+ );
727
+
728
+ $changelog[] = array(
729
+ 'version' => __( '3.6.1', 'wp-email-capture' ),
730
+ 'list' => array(
731
+ __( 'Added Gutenberg information to the help section.', 'wp-email-capture' ),
732
+ __( 'Removed a spelling mistake in one of the URL\'s on the setup form.', 'wp-email-capture' ),
733
+ ),
734
+ );
735
+
736
+ $changelog[] = array(
737
+ 'version' => __( '3.6', 'wp-email-capture' ),
738
+ 'list' => array(
739
+ __( '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' ),
740
+ ),
741
+ );
742
+
743
+
744
+ $changelog[] = array(
745
+ 'version' => __( '3.5.4', 'wp-email-capture' ),
746
+ 'list' => array(
747
+ __( 'Added a note should a version of MySQL earlier than 5.6 is shared.', 'wp-email-capture' ),
748
+ ),
749
+ );
750
+
751
+ $changelog[] = array(
752
+ 'version' => __( '3.5.3', 'wp-email-capture' ),
753
+ 'list' => array(
754
+ __( 'Fixed a bug that saving with GDPR switched off resulted in a display error (even though it was saved correctly).', 'wp-email-capture' ),
755
+ ),
756
+ );
757
+
758
+ $changelog[] = array(
759
+ 'version' => __( '3.5.2', 'wp-email-capture' ),
760
+ 'list' => array(
761
+ __( 'A few cosmetic changes to the help pages. Could use more work but is a bit neater for now.', 'wp-email-capture' ),
762
+ ),
763
+ );
764
+
765
+ $changelog[] = array(
766
+ 'version' => __( '3.5.1', 'wp-email-capture' ),
767
+ 'list' => array(
768
+ __( 'Fixed a bug that made the widget for WP Email Capture work.', 'wp-email-capture' ),
769
+ ),
770
+ );
771
+
772
+ $changelog[] = array(
773
+ 'version' => __( '3.5', 'wp-email-capture' ),
774
+ 'intro' => __( 'This version was released to try and make WP Email Capture more compatible with the GDPR legislation.', 'wp-email-capture' ),
775
+ 'list' => array(
776
+ __( 'Integration with WordPress GDPR checker.', 'wp-email-capture' ),
777
+ __( 'You can have a checkbox on your forms, explicitly giving consent to users to sign up to your newsletter.', 'wp-email-capture' ),
778
+ __( 'You can delete data after a period of time on the site.', 'wp-email-capture' ),
779
+ __( 'You can search the database, allowing you to see and delete what data you have for people', 'wp-email-capture' ),
780
+ __( 'Improved the changelog routine, allowing it to be updated more frequently.', 'wp-email-capture' ),
781
+ ),
782
+ );
783
+
784
+ $changelog[] = array(
785
+ 'version' => __( '3.4.2', 'wp-email-capture' ),
786
+ 'list' => array(
787
+ __( 'Introduced "wp_email_capture_is_premium" function, to make further development easier.', 'wp-email-capture' ),
788
+ __( 'Fixed a bug from Gutenberg 3.4 that called a undefined variable (blocks.source.children & blocks.source.attr).', 'wp-email-capture' ),
789
+ __( 'Switched from wp.blocks.InspectorControls.TextControl to wp.components.TextControl.', 'wp-email-capture' ),
790
+ ),
791
+ );
792
+
793
+ $changelog[] = array(
794
+ 'version' => __( '3.4.1', 'wp-email-capture' ),
795
+ 'list' => array(
796
+ __( 'Fixes a fatal error', 'wp-email-capture' ),
797
+ ),
798
+ );
799
+
800
+ $changelog[] = array(
801
+ 'version' => __( '3.4', 'wp-email-capture' ),
802
+ 'intro' => __( 'This version introduced compatability with Gutenberg.', 'wp-email-capture' ),
803
+ 'list' => array(
804
+ __( 'Added Default Styles should you wish to activate them.', 'wp-email-capture' ),
805
+ __( 'Gutenberg Compatibility!', 'wp-email-capture' ),
806
+ ),
807
+ );
808
+
809
+ $changelog[] = array(
810
+ 'version' => __( '3.3.4', 'wp-email-capture' ),
811
+ 'list' => array(
812
+ __( 'Fix a few dead links in the plugin', 'wp-email-capture' ),
813
+ ),
814
+ );
815
+
816
+ $changelog[] = array(
817
+ 'version' => __( '3.3.3', 'wp-email-capture' ),
818
+ 'list' => array(
819
+ __( 'Fix bug in header on export (props Ov3rfly).', 'wp-email-capture' ),
820
+ __( 'Tested in 4.9', 'wp-email-capture' ),
821
+ ),
822
+ );
823
+
824
+ $changelog[] = array(
825
+ 'version' => __( '3.3.2', 'wp-email-capture' ),
826
+ 'list' => array(
827
+ __( 'Make it compatible with 4.8', 'wp-email-capture' ),
828
+ __( 'Make the "Buy Link" in WP Email Capture include a coupon', 'wp-email-capture' ),
829
+ __( 'Include links to compatible services on the Plugin Dashboard', 'wp-email-capture' ),
830
+ ),
831
+ );
832
+
833
+ $changelog[] = array(
834
+ 'version' => __( '3.3.1', 'wp-email-capture' ),
835
+ 'list' => array(
836
+ __( 'Fixes a conflict with other plugins that send HTML emails.', 'wp-email-capture' ),
837
+ ),
838
+ );
839
+
840
+ $changelog[] = array(
841
+ 'version' => __( '3.3', 'wp-email-capture' ),
842
+ 'intro' => __( 'This version introduced the ability to have HTML emails in WP Email Capture', 'wp-email-capture' ),
843
+ 'list' => array(
844
+ __( 'Introduced the ability to have "HTML" enabled lists.', 'wp-email-capture' ),
845
+ __( 'Introduced the ability to send emails without headers. Useful for Amazon SES.', 'wp-email-capture' ),
846
+ __( 'Added a charset on export of CSV. (Props Ov3rfly)', 'wp-email-capture' ),
847
+ ),
848
+ );
849
+
850
+ $changelog[] = array(
851
+ 'version' => __( '3.2', 'wp-email-capture' ),
852
+ 'list' => array(
853
+ sprintf( __( 'Correction in the German translation (props <a href="%s" target="_blank">Lars Kasper</a>)', 'wp-email-capture' ), 'http://larskasper.de/' ),
854
+ __( 'Added a wp_email_capture_extra_checks action, that will allow people to run checks on the name/email address.', 'wp-email-capture' ),
855
+ __( 'Removed some legacy code that was commented out.', 'wp-email-capture' ),
856
+ __( 'Fix an encoding issue for new installs, now the tables match the database\'s encoding.', 'wp-email-capture' ),
857
+ __( 'Fixed a bug for new installs that had a "The plugin generated XXX characters of unexpected output during activation.".', 'wp-email-capture' ),
858
+ ),
859
+ );
860
+
861
+ $changelog[] = array(
862
+ 'version' => __( '3.1.4', 'wp-email-capture' ),
863
+ 'list' => array(
864
+ __( 'Fixed a bug that caused an "Unexpected Output" on some database setups.', 'wp-email-capture' ),
865
+ __( 'Used UNIQUE KEY rather than PRIMARY KEY, so activation and deactivation doesn\'t cause database errors.', 'wp-email-capture' ),
866
+ ),
867
+ );
868
+
869
+ $changelog[] = array(
870
+ 'version' => __( '3.1.3', 'wp-email-capture' ),
871
+ 'list' => array(
872
+ __( 'Added wp_email_capture_complete_before_redirect action. Allowing data to be manipulated before the redirect.', 'wp-email-capture' ),
873
+ __( 'Added Extensions area of dashboard.', 'wp-email-capture' ),
874
+ ),
875
+ );
876
+
877
+ $changelog[] = array(
878
+ 'version' => __( '3.1.2', 'wp-email-capture' ),
879
+ 'list' => array(
880
+ __( 'Reward linkers with a voucher code.', 'wp-email-capture' ),
881
+ __( 'Included the "Last Temporary Signup" date, so they get know the last attempted signup.', 'wp-email-capture' ),
882
+ __( 'Tested up to 4.5.', 'wp-email-capture' ),
883
+ ),
884
+ );
885
+
886
+ $changelog[] = array(
887
+ 'version' => __( '3.1.1', 'wp-email-capture' ),
888
+ 'list' => array(
889
+ __( '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' ),
890
+ __( 'Fixed a bug which saw a notice appear of a missing option on the upgrade and dashboard page.', 'wp-email-capture' ),
891
+ __( 'Removed a double header in Dashboard widget (props Ove3rfly).', 'wp-email-capture' ),
892
+ __( 'Correct textdomain used in some files (props Ov3rfly).', 'wp-email-capture' ),
893
+ __( 'Removed all PHP closing tags through the site (props Ov3rfly).', 'wp-email-capture' ),
894
+ ),
895
+ );
896
+
897
+ $changelog[] = array(
898
+ 'version' => __( '3.1', 'wp-email-capture' ),
899
+ 'list' => array(
900
+ 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/' ),
901
+ __( 'Changed word from "Update" to "Upgrade" for large lists as it was confusing people.', 'wp-email-capture' ),
902
+ __( 'Changed to new Text Domain as per WordPress new internationalisation integration (wp-email-capture).', 'wp-email-capture' ),
903
+ ),
904
+ );
905
+
906
+ $changelog[] = array(
907
+ 'version' => __( '3.0', 'wp-email-capture' ),
908
+ 'title' => __( 'Code Factorisation', 'wp-email-capture' ),
909
+ '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' ),
910
+ );
911
+
912
+ return $changelog;
913
 
914
+ }
inc/process.php CHANGED
@@ -10,6 +10,8 @@
10
  */
11
  function wp_email_capture_process() {
12
 
 
 
13
  if ( isset( $_REQUEST['wp_capture_action'] ) ) {
14
 
15
  do_action( 'wp_email_capture_signup_actions' );
@@ -23,7 +25,7 @@ function wp_email_capture_process() {
23
  //wp_capture_email_confirm();
24
  }
25
 
26
-
27
 
28
  }
29
 
@@ -95,6 +97,8 @@ function wp_email_capture_signup() {
95
  $name = wp_email_stripslashes( $name );
96
  $email = wp_email_stripslashes( $email );
97
 
 
 
98
  $referrer = esc_url( $_SERVER['HTTP_REFERER'] );
99
  $ip = esc_attr( $_SERVER['REMOTE_ADDR'] );
100
  $date = date( "Y-m-d H-i" );
@@ -105,13 +109,15 @@ function wp_email_capture_signup() {
105
  $error = urlencode( __( 'User already present', 'wp-email-capture' ) );
106
  $url = $starturl . $extrastring . "wp_email_capture_error=" . $error;
107
 
 
 
108
  wp_redirect( $url );
109
 
110
  die();
111
 
112
  }
113
 
114
- $member_data = array( 'confirm_code' => $confirm_code, 'name' => $name, 'email' => $email );
115
 
116
  /**
117
  * Filter whether we handle a new subscription.
@@ -131,7 +137,7 @@ function wp_email_capture_signup() {
131
  return;
132
 
133
  // Insert data into database
134
- $insert_into_temp=$wpdb->insert( WP_EMAIL_CAPTURE_TEMP_MEMBERS_TABLE, $member_data, array( '%s', '%s', '%s' ) );
135
 
136
  // if suceesfully inserted data into database, send confirmation link to email
137
 
@@ -151,7 +157,7 @@ function wp_email_capture_signup() {
151
  $subject = get_option( 'wp_email_capture_subject' );
152
 
153
  if ( $subject == "" ) {
154
- $subject = __( "Sign Up For Our Newsletter", "WPEC" );
155
  }
156
 
157
  // From
@@ -169,20 +175,24 @@ function wp_email_capture_signup() {
169
  $fromname = get_option( 'blogname' );
170
  }
171
 
 
 
172
  $header = "MIME-Version: 1.0\n" . "From: " . $fromname . " <" . $from . ">\n";
173
- $header .= "Content-Type: text/plain; charset=\"" . get_option( 'blog_charset' ) . "\"\n";
174
 
175
  // Your message
 
 
176
 
177
- $message.= get_option( 'wp_email_capture_body' ) . "\n\n";
178
 
179
- if ( $message == "\n\n" ) {
180
- $message .= __( "Thank you for signing up for our newsletter, please click the link below to confirm your subscription", "WPEC" ) . "\n\n";
181
  }
182
 
183
- $message .= $siteurl ."?wp_email_confirm=1&wp_email_capture_passkey=$confirm_code";
184
- $message .= "\n\n----\n";
185
- $message .= __( "This is an automated message that is generated because somebody with the IP address of", 'wp-email-capture' )." " . $ip ." ".__( '(possibly you) on', 'wp-email-capture' )." ". $date ." ".__( 'filled out the form on the following page', 'wp-email-capture' )." " . $referrer . "\n";
186
  $message .= __( "If you are sure this isn't you, please ignore this message, you will not be sent another message.", 'wp-email-capture' );
187
  $message = str_replace( "%NAME%", $name, $message );
188
 
@@ -282,24 +292,31 @@ function wp_capture_email_confirm() {
282
  $fullreg = get_bloginfo( 'url' );
283
  }
284
 
 
 
 
 
 
 
 
285
  wp_redirect( $fullreg );
286
  echo "<meta http-equiv='refresh' content='0;". $fullreg ."'>";
287
  die();
288
 
289
- /* } */
290
 
291
- } else {
292
 
293
- if ( strpos( $url, "?" ) === false ) { $extrastring = "?"; } else { $extrastring = "&"; }
294
-
295
- $error = urlencode( __( 'Wrong confirmation code', 'wp-email-capture' ) );
296
- $url = $url . $extrastring . "wp_email_capture_error=" . $error;
297
 
298
- wp_redirect( $url );
299
- die();
300
 
 
 
 
 
301
  }
302
- }
303
 
304
 
305
 
@@ -313,9 +330,62 @@ function wp_capture_email_confirm() {
313
  */
314
  function wp_email_capture_send_email_default( $to, $subject, $message, $header ) {
315
 
316
- $sendmail = wp_mail( $to, $subject, $message, $header);
317
 
318
- if ( $sendmail ) { $addedfield = "Email Sent!"; } else { $addedfield = "Email Not Sent"; }
319
 
320
- return $sendmail;
321
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  */
11
  function wp_email_capture_process() {
12
 
13
+ do_action( 'wp_email_capture_set_wp_email_capture_email_settings' );
14
+
15
  if ( isset( $_REQUEST['wp_capture_action'] ) ) {
16
 
17
  do_action( 'wp_email_capture_signup_actions' );
25
  //wp_capture_email_confirm();
26
  }
27
 
28
+ do_action( 'wp_email_capture_set_normal_email_settings' );
29
 
30
  }
31
 
97
  $name = wp_email_stripslashes( $name );
98
  $email = wp_email_stripslashes( $email );
99
 
100
+ do_action( 'wp_email_capture_extra_checks', $name, $email );
101
+
102
  $referrer = esc_url( $_SERVER['HTTP_REFERER'] );
103
  $ip = esc_attr( $_SERVER['REMOTE_ADDR'] );
104
  $date = date( "Y-m-d H-i" );
109
  $error = urlencode( __( 'User already present', 'wp-email-capture' ) );
110
  $url = $starturl . $extrastring . "wp_email_capture_error=" . $error;
111
 
112
+ $url = apply_filters( 'wp_email_capture_change_user_present_error_url', $url );
113
+
114
  wp_redirect( $url );
115
 
116
  die();
117
 
118
  }
119
 
120
+ $member_data = array( 'confirm_code' => $confirm_code, 'name' => $name, 'email' => $email, 'date' => $date );
121
 
122
  /**
123
  * Filter whether we handle a new subscription.
137
  return;
138
 
139
  // Insert data into database
140
+ $insert_into_temp=$wpdb->insert( WP_EMAIL_CAPTURE_TEMP_MEMBERS_TABLE, $member_data, array( '%s', '%s', '%s', '%s' ) );
141
 
142
  // if suceesfully inserted data into database, send confirmation link to email
143
 
157
  $subject = get_option( 'wp_email_capture_subject' );
158
 
159
  if ( $subject == "" ) {
160
+ $subject = __( "Sign Up For Our Newsletter", "wp-email-capture" );
161
  }
162
 
163
  // From
175
  $fromname = get_option( 'blogname' );
176
  }
177
 
178
+ $contenttype = ( 1 == get_option( 'wp_email_capture_send_email_html' ) ) ? "text/html" : "text/plain";
179
+
180
  $header = "MIME-Version: 1.0\n" . "From: " . $fromname . " <" . $from . ">\n";
181
+ $header .= "Content-Type: ". $contenttype . "; charset=\"" . get_option( 'blog_charset' ) . "\"\n";
182
 
183
  // Your message
184
+ $splitstring = ( 1 == get_option( 'wp_email_capture_send_email_html' ) ) ? "<br/>" : "\n";
185
+ $htmlurl = ( 1 == get_option( 'wp_email_capture_send_email_html' ) ) ? '<p><a href="' . $siteurl .'?wp_email_confirm=1&wp_email_capture_passkey=' . $confirm_code . '">Click Here to Subscribe!</a><br/></p>' : $siteurl ."?wp_email_confirm=1&wp_email_capture_passkey=" . $confirm_code;
186
 
187
+ $message.= get_option( 'wp_email_capture_body' ) . $splitstring . $splitstring;
188
 
189
+ if ( $message == $splitstring . $splitstring ) {
190
+ $message .= __( "Thank you for signing up for our newsletter, please click the link below to confirm your subscription", "wp-email-capture" ) . "\n\n";
191
  }
192
 
193
+ $message .= $htmlurl;
194
+ $message .= $splitstring . "----" . $splitstring;
195
+ $message .= __( "This is an automated message that is generated because somebody with the IP address of", 'wp-email-capture' )." " . $ip ." ".__( '(possibly you) on', 'wp-email-capture' )." ". $date ." ".__( 'filled out the form on the following page', 'wp-email-capture' )." " . $referrer . $splitstring;
196
  $message .= __( "If you are sure this isn't you, please ignore this message, you will not be sent another message.", 'wp-email-capture' );
197
  $message = str_replace( "%NAME%", $name, $message );
198
 
292
  $fullreg = get_bloginfo( 'url' );
293
  }
294
 
295
+ $emaildataarray = array(
296
+ 'name' => $name,
297
+ 'email' => $email
298
+ );
299
+
300
+ do_action( 'wp_email_capture_complete_before_redirect', $emaildataarray );
301
+
302
  wp_redirect( $fullreg );
303
  echo "<meta http-equiv='refresh' content='0;". $fullreg ."'>";
304
  die();
305
 
306
+ /* } */
307
 
308
+ } else {
309
 
310
+ if ( strpos( $url, "?" ) === false ) { $extrastring = "?"; } else { $extrastring = "&"; }
 
 
 
311
 
312
+ $error = urlencode( __( 'Wrong confirmation code', 'wp-email-capture' ) );
313
+ $url = $url . $extrastring . "wp_email_capture_error=" . $error;
314
 
315
+ wp_redirect( $url );
316
+ die();
317
+
318
+ }
319
  }
 
320
 
321
 
322
 
330
  */
331
  function wp_email_capture_send_email_default( $to, $subject, $message, $header ) {
332
 
333
+ $disableheaders = get_option( 'wp_email_capture_disabled_headers' );
334
 
335
+ if ( $disableheaders ) {
336
 
337
+ $sendmail = wp_mail( $to, $subject, $message );
338
+
339
+ } else {
340
+
341
+ $sendmail = wp_mail( $to, $subject, $message, $header );
342
+
343
+ }
344
+
345
+ // CLEAN THIS UP
346
+ // @todo CLEAN UP
347
+ /* if ( !is_object( $phpmailer ) || !is_a( $phpmailer, 'PHPMailer' ) ) {
348
+ require_once ABSPATH . WPINC . '/class-phpmailer.php';
349
+ require_once ABSPATH . WPINC . '/class-smtp.php';
350
+ $phpmailer = new PHPMailer( true );
351
+ } */
352
+
353
+ /* DEPRECATED 3.3 */
354
+ // Set SMTPDebug to true
355
+ /* $phpmailer->SMTPDebug = false;
356
+
357
+ echo "<br/><br/>To: " . $to;
358
+ echo "<br/>Subject " . $subject;
359
+ echo "<br/>Message " . $message;
360
+ echo "<br/>Header " . $header;
361
+
362
+ //$sendmail = wp_mail( $to, $subject, $message );
363
+
364
+ if ( $sendmail ) { $addedfield = "Email Sent!"; } else { $addedfield = "Email Not Sent"; }
365
+
366
+ // Start output buffering to grab smtp debugging output
367
+ /* ob_start();
368
+ add_filter( 'wp_mail_content_type', 'set_html_mail_content_type' );
369
+ // Send the test mail
370
+ //$result = wp_mail( $to, $subject, $message, $header );
371
+ remove_filter( 'wp_mail_content_type', 'set_html_mail_content_type' );
372
+ // Grab the smtp debugging output
373
+ $smtp_debug = ob_get_clean();
374
+
375
+ // Output the response
376
+ ?>
377
+ <div id="message" class="updated fade"><p><strong><?php _e( 'Test Message Sent', 'amgsessmtp' ); ?></strong></p>
378
+ <p><?php _e( 'The result was:', 'amgsessmtp' ); ?></p>
379
+ <pre><?php var_dump( $sendmail ); ?></pre>
380
+ <p><?php _e( 'The full debugging output is shown below:', 'amgsessmtp' ); ?></p>
381
+ <pre><?php var_dump( $phpmailer ); ?></pre>
382
+ <p><?php _e( 'The SMTP debugging output is shown below:', 'amgsessmtp' ); ?></p>
383
+ <pre><?php echo $smtp_debug ?></pre>
384
+ </div>
385
+ <?php
386
+
387
+ wp_die( "Sendmail is: " . $sendmail . "<br/>
388
+ Disableheaders is: " . $disableheaders); */
389
+
390
+ return $sendmail;
391
+ }
inc/security.php CHANGED
@@ -57,8 +57,4 @@ function wp_email_injection_test($str = "") {
57
 
58
  return preg_replace($tests, "", $str);
59
 
60
- }
61
-
62
-
63
-
64
- ?>
57
 
58
  return preg_replace($tests, "", $str);
59
 
60
+ }
 
 
 
 
inc/tabledata.php CHANGED
@@ -31,7 +31,7 @@ function wp_email_capture_writetable( $limit = 0, $header = '' ) {
31
 
32
  }
33
 
34
- echo $tabletoshow .= $header;
35
 
36
  $tabletoshow .= '
37
 
@@ -44,7 +44,7 @@ function wp_email_capture_writetable( $limit = 0, $header = '' ) {
44
 
45
  if ( $limit == 0 ) {
46
 
47
- $delid = wp_email_capture_formdelete( $member->id, $member->email );
48
 
49
  } else {
50
 
@@ -68,27 +68,46 @@ function wp_email_capture_writetable( $limit = 0, $header = '' ) {
68
 
69
  /**
70
  * The form to delete members from the database
71
- * @param int $id the email address ID in the database the database.
72
- * @param string $email The email address
 
 
 
73
  * @return void
74
  */
75
- function wp_email_capture_formdelete( $id, $email ) {
76
- return "<form action='" . esc_url( $_SERVER['REQUEST_URI'] ) . "#list' method='post'>
77
- <input type='hidden' name='wp_email_capture_deleteid' value='". $id."' />
78
- <input type='submit' value='".__( 'Delete ', 'wp-email-capture' ). $email ."' style='width: 300px;' class='button' />
79
- </form>";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
80
  }
81
 
82
 
83
  /**
84
  * Delete a member from the database.
85
- * @param int $id The database ID to delete
 
86
  * @return void
87
  */
88
- function wp_email_capture_deleteid( $id ) {
89
  global $wpdb;
90
 
91
- $delete_member_sql = "DELETE FROM " . WP_EMAIL_CAPTURE_REGISTERED_MEMBERS_TABLE . " WHERE id = '%d'";
92
 
93
  $delete_member = $wpdb->query( $wpdb->prepare( $delete_member_sql, $id ) );
94
 
@@ -97,5 +116,4 @@ function wp_email_capture_deleteid( $id ) {
97
  */
98
  do_action( 'wp_email_capture_after_delete_email_address', $id );
99
 
100
- }
101
- ?>
31
 
32
  }
33
 
34
+ $tabletoshow .= $header;
35
 
36
  $tabletoshow .= '
37
 
44
 
45
  if ( $limit == 0 ) {
46
 
47
+ $delid = wp_email_capture_formdelete( $member->id, $member->email, 'width:300px;' );
48
 
49
  } else {
50
 
68
 
69
  /**
70
  * The form to delete members from the database
71
+ * @param int $id the email address ID in the database the database.
72
+ * @param string $email Optional, the email address for deletion. Will be used for display only
73
+ * @param string $style Optional, Any styling you wish to add to the button
74
+ * @param string $table Optional, the table to delete the data from.
75
+ * @param array $hiddenvalues Optional, extra values to be hidden within the form
76
  * @return void
77
  */
78
+ function wp_email_capture_formdelete( $id, $email = '', $style = '', $table = '', $hiddenvalues = array() ) {
79
+ $formdelete = "<form action='" . esc_url( $_SERVER['REQUEST_URI'] ) . "#list' method='post'>
80
+ <input type='hidden' name='wp_email_capture_deleteid' value='". $id . "' />";
81
+
82
+ if ( $table ) {
83
+ $formdelete .= "<input type='hidden' name='wp_email_capture_deletefromtable' value='" . $table . "' />";
84
+ }
85
+
86
+ if ( !empty( $hiddenvalues ) ) {
87
+
88
+ foreach ($hiddenvalues as $key => $value) {
89
+ $formdelete .= "<input type='hidden' name='" . $key . "' value='" . $value . "' />";
90
+ }
91
+
92
+ }
93
+
94
+ $formdelete .= "<input type='submit' value='" . __( 'Delete ', 'wp-email-capture' ) . $email . "' style='" . $style . "' class='button' />";
95
+ $formdelete .= '</form>';
96
+
97
+ return $formdelete;
98
  }
99
 
100
 
101
  /**
102
  * Delete a member from the database.
103
+ * @param int $id The database ID to delete
104
+ * @param string $table Optional. The table we are deleting table from.
105
  * @return void
106
  */
107
+ function wp_email_capture_deleteid( $id, $table = WP_EMAIL_CAPTURE_REGISTERED_MEMBERS_TABLE ) {
108
  global $wpdb;
109
 
110
+ $delete_member_sql = "DELETE FROM $table WHERE id = '%d'";
111
 
112
  $delete_member = $wpdb->query( $wpdb->prepare( $delete_member_sql, $id ) );
113
 
116
  */
117
  do_action( 'wp_email_capture_after_delete_email_address', $id );
118
 
119
+ }
 
inc/tempdata.php CHANGED
@@ -47,6 +47,4 @@ function wp_email_capture_count_temp() {
47
 
48
  return $temp_members;
49
 
50
- }
51
-
52
- ?>
47
 
48
  return $temp_members;
49
 
50
+ }
 
 
inc/tinymce.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+
4
+ /**
5
+ * Check if we're on rich text editor of 4.9< and if so add the TinyMCE buttons
6
+ * @return void
7
+ */
8
+ function wp_email_capture_add_freebuttons() {
9
+ // Don't bother doing this stuff if the current user lacks permissions
10
+ if ( ! current_user_can( 'edit_posts' ) && ! current_user_can( 'edit_pages' ) )
11
+ return;
12
+
13
+ // Add only in Rich Editor mode
14
+ if ( get_user_option( 'rich_editing' ) == 'true' ) {
15
+ add_filter( "mce_external_plugins", "wp_email_capture_add_tinymce_plugin" );
16
+ add_filter( 'mce_buttons', 'wp_email_capture_free_button' );
17
+ }
18
+ }
19
+
20
+
21
+ /**
22
+ * Add the button for WP eBay Product Feeds
23
+ * @param array $buttons Array of current buttons
24
+ * @return array Array of buttons with WP eBay Product Feeds added
25
+ */
26
+ function wp_email_capture_free_button( $buttons ) {
27
+ array_push( $buttons, "separator", "wpemailcapturebutton" );
28
+ return $buttons;
29
+ }
30
+
31
+
32
+ // Load the TinyMCE plugin : editor_plugin.js (wp2.5)
33
+ function wp_email_capture_add_tinymce_plugin( $plugin_array ) {
34
+ $url = WP_EMAIL_CAPTURE_URL . "/inc/js/wp_email_capture_button.js";
35
+ $plugin_array['wpemailcapturebutton'] = $url;
36
+ return $plugin_array;
37
+ }
inc/tracking.php CHANGED
@@ -166,4 +166,4 @@ function wpec_start_tracking() {
166
  */
167
  function wpec_do_tracking() {
168
  do_action('wpec_tracking');
169
- }
166
  */
167
  function wpec_do_tracking() {
168
  do_action('wpec_tracking');
169
+ }
inc/widget.php CHANGED
@@ -6,7 +6,7 @@
6
  class wp_email_capture_widget_class extends WP_Widget {
7
 
8
  public function __construct() {
9
- parent::__construct('wp_email_capture_widget_class', __('WP Email Capture','WPEC'), array('description' =>__('Widget for WP Email Capture','WPEC')));
10
  }
11
 
12
 
@@ -19,14 +19,14 @@ class wp_email_capture_widget_class extends WP_Widget {
19
  extract($args);
20
  extract($args, EXTR_SKIP);
21
 
22
- $title = empty($instance['widget_title']) ? __('Subscribe!','WPEC') : apply_filters('widget_title', $instance['widget_title']);
23
- $text = empty($instance['widget_text']) ? __('Subscribe to my blog for updates','WPEC') : $instance['widget_text'];
24
 
25
  echo $before_widget;
26
 
27
- echo $before_title . $title . $after_title;
28
 
29
- echo '<div class="textwidget"><p>'.$text.'</p></div>';
30
 
31
  wp_email_capture_form();
32
 
@@ -46,15 +46,19 @@ class wp_email_capture_widget_class extends WP_Widget {
46
  * admin control form
47
  */
48
  function form($instance) {
49
- $default = array( 'widget_title' => __('Subscribe!','WPEC'), 'widget_text' => __('Subscribe to my blog for updates','WPEC') );
 
 
 
 
50
  $instance = wp_parse_args( (array) $instance, $default );
51
 
52
  $title_id = $this->get_field_id('widget_title');
53
  $title_name = $this->get_field_name('widget_title');
54
  $text_id = $this->get_field_id('widget_text');
55
  $text_name = $this->get_field_name('widget_text');
56
- echo "\r\n".'<p><label for="'.$title_id.'">'.__('Widget title:','WPEC').': <input type="text" class="widefat" id="'.$title_id.'" name="'.$title_name.'" value="'.esc_attr( $instance['widget_title'] ).'" /><label></p>';
57
- echo "\r\n".'<p><label for="'.$text_id.'">'.__('Widget text:','WPEC').': <input type="text" class="widefat" id="'.$text_id.'" name="'.$text_name .'" value="'.esc_attr( $instance['widget_text'] ).'" /><label></p>';
58
 
59
  }
60
 
@@ -65,7 +69,4 @@ class wp_email_capture_widget_class extends WP_Widget {
65
  function wp_email_capture_widget_init(){
66
  // curl need to be installed
67
  register_widget('wp_email_capture_widget_class');
68
- }
69
-
70
-
71
- ?>
6
  class wp_email_capture_widget_class extends WP_Widget {
7
 
8
  public function __construct() {
9
+ parent::__construct('wp_email_capture_widget_class', __('WP Email Capture','wp-email-capture'), array('description' =>__('Widget for WP Email Capture','WPEC')));
10
  }
11
 
12
 
19
  extract($args);
20
  extract($args, EXTR_SKIP);
21
 
22
+ $title = apply_filters('widget_title', $instance['widget_title']);
23
+ $text = $instance['widget_text'];
24
 
25
  echo $before_widget;
26
 
27
+ echo !empty($title) ? $before_title . $title . $after_title : '';
28
 
29
+ echo !empty($text) ? '<div class="textwidget"><p>'.$text.'</p></div>' : '';
30
 
31
  wp_email_capture_form();
32
 
46
  * admin control form
47
  */
48
  function form($instance) {
49
+ $default = array(
50
+ 'widget_title' => __('Subscribe!','wp-email-capture'),
51
+ 'widget_text' => __('Subscribe to my blog for updates','wp-email-capture')
52
+ );
53
+
54
  $instance = wp_parse_args( (array) $instance, $default );
55
 
56
  $title_id = $this->get_field_id('widget_title');
57
  $title_name = $this->get_field_name('widget_title');
58
  $text_id = $this->get_field_id('widget_text');
59
  $text_name = $this->get_field_name('widget_text');
60
+ echo "\r\n".'<p><label for="'.$title_id.'">'.__('Widget title:','wp-email-capture').': <input type="text" class="widefat" id="'.$title_id.'" name="'.$title_name.'" value="'.esc_attr( $instance['widget_title'] ).'" /><label></p>';
61
+ echo "\r\n".'<p><label for="'.$text_id.'">'.__('Widget text:','wp-email-capture').': <input type="text" class="widefat" id="'.$text_id.'" name="'.$text_name .'" value="'.esc_attr( $instance['widget_text'] ).'" /><label></p>';
62
 
63
  }
64
 
69
  function wp_email_capture_widget_init(){
70
  // curl need to be installed
71
  register_widget('wp_email_capture_widget_class');
72
+ }
 
 
 
languages/{WPEC-de_DE.mo → wp-email-capture-de_DE.mo} RENAMED
Binary file
languages/{WPEC-de_DE.po → wp-email-capture-de_DE.po} RENAMED
@@ -13,7 +13,7 @@ msgstr ""
13
  "X-Poedit-SourceCharset: UTF-8\n"
14
  "X-Poedit-Basepath: .\n"
15
  "X-Poedit-KeywordsList: __;_e\n"
16
- "X-Generator: Poedit 1.5.5\n"
17
  "X-Poedit-SearchPath-0: ..\n"
18
 
19
  #: inc/admin-sidebar.php:14
@@ -445,7 +445,7 @@ msgstr "Dies ist eine automatische Nachricht, weil jemand mit der IP-Adresse"
445
 
446
  #: inc/process.php:186
447
  msgid "(possibly you) on"
448
- msgstr "(vielleicht sie) am"
449
 
450
  #: inc/process.php:186
451
  msgid "filled out the form on the following page"
@@ -479,7 +479,6 @@ msgstr "Anmeldungen"
479
  msgid "Delete "
480
  msgstr "Entferne "
481
 
482
- #. #-#-#-#-# plugin.pot (WP Email Capture 2.10) #-#-#-#-#
483
  #. Plugin Name of the plugin/theme
484
  #: inc/widget.php:6
485
  msgid "WP Email Capture"
13
  "X-Poedit-SourceCharset: UTF-8\n"
14
  "X-Poedit-Basepath: .\n"
15
  "X-Poedit-KeywordsList: __;_e\n"
16
+ "X-Generator: Poedit 1.7.4\n"
17
  "X-Poedit-SearchPath-0: ..\n"
18
 
19
  #: inc/admin-sidebar.php:14
445
 
446
  #: inc/process.php:186
447
  msgid "(possibly you) on"
448
+ msgstr "(vielleicht Sie) am"
449
 
450
  #: inc/process.php:186
451
  msgid "filled out the form on the following page"
479
  msgid "Delete "
480
  msgstr "Entferne "
481
 
 
482
  #. Plugin Name of the plugin/theme
483
  #: inc/widget.php:6
484
  msgid "WP Email Capture"
languages/{WPEC-es_ES.mo → wp-email-capture-es_ES.mo} RENAMED
File without changes
languages/{WPEC-es_ES.po → wp-email-capture-es_ES.po} RENAMED
File without changes
languages/{WPEC-fr_FR.mo → wp-email-capture-fr_FR.mo} RENAMED
File without changes
languages/{WPEC-fr_FR.po → wp-email-capture-fr_FR.po} RENAMED
File without changes
languages/{WPEC-hr.mo → wp-email-capture-hr.mo} RENAMED
File without changes
languages/{WPEC-hr.po → wp-email-capture-hr.po} RENAMED
File without changes
languages/{WPEC-hu_HU.mo → wp-email-capture-hu_HU.mo} RENAMED
File without changes
languages/{WPEC-hu_HU.po → wp-email-capture-hu_HU.po} RENAMED
File without changes
languages/{WPEC-it_IT.mo → wp-email-capture-it_IT.mo} RENAMED
File without changes
languages/{WPEC-it_IT.po → wp-email-capture-it_IT.po} RENAMED
File without changes
languages/{WPEC-nl_NL.mo → wp-email-capture-nl_NL.mo} RENAMED
File without changes
languages/{WPEC-nl_NL.po → wp-email-capture-nl_NL.po} RENAMED
File without changes
languages/{WPEC-pt_BR.mo → wp-email-capture-pt_BR.mo} RENAMED
File without changes
languages/{WPEC-pt_BR.po → wp-email-capture-pt_BR.po} RENAMED
File without changes
languages/{WPEC-sr_RS.mo → wp-email-capture-sr_RS.mo} RENAMED
File without changes
languages/{WPEC-sr_RS.po → wp-email-capture-sr_RS.po} RENAMED
File without changes
readme.md ADDED
@@ -0,0 +1,424 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ WP Email Capture
2
+ ================
3
+ Tags: email, marketing, capture, form, affiliates, mailing lists, email marketing, widget ready
4
+
5
+ Requires at least: 3.0
6
+
7
+ Tested up to: 5.4
8
+
9
+ Version: 3.5.3
10
+
11
+ Stable tag: 3.5.3
12
+
13
+ Contributors: rhyswynne
14
+
15
+ Donate link: https://www.wpemailcapture.com/premium/?utm_source=donatelink&utm_medium=wordpressorgreadme&utm_campaign=wpemailcapture
16
+
17
+ Double opt-in form for building your email list. Define landing pages to distribute your ebooks & software.
18
+
19
+ Description
20
+ ===========
21
+ This creates a 2 field form (Name & Email) for capturing emails. Email is double opt in, and allows you to forward opt in to services such as ebooks or software. When you are ready to begin your email marketing campaign, simply export the list into your chosen email marketing software or service. WP Email Capture now comes with a number of [integrations and extensions](https://www.wpemailcapture.com/downloads/?utm_source=description&utm_medium=wordpressorgreadme&utm_campaign=wpemailcapture), including [WP Email Capture Premium](https://www.wpemailcapture.com/premium?utm_source=description&utm_medium=wordpressorgreadme&utm_campaign=wpemailcapture) allows you to build multiple lists, track stats and have custom fields and templates
22
+
23
+ WP Email Capture Free Features:-
24
+
25
+ * Widget Ready.
26
+ * Uses Wordpress' internal wp_mail function for sending mail.
27
+ * Easily integrated with posts & pages.
28
+ * Dashboard Widget.
29
+ * Export data into CSV files, compatible with most major Email Marketing Programmes (including Aweber, Mailchimp, Groupmail, Constant Contact)
30
+ * Double opt in, so compatible with CAN-SPAM act.
31
+ * And completely free!
32
+
33
+ For more details please visit the official site of [WP Email Capture](https://www.wpemailcapture.com/?utm_source=description&utm_medium=wordpressorgreadme&utm_campaign=wpemailcapture)
34
+
35
+ **Now Released is WP Email Capture Premium!** You get all the above features plus the following:-
36
+
37
+ * Stat tracking - track the visitors to your site and where your sign ups come from.
38
+ * Autoresponders - Create an autoresponder email, an email sent to the user when they sign up to your site.
39
+ * Multiple lists - Create multiple lists for your site.
40
+ * Build External Lists - If you have a Mailchimp or Aweber account, you can use WP Email Capture to build to these services directly.
41
+ * Custom Fields - You can capture more than just visitors name & email, add your own custom fields to capture (such as phone number or Address).
42
+
43
+ You also get premium support and further documentation. For more information, and to purchase, [visit the plans and pricing page](https://www.wpemailcapture.com/premium/?utm_source=wpemailcapturepremium&utm_medium=wordpressorgreadme&utm_campaign=wpemailcapture).
44
+
45
+ Keep in Contact:-
46
+
47
+ * [WP Email Capture on Facebook](http://www.facebook.com/wpemailcapture)
48
+ * [@WPEmailCapture](http://www.twitter.com/wpemailcapture) on Twitter
49
+ * For support requests please visit the [FAQ's](https://www.wpemailcapture.com/free-plugin/frequently-asked-questions/?utm_source=contact&utm_medium=wordpressorgreadme&utm_campaign=wpemailcapture), or leave a message in the [Wordpress Support Forum](http://wordpress.org/support/plugin/wp-email-capture).
50
+ * For general feature requests or bug notices [please contact me directly](http://wpemailcapture.com/contact/?utm_source=contact&utm_medium=wordpressorgreadme&utm_campaign=wpemailcapture), however any support requests sent via the contact form, Facebook Page or Twitter Feed will be ignored - please use the WordPress Support Forum - please note I'm unable to support CSS or styling queries, please read the "Stylings" area on [other notes](http://wordpress.org/plugins/wp-email-capture/other_notes/?utm_source=contact&utm_medium=wordpressorgreadme&utm_campaign=wpemailcapture).
51
+
52
+ Translation Credits:-
53
+
54
+ Translations have been done by the following parties. Thank you!
55
+
56
+ * French Translation: Olivier - http://www.ticket-system.net/ & Andrew Patton (@andpatton) - http://www.acusti.ca/
57
+ * German Translation: Stephan - http://www.computersniffer.com/, Marc Nilius (@libertello) - http://www.libertello.de/ and Ov3rFly
58
+ * Brazilian Portugese Translation: Nick Lima (@nick_linux) - http://www.nicklima.com.br
59
+ * Dutch Translation: Sander - http://www.zanderz.net/
60
+ * Hungarian Translation: Surbma - http://surbma.hu/
61
+ * Spanish Translation: David Bravo - http://dimensionmultimedia.com
62
+ * Italian Translation: Giuseppe Marino - http://it.gravatar.com/gpmarino
63
+ * Serbian Translation: Borisa Djuraskovic - http://www.webhostinghub.com/
64
+ * Croatian Translation: Lem Treursić - http://grafika-dizajn.com/
65
+
66
+ Installation
67
+ ============
68
+ 1. Upload the plugin (unzipped) into `/wp-content/plugins/`.
69
+ 2. Activate the plugin under the "Plugins" menu.
70
+ 3. Create a page on your site for "sign up" (this page will be forwarded to when the form is just filled in, informs the users that they need to click on a link in the email.
71
+ 4. Create a page on your site "confirmation" (thanking them for their enquiry, links to download etc).
72
+ 5. After creating these, fill in the settings in the "Settings > WP Email Capture" page, making sure the URL of the "sign up" page is in the "Page to redirect to on sign up" text box and the "confirmation" page URL is in the "Page to redirect to on confirmation of email address" text box.
73
+
74
+ The form can be inserted into the site at any location. However, to put the form anywhere, insert the following code into your template
75
+
76
+ `<?php if (function_exists('wp_email_capture_form')) { wp_email_capture_form(); } ?>`
77
+
78
+ If you want to insert the form within a page, insert into any post or page the string `[wp_email_capture_form]`. It will be replaced with a simple form.
79
+
80
+ You can also add a widget to any widget enabled area by going to Appearance > Widgets in the WordPress Administration.
81
+
82
+ If you need more help, please read this guide on [how to set up WP Email Capture](http://wpemailcapture.com/2012/10/how-to-set-up-wp-email-capture-free/?utm_source=installation&utm_medium=wordpressorgreadme&utm_campaign=wpemailcapture)
83
+
84
+ Stylings
85
+ ========
86
+ To style your form, you need to add to your CSS file the following ID declarations. `wp_email_capture` is for sidebar & template widgets, `wp_email_capture_2` is for on page forms.
87
+
88
+ ```
89
+ #wp_email_capture
90
+ {
91
+
92
+ }
93
+ #wp_email_capture label.wp-email-capture-name
94
+ {
95
+
96
+ }
97
+ #wp_email_capture label.wp-email-capture-email
98
+ {
99
+
100
+ }
101
+ #wp_email_capture input.wp-email-capture-name
102
+ {
103
+
104
+ }
105
+ #wp_email_capture input.wp-email-capture-email
106
+ {
107
+
108
+ }
109
+ #wp_email_capture_2
110
+ {
111
+
112
+ }
113
+ #wp_email_capture_2 label.wp-email-capture-name
114
+ {
115
+
116
+ }
117
+ #wp_email_capture_2 label.wp-email-capture-email
118
+ {
119
+
120
+ }
121
+ #wp_email_capture_2 input.wp-email-capture-name
122
+ {
123
+
124
+ }
125
+ #wp_email_capture_2 input.wp-email-capture-email
126
+ {
127
+
128
+ }
129
+ ```
130
+
131
+ Screenshots
132
+ ===========
133
+ 1. The Dashboard Widget
134
+ 2. The Options Page
135
+ 3. It's appearance within the template
136
+
137
+ Frequently Asked Questions
138
+ ==========================
139
+ Can I see/export/autoconfirm "Unverified" Email Addresses?
140
+ ----------------------------------------------------------
141
+ No.
142
+
143
+ Why Not?
144
+ --------
145
+ In accordance with the CANSPAM act, I have hidden Unverified emails from view. They can not be seen. Sorry, but the temptation is too big to spam unverified emails. Hence the removal.
146
+
147
+ Can Registered Users access the "thank you" page after signup? They try signing up again and get a 'user has already been registered' error
148
+ -------------------------------------------------------------------------------------------------------------------------------------------
149
+ Yes they can, however they can't go through the registration process. If you are using [WP Email Capture Premium](http://wpemailcapture.com/premium/?utm_source=faq&utm_medium=wordpressorgreadme&utm_campaign=wpemailcapture), you can send an autoresponder after signing up (which can contain a link to the "thank you" page). Alternatively, add a notice on your landing page to encourage users to bookmark the page.
150
+
151
+ I am Upgrading to WP Email Capture 2.3+, why has my WP Email Capture Sidebar Widget disappeared?
152
+ ------------------------------------------------------------------------------------------------
153
+ The WP Email Capture version 2.3 saw the introduction of multiple sidebar widgets. This was coded differently to the pre 2.3 WP Email Capture sidebar widget. As such you will have to recreate the sidebar widget. It's easy to do, but apologies for this - I am working on a fix!
154
+
155
+ Often My Email Is Going Into Spam, how can I stop this?
156
+ -------------------------------------------------------
157
+ The most likely cause is by putting an email address that doesn't exist in the "From Which Email Address". Please don't put a noreply@, as spam eats this up. Also, make sure your email address is from your server (rather than a @gmail/@hotmail/@yahoo email address). Finally, try improving your deliverability rate by sending your emails through SMTP using [WP Mail SMTP](http://wordpress.org/plugins/wp-mail-smtp/).
158
+
159
+ Does this piece of software send out email?
160
+ -------------------------------------------
161
+ No. I feel that to do so would be counter productive, as sending out email could have a detrimental effect on your server. There are a number of services we recommend, such as Aweber, to send out lists built on WP Email Capture.
162
+
163
+ Does it work with Wordpress Multisite?
164
+ --------------------------------------
165
+ This plugin is unsupported for Wordpress Multisite. Some people have reported success in using it. Others haven't. I have been unable to figure out why (I've been unable to get it working for Wordpress Multisite).
166
+
167
+ For some reason, no emails are being sent. No errors either. What could be the issue?
168
+ -------------------------------------------------------------------------------------
169
+ This is sometimes the case if your hosting (usually Godaddy) disables certain ways of sending mail. If you use [WP Mail SMTP](http://wordpress.org/extend/plugins/wp-mail-smtp/), you can send emails in a different way that works.
170
+
171
+ Does it work with [theme_name]?
172
+ -------------------------------
173
+ This plugin does use widgets, so probably yes :)
174
+
175
+ How do I include the name in my emails I send to people?
176
+ --------------------------------------------------------
177
+ Wherever you put in %NAME% (spelt exactly like that, uppercase as well), it will be replaced with the name given by the user.
178
+
179
+ Bugs/Suggestions/Support
180
+ ========================
181
+ Please report any bugs, support and suggestions to the [WP Email Capture Support Page](http://www.wpemailcapture.com/support/?utm_source=support&utm_medium=wordpressorgreadme&utm_campaign=wpemailcapture)
182
+
183
+ Donate
184
+ ======
185
+ To donate to this plugin, please visit the [WP Email Capture Donations Page](http://wpemailcapture.com/premium/?utm_source=donate&utm_medium=wordpressorgreadme&utm_campaign=wpemailcapture)
186
+
187
+ Change Log
188
+ ==========
189
+ 3.1.3
190
+ -----
191
+ * Added wp_email_capture_complete_before_redirect action. Allowing data to be manipulated before the redirect.
192
+ * Added Extensions area of dashboard.
193
+
194
+ 3.1.2
195
+ -----
196
+ * Reward linkers with a voucher code.
197
+
198
+ 3.1.1
199
+ -----
200
+ * 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. ** Update strongly required **
201
+ * Fixed a bug which saw a notice appear of a missing option on the upgrade and dashboard page.
202
+ * Removed a double header in Dashboard widget (props Ove3rfly).
203
+ * Correct textdomain used in some files (props Ov3rfly).
204
+ * Removed all PHP closing tags through the site (props Ov3rfly).
205
+
206
+ 3.1
207
+ ---
208
+ * Removed the default widget title should widget text be blank (props [Hassan Raza](http://hassan-raza.com/)).
209
+ * Changed word from "Update" to "Upgrade" for large lists as it was confusing people.
210
+ * Changed to new Text Domain as per WordPress' new internationalisation integration (wp-email-capture).
211
+
212
+ 3.0.2
213
+ -----
214
+ * Fixed an error with "Error: " displaying on the free version.
215
+
216
+ 3.0.1
217
+ -----
218
+ * Fixed a minor security issue in the display.php
219
+ * Removed Tracking (for now)
220
+
221
+ 3.0
222
+ ---
223
+ * Massive refactor of code, to help improve it.
224
+ * Fixed a bug that the "Hide Notice" dismissive now works.
225
+ * Updated French Translation (thanks [Andrew](http://www.acusti.ca/))
226
+ * Added Croatian Translation (thanks [Lem Treursić](http://grafika-dizajn.com/))
227
+ * Added Welcome Screen
228
+ * Added P tag around text widget introduction.
229
+ * Added better help documentation within the plugin.
230
+ * Added signup & confirm actions, to allow users to remove/add their own actions.
231
+ * Added a filter to the display form, so it can be changed.
232
+ * Add a filter for other subscription plugins (props [Dylan Kuhn](http://www.cyberhobo.net/))
233
+ * Changed menu structure
234
+ * Made compatible with WordPress 4.3, with new widget structure.
235
+ * Made compatible with new language packs.
236
+
237
+ 2.11
238
+ ----
239
+ * German Translation Updated (thanks Ove3rfly)
240
+ * Added the filter `wp_email_capture_dashboard_capability`, which means you can choose the capability you wish users to access the dashboard widget (thanks Ove3rfly).
241
+ * Added a few small fixes with the text (thanks Ove3rfly).
242
+
243
+ 2.10
244
+ ----
245
+ * Italian Translation Done (thanks [Guiseppe](http://it.gravatar.com/gpmarino)!)
246
+ * Serbian Translation Done (thanks [Borisa](http://www.webhostinghub.com/)!)
247
+
248
+ 2.9 (17/12/13)
249
+ --------------
250
+ * Fixed a small bug that produced warnings should security fields not be passed.
251
+ * Style buttons in a style for WordPress 3.8.
252
+ * Remove a rogue mysql_real_escape_string() call making it compatible with WordPress 3.9.
253
+ * Introduced stylings.
254
+
255
+ 2.8 (10/11/13)
256
+ --------------
257
+ * Introduced Spanish Translation (thanks David Bravo!)
258
+ * Added a feature whereby you can select the delimiter you wish to use.
259
+
260
+ 2.7.7 (08/07/13)
261
+ ----------------
262
+ * Fixed a few bug fixes that were spotted in Debug Mode (from forum member Ov3rfly).
263
+
264
+ 2.7.6 (12/06/13)
265
+ ----------------
266
+ * You can now translate error messages.
267
+
268
+ 2.7.5 (28/01/13)
269
+ ----------------
270
+ * Added an option "wp_email_capture_theme_affiliate_link", so theme designers can add this option on activation with their affiliate link to WP Email Capture.
271
+
272
+ 2.7.4 (14/01/13)
273
+ ----------------
274
+ * Added "title" attributes to the form fields, allowing WP Email Capture to play better with themes.
275
+
276
+ 2.7.3 (06/01/13)
277
+ ----------------
278
+ * Fixed the emails so that HTML characters (ampersands, speech marks, etc) in names/subjects/content are encoded properly.
279
+
280
+ 2.7.2 (11/12/12)
281
+ ----------------
282
+ * Compatible with WordPress 3.5. Critical upgrade if you're using WP 3.5
283
+ * Fixed an admin page error so if the news feed wasn't pulling from my site, then you will get an empty box, rather than an ugly error.
284
+
285
+ 2.7.1 (24/11/12)
286
+ ----------------
287
+ * Fixed a small bug that appears that error messages weren't appearing when sites had the defeault permalink structure.
288
+ * Fixed a redirection bug that users using the default URL structure were having, that caused a usability error.
289
+
290
+ 2.7 (20/11/12)
291
+ --------------
292
+ * Upgraded Hungarian Translation (thanks [Surbma](http://surbma.hu/)!)
293
+ * Rewritten areas of the readme file as it was confusing people (sorry!)
294
+
295
+ 2.6 (07/10/12)
296
+ --------------
297
+ * Added a checkbox that allows site owners to specify if "Name" is a required field.
298
+
299
+ 2.5.1 (12/08/12)
300
+ ----------------
301
+ * Recoded the RSS feed fetching code so it works on more servers and doesn't use a http based referrer.
302
+
303
+ 2.5 (01/08/12)
304
+ --------------
305
+ * A nag (which you can hide) should you not have the plugin set up correctly with a subscription or confirmation page.
306
+ * More CSS classes on each individual elements of the form.
307
+
308
+ 2.3.7 (23/07/12)
309
+ ----------------
310
+ * Improved wording of on page options, as well as documentation.
311
+
312
+ 2.3.6 (08/07/12)
313
+ ----------------
314
+ * Better error handling, if the settings for the plugin aren't filled in then the plugin doesn't fail.
315
+
316
+ 2.3.5 (01/06/12)
317
+ ----------------
318
+ * Added a "textwidget" class to the Widget Text Area so you can style it the same as all other text.
319
+ * More things you are able to translate, including buttons and more!
320
+ * Added Hungarian Translation.
321
+
322
+ 2.3.1 (22/5/12)
323
+ ---------------
324
+ * Bug fixes so notices shouldn't appear in debug mode.
325
+ * Added a for attribute to the form for accessibility.
326
+
327
+ 2.3 (09/5/12)
328
+ -------------
329
+ * Added support to multiple widgets.
330
+ * Added language support for the Dutch language.
331
+
332
+ 2.2 (17/4/12)
333
+ -------------
334
+ * The [Jemjabella](http://www.jemjabella.co.uk) update, after the individual who supplied most of the bug fixes, cheers!
335
+ * Added language support for Brazilian Portugese & German.
336
+
337
+ 2.1.1 (03/02/12)
338
+ ----------------
339
+ * Actually fixed the display bug talked about in 2.1
340
+ * Edited the Dashboard widget so that it's only displayed to user admins.
341
+
342
+ 2.1 (30/01/12)
343
+ --------------
344
+ * Internationalisation Completed - with French Language Pack
345
+ * Fixed a Small Display bug with the Plugin that occured in latest version of Wordpress.
346
+
347
+ 2.0.1 (28/10/10)
348
+ ----------------
349
+ * Fixed a small security bug which occurred in the previous version.
350
+
351
+ 2.0 (3/10/10)
352
+ -------------
353
+ * Switched functions to use the non depreciated functions
354
+ * Compatible with Spam Free
355
+ * Added a "Delete entire list" button in Wordpress.
356
+
357
+ 1.9 (20/01/10)
358
+ --------------
359
+ * Fixed a small bug that resulted in the display for [The plugin does not have a valid header.]
360
+ * Fixed a small phpmail bug
361
+
362
+ 1.8.1 (13/01/10)
363
+ ----------------
364
+ * Included more information in sent mail including IP, Date & Referral Page
365
+
366
+ 1.6 (18/10/09)
367
+ --------------
368
+ * You can now delete people from the confirmed members list (requested update!)
369
+
370
+ 1.5 (04/10/09)
371
+ --------------
372
+ * Fixed small error on the error checking form.
373
+
374
+ 1.4 (03/10/09)
375
+ --------------
376
+ * Added a check for duplicate emails.
377
+
378
+ 1.3 (30/09/09)
379
+ --------------
380
+ * Added a new feature where you can mention the name of the recipient of the email within the email by using the %NAME% string.
381
+ * Better default title & text for the WP Email Capture Widget.
382
+ * Fixed a bug that dropped the last character of the "From" name.
383
+
384
+ 1.2 (27/09/09)
385
+ --------------
386
+ * Fixed errors with the programme when using non pretty permalinks (they now work now)
387
+ * Compatible with windows based PHP configurations (1.1 introduced a function that didn't work on windows boxes).
388
+
389
+ 1.1 revision 2 (24/09/09)
390
+ -------------------------
391
+ * Fixed compatability issue with All in One SEO.
392
+ * Blogs which are on a subdomain now can use the plugin (http://www.domian.com/wordpress/)
393
+
394
+ 1.1 revision 1 (23/09/09)
395
+ -------------------------
396
+ * Fixed small upgrade bug
397
+
398
+ 1.1 (22/09/09)
399
+ --------------
400
+ * Fixed short tag problem in tempdata.php
401
+ * Emails that are not valid emails aren't processed
402
+
403
+ 1.0 RC 1 (17/09/09)
404
+ -------------------
405
+ * First Release!
406
+ * Dashboard Widget added.
407
+
408
+ 0.4 (14/09/09)
409
+ --------------
410
+ * Used more secure internal wp_mail class for sending out mail
411
+ * Implemented [wp_email_form] class for implementing plugin on form
412
+
413
+ 0.3 (12/09/09)
414
+ --------------
415
+ * Switch to headers, rather than meta refreshes for updating the page
416
+
417
+ 0.2 (09/09/09)
418
+ --------------
419
+ * Fixed small error in the plugin when using permalinks
420
+ * Implemented more security to the plugin
421
+
422
+ 0.1 (07/09/09)
423
+ --------------
424
+ * Plugin Launched
readme.txt CHANGED
@@ -1,44 +1,45 @@
1
- === WP Email Capture ===
2
- Tags: email, marketing, capture, form, affiliates, mailing lists, email marketing, widget ready
3
- Requires at least: 3.0
4
- Tested up to: 4.4
5
- Version: 3.0.1
6
- Stable tag: 3.0.1
7
  Contributors: rhyswynne
8
- Donate link: http://wpemailcapture.com/premium/
9
 
10
  Double opt-in form for building your email list. Define landing pages to distribute your ebooks & software.
11
 
12
  == Description ==
13
- This creates a 2 field form (Name & Email) for capturing emails. Email is double opt in, and allows you to forward opt in to services such as ebooks or software. When you are ready to begin your email marketing campaign, simply export the list into your chosen email marketing software or service.
14
 
15
- Features:-
16
 
17
  * Widget Ready.
18
  * Uses Wordpress' internal wp_mail function for sending mail.
19
  * Easily integrated with posts & pages.
20
  * Dashboard Widget.
 
21
  * Export data into CSV files, compatible with most major Email Marketing Programmes (including Aweber, Mailchimp, Groupmail, Constant Contact)
22
  * Double opt in, so compatible with CAN-SPAM act.
23
  * And completely free!
24
 
25
- For more details please visit the official site of [WP Email Capture](http://wpemailcapture.com/?utm_source=description&utm_medium=wordpressorgreadme&utm_campaign=wpemailcapture)
26
 
27
  **Now Released is WP Email Capture Premium!** You get all the above features plus the following:-
28
 
29
  * Stat tracking - track the visitors to your site and where your sign ups come from.
30
  * Autoresponders - Create an autoresponder email, an email sent to the user when they sign up to your site.
31
  * Multiple lists - Create multiple lists for your site.
32
- * Build External Lists - If you have a Mailchimp or Aweber account, you can use WP Email Capture to build to these services directly.
33
  * Custom Fields - You can capture more than just visitors name & email, add your own custom fields to capture (such as phone number or Address).
34
 
35
- You also get premium support and further documentation. For more information, and to purchase, [visit the plans and pricing page](http://wpemailcapture.com/premium/?utm_source=wpemailcapturepremium&utm_medium=wordpressorgreadme&utm_campaign=wpemailcapture).
36
 
37
  Keep in Contact:-
38
 
39
  * [WP Email Capture on Facebook](http://www.facebook.com/wpemailcapture)
40
  * [@WPEmailCapture](http://www.twitter.com/wpemailcapture) on Twitter
41
- * For support requests please visit the [FAQ's](http://wpemailcapture.com/free-plugin/frequently-asked-questions/?utm_source=contact&utm_medium=wordpressorgreadme&utm_campaign=wpemailcapture), or leave a message in the [Wordpress Support Forum](http://wordpress.org/support/plugin/wp-email-capture).
42
  * For general feature requests or bug notices [please contact me directly](http://wpemailcapture.com/contact/?utm_source=contact&utm_medium=wordpressorgreadme&utm_campaign=wpemailcapture), however any support requests sent via the contact form, Facebook Page or Twitter Feed will be ignored - please use the WordPress Support Forum - please note I'm unable to support CSS or styling queries, please read the "Stylings" area on [other notes](http://wordpress.org/plugins/wp-email-capture/other_notes/?utm_source=contact&utm_medium=wordpressorgreadme&utm_campaign=wpemailcapture).
43
 
44
  Translation Credits:-
@@ -64,7 +65,7 @@ Translations have been done by the following parties. Thank you!
64
 
65
  The form can be inserted into the site at any location. However, to put the form anywhere, insert the following code into your template
66
 
67
- `<?php if (function_exists('wp_email_capture_form')) { wp_email_capture_form(); } ?>`
68
 
69
  If you want to insert the form within a page, insert into any post or page the string `[wp_email_capture_form]`. It will be replaced with a simple form.
70
 
@@ -72,6 +73,9 @@ You can also add a widget to any widget enabled area by going to Appearance > Wi
72
 
73
  If you need more help, please read this guide on [how to set up WP Email Capture](http://wpemailcapture.com/2012/10/how-to-set-up-wp-email-capture-free/?utm_source=installation&utm_medium=wordpressorgreadme&utm_campaign=wpemailcapture)
74
 
 
 
 
75
  == Stylings ==
76
  To style your form, you need to add to your CSS file the following ID declarations. `wp_email_capture` is for sidebar & template widgets, `wp_email_capture_2` is for on page forms.
77
 
@@ -152,13 +156,136 @@ This plugin does use widgets, so probably yes :)
152
  = How do I include the name in my emails I send to people? =
153
  Wherever you put in %NAME% (spelt exactly like that, uppercase as well), it will be replaced with the name given by the user.
154
 
155
- == Bugs/Suggestions/Support ==
156
- Please report any bugs, support and suggestions to the [WP Email Capture Support Page](http://www.wpemailcapture.com/support/?utm_source=support&utm_medium=wordpressorgreadme&utm_campaign=wpemailcapture)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
157
 
158
- == Donate ==
159
- To donate to this plugin, please visit the [WP Email Capture Donations Page](http://wpemailcapture.com/premium/?utm_source=donate&utm_medium=wordpressorgreadme&utm_campaign=wpemailcapture)
160
 
161
- == Change Log ==
162
  = 3.0.1 =
163
  * Fixed a minor security issue in the display.php
164
  * Removed Tracking (for now)
@@ -188,7 +315,7 @@ To donate to this plugin, please visit the [WP Email Capture Donations Page](htt
188
  * Serbian Translation Done (thanks [Borisa](http://www.webhostinghub.com/)!)
189
 
190
  = 2.9 (17/12/13) =
191
- * Fixed a small bug that produced warnings should security fields not be passed.
192
  * Style buttons in a style for WordPress 3.8.
193
  * Remove a rogue mysql_real_escape_string() call making it compatible with WordPress 3.9.
194
  * Introduced stylings.
@@ -274,7 +401,7 @@ To donate to this plugin, please visit the [WP Email Capture Donations Page](htt
274
  * Added a "Delete entire list" button in Wordpress.
275
 
276
  = 1.9 (20/01/10) =
277
- * Fixed a small bug that resulted in the display for [The plugin does not have a valid header.]
278
  * Fixed a small phpmail bug
279
 
280
  = 1.8.1 (13/01/10) =
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.4
5
+ Version: 3.8.1
6
+ Stable tag: 3.8.1
7
  Contributors: rhyswynne
8
+ Donate link: https://www.wpemailcapture.com/premium/?utm_source=donatelink&utm_medium=wordpressorgreadme&utm_campaign=wpemailcapture
9
 
10
  Double opt-in form for building your email list. Define landing pages to distribute your ebooks & software.
11
 
12
  == Description ==
13
+ This creates a 2 field form (Name & Email) for capturing emails. Email is double opt in, and allows you to forward opt in to services such as ebooks or software. When you are ready to begin your email marketing campaign, simply export the list into your chosen email marketing software or service. WP Email Capture now comes with a number of [integrations and extensions](https://www.wpemailcapture.com/downloads/?utm_source=description&utm_medium=wordpressorgreadme&utm_campaign=wpemailcapture), including [WP Email Capture Premium](https://www.wpemailcapture.com/premium?utm_source=description&utm_medium=wordpressorgreadme&utm_campaign=wpemailcapture) allows you to build multiple lists, track stats and have custom fields and templates
14
 
15
+ WP Email Capture Free Features:-
16
 
17
  * Widget Ready.
18
  * Uses Wordpress' internal wp_mail function for sending mail.
19
  * Easily integrated with posts & pages.
20
  * Dashboard Widget.
21
+ * GDPR Friendly
22
  * Export data into CSV files, compatible with most major Email Marketing Programmes (including Aweber, Mailchimp, Groupmail, Constant Contact)
23
  * Double opt in, so compatible with CAN-SPAM act.
24
  * And completely free!
25
 
26
+ For more details please visit the official site of [WP Email Capture](https://www.wpemailcapture.com/?utm_source=description&utm_medium=wordpressorgreadme&utm_campaign=wpemailcapture)
27
 
28
  **Now Released is WP Email Capture Premium!** You get all the above features plus the following:-
29
 
30
  * Stat tracking - track the visitors to your site and where your sign ups come from.
31
  * Autoresponders - Create an autoresponder email, an email sent to the user when they sign up to your site.
32
  * Multiple lists - Create multiple lists for your site.
33
+ * Build External Lists - If you have a Constant Contact, Mailchimp or Aweber account, you can use WP Email Capture to build to these services directly.
34
  * Custom Fields - You can capture more than just visitors name & email, add your own custom fields to capture (such as phone number or Address).
35
 
36
+ You also get premium support and further documentation. For more information, and to purchase, [visit the plans and pricing page](https://www.wpemailcapture.com/premium/?utm_source=wpemailcapturepremium&utm_medium=wordpressorgreadme&utm_campaign=wpemailcapture).
37
 
38
  Keep in Contact:-
39
 
40
  * [WP Email Capture on Facebook](http://www.facebook.com/wpemailcapture)
41
  * [@WPEmailCapture](http://www.twitter.com/wpemailcapture) on Twitter
42
+ * For support requests please visit the [FAQ's](https://www.wpemailcapture.com/free-plugin/frequently-asked-questions/?utm_source=contact&utm_medium=wordpressorgreadme&utm_campaign=wpemailcapture), or leave a message in the [Wordpress Support Forum](http://wordpress.org/support/plugin/wp-email-capture).
43
  * For general feature requests or bug notices [please contact me directly](http://wpemailcapture.com/contact/?utm_source=contact&utm_medium=wordpressorgreadme&utm_campaign=wpemailcapture), however any support requests sent via the contact form, Facebook Page or Twitter Feed will be ignored - please use the WordPress Support Forum - please note I'm unable to support CSS or styling queries, please read the "Stylings" area on [other notes](http://wordpress.org/plugins/wp-email-capture/other_notes/?utm_source=contact&utm_medium=wordpressorgreadme&utm_campaign=wpemailcapture).
44
 
45
  Translation Credits:-
65
 
66
  The form can be inserted into the site at any location. However, to put the form anywhere, insert the following code into your template
67
 
68
+ `<?php if (function_exists('wp_email_capture_form')) { wp_email_capture_form(); } ?>`
69
 
70
  If you want to insert the form within a page, insert into any post or page the string `[wp_email_capture_form]`. It will be replaced with a simple form.
71
 
73
 
74
  If you need more help, please read this guide on [how to set up WP Email Capture](http://wpemailcapture.com/2012/10/how-to-set-up-wp-email-capture-free/?utm_source=installation&utm_medium=wordpressorgreadme&utm_campaign=wpemailcapture)
75
 
76
+ == Bugs/Suggestions/Support ==
77
+ Please report any bugs, support and suggestions to the [WP Email Capture Support Page](http://www.wpemailcapture.com/support/?utm_source=support&utm_medium=wordpressorgreadme&utm_campaign=wpemailcapture)
78
+
79
  == Stylings ==
80
  To style your form, you need to add to your CSS file the following ID declarations. `wp_email_capture` is for sidebar & template widgets, `wp_email_capture_2` is for on page forms.
81
 
156
  = How do I include the name in my emails I send to people? =
157
  Wherever you put in %NAME% (spelt exactly like that, uppercase as well), it will be replaced with the name given by the user.
158
 
159
+ == Change Log ==
160
+ = 3.8.1 =
161
+ * Version with all the missing files from 3.8!
162
+
163
+ = 3.8 =
164
+ * Added a new button to the classic editor allowing you to place the form anywhere.
165
+
166
+ = 3.7.3 =
167
+ * Fixed a small bug in the site.
168
+
169
+ = 3.7.2 =
170
+ * Tested to 5.3.
171
+
172
+ = 3.7.1 =
173
+ * Corrected the "Requires at Least" as it was showing as being incompatible in the plugin store (when it is).
174
+
175
+ = 3.7 =
176
+ * Added filter - `wp_email_capture_change_user_present_error_url`, needed for an additional plugin - [WP Email Capture: Returning User Redirect](https://www.wpemailcapture.com/downloads/wp-email-capture-returning-user-redirect/?utm_source=changelog&utm_medium=wordpressorgreadme&utm_campaign=wpemailcapture).
177
+ * Tested with WordPress 5.2
178
+ * Fixed a few CSS changes on the option pages.
179
+
180
+ = 3.6.6 =
181
+ * Tested up to 5.1
182
+
183
+ = 3.6.5 =
184
+ * Tested with Constant Contact so reflected help screens to mention that.
185
+
186
+ = 3.6.4 =
187
+ * Clarified further a couple of options that people were having problems with.
188
+
189
+ = 3.6.3 =
190
+ * Some files didn't manage to upload. I've now pushed them live.
191
+
192
+ = 3.6.2 =
193
+ * Fixed a bug in Gutenberg.
194
+ * Checking for "register_block_type" rather than "the_gutenberg_project" in prep for 5.0
195
+
196
+ = 3.6.1 =
197
+ * Added Gutenberg information to the help section.
198
+ * Removed a spelling mistake in one of the URL's on the setup form.
199
+
200
+ = 3.6 =
201
+ * 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.
202
+
203
+ = 3.5.4 =
204
+ * Added a note should a version of MySQL earlier than 5.6 is shared.
205
+
206
+ = 3.5.3 =
207
+ * Fixed a bug that saving with GDPR switched off resulted in a display error (even though it was saved correctly)
208
+
209
+ = 3.5.2 =
210
+ * A few cosmetic changes to the help pages. Could use more work but is a bit neater for now.
211
+
212
+ = 3.5.1 =
213
+ * Fix a bug that the Privacy Policy checkbox didn't work on widgets.
214
+
215
+ = 3.5 =
216
+ * Integration with WordPress' GDPR checker.
217
+ * You can have a checkbox on your forms, explicitly giving consent to users to sign up to your newsletter.
218
+ * You can delete data after a period of time on the site.
219
+ * You can search the database, allowing you to see and delete what data you have for people
220
+ * Improved the changelog routine, allowing it to be updated more frequently.
221
+
222
+ = 3.4.2 =
223
+ * Introduced "wp_email_capture_is_premium" function, to make further development easier.
224
+ * Fixed a bug from Gutenberg 3.4 that called a undefined variable (blocks.source.children & blocks.source.attr).
225
+ * Switched from wp.blocks.InspectorControls.TextControl to wp.components.TextControl.
226
+
227
+ = 3.4.1 =
228
+ * Fixes a fatal error
229
+
230
+ = 3.4 =
231
+ * Added Default Styles should you wish to activate them.
232
+ * Gutenberg Compatibility!
233
+
234
+ = 3.3.4 =
235
+ * Fix a few dead links in the plugin
236
+
237
+ = 3.3.3 =
238
+ * Fix bug in header on export (props Ov3rfly).
239
+ * Tested in 4.9
240
+
241
+ = 3.3.2 =
242
+ * Make it compatible with 4.8
243
+ * Make the "Buy Link" in WP Email Capture include a coupon
244
+ * Include links to compatible services on the Plugin Dashboard
245
+
246
+ = 3.3.1 =
247
+ * Fixes a conflict with other plugins that send HTML emails.
248
+
249
+ = 3.3 =
250
+ * Introduced the ability to have "HTML" enabled lists.
251
+ * Introduced the ability to send emails without headers. Useful for Amazon SES.
252
+ * Added a charset on export of CSV. (Props Ov3rfly)
253
+
254
+ = 3.2 =
255
+ * Correction in the German translation (props [Lars Kasper](http://larskasper.de/))
256
+ * Added a wp_email_capture_extra_checks action, that will allow people to run checks on the name/email address.
257
+ * Removed some legacy code that was commented out.
258
+ * Fix an encoding issue for new installs, now the tables match the database's encoding.
259
+ * Fixed a bug for new installs that had a "The plugin generated XXX characters of unexpected output during activation.".
260
+
261
+ = 3.1.4 =
262
+ * Fixed a bug that caused an "Unexpected Output" on some database setups.
263
+ * Used UNIQUE KEY rather than PRIMARY KEY, so activation and deactivation doesn't cause database errors.
264
+
265
+ = 3.1.3 =
266
+ * Added wp_email_capture_complete_before_redirect action. Allowing data to be manipulated before the redirect.
267
+ * Added Extensions area of dashboard.
268
+
269
+ = 3.1.2 =
270
+ * Reward linkers with a voucher code.
271
+ * Included the "Last Temporary Signup" date, so they get know the last attempted signup.
272
+ * Tested up to 4.5.
273
+
274
+ = 3.1.1 =
275
+ * 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. ** Update strongly required **
276
+ * Fixed a bug which saw a notice appear of a missing option on the upgrade and dashboard page.
277
+ * Removed a double header in Dashboard widget (props Ove3rfly).
278
+ * Correct textdomain used in some files (props Ov3rfly).
279
+ * Removed all PHP closing tags through the site (props Ov3rfly).
280
+
281
+ = 3.1 =
282
+ * Removed the default widget title should widget text be blank (props [Hassan Raza](http://hassan-raza.com/)).
283
+ * Changed word from "Update" to "Upgrade" for large lists as it was confusing people.
284
+ * Changed to new Text Domain as per WordPress' new internationalisation integration (wp-email-capture).
285
 
286
+ = 3.0.2 =
287
+ * Fixed an error with "Error: " displaying on the free version.
288
 
 
289
  = 3.0.1 =
290
  * Fixed a minor security issue in the display.php
291
  * Removed Tracking (for now)
315
  * Serbian Translation Done (thanks [Borisa](http://www.webhostinghub.com/)!)
316
 
317
  = 2.9 (17/12/13) =
318
+ * Fixed a small bug that produced warnings should security fields not be passed.
319
  * Style buttons in a style for WordPress 3.8.
320
  * Remove a rogue mysql_real_escape_string() call making it compatible with WordPress 3.9.
321
  * Introduced stylings.
401
  * Added a "Delete entire list" button in Wordpress.
402
 
403
  = 1.9 (20/01/10) =
404
+ * Fixed a small bug that resulted in the display for [The plugin does not have a valid header.]
405
  * Fixed a small phpmail bug
406
 
407
  = 1.8.1 (13/01/10) =
wp-email-capture.php CHANGED
@@ -1,32 +1,26 @@
1
  <?php
2
 
3
  /*
4
-
5
  Plugin Name: WP Email Capture
6
-
7
- Plugin URI: http://wpemailcapture.com/?utm_source=plugin-link&utm_medium=plugin&utm_campaign=wpemailcapture
8
-
9
- Description: Captures email addresses for insertion into software such as <a href="http://wpemailcapture.com/recommends/aweber" title="Email Marketing">Aweber</a> or <a href="http://wpemailcapture.com/recommends/mailchimp/">Mailchimp</a>
10
-
11
- Version: 3.0.1
12
-
13
  Author: Winwar Media
14
-
15
- Author URI: http://winwar.co.uk/?utm_source=author-link&utm_medium=plugin&utm_campaign=wpemailcapture
16
-
17
  */
18
 
19
  global $wp_email_capture_db_version;
20
  global $wpdb;
21
 
22
  // Definitions
23
- $wp_email_capture_db_version = "1.0";
24
 
25
  define( 'WP_EMAIL_CAPTURE_PATH', dirname( __FILE__ ) );
26
  define( 'WP_EMAIL_CAPTURE_URL', plugins_url( '', __FILE__ ) );
27
- define( 'WP_EMAIL_CAPTURE_TEMP_MEMBERS_TABLE', $wpdb->prefix . 'wp_email_capture_temp_members');
28
- define( 'WP_EMAIL_CAPTURE_REGISTERED_MEMBERS_TABLE', $wpdb->prefix . 'wp_email_capture_registered_members');
29
- define( 'WP_EMAIL_CAPTURE_VERSION', '3.0' );
 
30
 
31
  require_once WP_EMAIL_CAPTURE_PATH . '/inc/core.php';
32
 
@@ -34,7 +28,7 @@ require_once WP_EMAIL_CAPTURE_PATH . '/inc/core.php';
34
  * Function to initialise all WordPress Functionality.
35
  *
36
  * Loads textdomain, then loads admin functions, then front end functionality.
37
- *
38
  * @return void
39
  */
40
  function wp_email_capture_plugins_loaded() {
@@ -42,38 +36,61 @@ function wp_email_capture_plugins_loaded() {
42
  // Textdomain
43
  if ( function_exists( 'load_plugin_textdomain' ) ) {
44
  $plugin_dir = basename( dirname( __FILE__ ) );
45
- load_plugin_textdomain( 'wp-email-capture', false , dirname( plugin_basename( __FILE__ ) ) . '/languages' );
46
  }
47
 
48
  // Admin Functions
49
- add_action( 'admin_init', 'wp_email_capture_options_process' );
 
50
  add_action( 'wp_dashboard_setup', 'wp_email_capture_add_dashboard_widgets' );
51
  add_action( 'admin_menu', 'wp_email_capture_menus', 10 );
52
  //add_action( 'admin_notices', 'wp_email_capture_admin_notice' );
53
  add_action( 'admin_notices', 'wp_email_capture_admin_upsell' );
 
54
  add_action( 'admin_init', 'wp_email_capture_nag_ignore' );
55
- add_action( 'widgets_init', 'wp_email_capture_widget_init', 10);
56
-
57
- /* if ( 1 == get_option( 'wpec_set_tracking' ) ) {
58
 
59
- add_action( 'plugins_loaded', 'wpec_start_tracking', 15 );
60
- add_action( 'admin_init', 'wpec_do_tracking');
61
-
62
- } */
63
-
64
  // Front End Functions
65
  add_action( 'init', 'wp_email_capture_process' );
66
  add_action( 'wp_email_capture_signup_actions', 'wp_email_capture_signup', 10 );
67
  add_action( 'wp_email_capture_confirm_actions', 'wp_capture_email_confirm', 10 );
68
  add_action( 'wp_enqueue_scripts', 'wp_email_capture_scripts' );
69
  add_action( 'admin_enqueue_scripts', 'wp_email_capture_admin_scripts' );
70
- add_shortcode( 'wp_email_capture_form', 'wp_email_capture_form_process_atts' );
71
  add_filter( 'wp_email_capture_send_email', 'wp_email_capture_send_email_default', 10, 4 );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72
  }
73
 
74
  // Activation functionality
75
  add_action( 'plugins_loaded', 'wp_email_capture_plugins_loaded', 10 );
76
  register_activation_hook( __FILE__, 'wp_email_capture_install' );
77
-
78
-
79
- ?>
1
  <?php
2
 
3
  /*
 
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.8.1
 
 
 
 
8
  Author: Winwar Media
9
+ Author URI: https://www.winwar.co.uk/?utm_source=author-link&utm_medium=plugin&utm_campaign=wpemailcapture
 
 
10
  */
11
 
12
  global $wp_email_capture_db_version;
13
  global $wpdb;
14
 
15
  // Definitions
16
+ $wp_email_capture_db_version = '3.5';
17
 
18
  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.8.1' );
23
+ define( 'WP_EMAIL_MIN_MYSQL_VERSION', '5.6' );
24
 
25
  require_once WP_EMAIL_CAPTURE_PATH . '/inc/core.php';
26
 
28
  * Function to initialise all WordPress Functionality.
29
  *
30
  * Loads textdomain, then loads admin functions, then front end functionality.
31
+ *
32
  * @return void
33
  */
34
  function wp_email_capture_plugins_loaded() {
36
  // Textdomain
37
  if ( function_exists( 'load_plugin_textdomain' ) ) {
38
  $plugin_dir = basename( dirname( __FILE__ ) );
39
+ load_plugin_textdomain( 'wp-email-capture', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
40
  }
41
 
42
  // Admin Functions
43
+ add_action( 'init', 'wp_email_capture_add_freebuttons', 10 );
44
+ add_action( 'admin_init', 'wp_email_capture_options_process' );
45
  add_action( 'wp_dashboard_setup', 'wp_email_capture_add_dashboard_widgets' );
46
  add_action( 'admin_menu', 'wp_email_capture_menus', 10 );
47
  //add_action( 'admin_notices', 'wp_email_capture_admin_notice' );
48
  add_action( 'admin_notices', 'wp_email_capture_admin_upsell' );
49
+ add_action( 'admin_notices', 'wp_email_capture_mysql_upsell' );
50
  add_action( 'admin_init', 'wp_email_capture_nag_ignore' );
51
+ add_action( 'admin_init', 'wp_email_capture_install' );
52
+ add_action( 'widgets_init', 'wp_email_capture_widget_init', 10 );
 
53
 
 
 
 
 
 
54
  // Front End Functions
55
  add_action( 'init', 'wp_email_capture_process' );
56
  add_action( 'wp_email_capture_signup_actions', 'wp_email_capture_signup', 10 );
57
  add_action( 'wp_email_capture_confirm_actions', 'wp_capture_email_confirm', 10 );
58
  add_action( 'wp_enqueue_scripts', 'wp_email_capture_scripts' );
59
  add_action( 'admin_enqueue_scripts', 'wp_email_capture_admin_scripts' );
 
60
  add_filter( 'wp_email_capture_send_email', 'wp_email_capture_send_email_default', 10, 4 );
61
+ add_action( 'wp_email_capture_set_wp_email_capture_email_settings', 'wp_email_capture_set_email_to_html', 10 );
62
+ add_action( 'wp_email_capture_set_normal_email_settings', 'wp_email_capture_set_email_to_plain', 10 );
63
+
64
+ // Running this on the same hook so it can be removed if need be.
65
+ add_action( 'plugins_loaded', 'wp_email_capture_database_upgdrade', 50 );
66
+
67
+ add_shortcode( 'wp_email_capture_form', 'wp_email_capture_form_process_atts' );
68
+
69
+ // Gutenberg Support
70
+ if ( function_exists( 'register_block_type' ) ) {
71
+ add_action( 'enqueue_block_editor_assets', 'wp_email_capture_enqueue_block_editor_assets', 10 );
72
+ add_action( 'enqueue_block_assets', 'wp_email_capture_enqueue_block_editor_css', 10 );
73
+ add_action( 'wp_email_capture_help_boxes', 'wp_email_capture_gutenberg_help', 70 );
74
+ }
75
+
76
+ // GDPR
77
+ global $wp_version;
78
+ if ( version_compare( $wp_version, '4.9.6', '>=' ) ) {
79
+ //if ( get_option( 'wp_email_capture_enable_gdpr' ) ) {
80
+ add_action( 'wp_email_capture_form_echo_form_before_submit_button', 'wp_email_capture_add_privacy_policy_before_submit_echo_form', 10 );
81
+ add_filter( 'wp_email_capture_display_form', 'wp_email_capture_add_privacy_policy_before_submit_display_form', 10, 2 );
82
+ add_action( 'wp_email_capture_signup_actions', 'wp_email_capture_gdpr_process', 5 );
83
+ add_action( 'wp_email_capture_hourly', 'wp_email_capture_gdpr_deletion' );
84
+ //add_action( 'admin_menu', 'wp_email_capture_add_gdpr_page', 10 );
85
+ add_action( 'admin_init', 'wp_email_capture_add_privacy_policy_content', 160 );
86
+ add_filter( 'wp_privacy_personal_data_exporters', 'wp_email_capture_register_plugin_exporter', 10 );
87
+ add_filter( 'wp_privacy_personal_data_erasers', 'wp_email_capture_register_plugin_eraser', 10 );
88
+ //}
89
+ add_action( 'wp_email_capture_help_boxes', 'wp_email_capture_gdpr_help', 50 );
90
+ }
91
  }
92
 
93
  // Activation functionality
94
  add_action( 'plugins_loaded', 'wp_email_capture_plugins_loaded', 10 );
95
  register_activation_hook( __FILE__, 'wp_email_capture_install' );
96
+ register_activation_hook( __FILE__, 'wp_email_capture_gdpr_activation' );