WordPress Email Marketing Plugin – WP Email Capture - Version 3.1

Version Description

  • Removed the default widget title should widget text be blank (props Hassan Raza).
  • Changed word from "Update" to "Upgrade" for large lists as it was confusing people.
  • Changed to new Text Domain as per WordPress' new internationalisation integration (wp-email-capture).
Download this release

Release Info

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

Code changes from version 2.11 to 3.1

Files changed (44) hide show
  1. images/wpemailcapture-dashicon.png +0 -0
  2. inc/admin-sidebar.php +103 -80
  3. inc/core.php +4 -4
  4. inc/css/wp-email-capture-admin-styles.css +46 -0
  5. inc/dashboard.php +22 -20
  6. inc/{checks.php → deprecated/checks.php} +8 -13
  7. inc/deprecated/pagedresults.php +183 -0
  8. inc/display.php +56 -50
  9. inc/enqueue.php +17 -3
  10. inc/exportcsv.php +22 -29
  11. inc/functions.php +139 -48
  12. inc/help.php +180 -0
  13. inc/install.php +36 -40
  14. inc/js/admin-custom.js +15 -0
  15. inc/options.php +217 -150
  16. inc/pagedresults.php +0 -183
  17. inc/process.php +196 -201
  18. inc/security.php +14 -11
  19. inc/tabledata.php +64 -43
  20. inc/tempdata.php +23 -22
  21. inc/tracking.php +169 -0
  22. inc/widget.php +22 -166
  23. languages/WPEC-fr_FR.mo +0 -0
  24. languages/{WPEC-de_DE.mo → wp-email-capture-de_DE.mo} +0 -0
  25. languages/{WPEC-de_DE.po → wp-email-capture-de_DE.po} +0 -0
  26. languages/{WPEC-es_ES.mo → wp-email-capture-es_ES.mo} +0 -0
  27. languages/{WPEC-es_ES.po → wp-email-capture-es_ES.po} +0 -0
  28. languages/wp-email-capture-fr_FR.mo +0 -0
  29. languages/{WPEC-fr_FR.po → wp-email-capture-fr_FR.po} +4 -1
  30. languages/wp-email-capture-hr.mo +0 -0
  31. languages/wp-email-capture-hr.po +1 -0
  32. languages/{WPEC-hu_HU.mo → wp-email-capture-hu_HU.mo} +0 -0
  33. languages/{WPEC-hu_HU.po → wp-email-capture-hu_HU.po} +0 -0
  34. languages/{WPEC-it_IT.mo → wp-email-capture-it_IT.mo} +0 -0
  35. languages/{WPEC-it_IT.po → wp-email-capture-it_IT.po} +0 -0
  36. languages/{WPEC-nl_NL.mo → wp-email-capture-nl_NL.mo} +0 -0
  37. languages/{WPEC-nl_NL.po → wp-email-capture-nl_NL.po} +0 -0
  38. languages/{WPEC-pt_BR.mo → wp-email-capture-pt_BR.mo} +0 -0
  39. languages/{WPEC-pt_BR.po → wp-email-capture-pt_BR.po} +0 -0
  40. languages/{WPEC-sr_RS.mo → wp-email-capture-sr_RS.mo} +0 -0
  41. languages/{WPEC-sr_RS.po → wp-email-capture-sr_RS.po} +0 -0
  42. readme.txt +41 -13
  43. wp-email-capture.php +54 -40
  44. wp-email-capture.pot +0 -497
images/wpemailcapture-dashicon.png ADDED
Binary file
inc/admin-sidebar.php CHANGED
@@ -1,76 +1,91 @@
1
  <?php
2
 
3
- function wp_email_capture_admin_sidebar($sidestring)
4
- {
5
- $sidebararray = explode(',', $sidestring);
6
-
 
 
 
 
 
7
  echo '<div class="postbox-container" style="width:24%;padding-left:10px;float:left;"><div class="metabox-holder"><div class="meta-box-sortables">';
8
-
9
- foreach ($sidebararray as $widgettitle)
10
- {
11
- echo "<div id='wpemailcapture_premium".$widgettitle."' class='postbox'>";
12
- switch($widgettitle){
13
  case 'support':
14
- echo '<h3 class="hndle"><span>'.__('Need Help?','WPEC').'</span></h3>';
15
- echo '<div class="inside">';
16
- echo '<p>'.__('If you are having problems with this plugin, please read the','WPEC').' <a href="http://wpemailcapture.com/free-plugin/frequently-asked-questions/">'.__('Frequently Asked Questions','WPEC').'</a>, '.__('or alternatively','WPEC').' <a href="http://wpemailcapture.com/support/">'.__('submit a support request here','WPEC').'</a>.</p></div>';
 
17
  break;
 
18
  case 'affiliates':
19
- echo '<h3 class="hndle"><span>'.__('Recommended Services','WPEC').'</span></h3>';
20
- echo '<div class="inside">';
21
- echo '<p>'.__('We recommend the following services for sending out emails:-','WPEC').'</p>';
22
- echo '<ul>';
23
- echo '<li><strong><a href="http://wpemailcapture.com/recommends/aweber">Aweber</a></strong></li>';
24
- echo '<li><strong><a href="http://wpemailcapture.com/recommends/mailchimp">MailChimp</a></strong></li>';
25
- echo '<li><strong><a href="http://wpemailcapture.com/recommends/madmimi">MadMimi</a></strong></li>';
26
- echo '</ul>';
27
- echo '</div>';
28
  break;
 
29
  case 'globaldescription':
30
- echo '<h3 class="hndle"><span>'.__('Global List Management','WPEC').'</span></h3>';
31
- echo '<div class="inside">';
32
- echo '<p>'.__('This page allows you to create lists, either','WPEC').' <strong>'.__('external lists','WPEC').'</strong> '.__('(WP Email Capture is compatible with most major email marketing software packages), or a new','WPEC').' <strong>'.__('WP Email Capture List','WPEC').'</strong>.' .__('You can create as many different lists as you wish','WPEC').'.</p>';
33
- echo '</div>';
34
  break;
 
35
  case 'listdescriptionpremium':
36
- echo '<h3 class="hndle"><span>' .__('Add/Edit WP Email Capture List','WPEC').'</span></h3>';
37
- echo '<div class="inside">';
38
- echo '<p>' .__('This is the page for managing WP Email Capture Lists. From this page you can:-','WPEC').'</p>';
39
- echo '<ul>';
40
- echo '<li><strong>' .__('Make Changes To Your Lists','WPEC').'</strong> - ' .__('such as the name and the pages redirected to on form completion','WPEC').'.</li>';
41
- echo '<li><strong>' .__('Email Options','WPEC').'</strong> - ' .__('such as where the email comes from and what emails sent to the subscriber contains','WPEC').'.</li>';
42
- echo '<li><strong>' .__('Error Options','WPEC').'</strong> - ' .__('the errors that are displayed to subscribers who incorrectly fill in the form','WPEC').'.</li>';
43
- echo '<li><strong>' .__('Styling Options','WPEC').'</strong> - ' .__('change the button image (or use an image), as well as what to ask the user for besides their name','WPEC').'.</li>';
44
- echo '</ul>';
45
- echo __('You can also on this page do the following','WPEC'). ':-';
46
- echo '<ul>';
47
- echo '<li>'.__('Manage List Subscribers','WPEC').'</li>';
48
- echo '<li>'.__('Delete Temporary Emails','WPEC').'</li>';
49
- echo '<li>'.__('Empty the entire list','WPEC').'</li>';
50
- echo '</ul>';
51
- echo '</div>';
52
  break;
 
53
  case 'getwpemailcapturepremiumdescription':
54
- $link = get_option('wp_email_capture_theme_affiliate_link');
55
- if (!$link)
56
- {
57
- $link = "http://wpemailcapture.com/pricing/?utm_source=plugin&utm_medium=banner&utm_term=2point5&utm_campaign=internalbanner";
 
 
 
58
  }
59
- echo '<h3 class="hndle"><span>'.__('Get WP Email Capture Premium','WPEC').'</span></h3>';
60
- echo '<div class="inside">';
61
- echo '<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','WPEC').'.</p>';
62
- echo '<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"></a></p>';
63
- echo '</div>';
64
  break;
 
65
  case 'exlistdescriptionpremium':
66
- echo '<h3 class="hndle"><span>'.__('Add/Edit External List','WPEC').'</span></h3>';
67
- echo '<div class="inside">';
68
- echo '<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','WPEC').'.</p>';
69
- echo '</div>';
70
  break;
 
71
  case 'donations':
72
- echo '<h3 class="hndle"><span>'.__('Donations','WPEC').'</span></h3><div class="inside">
73
- <p>'.__('If you like this plugin, please consider a small donation to help with future versions and plugins.','WPEC'). '</p>
74
  <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
75
  <input type="hidden" name="cmd" value="_s-xclick">
76
  <input type="hidden" name="hosted_button_id" value="8590914">
@@ -78,42 +93,50 @@ function wp_email_capture_admin_sidebar($sidestring)
78
  <img alt="" border="0" src="https://www.paypal.com/en_GB/i/scr/pixel.gif" width="1" height="1">
79
  </form></div>';
80
  break;
 
81
  case 'news':
82
  $wpemailcapturefeed = wp_email_capture_fetch_rss_feed();
83
- echo '<h3 class="hndle"><span>'.__('Latest News','WPEC').'</span></h3><div class="inside">
84
- <p>'.__('The latest news and tutorials from WP Email Capture','WPEC').'.</p>';
85
- echo '<ul>';
86
- if ($wpemailcapturefeed) {
 
 
 
87
  foreach ( $wpemailcapturefeed as $item ) {
88
- $url = preg_replace( '/#.*/', '', esc_url( $item->get_permalink(), $protocolls=null, 'display' ) );
89
- echo '<li>';
90
- echo '<a href="'.$url.'#utm_source=wpadmin&utm_medium=sidebarwidget&utm_term=newsitem&utm_campaign=wpemailcapture">'. esc_html( $item->get_title() ) .'</a> ';
91
- echo '</li>';
92
- }
93
  }
94
- echo '</ul></div>';
95
  break;
 
96
  case 'supportus':
97
- echo '<h3 class="hndle"><span>'.__('Support Us!','WPEC').'</span></h3><div class="inside">
98
- <p>'.__('We would like you if you would not mind, doing one of the following if you are a fan of WP Email Capture','WPEC').'.</p>';
99
- echo '<ul>';
100
- echo '<li><a href="http://wordpress.org/extend/plugins/wp-email-capture/">'.__('Rate the plugin 5* on WordPress.org','WPEC').'</a></li>';
101
- echo '<li><a href="http://twitter.com/WPEmailCapture">'.__('Follow @WPEmailCapture on Twitter','WPEC').'</a></li>';
102
- echo '<li><a href="http://facebook.com/WPEmailCapture">'.__('Like us on Facebook','WPEC').'</a></li>';
103
- echo '</ul></div>';
 
104
  break;
 
105
  case 'becomeanaffiliate':
106
- echo '<h3 class="hndle"><span>'.__('Become An Affiliate!','WPEC').'</span></h3><div class="inside">
107
- <p>'.__('Earn upto','WPEC'). ' <strong>$30</strong> '.__('per sale of WP Email Capture','WPEC'). '! <a href="http://wpemailcapture.com/affiliates"><strong>'.__('Join our affilite programme today','WPEC').'</strong></a>.</p></div>';
108
  break;
 
109
  case 'supportpage':
110
- echo '<h3 class="hndle"><span>'.__('WP Email Capture Options','WPEC').'</span></h3><div class="inside">
111
- <p>'.__('On this page you can make changes that to the way in which WP Email Capture runs','WPEC').'.</p></div>';
112
  break;
113
  }
114
  echo "</div>";
115
  }
116
  echo '</div></div></div>';
117
-
118
- }
119
- ?>
1
  <?php
2
 
3
+ /**
4
+ * Function to generate the sidebar on admin pages.
5
+ *
6
+ * @param string $sidestring Comma separated string with all admin boxes.
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">
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
+ ?>
inc/core.php CHANGED
@@ -4,8 +4,6 @@ require_once(WP_EMAIL_CAPTURE_PATH . '/inc/functions.php');
4
  require_once(WP_EMAIL_CAPTURE_PATH . '/inc/admin-sidebar.php');
5
  require_once(WP_EMAIL_CAPTURE_PATH . '/inc/install.php');
6
 
7
- require_once(WP_EMAIL_CAPTURE_PATH . '/inc/pagedresults.php');
8
-
9
  require_once(WP_EMAIL_CAPTURE_PATH . '/inc/tabledata.php');
10
 
11
  require_once(WP_EMAIL_CAPTURE_PATH . '/inc/options.php');
@@ -24,9 +22,11 @@ require_once(WP_EMAIL_CAPTURE_PATH . '/inc/security.php');
24
 
25
  require_once(WP_EMAIL_CAPTURE_PATH . '/inc/dashboard.php');
26
 
27
- require_once(WP_EMAIL_CAPTURE_PATH . '/inc/checks.php');
28
-
29
  require_once(WP_EMAIL_CAPTURE_PATH . '/inc/functions.php');
30
 
31
  require_once(WP_EMAIL_CAPTURE_PATH . '/inc/enqueue.php');
 
 
 
 
32
  ?>
4
  require_once(WP_EMAIL_CAPTURE_PATH . '/inc/admin-sidebar.php');
5
  require_once(WP_EMAIL_CAPTURE_PATH . '/inc/install.php');
6
 
 
 
7
  require_once(WP_EMAIL_CAPTURE_PATH . '/inc/tabledata.php');
8
 
9
  require_once(WP_EMAIL_CAPTURE_PATH . '/inc/options.php');
22
 
23
  require_once(WP_EMAIL_CAPTURE_PATH . '/inc/dashboard.php');
24
 
 
 
25
  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
  ?>
inc/css/wp-email-capture-admin-styles.css ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .wpemailcapture-tab {
2
+ display: none;
3
+ }
4
+
5
+ .wpemailcapture-tab.active {
6
+ display: block;
7
+ }
8
+
9
+ .wpemailcapture-tab ul {
10
+ list-style-type: disc;
11
+ list-style-position: outside;
12
+ padding-left: 20px;
13
+ }
14
+
15
+ .wpemailcapture-tab button {
16
+
17
+ display: inline-block;
18
+ padding: 6px 12px;
19
+ margin-bottom: 0;
20
+ font-size: 14px;
21
+ font-weight: 400;
22
+ line-height: 1.42857143;
23
+ text-align: center;
24
+ white-space: nowrap;
25
+ vertical-align: middle;
26
+ -ms-touch-action: manipulation;
27
+ touch-action: manipulation;
28
+ cursor: pointer;
29
+ -webkit-user-select: none;
30
+ -moz-user-select: none;
31
+ -ms-user-select: none;
32
+ user-select: none;
33
+ background-image: none;
34
+ border: 1px solid transparent;
35
+ border-radius: 4px;
36
+ color: #fff;
37
+ background-color: #5cb85c;
38
+ border-color: #4cae4c;
39
+
40
+ }
41
+
42
+ .wpemailcapture-tab button:hover {
43
+ color: #fff;
44
+ background-color: #449d44;
45
+ border-color: #398439;
46
+ }
inc/dashboard.php CHANGED
@@ -1,30 +1,32 @@
1
  <?php
2
 
3
 
4
-
 
 
 
 
5
  function wp_email_capture_dashboard_widget() {
6
 
7
-
8
- // Display whatever it is you want to show
9
- wp_email_capture_writetable(3, "<strong>".__('Last Three Members To Join','WPEC')."</strong><br/><br/>");
10
 
11
- $tempemails = wp_email_capture_count_temp();
12
 
13
- echo '<br/><br/><a name="list"></a><strong>'.__('Export','WPEC').'</strong>';
14
- echo '<form name="wp_email_capture_export" action="'. esc_url($_SERVER['REQUEST_URI']) . '#list" method="post">';
15
- 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>';
16
  echo '<input type="hidden" name="wp_email_capture_export" />';
17
- echo '<div class="submit"><input type="submit" value="'.__('Export List','WPEC').'" class="button" /></div>';
18
  echo "</form><br/><br/>";
19
 
20
  $tempemails = wp_email_capture_count_temp();
21
-
22
- echo "<a name='truncate'></a><strong>".__('Temporary e-mails','WPEC')."</strong>\n";
23
  echo '<form name="wp_email_capture_truncate" action="'. esc_url($_SERVER['REQUEST_URI']) . '#truncate" method="post">';
24
- echo '<label>'.__('There are','WPEC').' '. $tempemails . ' '.__('e-mail addresses that have been unconfirmed. Delete them to save space below.','WPEC').'</label>';
25
 
26
  echo '<input type="hidden" name="wp_email_capture_truncate"/>';
27
- echo '<div class="submit"><input type="submit" value="'.__('Delete Unconfirmed e-mail Addresses','WPEC').'" class="button" /></div>';
28
  echo "</form>";
29
 
30
 
@@ -32,17 +34,17 @@ function wp_email_capture_dashboard_widget() {
32
  }
33
 
34
 
35
-
 
 
 
 
36
  function wp_email_capture_add_dashboard_widgets() {
37
 
38
  if (current_user_can( apply_filters( 'wp_email_capture_dashboard_capability', 'manage_options' ) )){
39
-
40
- wp_add_dashboard_widget('wp_email_capture_dashboard_widget', __('WP Email Capture - At A Glance','WPEC'), 'wp_email_capture_dashboard_widget');
41
  }
42
- }
43
-
44
-
45
-
46
 
 
47
 
48
  ?>
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','wp-email-capture')."</strong><br/><br/>");
 
 
12
 
13
+ $tempemails = wp_email_capture_count_temp();
14
 
15
+ echo '<br/><br/><a name="list"></a><strong>'.__('Export','wp-email-capture').'</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','wp-email-capture').' <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','wp-email-capture').'" 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','wp-email-capture')."</strong>\n";
25
  echo '<form name="wp_email_capture_truncate" action="'. esc_url($_SERVER['REQUEST_URI']) . '#truncate" method="post">';
26
+ 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>';
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','wp-email-capture').'" class="button" /></div>';
30
  echo "</form>";
31
 
32
 
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','wp-email-capture'), 'wp_email_capture_dashboard_widget');
 
46
  }
 
 
 
 
47
 
48
+ }
49
 
50
  ?>
inc/{checks.php → deprecated/checks.php} RENAMED
@@ -1,17 +1,12 @@
1
  <?php
2
 
3
  /**
4
-
5
- Validate an email address.
6
-
7
- Provide email address (raw input)
8
-
9
- Returns true if the email address has the email
10
-
11
- address format and the domain exists.
12
-
13
  */
