WordPress Email Marketing Plugin – WP Email Capture - Version 2.6

Version Description

(07/10/12) = * Added a checkbox that allows site owners to specify if "Name" is a required field.

Download this release

Release Info

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

Code changes from version 2.5 to 2.6

inc/display.php CHANGED
@@ -19,7 +19,7 @@ $url = addLastCharacter($url);
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" 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" /><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" /><br/>
25
 
@@ -58,7 +58,11 @@ $url = addLastCharacter($url);
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' 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' /><br/>\n";
 
 
 
 
62
 
63
  $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' /><br/>\n";
64
 
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" /><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" /><br/>
25
 
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' /><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' /><br/>\n";
68
 
inc/functions.php CHANGED
@@ -68,8 +68,7 @@ function wp_email_capture_nag_ignore() {
68
  }
69
 
70
  function wp_email_capture_fetch_rss_feed() {
71
- $url = includes_url();
72
- include_once($url . '/feed.php');
73
  $rss = fetch_feed("http://wpemailcapture.com/feed?cat=-4");
74
 
75
  if ( is_wp_error($rss) ) { return false; }
@@ -80,4 +79,5 @@ function wp_email_capture_fetch_rss_feed() {
80
 
81
  }
82
 
 
83
  ?>
68
  }
69
 
70
  function wp_email_capture_fetch_rss_feed() {
71
+ include_once(ABSPATH . WPINC . '/feed.php');
 
72
  $rss = fetch_feed("http://wpemailcapture.com/feed?cat=-4");
73
 
74
  if ( is_wp_error($rss) ) { return false; }
79
 
80
  }
81
 
82
+
83
  ?>
inc/options.php CHANGED
@@ -125,6 +125,20 @@ if (get_option('wp_email_capture_link') == 1) { echo "checked"; } ?>
125
 
126
  /></td>
127
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
128
  </tr>
129
 
130
  </tbody>
@@ -135,7 +149,7 @@ if (get_option('wp_email_capture_link') == 1) { echo "checked"; } ?>
135
 
136
  <input type="hidden" name="action" value="update" />
137
 
138
- <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" />
139
 
140
  <p class="submit">
141
 
@@ -216,6 +230,8 @@ function wp_email_capture_options_process() { // whitelist options
216
  register_setting( 'wp-email-capture-group', 'wp_email_capture_link');
217
 
218
  register_setting( 'wp-email-capture-group', 'wp_email_capture_from_name' );
 
 
219
 
220
  if(isset($_REQUEST['wp_email_capture_export'])) {
221
 
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
  </tbody>
149
 
150
  <input type="hidden" name="action" value="update" />
151
 
152
+ <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" />
153
 
154
  <p class="submit">
155
 
230
  register_setting( 'wp-email-capture-group', 'wp_email_capture_link');
231
 
232
  register_setting( 'wp-email-capture-group', 'wp_email_capture_from_name' );
233
+
234
+ register_setting( 'wp-email-capture-group', 'wp_email_capture_name_required' );
235
 
236
  if(isset($_REQUEST['wp_email_capture_export'])) {
237
 
inc/process.php CHANGED
@@ -38,7 +38,6 @@ function wp_email_capture_double_check_everything($name, $email)
38
 
39
 
40
  function wp_email_capture_signup()
41
-
42
  {
43
 
44
  global $wpdb;
@@ -51,6 +50,15 @@ $confirm_code=md5(uniqid(rand()));
51
 
52
  $name = $_REQUEST['wp-email-capture-name'];
53
 
 
 
 
 
 
 
 
 
 
54
  $email = $_REQUEST['wp-email-capture-email'];
55
 
56
 
38
 
39
 
40
  function wp_email_capture_signup()
 
41
  {
42
 
43
  global $wpdb;
50
 
51
  $name = $_REQUEST['wp-email-capture-name'];
52
 
53
+ if (get_option("wp_email_capture_name_required") == 1 && $name == "")
54
+ {
55
+
56
+ $url = $_SERVER['PHP_SELF'] . "?wp_email_capture_error=Please%20Provide%20A%20Name";
57
+ wp_redirect($url);
58
+ die();
59
+
60
+ }
61
+
62
  $email = $_REQUEST['wp-email-capture-email'];
63
 
64
 
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Tags: email, marketing, capture, form, affiliates, mailing lists, email marketing, widget ready
3
  Requires at least: 3.0
4
  Tested up to: 3.3.1
5
- Version: 2.5
6
- Stable tag: 2.5
7
  Contributors: rhyswynne
8
  Donate link: http://wpemailcapture.com/pricing/
9
 
@@ -141,6 +141,12 @@ Please report any bugs, support and suggestions to the [WP Email Capture Support
141
  To donate to this plugin, please visit the [WP Email Capture Donations Page](http://www.wpemailcapture.com/pricing/)
142
 
143
  == Change Log ==
 
 
 
 
 
 
144
  = 2.5 (01/08/12) =
145
  * A nag (which you can hide) should you not have the plugin set up correctly with a subscription or confirmation page.
146
  * More CSS classes on each individual elements of the form.
2
  Tags: email, marketing, capture, form, affiliates, mailing lists, email marketing, widget ready
3
  Requires at least: 3.0
4
  Tested up to: 3.3.1
5
+ Version: 2.6
6
+ Stable tag: 2.6
7
  Contributors: rhyswynne
8
  Donate link: http://wpemailcapture.com/pricing/
9
 
141
  To donate to this plugin, please visit the [WP Email Capture Donations Page](http://www.wpemailcapture.com/pricing/)
142
 
143
  == Change Log ==
144
+ = 2.6 (07/10/12) =
145
+ * Added a checkbox that allows site owners to specify if "Name" is a required field.
146
+
147
+ = 2.5.1 (12/08/12) =
148
+ * Recoded the RSS feed fetching code so it works on more servers and doesn't use a http based referrer.
149
+
150
  = 2.5 (01/08/12) =
151
  * A nag (which you can hide) should you not have the plugin set up correctly with a subscription or confirmation page.
152
  * More CSS classes on each individual elements of the form.
wp-email-capture.php CHANGED
@@ -8,7 +8,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.5
12
 
13
  Author: Rhys Wynne
14
 
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.6
12
 
13
  Author: Rhys Wynne
14