WP Better Emails - Version 0.1.3

Version Description

  • Sender email and name are now optional
    • Fixes replacing URLs of plain text content to handle https protocol
Download this release

Release Info

Developer nlemoine
Plugin Icon 128x128 WP Better Emails
Version 0.1.3
Comparing to
See all releases

Code changes from version 0.1.2 to 0.1.3

Files changed (46) hide show
  1. css/wpbe-admin-style.css +0 -1
  2. langs/wp-better-emails-nl_NL.mo +0 -0
  3. langs/wp-better-emails-nl_NL.po +0 -0
  4. markitup/jquery.markitup.js +0 -0
  5. markitup/sets/html/images/bold.png +0 -0
  6. markitup/sets/html/images/clean.png +0 -0
  7. markitup/sets/html/images/h1.png +0 -0
  8. markitup/sets/html/images/h2.png +0 -0
  9. markitup/sets/html/images/h3.png +0 -0
  10. markitup/sets/html/images/h4.png +0 -0
  11. markitup/sets/html/images/h5.png +0 -0
  12. markitup/sets/html/images/h6.png +0 -0
  13. markitup/sets/html/images/image.png +0 -0
  14. markitup/sets/html/images/italic.png +0 -0
  15. markitup/sets/html/images/link.png +0 -0
  16. markitup/sets/html/images/list-bullet.png +0 -0
  17. markitup/sets/html/images/list-item.png +0 -0
  18. markitup/sets/html/images/list-numeric.png +0 -0
  19. markitup/sets/html/images/paragraph.png +0 -0
  20. markitup/sets/html/images/picture.png +0 -0
  21. markitup/sets/html/images/preview.png +0 -0
  22. markitup/sets/html/images/stroke.png +0 -0
  23. markitup/sets/html/readme.txt +0 -0
  24. markitup/sets/html/set.js +0 -0
  25. markitup/sets/html/style.css +0 -0
  26. markitup/skins/markitup/images/bg-container.png +0 -0
  27. markitup/skins/markitup/images/bg-editor-bbcode.png +0 -0
  28. markitup/skins/markitup/images/bg-editor-dotclear.png +0 -0
  29. markitup/skins/markitup/images/bg-editor-html.png +0 -0
  30. markitup/skins/markitup/images/bg-editor-json.png +0 -0
  31. markitup/skins/markitup/images/bg-editor-markdown.png +0 -0
  32. markitup/skins/markitup/images/bg-editor-textile.png +0 -0
  33. markitup/skins/markitup/images/bg-editor-wiki.png +0 -0
  34. markitup/skins/markitup/images/bg-editor-xml.png +0 -0
  35. markitup/skins/markitup/images/bg-editor.png +0 -0
  36. markitup/skins/markitup/images/handle.png +0 -0
  37. markitup/skins/markitup/images/menu.png +0 -0
  38. markitup/skins/markitup/images/submenu.png +0 -0
  39. markitup/skins/markitup/style.css +0 -0
  40. markitup/skins/simple/images/handle.png +0 -0
  41. markitup/skins/simple/images/menu.png +0 -0
  42. markitup/skins/simple/images/submenu.png +0 -0
  43. markitup/skins/simple/style.css +0 -0
  44. readme.txt +8 -4
  45. wpbe-options.php +5 -5
  46. wpbe.php +8 -13
css/wpbe-admin-style.css CHANGED
@@ -1,4 +1,3 @@
1
-
2
  #wpbe_options_tabs {
3
  overflow: hidden;
4
  height: 100%;
 
1
  #wpbe_options_tabs {
2
  overflow: hidden;
3
  height: 100%;