14
-
15
  if(!function_exists('checkdnsrr'))
16
  {
17
  function checkdnsrr($hostName, $recType = '')
@@ -31,8 +26,8 @@ if(!function_exists('checkdnsrr'))
31
  }
32
  return false;
33
  }
34
- }
35
-
36
  function addLastCharacter($url)
37
  {
38
  $last = $url[strlen($url)-1];
@@ -42,7 +37,7 @@ function addLastCharacter($url)
42
  }
43
  return $url;
44
  }
45
-
46
 
47
  /* function validEmail($email)
48
 
1
  <?php
2
 
3
  /**
4
+ * Validate an email address.
5
+ * Provide email address (raw input)
6
+ * Returns true if the email address has the email
7
+ * address format and the domain exists.
 
 
 
 
 
8
  */
9
+ /*
10
  if(!function_exists('checkdnsrr'))
11
  {
12
  function checkdnsrr($hostName, $recType = '')
26
  }
27
  return false;
28
  }
29
+ } */
30
+ /*
31
  function addLastCharacter($url)
32
  {
33
  $last = $url[strlen($url)-1];
37
  }
38
  return $url;
39
  }
40
+ */
41
 
42
  /* function validEmail($email)
43
 
inc/deprecated/pagedresults.php ADDED
@@ -0,0 +1,183 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+
4
+
5
+ class MySQLPagedResultSet
6
+
7
+ {
8
+
9
+
10
+
11
+ var $results;
12
+
13
+ var $pageSize;
14
+
15
+ var $page;
16
+
17
+ var $row;
18
+
19
+
20
+
21
+ function MySQLPagedResultSet($query,$pageSize)
22
+
23
+ {
24
+
25
+
26
+
27
+ $resultpage = $_GET['resultpage'];
28
+
29
+
30
+
31
+ $this->results = mysql_query($query);
32
+
33
+ $this->pageSize = $pageSize;
34
+
35
+ if ((int)$resultpage <= 0) $resultpage = 1;
36
+
37
+ if ($resultpage > $this->getNumPages())
38
+
39
+ $resultpage = $this->getNumPages();
40
+
41
+ $this->setPageNum($resultpage);
42
+
43
+ }
44
+
45
+
46
+
47
+ function getNumPages()
48
+
49
+ {
50
+
51
+ if (!$this->results) return FALSE;
52
+
53
+
54
+
55
+ return ceil(mysql_num_rows($this->results) /
56
+
57
+ (float)$this->pageSize);
58
+
59
+ }
60
+
61
+
62
+
63
+ function setPageNum($pageNum)
64
+
65
+ {
66
+
67
+ if ($pageNum > $this->getNumPages() or
68
+
69
+ $pageNum <= 0) return FALSE;
70
+
71
+
72
+
73
+ $this->page = $pageNum;
74
+
75
+ $this->row = 0;
76
+
77
+ mysql_data_seek($this->results,($pageNum-1) * $this->pageSize);
78
+
79
+ }
80
+
81
+
82
+
83
+ function getPageNum()
84
+
85
+ {
86
+
87
+ return $this->page;
88
+
89
+ }
90
+
91
+
92
+
93
+ function isLastPage()
94
+
95
+ {
96
+
97
+ return ($this->page >= $this->getNumPages());
98
+
99
+ }
100
+
101
+
102
+
103
+ function isFirstPage()
104
+
105
+ {
106
+
107
+ return ($this->page <= 1);
108
+
109
+ }
110
+
111
+
112
+
113
+ function fetchArray()
114
+
115
+ {
116
+
117
+ if (!$this->results) return FALSE;
118
+
119
+ if ($this->row >= $this->pageSize) return FALSE;
120
+
121
+ $this->row++;
122
+
123
+ return mysql_fetch_array($this->results);
124
+
125
+ }
126
+
127
+
128
+
129
+ function getPageNav($queryvars = '')
130
+
131
+ {
132
+
133
+ $nav = '';
134
+
135
+ if (!$this->isFirstPage())
136
+
137
+ {
138
+
139
+ $nav .= "<a href=\"?resultpage=".
140
+
141
+ ($this->getPageNum()-1).'&'.$queryvars.'">'.__('Prev','wp-email-capture').'</a> ';
142
+
143
+ }
144
+
145
+ if ($this->getNumPages() > 1)
146
+
147
+ for ($i=1; $i<=$this->getNumPages(); $i++)
148
+
149
+ {
150
+
151
+ if ($i==$this->page)
152
+
153
+ $nav .= "$i ";
154
+
155
+ else
156
+
157
+ $nav .= "<a href=\"?resultpage={$i}&".
158
+
159
+ $queryvars."\">{$i}</a> ";
160
+
161
+ }
162
+
163
+ if (!$this->isLastPage())
164
+
165
+ {
166
+
167
+ $nav .= "<a href=\"?resultpage=".
168
+
169
+ ($this->getPageNum()+1).'&'.$queryvars.'">'.__('Next','wp-email-capture').'</a> ';
170
+
171
+ }
172
+
173
+
174
+
175
+ return $nav;
176
+
177
+ }
178
+
179
+ }
180
+
181
+
182
+
183
+ ?>
inc/display.php CHANGED
@@ -1,100 +1,106 @@
1
  <?php
2
 
3
 
 
 
 
 
 
 
 
4
 
5
- function wp_email_capture_form($error = 0)
 
6
 
7
- {
 
 
8
 
9
- $url = get_option('home');
10
- $url = addLastCharacter($url);
11
 
12
- ?> <div id="wp_email_capture" class="wp-email-capture wp-email-capture-widget wp-email-capture-widget-worldwide"><form name="wp_email_capture" method="post" action="<?php echo $url; ?>">
13
 
14
- <?php if (isset($_GET['wp_email_capture_error'])) {
15
 
16
- $error = wp_email_capture_sanitize($_GET['wp_email_capture_error']);
17
 
18
- echo "<div class='wp-email-capture-error'>".__('Error:','WPEC'). " " .$error ."</div>";
19
 
20
- } ?>
21
 
22
- <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/>
23
 
24
- <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/>
25
 
26
- <input type="hidden" name="wp_capture_action" value="1" />
27
 
28
- <input name="Submit" type="submit" value="<?php _e('Submit','WPEC'); ?>" class="wp-email-capture-submit wp-email-capture-widget-worldwide" />
29
 
30
- </form>
31
 
32
- </div>
33
 
34
- <?php if (get_option("wp_email_capture_link") == 1) {
35
 
36
- echo "<p style='font-size:10px;'>".__('Powered by','WPEC')." <a href='http://wpemailcapture.com/' target='_blank'>WP Email Capture</a></p>\n";
37
 
38
  }
39
 
40
  }
41
 
42
 
 
 
 
 
 
 
 
 
43
 
44
- function wp_email_capture_form_page($error = 0)
 
 
 
45
 
46
- {
47
 
48
- $url = get_option('home');
49
- $url = addLastCharacter($url);
50
- $display = "";
51
- $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";
52
 
53
- if (isset($_GET['wp_email_capture_error'])) {
54
-
55
- $error = wp_email_capture_sanitize($_GET['wp_email_capture_error']);
56
-
57
- $display .= "<div class='wp-email-capture-error'>Error: ". " " . $error ."</div>\n";
58
 
59
  }
60
 
61
  $display .= "<label class='wp-email-capture-name wp-email-capture-label wp-email-capture-display-worldwide wp-email-capture-name-display wp-email-capture-name-label wp-email-capture-name-label-display";
62
-
63
- if (get_option("wp_email_capture_name_required") == 1) { $display .= " wp-email-capture-required"; }
64
-
65
- $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";
66
 
67
- $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";
 
 
 
 
68
 
69
  $display .= "<input type='hidden' name='wp_capture_action' value='1' />\n";
70
 
71
- $display .= "<input name='Submit' type='submit' value='".__('Submit','WPEC')."' class='wp-email-capture-submit' /></form></div>\n";
72
 
73
  if (get_option("wp_email_capture_link") == 1) {
74
 
75
- $display .= "<p style='font-size:10px;'>".__('Powered by','WPEC')." <a href='http://wpemailcapture.com/' target='_blank'>WP Email Capture</a></p>\n";
76
  }
77
 
78
-
79
 
80
  return $display;
81
 
82
  }
83
 
84
 
85
-
86
- /* function wp_email_capture_display_form_in_post($content)
87
- {
88
-
89
- $get_form = wp_email_capture_form_page();
90
-
91
- $content = str_replace("[wp_email_capture_form]", $get_form, $content);
92
-
93
- return $content;
94
- } */
95
-
96
-
97
-
98
-
99
 
100
  ?>
1
  <?php
2
 
3
 
4
+ /**
5
+ * Displays the WP Email Capture Form
6
+ *
7
+ * @param string $error The error message
8
+ * @return void
9
+ */
10
+ function wp_email_capture_form( $error = "" ) {
11
 
12
+ $url = get_option('home');
13
+ $url = trailingslashit($url);
14
 
15
+ ?>
16
+ <div id="wp_email_capture" class="wp-email-capture wp-email-capture-widget wp-email-capture-widget-worldwide">
17
+ <form name="wp_email_capture" method="post" action="<?php echo $url; ?>">
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
+ <input type="hidden" name="wp_capture_action" value="1" />
36
 
37
+ <input name="Submit" type="submit" value="<?php _e('Submit','wp-email-capture'); ?>" 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','wp-email-capture')." <a href='http://wpemailcapture.com/' target='_blank'>WP Email Capture</a></p>\n";
46
 
47
  }
48
 
49
  }
50
 
51
 
52
+ /**
53
+ * Build the WP Email Capture Form - used for shortcodes.
54
+ *
55
+ * @param array $atts Any attributes included in the shrotcode.
56
+ * @param string $error The error message
57
+ * @return string The built form.
58
+ */
59
+ function wp_email_capture_form_page( $atts, $error = "") {
60
 
61
+ $url = get_option('home');
62
+ $url = trailingslashit($url);
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:','wp-email-capture'). " " . $error ."</div>\n";
 
 
 
 
71
 
72
  }
73
 
74
  $display .= "<label class='wp-email-capture-name wp-email-capture-label wp-email-capture-display-worldwide wp-email-capture-name-display wp-email-capture-name-label wp-email-capture-name-label-display";
 
 
 
 
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:','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";
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:','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";
81
 
82
  $display .= "<input type='hidden' name='wp_capture_action' value='1' />\n";
83
 
84
+ $display .= "<input name='Submit' type='submit' value='".__('Submit','wp-email-capture')."' 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','wp-email-capture')." <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 );
92
 
93
  return $display;
94
 
95
  }
96
 
97
 
98
+ /**
99
+ * Process the WP Email Capture Form, including any attributes
100
+ * @return void
101
+ */
102
+ function wp_email_capture_form_process_atts( $atts ) {
103
+ return wp_email_capture_form_page( $atts );
104
+ }
 
 
 
 
 
 
 
105
 
106
  ?>
inc/enqueue.php CHANGED
@@ -1,9 +1,23 @@
1
  <?php
2
 
 
 
 
 
3
  function wp_email_capture_scripts() {
4
  /* Register our stylesheet. */
5
- wp_enqueue_style( 'wpemailcapturestyles', plugins_url('/css/wp-email-capture-styles.css',__FILE__), array(), '1.0' );
6
- }
7
- add_action( 'wp_enqueue_scripts', 'wp_email_capture_scripts' );
 
 
 
 
 
 
 
 
 
 
8
 
9
  ?>
1
  <?php
2
 
3
+ /**
4
+ * Enqueue stylesheets associated with the plugin.
5
+ * @return void
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
+
13
+ /**
14
+ * Enqueue stylesheets associated with the plugin.
15
+ * @return void
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
  ?>
inc/exportcsv.php CHANGED
@@ -1,50 +1,43 @@
1
  <?php
2
 
 
 
 
 
 
 
3
 
4
 
5
-
6
-
7
- function wp_email_capture_export()
8
-
9
- {
10
-
11
  global $wpdb;
12
- $delimeter = get_option('wp_email_capture_name_delimeter');
13
- if (!$delimeter)
14
- {
15
- $delimeter = ",";
16
- }
17
- $csv_output = "";
18
 
19
- $csv_output .= __('Name','WPEC').$delimeter.__('Email','WPEC');
 
 
20
 
 
 
21
  $csv_output .= "\n";
22
 
 
23
 
 
24
 
25
-
26
-
27
- $table_name = $wpdb->prefix . "wp_email_capture_registered_members";
28
-
29
- $sql = "SELECT name, email FROM " . $table_name;
30
-
31
- $results = $wpdb->get_results($sql);
32
-
33
- foreach ($results as $result) {
34
 
35
- $csv_output .= $result->name .$delimeter. $result->email ."\n";
36
 
37
  }
38
 
39
 
40
- $file = 'WP_Email_Capture';
41
- $filename = $file."_".date("Y-m-d_H-i",time());
42
 
43
- header("Content-type: application/vnd.ms-excel");
44
 
45
- header("Content-disposition: csv" . date("Y-m-d") . ".csv");
46
 
47
- header( "Content-disposition: filename=".$filename.".csv");
48
 
49
  print $csv_output;
50
 
@@ -54,4 +47,4 @@ function wp_email_capture_export()
54
 
55
 
56
 
57
- ?>
1
  <?php
2
 
3
+ /**
4
+ * Function that exports the captured lists in a CSV format.
5
+ *
6
+ * @return void
7
+ */
8
+ function wp_email_capture_export() {
9
 
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
 
22
+ $registered_members_sql = apply_filters( 'wpec_change_export_sql', "SELECT name, email FROM " . WP_EMAIL_CAPTURE_REGISTERED_MEMBERS_TABLE );
23
 
24
+ $registered_members = $wpdb->get_results( $registered_members_sql );
25
 
26
+ foreach ( $registered_members as $member ) {
 
 
 
 
 
 
 
 
27
 
28
+ $csv_output .= $member->name .$delimeter. $member->email ."\n";
29
 
30
  }
31
 
32
 
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
 
47
 
48
 
49
 
50
+ ?>
inc/functions.php CHANGED
@@ -1,82 +1,173 @@
1
- <?php
2
 
3
- function wp_email_capture_sanitize($string)
4
  {
5
 
6
- $string = esc_attr($string);
7
 
8
- $string = htmlspecialchars($string, ENT_QUOTES, 'UTF-8');
9
 
10
- return $string;
11
 
12
  }
 
13
 
 
 
 
 
 
 
 
14
 
 
15
 
16
- function wp_email_capture_checkIfPresent($email){
 
 
 
17
 
18
- global $wpdb;
19
 
20
- $table_name = $wpdb->prefix . "wp_email_capture_registered_members";
21
 
22
- $sql = 'SELECT COUNT(*)
23
 
24
- FROM '. $table_name . ' WHERE email = "%s"';
25
-
26
- $prep = $wpdb->prepare($sql,$email);
27
 
28
- $result = $wpdb->get_var($prep);
29
-
30
- if($result > 0)
31
 
32
- {
33
 
34
- return true;
35
 
36
- }else{
37
 
38
- return false;
39
 
40
- }
 
 
 
 
 
 
 
 
 
41
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
42
  }
43
 
44
 
45
-
46
- function wp_email_capture_admin_notice() {
47
- global $current_user ;
48
- $user_id = $current_user->ID;
49
- /* Check that the user hasn't already clicked to ignore the message */
50
- if (!get_user_meta($user_id, 'example_ignore_notice')) {
51
- if (get_option('wp_email_capture_signup')=="" || get_option('wp_email_capture_redirection')=="") {
52
- echo '<div class="error"><p>';
53
- printf(__('<strong>Please Note: </strong> You have not created a subscription page, confirmation page or both in WP Email Capture, please go to the WP Email Capture Settings Page to add them. | <a href="%1$s">Hide Notice</a>'), '?wp_email_capture_nag_ignore=0');
54
- echo "</p></div>";
55
-
56
- }
57
- }
 
 
 
 
 
 
 
 
 
 
 
 
58
  }
59
 
 
 
 
 
 
60
  function wp_email_capture_nag_ignore() {
61
- global $current_user;
62
- $user_id = $current_user->ID;
63
- /* If user clicks to ignore the notice, add that to their user meta */
64
- if ( isset($_GET['wp_email_capture_nag_ignore']) && '0' == $_GET['wp_email_capture_nag_ignore'] ) {
65
- add_user_meta($user_id, 'wp_email_capture_ignore_notice', 'true', true);
66
- }
 
 
 
 
 
 
 
 
 
 
67
  }
68
 
 
 
 
 
 
 
69
  function wp_email_capture_fetch_rss_feed() {
70
- include_once(ABSPATH . WPINC . '/feed.php');
71
- $rss = fetch_feed("http://wpemailcapture.com/feed?cat=-4");
72
-
73
- if ( is_wp_error($rss) ) { return false; }
74
-
75
- $rss_items = $rss->get_items(0, 5);
76
-
77
- return $rss_items;
 
78
 
79
  }
80
 
81
 
82
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
 
3
+ /* function wp_email_capture_sanitize($string)
4
  {
5
 
6
+ $string = esc_attr($string);
7
 
8
+ $string = htmlspecialchars($string, ENT_QUOTES, 'UTF-8');
9
 
10
+ return $string;
11
 
12
  }
13
+ */
14
 
15
+ /**
16
+ * Check if the email is already present in the list.
17
+ *
18
+ * @param string $email The email address to check
19
+ * @return boolean TRUE if the email is present, FALSE if not.
20
+ */
21
+ function wp_email_capture_checkIfPresent( $email ) {
22
 
23
+ global $wpdb;
24
 
25
+ $get_email = '
26
+ SELECT COUNT(*)
27
+ FROM ' . WP_EMAIL_CAPTURE_REGISTERED_MEMBERS_TABLE . '
28
+ WHERE email = "%s"';
29
 
30
+ $prepared_get_email = $wpdb->prepare( $get_email, $email );
31
 
32
+ $number_of_email_instances = $wpdb->get_var( $prepared_get_email );
33
 
34
+ if ( $number_of_email_instances > 0 ) {
35
 
36
+ return true;
 
 
37
 
38
+ } else {
 
 
39
 
40
+ return false;
41
 
42
+ }
43
 
44
+ }
45
 
 
46
 
47
+ /**
48
+ * Add admin notices:-
49
+ *
50
+ * If the user tracking option isn't present, asks the user to set it.
51
+ *
52
+ * If the user hasn't set up WP Email Capture, encourage it.
53
+ *
54
+ * @return void
55
+ */
56
+ function wp_email_capture_admin_notice() {
57
 
58
+ /* Check Tracking First */
59
+ if ( !get_option( 'wpec_set_tracking' ) && current_user_can('activate_plugins') ) {
60
+ echo '<div class="updated">';
61
+ echo '<h4>';
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>';
69
+ } else {
70
+ global $current_user ;
71
+ $user_id = $current_user->ID;
72
+ /* Check that the user hasn't already clicked to ignore the message */
73
+ if ( !get_user_meta( $user_id, 'wp_email_capture_setup_ignore' ) ) {
74
+ if ( get_option( 'wp_email_capture_signup' ) == "" || get_option( 'wp_email_capture_redirection' ) == "" ) {
75
+ echo '<div class="error"><p>';
76
+ printf( __( '<strong>Please Note: </strong> You have not created a subscription page, confirmation page or both in WP Email Capture, please go to the WP Email Capture Settings Page to add them. | <a href="%1$s">Hide Notice</a>' ), '?wp_email_capture_setup_ignore=0' );
77
+ echo "</p></div>";
78
+ }
79
+ }
80
+ }
81
  }
82
 
83
 
84
+ /**
85
+ * If the user has over 500 emails, try to upsell.
86
+ *
87
+ * @return void
88
+ */
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 */
96
+
97
+ if ( !get_user_meta( $user_id, 'wp_email_capture_upsell_ignore' ) ) {
98
+ if ( 500 < wp_email_capture_get_number_of_registered_users() ) {
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>Upgrade WP Email Capture</strong></a></p></div>' ), '?wp_email_capture_upsell_ignore=0', $upgradeurl, $discountcode, $discountamount );
106
+ echo "</div>";
107
+ }
108
+ }
109
  }
110
 
111
+
112
+ /**
113
+ * If the user clicks "Dismiss Notice", we hide the notice for that user.
114
+ * @return void
115
+ */
116
  function wp_email_capture_nag_ignore() {
117
+
118
+ global $current_user;
119
+ $user_id = $current_user->ID;
120
+
121
+ /* If user clicks to ignore the notice, add that to their user meta */
122
+ if ( isset( $_GET['wp_email_capture_setup_ignore'] ) && '0' == $_GET['wp_email_capture_setup_ignore'] ) {
123
+ update_user_meta( $user_id, 'wp_email_capture_setup_ignore', 'true', true );
124
+ }
125
+
126
+ if ( isset( $_GET['wp_email_capture_upsell_ignore'] ) && '0' == $_GET['wp_email_capture_upsell_ignore'] ) {
127
+ update_user_meta( $user_id, 'wp_email_capture_upsell_ignore', 'true', true );
128
+ }
129
+
130
+ if ( isset( $_GET[ 'wp_email_capture_tracking' ] ) ) {
131
+ update_option( 'wpec_set_tracking', $_GET['wp_email_capture_tracking'] );
132
+ }
133
  }
134
 
135
+
136
+ /**
137
+ * Fetch the WP Email Capture RSS Feed
138
+ *
139
+ * @return mixed RSS object should the feed return correctly, FALSE if not.
140
+ */
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
+
148
+ $rss_items = $rss->get_items( 0, 5 );
149
+
150
+ return $rss_items;
151
 
152
  }
153
 
154
 
155
+ /**
156
+ * Get the number of registered valid email addresses.
157
+ *
158
+ * @return int The Number of Registered users.
159
+ */
160
+ 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
+
169
+ return $get_number_of_regs;
170
+
171
+ }
172
+
173
+ ?>
inc/help.php ADDED
@@ -0,0 +1,180 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Help Text for the free version.
5
+ *
6
+ * @return void
7
+ */
8
+ function wp_email_capture_free_help() {
9
+ ?>
10
+
11
+ <div class="wrap">
12
+ <div style="width:70%;float:left;clear:both;" class="postbox-container">
13
+ <div class="metabox-holder">
14
+ <div class="meta-box-sortables">
15
+ <h2><?php echo __( 'WP Email Capture - Help', 'wp-email-capture' ); ?></h2>
16
+ <?php
17
+ /**
18
+ * Action to control the display of the help boxes on the help page.
19
+ *
20
+ * Hook into this to add/remove help boxes should there be a change between free & premium.
21
+ */
22
+ do_action( 'wp_email_capture_help_boxes' ); ?>
23
+ </div>
24
+ </div>
25
+ </div>
26
+ <?php
27
+ wp_email_capture_admin_sidebar( "getwpemailcapturepremiumdescription,affiliates,news,supportus" );
28
+ ?>
29
+ </div>
30
+ <?php
31
+ }
32
+
33
+
34
+ /**
35
+ * Displays the help for the "Setup" section of the help documentation.
36
+ *
37
+ * @return void
38
+ */
39
+ function wp_email_capture_setup_help() {
40
+ /**
41
+ * Filter for the settings page URL for WP Email Capture
42
+ *
43
+ * This allows us to change it should something change between the versions.
44
+ *
45
+ * @var string
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
+
73
+
74
+
75
+ /**
76
+ * Displays the help for the "Options" section of the help documentation.
77
+ *
78
+ * @return void
79
+ */
80
+ function wp_email_capture_options_help() {
81
+
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 );
106
+
107
+
108
+ /**
109
+ * Displays the help for the "Display" section of the help documentation.
110
+ *
111
+ * @return void
112
+ */
113
+ function wp_email_capture_display_help() {
114
+
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>
123
+ <tr valign="top">
124
+ <td>
125
+
126
+ <p><?php _e( 'Once the form is set up, you need to display the form on the front end of your website using one of a few methods:-', 'wp-email-capture' ); ?></p>
127
+
128
+ <p><?php printf( __( '<strong>Widgets:</strong> To display the WP Email Capture form in a Widget, go to <a href="%s">your widgets page</a>, and drag the WP Email Capture widget to any widget area you have. You can add a title and text before the widget as well to try and entice subscriptions.', 'wp-email-capture' ), $widgetpageurl ); ?></p>
129
+ <p><?php printf( __( '<strong>In Posts/Pages:</strong> To display the WP Email Capture Form in posts or pages, you can use the shortcode. [wp_email_capture_form]. This shortcode doesn\'t have any attributes.', 'wp-email-capture' ) ); ?></p>
130
+ <p><?php printf( __( '<strong>In PHP:</strong> To display the WP Email Capture Form in PHP, add <code>&lt;?php if (function_exists(\'wp_email_capture_form\')) { wp_email_capture_form(); } ?&gt;</code> to your template.', 'wp-email-capture' ) ); ?></p>
131
+
132
+ </td>
133
+ </tr>
134
+ </tbody>
135
+ </table>
136
+
137
+ <?php
138
+ } add_action( 'wp_email_capture_help_boxes', 'wp_email_capture_display_help', 30 );
139
+
140
+
141
+
142
+ /**
143
+ * Displays the help for the "List Operations" section of the help documentation.
144
+ *
145
+ * @return void
146
+ */
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>
165
+ <p><?php printf( __( '<strong>Delete All Email Addresses:</strong> This will delete <em>all</em> email addresses in the system, both confirmed and unconfirmed. Please use with caution!', 'wp-email-capture' ) ); ?></p>
166
+
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>','wp-email-capture' ), $purchasepageurl );
171
+ }
172
+ ?>
173
+
174
+ </td>
175
+ </tr>
176
+ </tbody>
177
+ </table>
178
+
179
+ <?php
180
+ } add_action( 'wp_email_capture_help_boxes', 'wp_email_capture_list_help', 40 );
inc/install.php CHANGED
@@ -1,75 +1,71 @@
1
- <?php
2
-
3
-
4
 
 
 
 
 
 
5
  function wp_email_capture_install() {
6
 
7
- global $wpdb;
8
 
9
- global $wp_email_capture_db_version;
10
 
11
- require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
12
 
13
- $table_name = $wpdb->prefix . "wp_email_capture_registered_members";
14
 
15
- if($wpdb->get_var("show tables like '$table_name'") != $table_name) {
16
 
17
-
18
 
19
- $sql = "CREATE TABLE " . $table_name . " (
20
 
21
- id INT( 255 ) NOT NULL AUTO_INCREMENT ,
22
 
23
- name TINYTEXT NOT NULL ,
24
 
25
- email TEXT NOT NULL ,
26
 
27
- PRIMARY KEY (id)
28
 
29
- );";
30
 
31
- dbDelta($sql);
32
 
33
  }
34
 
35
- $table_name = $wpdb->prefix . "wp_email_capture_temp_members";
36
-
37
- if($wpdb->get_var("show tables like '$table_name'") != $table_name) {
38
-
39
-
40
 
41
- $sql = "CREATE TABLE " . $table_name . " (
42
 
43
- id INT( 255 ) NOT NULL AUTO_INCREMENT ,
44
 
45
- name TINYTEXT NOT NULL ,
46
 
47
- email TEXT NOT NULL ,
48
 
49
-
50
 
51
- confirm_code TEXT NOT NULL,
52
 
53
- PRIMARY KEY (id)
54
 
55
- );";
56
-
57
-
58
-
59
- dbDelta($sql);
60
-
61
-
62
 
 
63
 
 
64
 
65
  }
66
- $from = get_option('admin_email');
67
- add_option('wp_email_capture_link', 1);
68
- add_option('wp_email_capture_from',$from);
69
- add_option("wp_email_capture_db_version", $wp_email_capture_db_version);
 
70
 
71
  }
72
 
73
 
74
 
75
- ?>
1
+ <?php
 
 
2
 
3
+ /**
4
+ * Set up the WP Email Capture Database Tables.
5
+ *
6
+ * @return void
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
+ ?>
inc/js/admin-custom.js ADDED
@@ -0,0 +1,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
+ });
inc/options.php CHANGED
@@ -1,277 +1,344 @@
1
- <?php
2
 
 
 
 
 
3
  function wp_email_capture_menus() {
4
-
5
- add_options_page(__('WP Email Capture Options','WPEC'), 'WP Email Capture', 'activate_plugins', 'wpemailcaptureoptions', 'wp_email_capture_options');
6
-
 
 
7
  }
8
 
9
 
 
 
 
 
 
 
 
10
 
11
- function wp_email_capture_options() {
12
-
13
- echo '<div class="wrap">';
14
- echo '<div style="width:70%;float:left;clear:both;" class="postbox-container">';
15
- echo '<div class="metabox-holder"><div class="meta-box-sortables">';
16
-
17
-
18
- echo '<h2>'.__('WP Email Capture Options','WPEC').'</h2>';
19
-
20
- ?>
21
 
22
- <!-- <h3><?php _e('Recommendations','WPEC'); ?></h3>
23
 
24
- <p><?php _e('We recommend','WPEC'); ?> <a href="http://wpemailcapture.com/recommends/aweber" title="Email Marketing">Aweber</a> <?php _e('to run your email campaigns. We have tested this plugin with it.','WPEC'); ?>
 
 
25
 
26
- </p>
 
 
 
 
27
 
28
- <table width="75%" border="0">
 
29
 
30
- <tr>
31
 
32
- <td><div style="text-align:center;">
33
 
34
- <a href="http://wpemailcapture.com/recommends/aweber" title="Email Marketing">
35
-
36
- <img src="http://www.aweber.com/banners/email_marketing_easy/726x90.gif" alt="AWeber - Email Marketing Made Easy" style="border:none;" /></a>
37
-
38
- </div></td>
39
-
40
- </tr>
41
-
42
- </table> -->
43
- <p>
44
-
45
- <?php
46
 
47
-
48
 
49
- echo '<h3>'.__('Options','WPEC').'</h3>';
50
 
51
- ?>
52
 
53
-
 
54
 
55
- </p>
 
 
 
 
 
 
 
 
 
 
56
 
57
- <form method="post" action="options.php">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
 
59
- <?php wp_nonce_field('update-options'); ?>
60
 
61
- <?php settings_fields( 'wp-email-capture-group' ); ?>
62
 
63
- <table class="form-table">
 
 
 
 
 
64
 
65
- <tbody>
 
 
 
 
66
 
67
- <tr valign="top">
68
 
69
- <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/)','WPEC'); ?></th>
70
 
71
- <td><input type="text" name="wp_email_capture_signup" class="regular-text code" value="<?php echo get_option('wp_email_capture_signup'); ?>" /></td>
72
 
73
- </tr>
74
 
75
- <tr valign="top">
76
 
77
- <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/)','WPEC'); ?></label></th>
78
 
79
- <td><input type="text" name="wp_email_capture_redirection" class="regular-text code" value="<?php echo get_option('wp_email_capture_redirection'); ?>" /></td>
80
 
81
- </tr>
82
 
83
- <tr valign="top">
84
 
85
- <th scope="row" style="width:400px"><label for="wp_email_capture_from"><?php _e('From Which Email Address','WPEC'); ?></label></th>
86
 
87
- <td><input type="text" name="wp_email_capture_from" class="regular-text code" value="<?php echo get_option('wp_email_capture_from'); ?>" /></td>
88
 
89
- </tr>
90
 
91
- <tr valign="top">
92
 
93
- <th scope="row" style="width:400px"><label for="wp_email_capture_from_name"><?php _e('From Which Name','WPEC'); ?></label></th>
94
 
95
- <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>
96
 
97
- </tr>
98
 
99
- <tr valign="top">
100
 
101
- <th scope="row" style="width:400px"><?php _e('Subject of Email','WPEC'); ?></th>
102
 
103
- <td><input type="text" name="wp_email_capture_subject" class="regular-text code" value="<?php echo get_option('wp_email_capture_subject'); ?>" /></td>
104
 
105
- </tr>
106
 
107
- <tr valign="top">
108
 
109
- <th scope="row" style="width:400px"><label for="wp_email_capture_body"><?php _e('Body of Email','WPEC'); ?><br>
110
- <?php _e('(use %NAME% to use the form\'s &quot;Name&quot; field in their welcome email)','WPEC'); ?></label></th>
111
 
112
- <td><textarea name="wp_email_capture_body" style="width: 25em;"><?php echo get_option('wp_email_capture_body'); ?></textarea></td>
113
 
114
- </tr>
115
 
116
- <tr valign="top">
117
 
118
- <th scope="row" style="width:400px"><label><?php _e('Link to us (optional, but appreciated)','WPEC'); ?></label></th>
119
 
120
- <td><input type="checkbox" name="wp_email_capture_link" value="1"
121
 
122
- <?php
 
 
123
 
124
- if (get_option('wp_email_capture_link') == 1) { echo "checked"; } ?>
125
 
126
- /></td>
127
 
128
- </tr>
129
 
130
- <tr valign="top">
131
 
132
- <th scope="row" style="width:400px"><label><?php _e('Make The "Name" field a required field?','WPEC'); ?></label></th>
133
 
134
- <td><input type="checkbox" name="wp_email_capture_name_required" value="1"
135
 
136
- <?php
137
 
138
- if (get_option('wp_email_capture_name_required') == 1) { echo "checked"; } ?>
139
 
140
- /></td>
141
 
142
- </tr>
143
 
144
- <tr valign="top">
145
 
146
- <th scope="row" style="width:400px"><?php _e('Delimeter (leave blank for a comma)','WPEC'); ?></th>
147
 
148
- <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>
149
 
150
- </tr>
151
 
152
- </tbody>
153
 
154
- </table>
155
 
 
156
 
 
157
 
158
- <input type="hidden" name="action" value="update" />
159
 
160
- <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" />
161
 
162
- <p class="submit">
163
 
164
- <input type="submit" class="button-primary" value="<?php _e('Save Changes','WPEC') ?>" />
165
 
166
- </p>
167
 
168
- </form>
169
 
 
170
 
 
171
 
172
- <?php
173
-
174
- wp_email_capture_writetable();
175
-
176
- echo '<a name="list"></a><h3>'.__('Export','WPEC').'</h3>';
177
-
178
- echo '<form name="wp_email_capture_export" action="'. esc_url($_SERVER['REQUEST_URI']) . '#list" method="post">';
179
-
180
- echo '<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>','WPEC').'</label>';
181
-
182
- echo '<input type="hidden" name="wp_email_capture_export" />';
183
 
184
- echo '<div class="submit"><input type="submit" value="'.__('Export List','WPEC').'" class="button" /></div>';
 
 
 
 
185
 
186
- echo "</form>";
187
 
188
- $tempemails = wp_email_capture_count_temp();
189
 
190
- echo "<a name='truncate'></a><h3>".__('Temporary e-mails','WPEC')."</h3>\n";
191
 
192
- echo '<form name="wp_email_capture_truncate" action="'. esc_url($_SERVER['REQUEST_URI']) . '#truncate" method="post">';
193
 
194
- echo '<label>'.__('There are','WPEC').' '. $tempemails . ' '.__('e-mail addresses that have been unconfirmed. Delete them to save space below.','WPEC').'</label>';
195
 
196
- echo '<input type="hidden" name="wp_email_capture_truncate"/>';
197
 
198
- echo '<div class="submit"><input type="submit" value="'.__('Delete Unconfirmed e-mail Addresses','WPEC').'" class="button" /></div>';
199
 
200
- echo "</form>";
201
 
202
- echo "<a name='emptyallemails'></a><h3>".__('Delete Current List','WPEC')."</h3>\n";
203
 
204
- echo '<form name="wp_email_capture_delete" action="'. esc_url($_SERVER['REQUEST_URI']) . '#delete" method="post">';
205
 
206
- 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.','WPEC').'</label>';
207
 
208
- echo '<input type="hidden" name="wp_email_capture_delete"/>';
209
 
210
- echo '<div class="submit"><input type="submit" value="'.__('Delete Confirmed e-mail Addresses','WPEC').'" class="button" /></div>';
211
 
212
- echo "</form>";
213
 
214
- echo '</div></div></div>';
215
 
216
- wp_email_capture_admin_sidebar("getwpemailcapturepremiumdescription,affiliates,news,supportus");
217
 
218
  echo '</div>';
219
- ?>
220
 
221
 
222
- <?php }
223
-
224
 
225
 
 
 
 
 
 
226
  function wp_email_capture_options_process() { // whitelist options
227
 
228
- register_setting( 'wp-email-capture-group', 'wp_email_capture_signup' );
229
 
230
- register_setting( 'wp-email-capture-group', 'wp_email_capture_redirection' );
231
 
232
- register_setting( 'wp-email-capture-group', 'wp_email_capture_from' );
233
 
234
- register_setting( 'wp-email-capture-group', 'wp_email_capture_subject' );
235
 
236
- register_setting( 'wp-email-capture-group', 'wp_email_capture_body' );
237
 
238
- register_setting( 'wp-email-capture-group', 'wp_email_capture_link');
239
 
240
- register_setting( 'wp-email-capture-group', 'wp_email_capture_from_name' );
241
-
242
- register_setting( 'wp-email-capture-group', 'wp_email_capture_name_required' );
243
 
244
- register_setting( 'wp-email-capture-group', 'wp_email_capture_name_delimeter' );
245
 
246
- if(isset($_REQUEST['wp_email_capture_export'])) {
247
 
248
- wp_email_capture_export();
249
 
250
- }
251
 
 
252
 
253
- if(isset($_REQUEST['wp_email_capture_deleteid'])) {
254
- $wpemaildeleteid = $_POST['wp_email_capture_deleteid'];
255
- wp_email_capture_deleteid($wpemaildeleteid);
256
- }
257
-
258
 
259
- if(isset($_REQUEST['wp_email_capture_truncate'])) {
260
 
261
-
262
 
263
- wp_email_capture_truncate();
264
 
265
- }
266
 
267
- if(isset($_REQUEST['wp_email_capture_delete'])) {
268
 
269
-
270
 
271
- wp_email_capture_delete();
272
 
273
- }
 
 
 
274
 
275
  }
276
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
277
  ?>
1
+ <?php
2
 
3
+ /**
4
+ * Set up the WP Email Capture Menus
5
+ * @return void
6
+ */
7
  function wp_email_capture_menus() {
8
+ $avatar = WP_EMAIL_CAPTURE_URL . '/images/wpemailcapture-dashicon.png';
9
+ //add_options_page( __( 'WP Email Capture Options', 'wp-email-capture' ), 'WP Email Capture', 'activate_plugins', 'wpemailcaptureoptions', 'wp_email_capture_options' );
10
+ add_menu_page(__('WP Email Capture'),__('WP Email Capture','wp-email-capture'), 'activate_plugins', 'wpemailcapture', 'wp_email_capture_dashboard',$avatar,85);
11
+ add_submenu_page('wpemailcapture',__('Settings'), __('Settings','wp-email-capture'), 'activate_plugins', 'wpemailcapturefreesettings', 'wp_email_capture_free_options');
12
+ add_submenu_page('wpemailcapture',__('Help'), __('Help','wp-email-capture'), 'activate_plugins', 'wpemailcapturefreehelp', 'wp_email_capture_free_help');
13
  }