langs/wp-better-emails-nl_NL.mo CHANGED
File without changes
langs/wp-better-emails-nl_NL.po CHANGED
File without changes
markitup/jquery.markitup.js CHANGED
File without changes
markitup/sets/html/images/bold.png CHANGED
File without changes
markitup/sets/html/images/clean.png CHANGED
File without changes
markitup/sets/html/images/h1.png CHANGED
File without changes
markitup/sets/html/images/h2.png CHANGED
File without changes
markitup/sets/html/images/h3.png CHANGED
File without changes
markitup/sets/html/images/h4.png CHANGED
File without changes
markitup/sets/html/images/h5.png CHANGED
File without changes
markitup/sets/html/images/h6.png CHANGED
File without changes
markitup/sets/html/images/image.png CHANGED
File without changes
markitup/sets/html/images/italic.png CHANGED
File without changes
markitup/sets/html/images/link.png CHANGED
File without changes
markitup/sets/html/images/list-bullet.png CHANGED
File without changes
markitup/sets/html/images/list-item.png CHANGED
File without changes
markitup/sets/html/images/list-numeric.png CHANGED
File without changes
markitup/sets/html/images/paragraph.png CHANGED
File without changes
markitup/sets/html/images/picture.png CHANGED
File without changes
markitup/sets/html/images/preview.png CHANGED
File without changes
markitup/sets/html/images/stroke.png CHANGED
File without changes
markitup/sets/html/readme.txt CHANGED
File without changes
markitup/sets/html/set.js CHANGED
File without changes
markitup/sets/html/style.css CHANGED
File without changes
markitup/skins/markitup/images/bg-container.png CHANGED
File without changes
markitup/skins/markitup/images/bg-editor-bbcode.png CHANGED
File without changes
markitup/skins/markitup/images/bg-editor-dotclear.png CHANGED
File without changes
markitup/skins/markitup/images/bg-editor-html.png CHANGED
File without changes
markitup/skins/markitup/images/bg-editor-json.png CHANGED
File without changes
markitup/skins/markitup/images/bg-editor-markdown.png CHANGED
File without changes
markitup/skins/markitup/images/bg-editor-textile.png CHANGED
File without changes
markitup/skins/markitup/images/bg-editor-wiki.png CHANGED
File without changes
markitup/skins/markitup/images/bg-editor-xml.png CHANGED
File without changes
markitup/skins/markitup/images/bg-editor.png CHANGED
File without changes
markitup/skins/markitup/images/handle.png CHANGED
File without changes
markitup/skins/markitup/images/menu.png CHANGED
File without changes
markitup/skins/markitup/images/submenu.png CHANGED
File without changes
markitup/skins/markitup/style.css CHANGED
File without changes
markitup/skins/simple/images/handle.png CHANGED
File without changes
markitup/skins/simple/images/menu.png CHANGED
File without changes
markitup/skins/simple/images/submenu.png CHANGED
File without changes
markitup/skins/simple/style.css CHANGED
File without changes
readme.txt CHANGED
@@ -2,7 +2,7 @@
2
  Tags: email, emails, templates, notification, html emails, html, wp_mail, wpmu, multisite
3
  Requires at least: 2.8
4
  Tested up to: 3.1
5
- Stable tag: 0.1.2
6
 
7
  Adds a customizable good looking HTML template to all WP default plain/text emails and lets you set
8
  a custom sender name and email address.
@@ -26,7 +26,7 @@ replaced when sending the email.
26
 
27
  * Add some ads/sponsored links to every email sent with wordpress
28
  * Include some banners to promote a special event or feature of your website
29
- * Brand your emails to your website or client website
30
 
31
  = Internationalization =
32
 
@@ -34,7 +34,7 @@ WP Better Emails is currently available in :
34
 
35
  * English
36
  * French