14
 
15
 
16
+ /**
17
+ * Contents of the WP Email Capture Dashboard Page
18
+ *
19
+ * @todo Build this
20
+ * @return void
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.', 'wp-email-capture'); ?></p>
45
 
46
+ <p><a class="non-nav-tab" href="#changelog" id="changelog-tab"><?php _e( 'Read the changelog', 'wp-email-capture'); ?></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.', 'wp-email-capture'); ?></p>
61
+ <h3><?php _e( '3.1 Changes', 'wp-email-capture' ); ?></h3>
62
+ <ul>
63
+ <li><?php echo 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/' ); ?></li>
64
+ <li><?php _e( 'Changed word from "Update" to "Upgrade" for large lists as it was confusing people.','wp-email-capture' ); ?></li>
65
+ <li><?php _e( 'Changed to new Text Domain as per WordPress new internationalisation integration (wp-email-capture).', 'wp-email-capture' ); ?></li>
66
+ </ul>
67
+ </div>
68
 
69
+ <div id="credits" class="wpemailcapture-tab">
70
+ <h2><?php _e( 'Credits', 'wp-email-capture' ); ?></h2>
71
+ <p><?php _e( 'This plugin has been helped and improved by the following people', 'wp-email-capture' ); ?></p>
72
+ <ul>
73
+ <li><?php echo sprintf( __( '<strong>3.1:</strong> <a href="%s" target="_blank">Hassan Raza</a>','wp-email-capture' ), 'http://hassan-raza.com/' ); ?></li>
74
+ </ul>
75
+ <h3><?php _e('Translations', 'wp-email-capture' ); ?></h3>
76
+ <ul>
77
+ <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>
78
+ <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>
79
+ <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>
80
+ <li><?php echo sprintf( __( '<strong>Dutch Translation:</strong> <a href="%s" target="_blank">Sander</a>', 'wp-email-capture' ), 'http://www.zanderz.net/' ); ?></li>
81
+ <li><?php echo sprintf( __( '<strong>Hungarian Translation:</strong> <a href="%s" target="_blank">Surbma</a>', 'wp-email-capture' ), 'http://surbma.hu/' ); ?></li>
82
+ <li><?php echo sprintf( __( '<strong>Spanish Translation:</strong> <a href="%s" target="_blank">David Bravo</a>' , 'wp-email-capture' ), 'http://dimensionmultimedia.com' ); ?></li>
83
+ <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>
84
+ <li><?php echo sprintf( __( '<strong>Serbian Translation:</strong> <a href="%s" target="_blank">Borisa Djuraskovic</a>' , 'wp-email-capture' ), 'http://www.webhostinghub.com/' ); ?></li>
85
+ <li><?php echo sprintf( __( '<strong>Croatian Translation:</strong> <a href="%s" target="_blank">Lem Treursić</a>' , 'wp-email-capture' ), 'http://grafika-dizajn.com/' ); ?></li>
86
+ </ul>
87
+ <h3><?php _e( 'Contribute?', 'wp-email-capture' ); ?></h3>
88
+ <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>
89
+ </div>
90
+ </div>
91
+ <?php
92
 
93
+ }
94
 
 
95
 
96
+ /**
97
+ * Contents of the WP Email Capture Options Page
98
+ *
99
+ * @return void
100
+ */
101
+ function wp_email_capture_free_options() {
102
 
103
+ echo '<div class="wrap">
104
+ <div style="width:70%;float:left;clear:both;" class="postbox-container">
105
+ <div class="metabox-holder"><div class="meta-box-sortables">
106
+ <h2>'.__( 'WP Email Capture Options', 'wp-email-capture' ).'</h2>
107
+ <h3>'.__( 'Options', 'wp-email-capture' ).'</h3>';
108
 
109
+ ?>
110
 
111
+ <form method="post" action="options.php">
112
 
113
+ <?php wp_nonce_field( 'update-options' ); ?>
114
 
115
+ <?php settings_fields( 'wp-email-capture-group' ); ?>
116
 
117
+ <table class="form-table">
118
 
119
+ <tbody>
120
 
121
+ <tr valign="top">
122
 
123
+ <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>
124
 
125
+ <td><input type="text" name="wp_email_capture_signup" class="regular-text code" value="<?php echo get_option( 'wp_email_capture_signup' ); ?>" /></td>
126
 
127
+ </tr>
128
 
129
+ <tr valign="top">
130
 
131
+ <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>
132
 
133
+ <td><input type="text" name="wp_email_capture_redirection" class="regular-text code" value="<?php echo get_option( 'wp_email_capture_redirection' ); ?>" /></td>
134
 
135
+ </tr>
136
 
137
+ <tr valign="top">
138
 
139
+ <th scope="row" style="width:400px"><label for="wp_email_capture_from"><?php _e( 'From Which Email Address', 'wp-email-capture' ); ?></label></th>
140
 
141
+ <td><input type="text" name="wp_email_capture_from" class="regular-text code" value="<?php echo get_option( 'wp_email_capture_from' ); ?>" /></td>
142
 
143
+ </tr>
144
 
145
+ <tr valign="top">
146
 
147
+ <th scope="row" style="width:400px"><label for="wp_email_capture_from_name"><?php _e( 'From Which Name', 'wp-email-capture' ); ?></label></th>
148
 
149
+ <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>
150
 
151
+ </tr>
 
152
 
153
+ <tr valign="top">
154
 
155
+ <th scope="row" style="width:400px"><?php _e( 'Subject of Email', 'wp-email-capture' ); ?></th>
156
 
157
+ <td><input type="text" name="wp_email_capture_subject" class="regular-text code" value="<?php echo get_option( 'wp_email_capture_subject' ); ?>" /></td>
158
 
159
+ </tr>
160
 
161
+ <tr valign="top">
162
 
163
+ <th scope="row" style="width:400px"><label for="wp_email_capture_body"><?php _e( 'Body of Email', 'wp-email-capture' ); ?><br>
164
+ <?php _e( '(use %NAME% to use the form\'s &quot;Name&quot; field in their welcome email)', 'wp-email-capture' ); ?></label>
165
+ </th>
166
 
167
+ <td><textarea name="wp_email_capture_body" style="width: 25em;"><?php echo get_option( 'wp_email_capture_body' ); ?></textarea></td>
168
 
169
+ </tr>
170
 
171
+ <tr valign="top">
172
 
173
+ <th scope="row" style="width:400px"><label><?php _e( 'Link to us (optional, but appreciated)', 'wp-email-capture' ); ?></label></th>
174
 
175
+ <td><input type="checkbox" name="wp_email_capture_link" value="1" <?php checked( get_option( 'wp_email_capture_link' ), 1 ); ?> /></td>
176
 
177
+ </tr>
178
 
179
+ <tr valign="top">
180
 
181
+ <th scope="row" style="width:400px"><label><?php _e( 'Make The "Name" field a required field?', 'wp-email-capture' ); ?></label></th>
182
 
183
+ <td><input type="checkbox" name="wp_email_capture_name_required" value="1" <?php checked( get_option( 'wp_email_capture_name_required' ), 1 ); ?> /></td>
184
 
185
+ </tr>
186
 
187
+ <tr valign="top">
188
 
189
+ <th scope="row" style="width:400px"><?php _e( 'Delimeter (leave blank for a comma)', 'wp-email-capture' ); ?></th>
190
 
191
+ <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>
192
 
193
+ </tr>
194
 
195
+ </tbody>
196
 
197
+ </table>
198
 
199
+ <input type="hidden" name="action" value="update" />
200
 
201
+ <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" />
202
 
203
+ <p class="submit">
204
 
205
+ <input type="submit" class="button-primary" value="<?php _e( 'Save Changes', 'wp-email-capture' ) ?>" />
206
 
207
+ </p>
208
 
209
+ </form>
210
 
 
211
 
 
212
 
213
+ <?php
214
 
215
+ wp_email_capture_writetable();
216
 
217
+ echo '<a name="list"></a><h3>'.__( 'Export', 'wp-email-capture' ).'</h3>
218
+ <form name="wp_email_capture_export" action="'. esc_url( $_SERVER['REQUEST_URI'] ) . '#list" method="post">
 
 
 
 
 
 
 
 
 
219
 
220
+ <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>
221
+ <input type="hidden" name="wp_email_capture_export" />
222
+ <div class="submit">
223
+ <input type="submit" value="'.__( 'Export List', 'wp-email-capture' ).'" class="button" />
224
+ </div>
225
 
226
+ </form>';
227
 
228
+ $tempemails = wp_email_capture_count_temp();
229
 
230
+ echo "<a name='truncate'></a><h3>".__( 'Temporary e-mails', 'wp-email-capture' )."</h3>\n";
231
 
232
+ echo '<form name="wp_email_capture_truncate" action="'. esc_url( $_SERVER['REQUEST_URI'] ) . '#truncate" method="post">';
233
 
234
+ 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>';
235
 
236
+ echo '<input type="hidden" name="wp_email_capture_truncate"/>';
237
 
238
+ echo '<div class="submit"><input type="submit" value="'.__( 'Delete Unconfirmed e-mail Addresses', 'wp-email-capture' ).'" class="button" /></div>';
239
 
240
+ echo "</form>";
241
 
242
+ echo "<a name='emptyallemails'></a><h3>".__( 'Delete Current List', 'wp-email-capture' )."</h3>\n";
243
 
244
+ echo '<form name="wp_email_capture_delete" action="'. esc_url( $_SERVER['REQUEST_URI'] ) . '#delete" method="post">';
245
 
246
+ 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>';
247
 
248
+ echo '<input type="hidden" name="wp_email_capture_delete"/>';
249
 
250
+ echo '<div class="submit"><input type="submit" value="'.__( 'Delete Confirmed e-mail Addresses', 'wp-email-capture' ).'" class="button" /></div>';
251
 
252
+ echo "</form>";
253
 
254
+ echo '</div></div></div>';
255
 
256
+ wp_email_capture_admin_sidebar( "getwpemailcapturepremiumdescription,affiliates,news,supportus" );
257
 
258
  echo '</div>';
259
+ ?>
260
 
261
 
262
+ <?php
263
+ }
264
 
265
 
266
+ /**
267
+ * Save the options from the WP Email Capture Options Page.
268
+ *
269
+ * @return void
270
+ */
271
  function wp_email_capture_options_process() { // whitelist options
272
 
273
+ register_setting( 'wp-email-capture-group', 'wp_email_capture_signup' );
274
 
275
+ register_setting( 'wp-email-capture-group', 'wp_email_capture_redirection' );
276
 
277
+ register_setting( 'wp-email-capture-group', 'wp_email_capture_from' );
278
 
279
+ register_setting( 'wp-email-capture-group', 'wp_email_capture_subject' );
280
 
281
+ register_setting( 'wp-email-capture-group', 'wp_email_capture_body' );
282
 
283
+ register_setting( 'wp-email-capture-group', 'wp_email_capture_link' );
284
 
285
+ register_setting( 'wp-email-capture-group', 'wp_email_capture_from_name' );
 
 
286
 
287
+ register_setting( 'wp-email-capture-group', 'wp_email_capture_name_required' );
288
 
289
+ register_setting( 'wp-email-capture-group', 'wp_email_capture_name_delimeter' );
290
 
291
+ if ( isset( $_REQUEST['wp_email_capture_export'] ) ) {
292
 
293
+ wp_email_capture_export();
294
 
295
+ }
296
 
297
+ if ( isset( $_REQUEST['wp_email_capture_deleteid'] ) ) {
298
+ $wpemaildeleteid = esc_attr( $_POST['wp_email_capture_deleteid'] );
299
+ wp_email_capture_deleteid( $wpemaildeleteid );
300
+ }
 
301
 
 
302
 
303
+ if ( isset( $_REQUEST['wp_email_capture_truncate'] ) ) {
304
 
305
+ wp_email_capture_truncate();
306
 
307
+ }
308
 
309
+ if ( isset( $_REQUEST['wp_email_capture_delete'] ) ) {
310
 
311
+ wp_email_capture_delete();
312
 
313
+ }
314
 
315
+ /**
316
+ * Action to hook into to register any other options.
317
+ */
318
+ do_action( 'wp_email_capture_added_option_process' );
319
 
320
  }
321
 
322
+
323
+ /**
324
+ * Box to upsell WP Email Capture Premium
325
+ *
326
+ * @return void
327
+ */
328
+ function wp_email_capture_premium_upsell() {
329
+ ?>
330
+ <h3><?php _e( 'Upgrade To WP Email Capture Premium', 'wp-email-capture' ); ?></h3>
331
+ <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>
332
+ <ul>
333
+ <li><?php _e( '<strong>Stat tracking</strong> - track the visitors to your site and where your sign ups come from.', 'wp-email-capture' ); ?></li>
334
+ <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>
335
+ <li><?php _e( '<strong>Multiple lists</strong> - Create multiple lists for your site.', 'wp-email-capture' ); ?></li>
336
+ <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>
337
+ <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>
338
+ </ul>
339
+ <p><?php _e( 'You also get premium support for a whole year!', 'wp-email-capture' ); ?></p>
340
+ <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>
341
+ <?php
342
+ } add_action( 'wp_email_capture_dashboard_premium_upsell', 'wp_email_capture_premium_upsell' );
343
+
344
  ?>
inc/pagedresults.php DELETED
@@ -1,183 +0,0 @@
1
- <?php
2
-
3
-
4
-
5
- class MySQLPagedResultSet
6
-
7
- {
8
-
9
-
10
-
11
- var $results;
12
-
13
- var $pageSize;
14
-
15
- var $page;
16
-
17
- var $row;
18
-
19
-
20
-
21
- function MySQLPagedResultSet($query,$pageSize)
22
-
23
- {
24
-
25
-
26
-
27
- $resultpage = $_GET['resultpage'];
28
-
29
-
30
-
31
- $this->results = mysql_query($query);
32
-
33
- $this->pageSize = $pageSize;
34
-
35
- if ((int)$resultpage <= 0) $resultpage = 1;
36
-
37
- if ($resultpage > $this->getNumPages())
38
-
39
- $resultpage = $this->getNumPages();
40
-
41
- $this->setPageNum($resultpage);
42
-
43
- }
44
-
45
-
46
-
47
- function getNumPages()
48
-
49
- {
50
-
51
- if (!$this->results) return FALSE;
52
-
53
-
54
-
55
- return ceil(mysql_num_rows($this->results) /
56
-
57
- (float)$this->pageSize);
58
-
59
- }
60
-
61
-
62
-
63
- function setPageNum($pageNum)
64
-
65
- {
66
-
67
- if ($pageNum > $this->getNumPages() or
68
-
69
- $pageNum <= 0) return FALSE;
70
-
71
-
72
-
73
- $this->page = $pageNum;
74
-
75
- $this->row = 0;
76
-
77
- mysql_data_seek($this->results,($pageNum-1) * $this->pageSize);
78
-
79
- }
80
-
81
-
82
-
83
- function getPageNum()
84
-
85
- {
86
-
87
- return $this->page;
88
-
89
- }
90
-
91
-
92
-
93
- function isLastPage()
94
-
95
- {
96
-
97
- return ($this->page >= $this->getNumPages());
98
-
99
- }
100
-
101
-
102
-
103
- function isFirstPage()
104
-
105
- {
106
-
107
- return ($this->page <= 1);
108
-
109
- }
110
-
111
-
112
-
113
- function fetchArray()
114
-
115
- {
116
-
117
- if (!$this->results) return FALSE;
118
-
119
- if ($this->row >= $this->pageSize) return FALSE;
120
-
121
- $this->row++;
122
-
123
- return mysql_fetch_array($this->results);
124
-
125
- }
126
-
127
-
128
-
129
- function getPageNav($queryvars = '')
130
-
131
- {
132
-
133
- $nav = '';
134
-
135
- if (!$this->isFirstPage())
136
-
137
- {
138
-
139
- $nav .= "<a href=\"?resultpage=".
140
-
141
- ($this->getPageNum()-1).'&'.$queryvars.'">'.__('Prev','WPEC').'</a> ';
142
-
143
- }
144
-
145
- if ($this->getNumPages() > 1)
146
-
147
- for ($i=1; $i<=$this->getNumPages(); $i++)
148
-
149
- {
150
-
151
- if ($i==$this->page)
152
-
153
- $nav .= "$i ";
154
-
155
- else
156
-
157
- $nav .= "<a href=\"?resultpage={$i}&".
158
-
159
- $queryvars."\">{$i}</a> ";
160
-
161
- }
162
-
163
- if (!$this->isLastPage())
164
-
165
- {
166
-
167
- $nav .= "<a href=\"?resultpage=".
168
-
169
- ($this->getPageNum()+1).'&'.$queryvars.'">'.__('Next','WPEC').'</a> ';
170
-
171
- }
172
-
173
-
174
-
175
- return $nav;
176
-
177
- }
178
-
179
- }
180
-
181
-
182
-
183
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
inc/process.php CHANGED
@@ -1,26 +1,35 @@
1
  <?php
2
 
3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
 
5
- function wp_email_capture_process()
 
 
6
 
7
- {
 
8
 
9
- if(isset($_REQUEST['wp_capture_action'])) {
10
- wp_email_capture_signup();
11
- }
12
 
13
- if(isset($_GET['wp_email_confirm']) || isset($_REQUEST['wp_email_confirm'])) {
14
- wp_capture_email_confirm();
15
- }
16
 
17
  }
18
 
19
 
20
-
21
- function wp_email_capture_double_check_everything($name, $email)
22
-
23
- {
24
 
25
  if (wp_email_injection_chars($name) || wp_email_injection_chars($email) || wp_email_injection_chars($name) || wp_email_injection_chars($email))
26
 
@@ -33,294 +42,280 @@ function wp_email_capture_double_check_everything($name, $email)
33
  return TRUE;
34
  }
35
 
36
- }
37
 
38
 
 
 
 
 
 
 
 
39
 
40
- function wp_email_capture_signup()
41
- {
42
-
43
- global $wpdb;
44
 
 
45
 
 
46
 
47
- // Random confirmation code
 
48
 
49
- $confirm_code=md5(uniqid(rand()));
50
 
51
- $name = $_REQUEST['wp-email-capture-name'];
52
- $starturl = $_SERVER['HTTP_REFERER'];
53
- if (strpos($starturl, "?") === false) { $extrastring = "?"; } else { $extrastring = "&"; }
 
 
 
54
 
55
- if (get_option("wp_email_capture_name_required") == 1 && $name == "")
56
- {
57
- $error = urlencode(__('Please Provide A Name','WPEC'));
58
- $url = $starturl . $extrastring . "wp_email_capture_error=" . $error;
59
- wp_redirect($url);
60
- die();
61
-
62
- }
63
 
64
- $email = $_REQUEST['wp-email-capture-email'];
65
 
 
66
 
67
- if (!is_email($email))
 
68
 
69
- {
70
- $error = urlencode(__('Not a valid email','WPEC'));
71
- $url = $starturl . $extrastring . "wp_email_capture_error=" . $error;
72
 
73
- wp_redirect($url);
74
 
75
- die();
76
 
77
- }
 
78
 
 
 
79
 
 
 
80
 
81
- if (wp_email_capture_double_check_everything($name, $email))
 
 
82
 
83
- {
84
 
85
- // values sent from form
86
 
87
- $name = wp_email_capture_sanitize($name);
 
88
 
89
- $email= wp_email_capture_sanitize($email);
90
 
91
- $name = wp_email_injection_test($name);
92
 
93
- $email = wp_email_injection_test($email);
94
 
95
- $name = wp_email_stripslashes($name);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
96
 
97
- $email = wp_email_stripslashes($email);
 
98
 
99
- $referrer = wp_email_capture_sanitize($_SERVER['HTTP_REFERER']);
100
 
101
- $ip = wp_email_capture_sanitize($_SERVER['REMOTE_ADDR']);
102
 
103
- $date = date("Y-m-d H-i");
104
 
 
105
 
106
- $sqlcheck = wp_email_capture_checkIfPresent($email);
 
 
 
107
 
 
 
 
108
 
 
 
 
109
 
110
- if ($sqlcheck){
111
-
112
- $error = urlencode(__('User already present','WPEC'));
113
- $url = $starturl . $extrastring . "wp_email_capture_error=" . $error;
114
 
115
- wp_redirect($url);
 
 
116
 
117
- die();
 
 
 
 
 
118
 
119
- }
 
 
 
120
 
 
121
 
 
 
 
122
 
123
- // Insert data into database
 
 
 
 
124
 
125
- $table_name = $wpdb->prefix . "wp_email_capture_temp_members";
126
 
 
127
 
128
- $result=$wpdb->insert($table_name, array('confirm_code' => $confirm_code, 'name' => $name,'email' => $email), array('%s','%s', '%s'));
 
129
 
130
-
 
 
 
 
 
 
131
 
132
- // if suceesfully inserted data into database, send confirmation link to email
133
 
134
- if($result){
135
-
136
-
137
-
138
- // ---------------- SEND MAIL FORM ----------------
139
-
140
-
141
-
142
- // send e-mail to ...
143
-
144
- $to=$email;
145
- $message = "";
146
- $siteurl = get_option('home');
147
- $siteurl = addLastCharacter($siteurl);
148
-
149
- // Your subject
150
- $subject = "";
151
- $subject=get_option('wp_email_capture_subject');
152
-
153
- if ($subject=="")
154
- {
155
- $subject = __("Sign Up For Our Newsletter","WPEC");
156
- }
157
-
158
-
159
- // From
160
- $from = "";
161
- $from = get_option('wp_email_capture_from');
162
- if ($from == "")
163
- {
164
- $from = get_option('admin_email');
165
- }
166
-
167
- $fromname = "";
168
- $fromname = get_option('wp_email_capture_from_name');
169
- if ($from == "")
170
- {
171
- $fromname = get_option('blogname');
172
- }
173
- $header = "MIME-Version: 1.0\n" . "From: " . $fromname . " <" . $from . ">\n";
174
- $header .= "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n";
175
- // Your message
176
-
177
- $message.= get_option('wp_email_capture_body') . "\n\n";
178
-
179
- if ($message == "\n\n")
180
- {
181
- $message .= __("Thank you for signing up for our newsletter, please click the link below to confirm your subscription","WPEC") . "\n\n";
182
- }
183
-
184
- $message.= $siteurl ."?wp_email_confirm=1&wp_email_capture_passkey=$confirm_code";
185
- $message .= "\n\n----\n";
186
- $message .= __("This is an automated message that is generated because somebody with the IP address of",'WPEC')." " . $ip ." ".__('(possibly you) on','WPEC')." ". $date ." ".__('filled out the form on the following page','WPEC')." " . $referrer . "\n";
187
- $message .= __("If you are sure this isn't you, please ignore this message, you will not be sent another message.",'WPEC');
188
- $message = str_replace("%NAME%", $name, $message);
189
-
190
- // send email
191
-
192
- $sentmail = wp_mail($to,$subject,$message,$header);
193
 
194
- }
 
195
 
196
- }
197
 
 
198
 
 
199
 
200
- // if not found
201
 
202
- else {
203
 
204
- echo __("Not found your email in our database",'WPEC');
205
 
206
  }
207
 
208
 
209
 
210
- // if your email succesfully sent
211
-
212
- if($sentmail){
213
- $halfreg = "";
214
- $halfreg = get_option('wp_email_capture_signup');
215
- if ($halfreg == "")
216
- {
217
- $halfreg = get_bloginfo('url');
218
- }
219
- wp_redirect($halfreg);
220
-
221
- die();
222
-
223
- }
224
-
225
- else {
226
- $error = urlencode(__('Email unable to be sent','WPEC'));
227
- $url = $starturl . $extrastring . "wp_email_capture_error=" . $error;
228
-
229
- wp_redirect($url);
230
 
231
- die();
232
 
233
- //echo "<meta http-equiv='refresh' content='0;". $url . "?wp_email_capture_error=Email%20unable%20to%20be%sent'>";
234
 
235
  }
236
 
237
- }
238
 
239
 
240
 
241
 
 
242
 
243
- function wp_capture_email_confirm()
244
 
245
- {
 
 
 
 
 
 
246
 
247
  global $wpdb;
248
 
249
  // Passkey that got from link
250
 
251
- $passkey=wp_email_capture_sanitize($_GET['wp_email_capture_passkey']);
252
-
253
- $table_name = $wpdb->prefix . "wp_email_capture_temp_members";
254
-
255
- $sql1="SELECT id FROM $table_name WHERE confirm_code ='%s'";
256
 
257
- $result=$wpdb->get_var($wpdb->prepare($sql1,$passkey));
258
 
259
- if ($result != '')
260
 
261
- {
262
 
263
- $table_name2 = $wpdb->prefix . "wp_email_capture_registered_members";
264
 
265
- $sql2="SELECT * FROM $table_name WHERE confirm_code ='%s'";
266
 
267
- $rowresults = $wpdb->get_results($wpdb->prepare($sql2,$passkey));
268
 
269
- foreach ($rowresults as $rowresult) {
270
 
271
- $name = $rowresult->name;
272
-
273
- $email = $rowresult->email;
274
-
275
- $result3 = $wpdb->insert($table_name2, array( 'name' => $name, 'email' => $email),array('%s','%s'));
276
 
 
277
 
 
 
 
278
 
279
- }
280
 
281
- }
 
282
 
283
- else {
284
- if (strpos($url, "?") === false) { $extrastring = "?"; } else { $extrastring = "&"; }
285
- $error = urlencode(__('Wrong confirmation code','WPEC'));
286
- $url = $url . $extrastring . "wp_email_capture_error=" . $error;
287
 
288
- wp_redirect($url);
 
 
289
 
290
- }
291
 
292
- // if successfully moved data from table"temp_members_db" to table "registered_members" displays message "Your account has been activated" and don't forget to delete confirmation code from table "temp_members_db"
293
 
 
294
 
 
 
295
 
296
- if($result3){
297
-
298
- $sql4="DELETE FROM $table_name WHERE confirm_code = '%s'";
299
-
300
- $result4=$wpdb->query($wpdb->prepare($sql4,$passkey));
301
- $fullreg = "";
302
- $fullreg = get_option('wp_email_capture_redirection');
303
- if ($fullreg == "")
304
- {
305
- $fullreg = get_bloginfo('url');
306
- }
307
- wp_redirect($fullreg);
308
-
309
-
310
-
311
- echo "<meta http-equiv='refresh' content='0;". $fullreg ."'>";
312
- die();
313
 
314
  }
315
-
316
-
317
-
318
-
319
-
320
  }
321
 
322
 
323
 
 
 
 
 
 
 
 
 
 
324
 
 
325
 
326
- ?>
 
 
 
1
  <?php
2
 
3
 
4
+ /**
5
+ * Wrapper function after the user submits an email address.
6
+ *
7
+ * Runs two actions, that can be overwritten if need be.
8
+ *
9
+ * @return void
10
+ */
11
+ function wp_email_capture_process() {
12
+
13
+ if ( isset( $_REQUEST['wp_capture_action'] ) ) {
14
+
15
+ do_action( 'wp_email_capture_signup_actions' );
16
+
17
+ }
18
 
19
+ if ( isset( $_GET['wp_email_confirm'] ) || isset( $_REQUEST['wp_email_confirm'] ) ) {
20
+
21
+ do_action( 'wp_email_capture_confirm_actions' );
22
 
23
+ //wp_capture_email_confirm();
24
+ }
25
 
 
 
 
26
 
 
 
 
27
 
28
  }
29
 
30
 
31
+ /*
32
+ function wp_email_capture_double_check_everything($name, $email) {
 
 
33
 
34
  if (wp_email_injection_chars($name) || wp_email_injection_chars($email) || wp_email_injection_chars($name) || wp_email_injection_chars($email))
35
 
42
  return TRUE;
43
  }
44
 
45
+ } */
46
 
47
 