37
- * Dutch (Thanks to [Glenn Mulleners](http://wp-expert.nl "Glenn Mulleners"))
38
 
39
  I'm looking for translators to extend to other languages. If you have translated the plugin in your language or want to,
40
  please let me know : plugins [ at ] artyshow-studio.fr
@@ -71,6 +71,10 @@ I included a few helpful links in the 'Help & support' tab, you will find comple
71
 
72
  == Changelog ==
73
 
 
 
 
 
74
  = 0.1.2 =
75
  * Added 3.1 compatibility
76
  * Dutch translation
@@ -79,4 +83,4 @@ I included a few helpful links in the 'Help & support' tab, you will find comple
79
  * French translation added
80
 
81
  = 0.1 =
82
- * WP Better Emails first release
2
  Tags: email, emails, templates, notification, html emails, html, wp_mail, wpmu, multisite
3
  Requires at least: 2.8
4
  Tested up to: 3.1
5
+ Stable tag: 0.1.3
6
 
7
  Adds a customizable good looking HTML template to all WP default plain/text emails and lets you set
8
  a custom sender name and email address.
26
 
27
  * Add some ads/sponsored links to every email sent with wordpress
28
  * Include some banners to promote a special event or feature of your website
29
+ * Brand the emails of your website or client website
30
 
31
  = Internationalization =
32
 
34
 
35
  * English
36
  * French
37
+ * Dutch by [Glenn Mulleners](http://wp-expert.nl "Glenn Mulleners")
38
 
39
  I'm looking for translators to extend to other languages. If you have translated the plugin in your language or want to,
40
  please let me know : plugins [ at ] artyshow-studio.fr
71
 
72
  == Changelog ==
73
 
74
+ = 0.1.3 =
75
+ * Sender email and name are now optional
76
+ * Fixes replacing URLs of plain text content to handle https protocol
77
+
78
  = 0.1.2 =
79
  * Added 3.1 compatibility
80
  * Dutch translation
83
  * French translation added
84
 
85
  = 0.1 =
86
+ * WP Better Emails first release
wpbe-options.php CHANGED
@@ -13,12 +13,12 @@
13
  <div id="tab1" class="wpbe_tab_content">
14
  <p><?php _e('Change the Wordpress default behavior when sending emails to users (i.e. comment notifications, lost password, etc.), set your own sender name and email address.', 'wp-better-emails'); ?></p>
15
  <table class="form-table">
16
- <tr valign="top" class="form-field form-required">
17
- <th scope="row"><label for="wpbe_from_name"><?php _e('From name', 'wp-better-emails'); ?> <span class="description">(<?php _e('required', 'wp-better-emails'); ?>)</span></label></th>
18
  <td><input type="text" id="wpbe_from_name" class="regular-text" name="wpbe_options[from_name]" value="<?php echo $options['from_name']; ?>" /></td>
19
  </tr>
20
- <tr valign="top" class="form-field form-required">
21
- <th scope="row"><label for="wpbe_from_email"><?php _e('From email address', 'wp-better-emails'); ?> <span class="description">(<?php _e('required', 'wp-better-emails'); ?>)</span></label></th>
22
  <td><input type="text" id="wpbe_from_email" class="regular-text" name="wpbe_options[from_email]" value="<?php echo $options['from_email']; ?>" /></td>
23
  </tr>
24
  </table>
@@ -49,7 +49,7 @@
49
  <textarea id="wpbe_template" name="wpbe_options[template]" cols="80" rows="20"><?php echo $options['template']; ?></textarea>
50
  <p>
51
  <label for="wpbe_preview_email"><?php _e('Send an email preview to', 'wp-better-emails'); ?></label>
52
- <input type="hidden" id="wpbe_nonce_preview" name="_ajax_nonce" value="<? echo wp_create_nonce( 'email_preview' ); ?>" />
53
  <input type="text" id="wpbe_preview_email" name="wpbe_preview_email" value="<?php echo get_option('admin_email'); ?>" />
54
  <a href="javascript:void(0);" class="button" id="wpbe_send_preview"><?php _e('Send', 'wp-better-emails'); ?></a><span id="loading"></span>
55
  <img src="<?php echo get_option('siteurl'); ?>/wp-admin/images/wpspin_light.gif" id="ajax-loading" style="visibility: hidden;" alt="Loading" />
13
  <div id="tab1" class="wpbe_tab_content">
14
  <p><?php _e('Change the Wordpress default behavior when sending emails to users (i.e. comment notifications, lost password, etc.), set your own sender name and email address.', 'wp-better-emails'); ?></p>
15
  <table class="form-table">
16
+ <tr valign="top" class="form-field">
17
+ <th scope="row"><label for="wpbe_from_name"><?php _e('From name', 'wp-better-emails'); ?></label></th>
18
  <td><input type="text" id="wpbe_from_name" class="regular-text" name="wpbe_options[from_name]" value="<?php echo $options['from_name']; ?>" /></td>
19
  </tr>
20
+ <tr valign="top" class="form-field">
21
+ <th scope="row"><label for="wpbe_from_email"><?php _e('From email address', 'wp-better-emails'); ?></label></th>
22
  <td><input type="text" id="wpbe_from_email" class="regular-text" name="wpbe_options[from_email]" value="<?php echo $options['from_email']; ?>" /></td>
23
  </tr>
24
  </table>
49
  <textarea id="wpbe_template" name="wpbe_options[template]" cols="80" rows="20"><?php echo $options['template']; ?></textarea>
50
  <p>
51
  <label for="wpbe_preview_email"><?php _e('Send an email preview to', 'wp-better-emails'); ?></label>
52
+ <input type="hidden" id="wpbe_nonce_preview" name="_ajax_nonce" value="<?php echo wp_create_nonce( 'email_preview' ); ?>" />
53
  <input type="text" id="wpbe_preview_email" name="wpbe_preview_email" value="<?php echo get_option('admin_email'); ?>" />
54
  <a href="javascript:void(0);" class="button" id="wpbe_send_preview"><?php _e('Send', 'wp-better-emails'); ?></a><span id="loading"></span>
55
  <img src="<?php echo get_option('siteurl'); ?>/wp-admin/images/wpspin_light.gif" id="ajax-loading" style="visibility: hidden;" alt="Loading" />
wpbe.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: WP Better Emails
4
  Plugin URI: http://wordpress.org/extend/plugins/wp-better-emails/
5
  Description: Beautify the default text/plain WP mails into fully customizable HTML emails.
6
- Version: 0.1.2
7
  Author: ArtyShow
8
  Author URI: http://wordpress.org/extend/plugins/wp-better-emails/
9
  */
@@ -53,7 +53,7 @@ function wpbe_plugin_init() {
53
  *
54
  * @param array $links Plugin links
55
  * @return array Plugins links with settings added
56
- */
57
  function wpbe_add_settings_link( $links ) {
58
  $links[] = '<a href="options-general.php?page=wpbe_options">' . __('Settings', 'wp-better-emails') . '</a>';
59
  return $links;
@@ -156,10 +156,7 @@ function wpbe_options_validate( $input ) {
156
  $from_email = strtolower($input['from_email']);
157
 
158
  // Checking emails
159
- if ( empty($from_email) ) {
160
- add_settings_error('wpbe_options', 'settings_updated', __('Please enter a sender email address.', 'wp-better-emails'));
161
- $input['from_email'] = '';
162
- } elseif ( !is_email($from_email) ) {
163
  add_settings_error('wpbe_options', 'settings_updated', __('Please enter a valid sender email address.', 'wp-better-emails'));
164
  $input['from_email'] = '';
165
  } else {
@@ -220,8 +217,8 @@ function wpbe_email_templatize( $body ) {
220
  $template = '';
221
  if( isset ($wpbe_options['template']) && !empty($wpbe_options['template']) )
222
  $template .= $wpbe_options['template'];
223
- $email = str_replace('%content%', $body, $template);
224
- return $email;
225
  }
226
 
227
  /**
@@ -265,13 +262,13 @@ function wpbe_check_template() {
265
  * @since 0.1
266
  * @global array $wpbe_options
267
  * @param string $from_email
268
- * @return string
269
  */
270
  function wpbe_set_from_email( $from_email ) {
271
  global $wpbe_options;
272
  if ( !empty($wpbe_options['from_email']) && is_email( $wpbe_options['from_email'] ) )
273
  return $wpbe_options['from_email'];
274
- return $email;
275
  }
276
 
277
  /**
@@ -332,8 +329,6 @@ function wpbe_send_html( $phpmailer ) {
332
  * @return string
333
  */
334
  function wpbe_esc_textlinks( $body ) {
335
- return preg_replace('#<(http://[^*]+)>#', '$1', $body);
336
  }
337
-
338
-
339
  ?>
3
  Plugin Name: WP Better Emails
4
  Plugin URI: http://wordpress.org/extend/plugins/wp-better-emails/
5
  Description: Beautify the default text/plain WP mails into fully customizable HTML emails.
6
+ Version: 0.1.3
7
  Author: ArtyShow
8
  Author URI: http://wordpress.org/extend/plugins/wp-better-emails/
9
  */
53
  *
54
  * @param array $links Plugin links
55
  * @return array Plugins links with settings added
56
+ */
57
  function wpbe_add_settings_link( $links ) {
58
  $links[] = '<a href="options-general.php?page=wpbe_options">' . __('Settings', 'wp-better-emails') . '</a>';
59
  return $links;
156
  $from_email = strtolower($input['from_email']);
157
 
158
  // Checking emails
159
+ if ( !empty($from_email) && !is_email($from_email) ) {
 
 
 
160
  add_settings_error('wpbe_options', 'settings_updated', __('Please enter a valid sender email address.', 'wp-better-emails'));
161
  $input['from_email'] = '';
162
  } else {
217
  $template = '';
218
  if( isset ($wpbe_options['template']) && !empty($wpbe_options['template']) )
219
  $template .= $wpbe_options['template'];
220
+ $html_email = str_replace('%content%', $body, $template);
221
+ return $html_email;
222
  }
223
 
224
  /**
262
  * @since 0.1
263
  * @global array $wpbe_options
264
  * @param string $from_email
265
+ * @return string
266
  */
267
  function wpbe_set_from_email( $from_email ) {
268
  global $wpbe_options;
269
  if ( !empty($wpbe_options['from_email']) && is_email( $wpbe_options['from_email'] ) )
270
  return $wpbe_options['from_email'];
271
+ return $from_email;
272
  }
273
 
274
  /**
329
  * @return string
330
  */
331
  function wpbe_esc_textlinks( $body ) {
332
+ return preg_replace('#<(https?://[^*]+)>#', '$1', $body);
333
  }
 
 
334
  ?>