48
+ /**
49
+ * Get the email submission form entry, validates it, adds it to the tempoaray database,
50
+ * and redirects user to the "Please check your email" page.
51
+ *
52
+ * @return void
53
+ */
54
+ function wp_email_capture_signup() {
55
 
56
+ global $wpdb;
 
 
 
57
 
58
+ // Random confirmation code
59
 
60
+ $confirm_code=md5( uniqid( rand() ) );
61
 
62
+ $name = esc_attr( $_REQUEST['wp-email-capture-name'] );
63
+ $starturl = esc_url( $_SERVER['HTTP_REFERER'] );
64
 
65
+ if ( strpos( $starturl, "?" ) === false ) { $extrastring = "?"; } else { $extrastring = "&"; }
66
 
67
+ if ( get_option( "wp_email_capture_name_required" ) == 1 && $name == "" ) {
68
+
69
+ $error = urlencode( __( 'Please Provide A Name', 'wp-email-capture' ) );
70
+ $url = $starturl . $extrastring . "wp_email_capture_error=" . $error;
71
+ wp_redirect( $url );
72
+ die();
73
 
74
+ }
 
 
 
 
 
 
 
75
 
76
+ $email = trim( esc_attr( $_REQUEST['wp-email-capture-email'] ) );
77
 
78
+ if ( !is_email( $email ) ) {
79
 
80
+ $error = urlencode( __( 'Not a valid email', 'wp-email-capture' ) );
81
+ $url = $starturl . $extrastring . "wp_email_capture_error=" . $error;
82
 
83
+ wp_redirect( $url );
 
 
84
 
85
+ die();
86
 
87
+ }
88
 
89
+ $name = esc_attr( $name );
90
+ $email = esc_attr( $email );
91
 
92
+ $name = wp_email_injection_test( $name );
93
+ $email = wp_email_injection_test( $email );
94
 
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" );
101
 
 
102
 
103
+ if ( wp_email_capture_checkIfPresent( $email ) ) {
104
 
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.
118
+ *
119
+ * This allows other plugins to do subscriptions if desired.
120
+ *
121
+ * @param bool True for WP Email Capture subscription handling.
122
+ * @param array {
123
+ * @type string $confirm_code
124
+ * @type string $name
125
+ * @type string $email
126
+ * }
127
+ */
128
+ $do_subscription = apply_filters( 'wp_email_capture_do_subscription', true, $member_data );
129
+
130
+ if ( !$do_subscription )
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
 
138
+ if ( $insert_into_temp ) {
139
 
140
+ // ---------------- SEND MAIL FORM ----------------
141
 
142
+ // send e-mail to ...
143
 
144
+ $to = $email;
145
+ $message = "";
146
+ $siteurl = get_option( 'home' );
147
+ $siteurl = trailingslashit( $siteurl );
148
 
149
+ // Your subject
150
+ $subject = "";
151
+ $subject = get_option( 'wp_email_capture_subject' );
152
 
153
+ if ( $subject == "" ) {
154
+ $subject = __( "Sign Up For Our Newsletter", "wp-email-capture" );
155
+ }
156
 
157
+ // From
158
+ $from = "";
159
+ $from = get_option( 'wp_email_capture_from' );
 
160
 
161
+ if ( $from == "" ) {
162
+ $from = get_option( 'admin_email' );
163
+ }
164
 
165
+ $fromname = "";
166
+ $fromname = get_option( 'wp_email_capture_from_name' );
167
+
168
+ if ( $from == "" ) {
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", "wp-email-capture" ) . "\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
 
189
+ // send email
190
 
191
+ $sentmail = apply_filters( 'wp_email_capture_send_email', $to, $subject, $message, $header );
192
 
193
+ //wp_die( $header );
194
+ // if your email succesfully sent
195
 
196
+ if ( $sentmail ) {
197
+ $halfreg = "";
198
+ $halfreg = get_option( 'wp_email_capture_signup' );
199
+ if ( $halfreg == "" ) {
200
+ $halfreg = get_bloginfo( 'url' );
201
+ }
202
+ wp_redirect( $halfreg );
203
 
204
+ die();
205
 
206
+ } else {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
207
 
208
+ $error = urlencode( __( 'Email unable to be sent', 'wp-email-capture' ) );
209
+ $url = $starturl . $extrastring . "wp_email_capture_error=" . $error;
210
 
211
+ wp_redirect( $url );
212
 
213
+ die();
214
 
215
+ }
216
 
217
+ }
218
 
 
219
 
 
220
 
221
  }
222
 
223
 
224
 
225
+ // if not found
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
226
 
227
+ /* else {
228
 
229
+ echo __( "Not found your email in our database", 'wp-email-capture' );
230
 
231
  }
232
 
 
233
 
234
 
235
 
236
 
237
+ } */
238
 
 
239
 
240
+ /**
241
+ * Confirm the email address has been validated by the user and register the user, allowing the site owner to
242
+ * see/export their email address. Redirects user to final destination page.
243
+ *
244
+ * @return void
245
+ */
246
+ function wp_capture_email_confirm() {
247
 
248
  global $wpdb;
249
 
250
  // Passkey that got from link
251
 
252
+ $passkey = esc_attr( $_GET['wp_email_capture_passkey'] );
 
 
 
 
253
 
254
+ $get_confirmation_code = "SELECT id FROM ". WP_EMAIL_CAPTURE_TEMP_MEMBERS_TABLE ." WHERE confirm_code ='%s'";
255
 
256
+ $confirmation_code = $wpdb->get_var( $wpdb->prepare( $get_confirmation_code, $passkey ) );
257
 
258
+ if ( $confirmation_code != '' ) {
259
 
260
+ $get_confirmation_row = "SELECT * FROM ". WP_EMAIL_CAPTURE_TEMP_MEMBERS_TABLE ." WHERE confirm_code ='%s'";
261
 
262
+ $confirmation_row = $wpdb->get_row( $wpdb->prepare( $get_confirmation_row, $passkey ) );
263
 
264
+ /* foreach ( $confirmation_rows as $confirmation_row ) { */
265
 
266
+ $name = $confirmation_row->name;
267
 
268
+ $email = $confirmation_row->email;
 
 
 
 
269
 
270
+ $add_to_registered_members_table = $wpdb->insert( WP_EMAIL_CAPTURE_REGISTERED_MEMBERS_TABLE, array( 'name' => $name, 'email' => $email ), array( '%s', '%s' ) );
271
 
272
+ // if successfully moved data from table"temp_members_db" to table "registered_members" displays message "Your account has been activated" and don't forget to delete confirmation code from table "temp_members_db"
273
+
274
+ $delete_from_temp_members_sql = "DELETE FROM ". WP_EMAIL_CAPTURE_TEMP_MEMBERS_TABLE . " WHERE confirm_code = '%s'";
275
 
276
+ $delete_from_temp_members = $wpdb->query( $wpdb->prepare( $delete_from_temp_members_sql, $passkey ) );
277
 
278
+ $fullreg = "";
279
+ $fullreg = get_option( 'wp_email_capture_redirection' );
280
 
281
+ if ( $fullreg == "" ) {
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
 
306
+ /**
307
+ * Default function to send emails. Can be overwritten using filters.
308
+ * @param string $to where the email is going
309
+ * @param string $subject the email subject
310
+ * @param string $message the message of the email
311
+ * @param string $header the header of the email
312
+ * @return boolean whether the email was successful in sending.
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
+ }
inc/security.php CHANGED
@@ -4,11 +4,11 @@
4
 
5
  /* Check for injection characters */
6
 
7
- function wp_email_injection_chars($s = "") {
8
 
9
  return (stripos("\r", $s) || stripos("\n", $s) || stripos("%0a", $s) || stripos("%0d", $s)) ? TRUE : FALSE;
10
 
11
- }
12
 
13
 
14
 
@@ -16,20 +16,19 @@ function wp_email_injection_chars($s = "") {
16
 
17
  /* Make output safe for the browser */
18
 
19
- function wp_email_capture_bsafe($input = "") {
20
 
21
  return htmlspecialchars(stripslashes($input));
22
 
23
- }
24
-
25
-
26
-
27
-
28
-
29
-
30
 
31
 
32
 
 
 
 
 
 
33
  function wp_email_stripslashes($s = "") {
34
 
35
  if (defined('TEMPLATEPATH') || (get_magic_quotes_gpc())) {
@@ -47,7 +46,11 @@ function wp_email_stripslashes($s = "") {
47
 
48
 
49
 
50
-
 
 
 
 
51
  function wp_email_injection_test($str = "") {
52
 
53
  $tests = array("/bcc\:/i", "/Content\-Type\:/i", "/Mime\-Version\:/i", "/cc\:/i", "/from\:/i", "/to\:/i", "/Content\-Transfer\-Encoding\:/i");
4
 
5
  /* Check for injection characters */
6
 
7
+ /* function wp_email_injection_chars($s = "") {
8
 
9
  return (stripos("\r", $s) || stripos("\n", $s) || stripos("%0a", $s) || stripos("%0d", $s)) ? TRUE : FALSE;
10
 
11
+ } */
12
 
13
 
14
 
16
 
17
  /* Make output safe for the browser */
18
 
19
+ /* function wp_email_capture_bsafe($input = "") {
20
 
21
  return htmlspecialchars(stripslashes($input));
22
 
23
+ } */
 
 
 
 
 
 
24
 
25
 
26
 
27
+ /**
28
+ * Strip Slashes from the string
29
+ * @param string $s the string to use.
30
+ * @return string The string cleaned of slashes.
31
+ */
32
  function wp_email_stripslashes($s = "") {
33
 
34
  if (defined('TEMPLATEPATH') || (get_magic_quotes_gpc())) {
46
 
47
 
48
 
49
+ /**
50
+ * Avoid injection tests
51
+ * @param string $str the string to check
52
+ * @return string the cleaned string
53
+ */
54
  function wp_email_injection_test($str = "") {
55
 
56
  $tests = array("/bcc\:/i", "/Content\-Type\:/i", "/Mime\-Version\:/i", "/cc\:/i", "/from\:/i", "/to\:/i", "/Content\-Transfer\-Encoding\:/i");
inc/tabledata.php CHANGED
@@ -1,80 +1,101 @@
1
- <?php
2
 
3
 
 
 
 
 
 
 
 
4
 
5
- function wp_email_capture_writetable($limit = 0, $header = '')
 
 
 
 
6
 
7
- {
8
 
9
- global $wpdb;
10
 
11
- $table_name = $wpdb->prefix . "wp_email_capture_registered_members";
 
 
12
 
13
- $sql = "SELECT id, name, email FROM " . $table_name;
14
 
15
- if ($limit != 0) {
16
 
17
- $sql .= " ORDER BY id DESC LIMIT 3";
18
 
19
  }
20
 
21
- $results = $wpdb->get_results($sql);
22
 
 
23
 
 
24
 
25
- if ($header == '') {
26
 
27
- $header = "<h3>".__('Members','WPEC')."</h3>";
28
 
29
- }
30
 
31
- echo $header;
32
 
33
- ?>
34
 
35
- <table border="0">
36
 
37
- <tr><td><strong><?php _e('Name','WPEC'); ?></strong></td><td colspan="2"><strong><?php _e('Email','WPEC'); ?></strong></td></tr>
38
 
39
- <?php foreach ($results as $result) {
40
- if ($limit == 0) {
41
- $delid = wp_email_capture_formdelete($result->id, $result->email);
42
- } else {
43
- $delid = '';
44
- }
45
- echo "<tr><td style='width: 300px;'>" . $result->name ."</td><td style='width: 300px;'>" . $result->email ."</td><td style='width: 300px;'>
46
- ". $delid ."</td>
47
 
48
- </tr>";
 
49
 
50
- }
51
 
52
- ?>
53
 
54
- </table>
55
 
56
- <?php
57
 
58
  }
59
 
60
 
61
- function wp_email_capture_formdelete($id, $email)
62
- {
63
- return "<form action='" . esc_url($_SERVER['REQUEST_URI']) . "#list' method='post'>
64
- <input type='hidden' name='wp_email_capture_deleteid' value='". $id."' />
65
- <input type='submit' value='".__('Delete ','WPEC'). $email ."' style='width: 300px;' class='button' />
66
- </form>";
 
 
 
 
 
67
  }
68
 
69
- function wp_email_capture_deleteid($id)
70
- {
 
 
 
 
 
71
  global $wpdb;
72
-
73
- $table_name = $wpdb->prefix . "wp_email_capture_registered_members";
74
-
75
- $sql = "DELETE FROM " . $table_name . " WHERE id = '%d'";
76
 
77
- $result = $wpdb->query($wpdb->prepare($sql,$id));
 
 
 
 
 
 
 
78
 
79
  }
80
- ?>
1
+ <?php
2
 
3
 
4
+ /**
5
+ * Display a table showing the latest members
6
+ * @param int $limit The amount of rows to show (default all)
7
+ * @param string $header the header text of the table
8
+ * @return void
9
+ */
10
+ function wp_email_capture_writetable( $limit = 0, $header = '' ) {
11
 
12
+ global $wpdb;
13
+
14
+ $registered_members_table = WP_EMAIL_CAPTURE_REGISTERED_MEMBERS_TABLE;
15
+
16
+ $get_registered_members_sql = "SELECT id, name, email FROM " . $registered_members_table;
17
 
18
+ if ( $limit != 0 ) {
19
 
20
+ $get_registered_members_sql .= " ORDER BY id DESC LIMIT 3";
21
 
22
+ }
23
+
24
+ $registered_members = $wpdb->get_results( $get_registered_members_sql );
25
 
26
+ $tabletoshow = "";
27
 
28
+ if ( $header == '' ) {
29
 
30
+ $header = "<h3>".__( 'Members', 'wp-email-capture' )."</h3>";
31
 
32
  }
33
 
34
+ echo $tabletoshow .= $header;
35
 
36
+ $tabletoshow .= '
37
 
38
+ <table border="0">
39
 
40
+ <tr><td><strong>' . __( 'Name', 'wp-email-capture' ) . '</strong></td><td colspan="2"><strong>' . __( 'Email', 'wp-email-capture' ) . '</strong></td></tr>';
41
 
 
42
 
43
+ foreach ( $registered_members as $member ) {
44
 
45
+ if ( $limit == 0 ) {
46
 
47
+ $delid = wp_email_capture_formdelete( $member->id, $member->email );
48
 
49
+ } else {
50
 
51
+ $delid = '';
52
 
53
+ }
 
 
 
 
 
 
 
54
 
55
+ $tabletoshow .= '<tr><td style="width: 300px;">' . $member->name . '</td><td style="width: 300px;">' . $member->email . '</td><td style="width: 300px;">'
56
+ . $delid . '</td></tr>';
57
 
58
+ }
59
 
60
+ $tabletoshow .= '</table>';
61
 
62
+ $tabletoshow = apply_filters( 'wp_email_capture_display_table', $tabletoshow );
63
 
64
+ echo $tabletoshow;
65
 
66
  }
67
 
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
+
95
+ /**
96
+ * Action to add on extra things on deleted ID.
97
+ */
98
+ do_action( 'wp_email_capture_after_delete_email_address', $id );
99
 
100
  }
101
+ ?>
inc/tempdata.php CHANGED
@@ -1,50 +1,51 @@
1
  <?php
2
 
3
- function wp_email_capture_truncate()
4
 
5
- {
 
 
 
 
6
 
7
  global $wpdb;
8
 
9
- $table_name = $wpdb->prefix . "wp_email_capture_temp_members";
10
 
11
- $sql = "TRUNCATE " . $table_name;
12
-
13
- $result = $wpdb->query($sql);
14
 
15
  }
16
 
17
- function wp_email_capture_delete()
18
 
19
- {
 
 
 
 
20
 
21
  global $wpdb;
22
 
23
- $table_name = $wpdb->prefix . "wp_email_capture_registered_members";
24
-
25
- $sql = "TRUNCATE " . $table_name;
26
 
27
- $result = $wpdb->query($sql);
28
 
29
  }
30
 
31
 
32
- function wp_email_capture_count_temp()
33
-
34
- {
 
 
35
 
36
  global $wpdb;
37
 
38
- $table_name = $wpdb->prefix . "wp_email_capture_temp_members";
39
-
40
- $sql = 'SELECT COUNT(*)
41
-
42
- FROM '. $table_name;
43
 
 
44
 
45
- $result = $wpdb->get_var($sql);
46
 
47
- return $result;
48
 
49
  }
50
 
1
  <?php
2
 
 
3
 
4
+ /**
5
+ * Delete the members in the tempoarary members table.
6
+ * @return void
7
+ */
8
+ function wp_email_capture_truncate() {
9
 
10
  global $wpdb;
11
 
12
+ $truncate_temp_sql = "TRUNCATE " . WP_EMAIL_CAPTURE_TEMP_MEMBERS_TABLE;
13
 
14
+ $truncated_table = $wpdb->query($truncate_temp_sql);
 
 
15
 
16
  }
17
 
 
18
 
19
+ /**
20
+ * Delete the members of the registered members table.
21
+ * @return void
22
+ */
23
+ function wp_email_capture_delete() {
24
 
25
  global $wpdb;
26
 
27
+ $truncate_registered_sql = "TRUNCATE " . WP_EMAIL_CAPTURE_REGISTERED_MEMBERS_TABLE;
 
 
28
 
29
+ $truncated_registered = $wpdb->query($truncate_registered_sql);
30
 
31
  }
32
 
33
 
34
+ /**
35
+ * Count the members in the temporary members table.
36
+ * @return int The number of members in the tempoarary members table.
37
+ */
38
+ function wp_email_capture_count_temp() {
39
 
40
  global $wpdb;
41
 
42
+ $count_temp_sql = 'SELECT COUNT(*)
 
 
 
 
43
 
44
+ FROM '. WP_EMAIL_CAPTURE_TEMP_MEMBERS_TABLE;
45
 
46
+ $temp_members = $wpdb->get_var($count_temp_sql);
47
 
48
+ return $temp_members;
49
 
50
  }
51
 
inc/tracking.php ADDED
@@ -0,0 +1,169 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * @package WP Email Capture
5
+ * @subpackage Admin
6
+ */
7
+ if ( ! defined( 'WP_EMAIL_CAPTURE_VERSION' ) ) {
8
+ header( 'Status: 403 Forbidden' );
9
+ header( 'HTTP/1.1 403 Forbidden' );
10
+ exit();
11
+ }
12
+
13
+
14
+ /**
15
+ * WPEC Tracking Class, taken from the Yoast SEO Tracking class. Props Yoast & team. :)
16
+ */
17
+ class WPEC_Tracking {
18
+ /**
19
+ * @var object Instance of this class
20
+ */
21
+ public static $instance;
22
+ /**
23
+ * Class constructor
24
+ */
25
+ function __construct() {
26
+ add_action( 'wpec_tracking', array( $this, 'tracking' ), 10 );
27
+ add_filter( 'wpec_tracking_filters', array( $this, 'tracking_additions' ), 5 );
28
+ }
29
+ /**
30
+ * Get the singleton instance of this class
31
+ *
32
+ * @return object
33
+ */
34
+ public static function get_instance() {
35
+ if ( ! ( self::$instance instanceof self ) ) {
36
+ self::$instance = new self();
37
+ }
38
+ return self::$instance;
39
+ }
40
+ /**
41
+ * Main tracking function.
42
+ */
43
+ function tracking() {
44
+ $transient_key = 'wpec_tracking_cache';
45
+ $data = get_transient( $transient_key );
46
+ // bail if transient is set and valid
47
+ if ( $data !== false ) {
48
+ return;
49
+ }
50
+ // Make sure to only send tracking data once a week
51
+ set_transient( $transient_key, 1, WEEK_IN_SECONDS );
52
+ // Start of Metrics
53
+ global $blog_id, $wpdb;
54
+ $hash = get_option( 'WPEC_Tracking_Hash', false );
55
+ if ( ! $hash || empty( $hash ) ) {
56
+ // create and store hash
57
+ $hash = md5( site_url() );
58
+ update_option( 'WPEC_Tracking_Hash', $hash );
59
+ }
60
+ $pts = array();
61
+ $post_types = get_post_types( array( 'public' => true ) );
62
+ if ( is_array( $post_types ) && $post_types !== array() ) {
63
+ foreach ( $post_types as $post_type ) {
64
+ $count = wp_count_posts( $post_type );
65
+ $pts[ $post_type ] = $count->publish;
66
+ }
67
+ }
68
+ unset( $post_types );
69
+ $comments_count = wp_count_comments();
70
+ $theme_data = wp_get_theme();
71
+ $theme = array(
72
+ 'name' => $theme_data->display( 'Name', false, false ),
73
+ 'theme_uri' => $theme_data->display( 'ThemeURI', false, false ),
74
+ 'version' => $theme_data->display( 'Version', false, false ),
75
+ 'author' => $theme_data->display( 'Author', false, false ),
76
+ 'author_uri' => $theme_data->display( 'AuthorURI', false, false ),
77
+ );
78
+ $theme_template = $theme_data->get_template();
79
+ if ( $theme_template !== '' && $theme_data->parent() ) {
80
+ $theme['template'] = array(
81
+ 'version' => $theme_data->parent()->display( 'Version', false, false ),
82
+ 'name' => $theme_data->parent()->display( 'Name', false, false ),
83
+ 'theme_uri' => $theme_data->parent()->display( 'ThemeURI', false, false ),
84
+ 'author' => $theme_data->parent()->display( 'Author', false, false ),
85
+ 'author_uri' => $theme_data->parent()->display( 'AuthorURI', false, false ),
86
+ );
87
+ }
88
+ else {
89
+ $theme['template'] = '';
90
+ }
91
+ unset( $theme_template );
92
+ $plugins = array();
93
+ $active_plugin = get_option( 'active_plugins' );
94
+ foreach ( $active_plugin as $plugin_path ) {
95
+ if ( ! function_exists( 'get_plugin_data' ) ) {
96
+ require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
97
+ }
98
+ $plugin_info = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin_path );
99
+ $slug = str_replace( '/' . basename( $plugin_path ), '', $plugin_path );
100
+ $plugins[ $slug ] = array(
101
+ 'version' => $plugin_info['Version'],
102
+ 'name' => $plugin_info['Name'],
103
+ 'plugin_uri' => $plugin_info['PluginURI'],
104
+ 'author' => $plugin_info['AuthorName'],
105
+ 'author_uri' => $plugin_info['AuthorURI'],
106
+ );
107
+ }
108
+ unset( $active_plugins, $plugin_path );
109
+ $data = array(
110
+ 'site' => array(
111
+ 'hash' => $hash,
112
+ 'version' => get_bloginfo( 'version' ),
113
+ 'multisite' => is_multisite(),
114
+ 'users' => $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->users INNER JOIN $wpdb->usermeta ON ({$wpdb->users}.ID = {$wpdb->usermeta}.user_id) WHERE 1 = 1 AND ( {$wpdb->usermeta}.meta_key = %s )", 'wp_' . $blog_id . '_capabilities' ) ),
115
+ 'lang' => get_locale(),
116
+ ),
117
+ 'pts' => $pts,
118
+ 'comments' => array(
119
+ 'total' => $comments_count->total_comments,
120
+ 'approved' => $comments_count->approved,
121
+ 'spam' => $comments_count->spam,
122
+ 'pings' => $wpdb->get_var( "SELECT COUNT(comment_ID) FROM $wpdb->comments WHERE comment_type = 'pingback'" ),
123
+ ),
124
+ 'options' => apply_filters( 'wpec_tracking_filters', array() ),
125
+ 'theme' => $theme,
126
+ 'plugins' => $plugins,
127
+ );
128
+ $args = array(
129
+ 'body' => $data,
130
+ 'blocking' => false,
131
+ 'sslverify' => false,
132
+ );
133
+ //wp_die(print_r($data));
134
+ wp_remote_post( 'http://tracking.winwar.co.uk/', $args );
135
+ }
136
+
137
+ function tracking_additions( $options ) {
138
+
139
+ if ( function_exists( 'curl_version' ) ) {
140
+ $curl = curl_version();
141
+ }
142
+ else {
143
+ $curl = null;
144
+ }
145
+
146
+ $options['wpemailcapture'] = array(
147
+ 'listsize' => wp_email_capture_get_number_of_registered_users(),
148
+ 'tempsize' => wp_email_capture_count_temp(),
149
+ 'linktous' => get_option( 'wp_email_capture_link' )
150
+ );
151
+ return $options;
152
+ }
153
+ } /* End of class */
154
+
155
+ /**
156
+ * Start tracking
157
+ * @return void
158
+ */
159
+ function wpec_start_tracking() {
160
+ $tracking = new WPEC_Tracking;
161
+ }
162
+
163
+ /**
164
+ * Action tracking wrapper.
165
+ * @return void
166
+ */
167
+ function wpec_do_tracking() {
168
+ do_action('wpec_tracking');
169
+ }
inc/widget.php CHANGED
@@ -1,16 +1,17 @@
1
  <?php
2
 
 
 
 
3
  class wp_email_capture_widget_class extends WP_Widget {
4
 
5
- function wp_email_capture_widget_class() {
6
- parent::WP_Widget('wp_email_capture_widget_class', __('WP Email Capture','WPEC'), array('description' =>__('Widget for WP Email Capture','WPEC')));
7
  }
8
 
9
 
10
  function widget($args, $instance) {
11
 
12
-
13
-
14
  // $args is an array of strings which help your widget
15
  // conform to the active theme: before_widget, before_title,
16
  // after_widget, and after_title are the array keys.
@@ -18,16 +19,16 @@ class wp_email_capture_widget_class extends WP_Widget {
18
  extract($args);
19
  extract($args, EXTR_SKIP);
20
 
21
- $title = empty($instance['widget_title']) ? __('Subscribe!','WPEC') : apply_filters('widget_title', $instance['widget_title']);
22
- $text = empty($instance['widget_text']) ? __('Subscribe to my blog for updates','WPEC') : $instance['widget_text'];
23
-
24
- echo $before_widget;
25
 
26
- echo $before_title . $title . $after_title;
27
 
28
- echo '<div class="textwidget">'.$text.'</div>';
29
 
30
- wp_email_capture_form();
31
 
32
  echo $after_widget;
33
 
@@ -40,180 +41,35 @@ class wp_email_capture_widget_class extends WP_Widget {
40
  $instance['widget_text'] = strip_tags($new_instance['widget_text']);
41
  return $instance;
42
  }
43
-
44
  /**
45
  * admin control form
46
  */
47
  function form($instance) {
48
- $default = array( 'widget_title' => __('Subscribe!','WPEC'), 'widget_text' => __('Subscribe to my blog for updates','WPEC') );
 
 
 
 
49
  $instance = wp_parse_args( (array) $instance, $default );
50
-
51
  $title_id = $this->get_field_id('widget_title');
52
  $title_name = $this->get_field_name('widget_title');
53
  $text_id = $this->get_field_id('widget_text');
54
  $text_name = $this->get_field_name('widget_text');
55
  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>';
56
- 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>';
57
-
58
  }
59
 
60
  }
61
 
62
- add_action('widgets_init', 'wp_email_capture_widget_init');
63
 
64
  function wp_email_capture_widget_init(){
65
  // curl need to be installed
66
  register_widget('wp_email_capture_widget_class');
67
  }
68
- /*
69
- function wp_email_capture_widget_init() {
70
-
71
-
72
-
73
- // Check to see required Widget API functions are defined...
74
-
75
- if ( !function_exists('register_sidebar_widget') || !function_exists('register_widget_control') )
76
-
77
- return; // ...and if not, exit gracefully from the script.
78
-
79
-
80
-
81
- // This function prints the sidebar widget--the cool stuff!
82
-
83
- function wp_email_capture_widget($args) {
84
-
85
-
86
-
87
- // $args is an array of strings which help your widget
88
-
89
- // conform to the active theme: before_widget, before_title,
90
-
91
- // after_widget, and after_title are the array keys.
92
-
93
- extract($args);
94
-
95
-
96
-
97
- // Collect our widget's options, or define their defaults.
98
-
99
- $options = get_option('wp_email_capture_widget');
100
-
101
- $title = empty($options['title']) ? __('Subscribe!','WPEC') : $options['title'];
102
-
103
- $text = empty($options['text']) ? __('Subscribe to my blog for updates','WPEC') : $options['text'];
104
-
105
-
106
-
107
- // It's important to use the $before_widget, $before_title,
108
-
109
- // $after_title and $after_widget variables in your output.
110
-
111
- echo $before_widget;
112
-
113
- echo $before_title . $title . $after_title;
114
-
115
- echo $text;
116
-
117
- wp_email_capture_form();
118
-
119
- echo $after_widget;
120
-
121
- }
122
-
123
-
124
-
125
- // This is the function that outputs the form to let users edit
126
-
127
- // the widget's title and so on. It's an optional feature, but
128
-
129
- // we'll use it because we can!
130
-
131
- function wp_email_capture_widget_control() {
132
-
133
-
134
-
135
- // Collect our widget's options.
136
-
137
- $options = get_option('wp_email_capture_widget');
138
-
139
- $newoptions = get_option('wp_email_capture_widget');
140
-
141
- // This is for handing the control form submission.
142
-
143
- if ( $_POST['wp-email-capture-submit'] ) {
144
-
145
- // Clean up control form submission options
146
-
147
- $newoptions['title'] = strip_tags(stripslashes($_POST['wp-email-capture-title']));
148
-
149
- $newoptions['text'] = strip_tags(stripslashes($_POST['wp-email-capture-text']));
150
-
151
- }
152
-
153
-
154
-
155
- // If original widget options do not match control form
156
-
157
- // submission options, update them.
158
-
159
- if ( $options != $newoptions ) {
160
-
161
- $options = $newoptions;
162
-
163
- update_option('wp_email_capture_widget', $options);
164
-
165
- }
166
-
167
-
168
-
169
- // Format options as valid HTML. Hey, why not.
170
-
171
- $title = htmlspecialchars($options['title'], ENT_QUOTES);
172
-
173
- $text = htmlspecialchars($options['text'], ENT_QUOTES);
174
-
175
-
176
-
177
- // The HTML below is the control form for editing options.
178
-
179
- ?>
180
-
181
- <div>
182
-
183
- <label for="wp-email-capture-title" style="line-height:35px;display:block;"><?php _e('Widget title:','WPEC'); ?> <input type="text" id="wp-email-capture-title" name="wp-email-capture-title" value="<?php echo $title; ?>" /></label>
184
-
185
- <label for="wp-email-capture-text" style="line-height:35px;display:block;"><?php _e('Widget text:','WPEC'); ?> <input type="text" id="wp-email-capture-text" name="wp-email-capture-text" value="<?php echo $text; ?>" /></label>
186
-
187
- <input type="hidden" name="wp-email-capture-submit" id="wp-email-capture-submit" value="1" />
188
-
189
- </div>
190
-
191
- <?php
192
-
193
- // end of widget_mywidget_control()
194
-
195
- }
196
-
197
-
198
-
199
- // This registers the widget. About time.
200
-
201
- wp_register_sidebar_widget('wpemailcapture',__('WP Email Capture','WPEC'), 'wp_email_capture_widget');
202
-
203
-
204
-
205
- // This registers the (optional!) widget control form.
206
-
207
- wp_register_widget_control('wpemailcapture',__('WP Email Capture','WPEC'), 'wp_email_capture_widget_control');
208
-
209
- }
210
-
211
-
212
-
213
- // Delays plugin execution until Dynamic Sidebar has loaded first.
214
-
215
- add_action('plugins_loaded', 'wp_email_capture_widget_init');
216
 
217
- */
218
 
219
  ?>
1
  <?php
2
 
3
+ /**
4
+ * Class to display the WP Email Capture Widget.
5
+ */
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
 
13
  function widget($args, $instance) {
14
 
 
 
15
  // $args is an array of strings which help your widget
16
  // conform to the active theme: before_widget, before_title,
17
  // after_widget, and after_title are the array keys.
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
 
33
  echo $after_widget;
34
 
41
  $instance['widget_text'] = strip_tags($new_instance['widget_text']);
42
  return $instance;
43
  }
44
+
45
  /**
46
  * admin control form
47
  */
48
  function form($instance) {
49
+ $default = array(
50
+ 'widget_title' => __('Subscribe!','WPEC'),
51
+ 'widget_text' => __('Subscribe to my blog for updates','WPEC')
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:','WPEC').': <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:','WPEC').': <input type="text" class="widefat" id="'.$text_id.'" name="'.$text_name .'" value="'.esc_attr( $instance['widget_text'] ).'" /><label></p>';
62
+
63
  }
64
 
65
  }
66
 
67
+
68
 
69
  function wp_email_capture_widget_init(){
70
  // curl need to be installed
71
  register_widget('wp_email_capture_widget_class');
72
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
73
 
 
74
 
75
  ?>
languages/WPEC-fr_FR.mo DELETED
Binary file
languages/{WPEC-de_DE.mo → wp-email-capture-de_DE.mo} RENAMED
File without changes
languages/{WPEC-de_DE.po → wp-email-capture-de_DE.po} RENAMED
File without changes
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/wp-email-capture-fr_FR.mo ADDED
Binary file
languages/{WPEC-fr_FR.po → wp-email-capture-fr_FR.po} RENAMED
@@ -57,6 +57,10 @@ msgstr "Email:"
57
  msgid "Powered by"
58
  msgstr "Propulsé par"
59
 
 
 
 
 
60
  #: ../inc/options.php:5
61
  #: ../inc/options.php:15
62
  msgid "WP Email Capture Options"
@@ -194,4 +198,3 @@ msgstr "Texte du widget:"
194
  #: ../inc/widget.php:141
195
  msgid "WP Email Capture"
196
  msgstr "WP Email Capture"
197
-
57
  msgid "Powered by"
58
  msgstr "Propulsé par"
59
 
60
+ #: ../inc/display.php:71
61
+ msgid "Submit"
62
+ msgstr "Envoyer"
63
+
64
  #: ../inc/options.php:5
65
  #: ../inc/options.php:15
66
  msgid "WP Email Capture Options"
198
  #: ../inc/widget.php:141
199
  msgid "WP Email Capture"
200
  msgstr "WP Email Capture"
 
languages/wp-email-capture-hr.mo ADDED
Binary file
languages/wp-email-capture-hr.po ADDED
@@ -0,0 +1 @@
 
1
+
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.txt CHANGED
@@ -1,11 +1,11 @@
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.0
5
- Version: 2.11
6
- Stable tag: 2.11
7
  Contributors: rhyswynne
8
- Donate link: http://wpemailcapture.com/pricing/
9
 
10
  Double opt-in form for building your email list. Define landing pages to distribute your ebooks & software.
11
 
@@ -22,7 +22,7 @@ Features:-
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://www.wpemailcapture.com/)
26
 
27
  **Now Released is WP Email Capture Premium!** You get all the above features plus the following:-
28
 
@@ -32,20 +32,20 @@ For more details please visit the official site of [WP Email Capture](http://www
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/pricing/).
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/), 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/), 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/).
43
 
44
  Translation Credits:-
45
 
46
  Translations have been done by the following parties. Thank you!
47
 
48
- * French Translation: Olivier - http://www.ticket-system.net/
49
  * German Translation: Stephan - http://www.computersniffer.com/, Marc Nilius (@libertello) - http://www.libertello.de/ and Ov3rFly
50
  * Brazilian Portugese Translation: Nick Lima (@nick_linux) - http://www.nicklima.com.br
51
  * Dutch Translation: Sander - http://www.zanderz.net/
@@ -53,6 +53,7 @@ Translations have been done by the following parties. Thank you!
53
  * Spanish Translation: David Bravo - http://dimensionmultimedia.com
54
  * Italian Translation: Giuseppe Marino - http://it.gravatar.com/gpmarino
55
  * Serbian Translation: Borisa Djuraskovic - http://www.webhostinghub.com/
 
56
 
57
  == Installation ==
58
  1. Upload the plugin (unzipped) into `/wp-content/plugins/`.
@@ -69,7 +70,7 @@ If you want to insert the form within a page, insert into any post or page the s
69
 
70
  You can also add a widget to any widget enabled area by going to Appearance > Widgets in the WordPress Administration.
71
 
72
- 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/)
73
 
74
  == Stylings ==
75
  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.
@@ -128,7 +129,7 @@ No.
128
  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.
129
 
130
  = Can Registered Users access the "thank you" page after signup? They try signing up again and get a 'user has already been registered' error =
131
- Yes they can, however they can't go through the registration process. If you are using [WP Email Capture Premium](http://www.wpemailcapture.com/pricing/), 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.
132
 
133
  = I am Upgrading to WP Email Capture 2.3+, why has my WP Email Capture Sidebar Widget disappeared? =
134
  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!
@@ -152,12 +153,39 @@ This plugin does use widgets, so probably yes :)
152
  Wherever you put in %NAME% (spelt exactly like that, uppercase as well), it will be replaced with the name given by the user.
153
 
154
  == Bugs/Suggestions/Support ==
155
- Please report any bugs, support and suggestions to the [WP Email Capture Support Page](http://www.wpemailcapture.com/support/)
156
 
157
  == Donate ==
158
- To donate to this plugin, please visit the [WP Email Capture Donations Page](http://www.wpemailcapture.com/pricing/)
159
 
160
  == Change Log ==
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
161
  = 2.11 =
162
  * German Translation Updated (thanks Ove3rfly)
163
  * 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).
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.1
6
+ Stable tag: 3.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
 
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
 
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:-
45
 
46
  Translations have been done by the following parties. Thank you!
47
 
48
+ * French Translation: Olivier - http://www.ticket-system.net/ & Andrew Patton (@andpatton) - http://www.acusti.ca/
49
  * German Translation: Stephan - http://www.computersniffer.com/, Marc Nilius (@libertello) - http://www.libertello.de/ and Ov3rFly
50
  * Brazilian Portugese Translation: Nick Lima (@nick_linux) - http://www.nicklima.com.br
51
  * Dutch Translation: Sander - http://www.zanderz.net/
53
  * Spanish Translation: David Bravo - http://dimensionmultimedia.com
54
  * Italian Translation: Giuseppe Marino - http://it.gravatar.com/gpmarino
55
  * Serbian Translation: Borisa Djuraskovic - http://www.webhostinghub.com/
56
+ * Croatian Translation: Lem Treursić - http://grafika-dizajn.com/
57
 
58
  == Installation ==
59
  1. Upload the plugin (unzipped) into `/wp-content/plugins/`.
70
 
71
  You can also add a widget to any widget enabled area by going to Appearance > Widgets in the WordPress Administration.
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.
129
  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.
130
 
131
  = Can Registered Users access the "thank you" page after signup? They try signing up again and get a 'user has already been registered' error =
132
+ 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.
133
 
134
  = I am Upgrading to WP Email Capture 2.3+, why has my WP Email Capture Sidebar Widget disappeared? =
135
  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!
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.1 =
163
+ * Removed the default widget title should widget text be blank (props [Hassan Raza](http://hassan-raza.com/)).
164
+ * Changed word from "Update" to "Upgrade" for large lists as it was confusing people.
165
+ * Changed to new Text Domain as per WordPress' new internationalisation integration (wp-email-capture).
166
+
167
+ = 3.0.2 =
168
+ * Fixed an error with "Error: " displaying on the free version.
169
+
170
+ = 3.0.1 =
171
+ * Fixed a minor security issue in the display.php
172
+ * Removed Tracking (for now)
173
+
174
+ = 3.0 =
175
+ * Massive refactor of code, to help improve it.
176
+ * Fixed a bug that the "Hide Notice" dismissive now works.
177
+ * Updated French Translation (thanks [Andrew](http://www.acusti.ca/))
178
+ * Added Croatian Translation (thanks [Lem Treursić](http://grafika-dizajn.com/))
179
+ * Added Welcome Screen
180
+ * Added P tag around text widget introduction.
181
+ * Added better help documentation within the plugin.
182
+ * Added signup & confirm actions, to allow users to remove/add their own actions.
183
+ * Added a filter to the display form, so it can be changed.
184
+ * Add a filter for other subscription plugins (props [Dylan Kuhn](http://www.cyberhobo.net/))
185
+ * Changed menu structure
186
+ * Made compatible with WordPress 4.3, with new widget structure.
187
+ * Made compatible with new language packs.
188
+
189
  = 2.11 =
190
  * German Translation Updated (thanks Ove3rfly)
191
  * 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).
wp-email-capture.php CHANGED
@@ -1,65 +1,79 @@
1
- <?php
2
 
3
  /*
4
 
5
  Plugin Name: WP Email Capture
6
 
7
- Plugin URI: http://www.wpemailcapture.com
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: 2.11
12
 
13
- Author: Rhys Wynne
14
 
15
- Author URI: http://www.rhyswynne.co.uk/
16
 
17
  */
18
 
19
  global $wp_email_capture_db_version;
 
20
 
 
21
  $wp_email_capture_db_version = "1.0";
22
 
23
- define('WP_EMAIL_CAPTURE_PATH', dirname(__FILE__));
24
-
25
- require_once(WP_EMAIL_CAPTURE_PATH . '/inc/core.php');
26
-
27
- add_action('plugins_loaded','wp_email_capture_plugins_loaded');
28
-
29
- function wp_email_capture_plugins_loaded()
30
- {
31
-
32
- if (function_exists('load_plugin_textdomain'))
33
- {
34
- $plugin_dir = basename(dirname(__FILE__));
35
- load_plugin_textdomain('WPEC','wp-content/plugins/'.$plugin_dir.'/languages',$plugin_dir.'/languages');
 
 
 
 
 
 
 
 
36
  }
37
-
38
- return;
39
- }
40
-
41
- if ( is_admin() ){ // admin actions
42
-
43
- add_action( 'admin_init', 'wp_email_capture_options_process' );
44
 
45
- add_action('wp_dashboard_setup', 'wp_email_capture_add_dashboard_widgets' );
46
- add_action('admin_menu', 'wp_email_capture_menus');
47
-
48
- } else {
49
-
50
- add_action('init','wp_email_capture_process');
 
 
 
 
51
 
52
- //add_filter( 'the_content', 'wp_email_capture_display_form_in_post');
 
53
 
 
 
 
 
 
 
 
 
 
 
54
  }
55
 
 
 
 
56
 
57
 
58
- register_activation_hook(__FILE__,'wp_email_capture_install');
59
-
60
- add_shortcode( 'wp_email_capture_form', 'wp_email_capture_form_page');
61
-
62
- add_action('admin_notices', 'wp_email_capture_admin_notice');
63
- add_action('admin_init', 'wp_email_capture_nag_ignore');
64
-
65
- ?>
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.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.1' );
30
+
31
+ require_once WP_EMAIL_CAPTURE_PATH . '/inc/core.php';
32
+
33
+ /**
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() {
41
+
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
+ ?>
 
 
 
 
 
 
 
wp-email-capture.pot DELETED
@@ -1,497 +0,0 @@
1
- # Copyright (C) 2014 WP Email Capture
2
- # This file is distributed under the same license as the WP Email Capture package.
3
- msgid ""
4
- msgstr ""
5
- "Project-Id-Version: WP Email Capture 2.10\n"
6
- "Report-Msgid-Bugs-To: http://wordpress.org/tag/wp-email-capture\n"
7
- "POT-Creation-Date: 2014-07-07 20:18:59+00:00\n"
8
- "MIME-Version: 1.0\n"
9
- "Content-Type: text/plain; charset=UTF-8\n"
10
- "Content-Transfer-Encoding: 8bit\n"
11
- "PO-Revision-Date: 2014-MO-DA HO:MI+ZONE\n"
12
- "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
- "Language-Team: LANGUAGE <LL@li.org>\n"
14
-
15
- #: inc/admin-sidebar.php:14
16
- msgid "Need Help?"
17
- msgstr ""
18
-
19
- #: inc/admin-sidebar.php:16
20
- msgid "If you are having problems with this plugin, please read the"
21
- msgstr ""
22
-
23
- #: inc/admin-sidebar.php:16
24
- msgid "Frequently Asked Questions"
25
- msgstr ""
26
-
27
- #: inc/admin-sidebar.php:16
28
- msgid "or alternatively"
29
- msgstr ""
30
-
31
- #: inc/admin-sidebar.php:16
32
- msgid "submit a support request here"
33
- msgstr ""
34
-
35
- #: inc/admin-sidebar.php:19
36
- msgid "Recommended Services"
37
- msgstr ""
38
-
39
- #: inc/admin-sidebar.php:21
40
- msgid "We recommend the following services for sending out emails:-"
41
- msgstr ""
42
-
43
- #: inc/admin-sidebar.php:30
44
- msgid "Global List Management"
45
- msgstr ""
46
-
47
- #: inc/admin-sidebar.php:32
48
- msgid "This page allows you to create lists, either"
49
- msgstr ""
50
-
51
- #: inc/admin-sidebar.php:32
52
- msgid "external lists"
53
- msgstr ""
54
-
55
- #: inc/admin-sidebar.php:32
56
- msgid ""
57
- "(WP Email Capture is compatible with most major email marketing software "
58
- "packages), or a new"
59
- msgstr ""
60
-
61
- #: inc/admin-sidebar.php:32
62
- msgid "WP Email Capture List"
63
- msgstr ""
64
-
65
- #: inc/admin-sidebar.php:32
66
- msgid "You can create as many different lists as you wish"
67
- msgstr ""
68
-
69
- #: inc/admin-sidebar.php:36
70
- msgid "Add/Edit WP Email Capture List"
71
- msgstr ""
72
-
73
- #: inc/admin-sidebar.php:38
74
- msgid ""
75
- "This is the page for managing WP Email Capture Lists. From this page you "
76
- "can:-"
77
- msgstr ""
78
-
79
- #: inc/admin-sidebar.php:40
80
- msgid "Make Changes To Your Lists"
81
- msgstr ""
82
-
83
- #: inc/admin-sidebar.php:40
84
- msgid "such as the name and the pages redirected to on form completion"
85
- msgstr ""
86
-
87
- #: inc/admin-sidebar.php:41
88
- msgid "Email Options"
89
- msgstr ""
90
-
91
- #: inc/admin-sidebar.php:41
92
- msgid ""
93
- "such as where the email comes from and what emails sent to the subscriber "
94
- "contains"
95
- msgstr ""
96
-
97
- #: inc/admin-sidebar.php:42
98
- msgid "Error Options"
99
- msgstr ""
100
-
101
- #: inc/admin-sidebar.php:42
102
- msgid ""
103
- "the errors that are displayed to subscribers who incorrectly fill in the form"
104
- msgstr ""
105
-
106
- #: inc/admin-sidebar.php:43
107
- msgid "Styling Options"
108
- msgstr ""
109
-
110
- #: inc/admin-sidebar.php:43
111
- msgid ""
112
- "change the button image (or use an image), as well as what to ask the user "
113
- "for besides their name"
114
- msgstr ""
115
-
116
- #: inc/admin-sidebar.php:45
117
- msgid "You can also on this page do the following"
118
- msgstr ""
119
-
120
- #: inc/admin-sidebar.php:47
121
- msgid "Manage List Subscribers"
122
- msgstr ""
123
-
124
- #: inc/admin-sidebar.php:48
125
- msgid "Delete Temporary Emails"
126
- msgstr ""
127
-
128
- #: inc/admin-sidebar.php:49
129
- msgid "Empty the entire list"
130
- msgstr ""
131
-
132
- #: inc/admin-sidebar.php:59
133
- msgid "Get WP Email Capture Premium"
134
- msgstr ""
135
-
136
- #: inc/admin-sidebar.php:61
137
- msgid ""
138
- "Unlock the <strong>true</strong> power of WP Email Capture with the Premium "
139
- "version. With multiple lists, and stat tracking, WP Email Capture Premium is "
140
- "the missing link in your WordPress Email Marketing Puzzle"
141
- msgstr ""
142
-
143
- #: inc/admin-sidebar.php:66
144
- msgid "Add/Edit External List"
145
- msgstr ""
146
-
147
- #: inc/admin-sidebar.php:68
148
- msgid ""
149
- "This is the page for managing External lists through WP Email Capture. "
150
- "Simply copy & paste the code from your Email Marketing software into the "
151
- "page below and you can embed your newsletter subscriptions into posts, pages "
152
- "or sidebars easily using WP Email Capture. If you do not have an Email "
153
- "Marketing Service, a few are recommended below"
154
- msgstr ""
155
-
156
- #: inc/admin-sidebar.php:72
157
- msgid "Donations"
158
- msgstr ""
159
-
160
- #: inc/admin-sidebar.php:73
161
- msgid ""
162
- "If you like this plugin, please consider a small donation to help with "
163
- "future versions and plugins."
164
- msgstr ""
165
-
166
- #: inc/admin-sidebar.php:83
167
- msgid "Latest News"
168
- msgstr ""
169
-
170
- #: inc/admin-sidebar.php:84
171
- msgid "The latest news and tutorials from WP Email Capture"
172
- msgstr ""
173
-
174
- #: inc/admin-sidebar.php:97
175
- msgid "Support Us!"
176
- msgstr ""
177
-
178
- #: inc/admin-sidebar.php:98
179
- msgid ""
180
- "We would like you if you would not mind, doing one of the following if you "
181
- "are a fan of WP Email Capture"
182
- msgstr ""
183
-
184
- #: inc/admin-sidebar.php:100
185
- msgid "Rate the plugin 5* on WordPress.org"
186
- msgstr ""
187
-
188
- #: inc/admin-sidebar.php:101
189
- msgid "Follow @WPEmailCapture on Twitter"
190
- msgstr ""
191
-
192
- #: inc/admin-sidebar.php:102
193
- msgid "Like us on Facebook"
194
- msgstr ""
195
-
196
- #: inc/admin-sidebar.php:106
197
- msgid "Become An Affiliate!"
198
- msgstr ""
199
-
200
- #: inc/admin-sidebar.php:107
201
- msgid "Earn upto"
202
- msgstr ""
203
-
204
- #: inc/admin-sidebar.php:107
205
- msgid "per sale of WP Email Capture"
206
- msgstr ""
207
-
208
- #: inc/admin-sidebar.php:107
209
- msgid "Join our affilite programme today"
210
- msgstr ""
211
-
212
- #: inc/admin-sidebar.php:110 inc/options.php:5 inc/options.php:18
213
- msgid "WP Email Capture Options"
214
- msgstr ""
215
-
216
- #: inc/admin-sidebar.php:111
217
- msgid ""
218
- "On this page you can make changes that to the way in which WP Email Capture "
219
- "runs"
220
- msgstr ""
221
-
222
- #: inc/dashboard.php:9
223
- msgid "Last Three Members To Join"
224
- msgstr ""
225
-
226
- #: inc/dashboard.php:13 inc/options.php:176
227
- msgid "Export"
228
- msgstr ""
229
-
230
- #: inc/dashboard.php:15
231
- msgid ""
232
- "Use the button below to export your list as a CSV to use in software such as"
233
- msgstr ""
234
-
235
- #: inc/dashboard.php:17 inc/options.php:184
236
- msgid "Export List"
237
- msgstr ""
238
-
239
- #: inc/dashboard.php:22 inc/options.php:190
240
- msgid "Temporary e-mails"
241
- msgstr ""
242
-
243
- #: inc/dashboard.php:24 inc/options.php:194
244
- msgid "There are"
245
- msgstr ""
246
-
247
- #: inc/dashboard.php:24 inc/options.php:194
248
- msgid ""
249
- "e-mail addresses that have been unconfirmed. Delete them to save space below."
250
- msgstr ""
251
-
252
- #: inc/dashboard.php:27 inc/options.php:198
253
- msgid "Delete Unconfirmed e-mail Addresses"
254
- msgstr ""
255
-
256
- #: inc/dashboard.php:40
257
- msgid "WP Email Capture - At A Glance"
258
- msgstr ""
259
-
260
- #: inc/display.php:18
261
- msgid "Error:"
262
- msgstr ""
263
-
264
- #: inc/display.php:22 inc/display.php:65
265
- msgid "Name:"
266
- msgstr ""
267
-
268
- #: inc/display.php:24 inc/display.php:67
269
- msgid "Email:"
270
- msgstr ""
271
-
272
- #: inc/display.php:28 inc/display.php:71
273
- msgid "Submit"
274
- msgstr ""
275
-
276
- #: inc/display.php:36 inc/display.php:75
277
- msgid "Powered by"
278
- msgstr ""
279
-
280
- #: inc/exportcsv.php:19 inc/tabledata.php:37
281
- msgid "Name"
282
- msgstr ""
283
-
284
- #: inc/exportcsv.php:19 inc/tabledata.php:37
285
- msgid "Email"
286
- msgstr ""
287
-
288
- #: inc/functions.php:53
289
- msgid ""
290
- "<strong>Please Note: </strong> You have not created a subscription page, "
291
- "confirmation page or both in WP Email Capture, please go to the WP Email "
292
- "Capture Settings Page to add them. | <a href=\"%1$s\">Hide Notice</a>"
293
- msgstr ""
294
-
295
- #: inc/options.php:22
296
- msgid "Recommendations"
297
- msgstr ""
298
-
299
- #: inc/options.php:24
300
- msgid "We recommend"
301
- msgstr ""
302
-
303
- #: inc/options.php:24
304
- msgid "to run your email campaigns. We have tested this plugin with it."
305
- msgstr ""
306
-
307
- #: inc/options.php:49
308
- msgid "Options"
309
- msgstr ""
310
-
311
- #: inc/options.php:69
312
- msgid ""
313
- "Page to redirect to on sign up (full web address ie: http://www.domain.com/"
314
- "this-page/)"
315
- msgstr ""
316
-
317
- #: inc/options.php:77
318
- msgid ""
319
- "Page to redirect to on confirmation of email address (full web address ie: "
320
- "http://www.domain.com/this-other-page/)"
321
- msgstr ""
322
-
323
- #: inc/options.php:85
324
- msgid "From Which Email Address"
325
- msgstr ""
326
-
327
- #: inc/options.php:93
328
- msgid "From Which Name"
329
- msgstr ""
330
-
331
- #: inc/options.php:101
332
- msgid "Subject of Email"
333
- msgstr ""
334
-
335
- #: inc/options.php:109
336
- msgid "Body of Email"
337
- msgstr ""
338
-
339
- #: inc/options.php:110
340
- msgid ""
341
- "(use %NAME% to use the form's &quot;Name&quot; field in their welcome email)"
342
- msgstr ""
343
-
344
- #: inc/options.php:118
345
- msgid "Link to us (optional, but appreciated)"
346
- msgstr ""
347
-
348
- #: inc/options.php:132
349
- msgid "Make The \"Name\" field a required field?"
350
- msgstr ""
351
-
352
- #: inc/options.php:146
353
- msgid "Delimeter (leave blank for a comma)"
354
- msgstr ""
355
-
356
- #: inc/options.php:164
357
- msgid "Save Changes"
358
- msgstr ""
359
-
360
- #: inc/options.php:180
361
- msgid ""
362
- "Use the button below to export your list as a CSV to use in software such as "
363
- "<a href=\"http://wpemailcapture.com/recommends/aweber\" title=\"Email "
364
- "Marketing\">Aweber</a> or <a href=\"http://wpemailcapture.com/recommends/"
365
- "mailchimp\">Mailchimp</a>"
366
- msgstr ""
367
-
368
- #: inc/options.php:202
369
- msgid "Delete Current List"
370
- msgstr ""
371
-
372
- #: inc/options.php:206
373
- msgid ""
374
- "Want to delete the entire list? Click the link below. <strong>WARNING: </"
375
- "strong> this will delete all confirmed emails, so make sure you have a "
376
- "backup."
377
- msgstr ""
378
-
379
- #: inc/options.php:210
380
- msgid "Delete Confirmed e-mail Addresses"
381
- msgstr ""
382
-
383
- #: inc/pagedresults.php:141
384
- msgid "Prev"
385
- msgstr ""
386
-
387
- #: inc/pagedresults.php:169
388
- msgid "Next"
389
- msgstr ""
390
-
391
- #: inc/process.php:57
392
- msgid "Please Provide A Name"
393
- msgstr ""
394
-
395
- #: inc/process.php:70
396
- msgid "Not a valid email"
397
- msgstr ""
398
-
399
- #: inc/process.php:112
400
- msgid "User already present"
401
- msgstr ""
402
-
403
- #: inc/process.php:155
404
- msgid "Sign Up For Our Newsletter"
405
- msgstr ""
406
-
407
- #: inc/process.php:181
408
- msgid ""
409
- "Thank you for signing up for our newsletter, please click the link below to "
410
- "confirm your subscription"
411
- msgstr ""
412
-
413
- #: inc/process.php:186
414
- msgid ""
415
- "This is an automated message that is generated because somebody with the IP "
416
- "address of"
417
- msgstr ""
418
-
419
- #: inc/process.php:186
420
- msgid "(possibly you) on"
421
- msgstr ""
422
-
423
- #: inc/process.php:186
424
- msgid "filled out the form on the following page"
425
- msgstr ""
426
-
427
- #: inc/process.php:187
428
- msgid ""
429
- "If you are sure this isn't you, please ignore this message, you will not be "
430
- "sent another message."
431
- msgstr ""
432
-
433
- #: inc/process.php:204
434
- msgid "Not found your email in our database"
435
- msgstr ""
436
-
437
- #: inc/process.php:226
438
- msgid "Email unable to be sent"
439
- msgstr ""
440
-
441
- #: inc/process.php:285
442
- msgid "Wrong confirmation code"
443
- msgstr ""
444
-
445
- #: inc/tabledata.php:27
446
- msgid "Members"
447
- msgstr ""
448
-
449
- #: inc/tabledata.php:65
450
- msgid "Delete "
451
- msgstr ""
452
-
453
- #. #-#-#-#-# plugin.pot (WP Email Capture 2.10) #-#-#-#-#
454
- #. Plugin Name of the plugin/theme
455
- #: inc/widget.php:6
456
- msgid "WP Email Capture"
457
- msgstr ""
458
-
459
- #: inc/widget.php:6
460
- msgid "Widget for WP Email Capture"
461
- msgstr ""
462
-
463
- #: inc/widget.php:21 inc/widget.php:48
464
- msgid "Subscribe!"
465
- msgstr ""
466
-
467
- #: inc/widget.php:22 inc/widget.php:48
468
- msgid "Subscribe to my blog for updates"
469
- msgstr ""
470
-
471
- #: inc/widget.php:55
472
- msgid "Widget title:"
473
- msgstr ""
474
-
475
- #: inc/widget.php:56
476
- msgid "Widget text:"
477
- msgstr ""
478
-
479
- #. Plugin URI of the plugin/theme
480
- msgid "http://www.wpemailcapture.com"
481
- msgstr ""
482
-
483
- #. Description of the plugin/theme
484
- msgid ""
485
- "Captures email addresses for insertion into software such as <a href="
486
- "\"http://wpemailcapture.com/recommends/aweber\" title=\"Email Marketing"
487
- "\">Aweber</a> or <a href=\"http://wpemailcapture.com/recommends/mailchimp/"
488
- "\">Mailchimp</a>"
489
- msgstr ""
490
-
491
- #. Author of the plugin/theme
492
- msgid "Rhys Wynne"
493
- msgstr ""
494
-
495
- #. Author URI of the plugin/theme
496
- msgid "http://www.rhyswynne.co.uk/"
497
- msgstr ""