SB Welcome Email Editor - Version 5.0.4

Version Description

| May 11, 2022 = * Tweak: Replace [reset_url] with [reset_pass_url] to keep things uniform * Fixed: Some links were not rendered properly in some cases if Mail Content Type was set to HTML * Fixed: Wrong textdomains

Download this release

Release Info

Developer davidvongries
Plugin Icon wp plugin SB Welcome Email Editor
Version 5.0.4
Comparing to
See all releases

Code changes from version 5.0.3 to 5.0.4

class-setup.php CHANGED
@@ -71,15 +71,15 @@ class Setup {
71
  /* translators: %s: User login. */
72
  $user_welcome_email_body = __( 'Username:', 'welcome-email-editor' ) . ' [user_login]' . "<br><br>\r\n\r\n";
73
  $user_welcome_email_body .= __( 'To set your password, visit the following address:' ) . "<br><br>\r\n\r\n";
74
- $user_welcome_email_body .= '[reset_pass_url]<br><br>' . "\r\n\r\n";
75
- $user_welcome_email_body .= '[login_url]' . "\r\n";
76
 
77
  /* translators: %s: Site title. */
78
- $user_welome_email_body = __( 'New user registration on your site', 'welcome-email-editor' ) . " [blog_name]<br><br>\r\n\r\n";
79
  /* translators: %s: User login. */
80
- $user_welome_email_body .= __( 'Username:', 'welcome-email-editor' ) . " [user_login]<br><br>\r\n\r\n";
81
  /* translators: %s: User email address. */
82
- $user_welome_email_body .= __( 'Email:', 'welcome-email-editor' ) . " [user_email]<br><br>\r\n";
83
 
84
  $reset_password_message = __( 'Someone has requested a password reset for the following account:', 'welcome-email-editor' ) . "<br><br>\r\n\r\n";
85
  /* translators: %s: Site name. */
@@ -88,7 +88,7 @@ class Setup {
88
  $reset_password_message .= __( 'Username:', 'welcome-email-editor' ) . " [user_login]<br><br>\r\n\r\n";
89
  $reset_password_message .= __( 'If this was a mistake, ignore this email and nothing will happen.', 'welcome-email-editor' ) . "<br><br>\r\n\r\n";
90
  $reset_password_message .= __( 'To reset your password, visit the following address:', 'welcome-email-editor' ) . "<br><br>\r\n\r\n";
91
- $reset_password_message .= "[reset_url]\r\n";
92
 
93
  $defaults = array(
94
  // General settings.
@@ -106,7 +106,7 @@ class Setup {
106
 
107
  // Welcome email settings - for admin.
108
  'admin_new_user_notif_email_subject' => '[[blog_name]] ' . __( 'New User Registration', 'welcome-email-editor' ),
109
- 'admin_new_user_notif_email_body' => $user_welome_email_body,
110
  'admin_new_user_notif_email_custom_recipients' => '',
111
 
112
  // Reset password email settings.
71
  /* translators: %s: User login. */
72
  $user_welcome_email_body = __( 'Username:', 'welcome-email-editor' ) . ' [user_login]' . "<br><br>\r\n\r\n";
73
  $user_welcome_email_body .= __( 'To set your password, visit the following address:' ) . "<br><br>\r\n\r\n";
74
+ $user_welcome_email_body .= '<a href="[reset_pass_url]">[reset_pass_url]</a><br><br>' . "\r\n\r\n";
75
+ $user_welcome_email_body .= '<a href="[login_url]">[login_url]</a>' . "\r\n";
76
 
77
  /* translators: %s: Site title. */
78
+ $admin_welcome_email_body = __( 'New user registration on your site', 'welcome-email-editor' ) . " [blog_name]<br><br>\r\n\r\n";
79
  /* translators: %s: User login. */
80
+ $admin_welcome_email_body .= __( 'Username:', 'welcome-email-editor' ) . " [user_login]<br><br>\r\n\r\n";
81
  /* translators: %s: User email address. */
82
+ $admin_welcome_email_body .= __( 'Email:', 'welcome-email-editor' ) . " [user_email]<br><br>\r\n";
83
 
84
  $reset_password_message = __( 'Someone has requested a password reset for the following account:', 'welcome-email-editor' ) . "<br><br>\r\n\r\n";
85
  /* translators: %s: Site name. */
88
  $reset_password_message .= __( 'Username:', 'welcome-email-editor' ) . " [user_login]<br><br>\r\n\r\n";
89
  $reset_password_message .= __( 'If this was a mistake, ignore this email and nothing will happen.', 'welcome-email-editor' ) . "<br><br>\r\n\r\n";
90
  $reset_password_message .= __( 'To reset your password, visit the following address:', 'welcome-email-editor' ) . "<br><br>\r\n\r\n";
91
+ $reset_password_message .= '<a href="[reset_pass_url]">[reset_pass_url]</a>' . "\r\n";
92
 
93
  $defaults = array(
94
  // General settings.
106
 
107
  // Welcome email settings - for admin.
108
  'admin_new_user_notif_email_subject' => '[[blog_name]] ' . __( 'New User Registration', 'welcome-email-editor' ),
109
+ 'admin_new_user_notif_email_body' => $admin_welcome_email_body,
110
  'admin_new_user_notif_email_custom_recipients' => '',
111
 
112
  // Reset password email settings.
modules/settings/ajax/class-test-emails.php CHANGED
@@ -90,7 +90,7 @@ class Test_Emails {
90
 
91
  wp_new_user_notification( $current_user->ID, null, 'admin' );
92
 
93
- wp_send_json_success( __( 'Email has been sent successfully', 'welome-email-editor' ) );
94
 
95
  }
96
 
@@ -103,7 +103,7 @@ class Test_Emails {
103
 
104
  wp_new_user_notification( $current_user->ID, null, 'user' );
105
 
106
- wp_send_json_success( __( 'Email has been sent successfully', 'welome-email-editor' ) );
107
 
108
  }
109
 
@@ -116,7 +116,7 @@ class Test_Emails {
116
 
117
  retrieve_password( $current_user->user_login );
118
 
119
- wp_send_json_success( __( 'Email has been sent successfully', 'welome-email-editor' ) );
120
 
121
  }
122
 
90
 
91
  wp_new_user_notification( $current_user->ID, null, 'admin' );
92
 
93
+ wp_send_json_success( __( 'Email has been sent successfully', 'welcome-email-editor' ) );
94
 
95
  }
96
 
103
 
104
  wp_new_user_notification( $current_user->ID, null, 'user' );
105
 
106
+ wp_send_json_success( __( 'Email has been sent successfully', 'welcome-email-editor' ) );
107
 
108
  }
109
 
116
 
117
  retrieve_password( $current_user->user_login );
118
 
119
+ wp_send_json_success( __( 'Email has been sent successfully', 'welcome-email-editor' ) );
120
 
121
  }
122
 
modules/settings/class-settings-output.php CHANGED
@@ -158,7 +158,8 @@ class Settings_Output extends Base_Output {
158
  $find = array(
159
  '[blog_name]',
160
  '[site_url]',
161
- '[reset_url]',
 
162
  '[user_login]',
163
  '[first_name]',
164
  '[last_name]',
@@ -168,6 +169,7 @@ class Settings_Output extends Base_Output {
168
  $blogname,
169
  $site_url,
170
  $reset_url,
 
171
  $user_login,
172
  $user_data->first_name,
173
  $user_data->last_name,
158
  $find = array(
159
  '[blog_name]',
160
  '[site_url]',
161
+ '[reset_url]', // Deprecated, this is here for compatibility purpose.
162
+ '[reset_pass_url]',
163
  '[user_login]',
164
  '[first_name]',
165
  '[last_name]',
169
  $blogname,
170
  $site_url,
171
  $reset_url,
172
+ $reset_url,
173
  $user_login,
174
  $user_data->first_name,
175
  $user_data->last_name,
modules/settings/templates/settings-template.php CHANGED
@@ -92,7 +92,7 @@ return function () {
92
 
93
  <div class="heatbox-sidebar">
94
  <div class="heatbox weed-tags-metabox">
95
- <h2><?php _e( 'Template Tags', 'welome-email-editor' ); ?></h2>
96
  <div class="heatbox-content">
97
  <p><?php _e( 'Use the template tags below in any fields to output certain information.', 'welcome-email-editor' ); ?></p>
98
  <p class="tags-wrapper">
@@ -103,7 +103,7 @@ return function () {
103
 
104
  <?php if ( defined( 'BP_PLUGIN_URL' ) ) : ?>
105
  <div class="heatbox weed-tags-metabox">
106
- <h2><?php _e( 'BuddyPress Template Tags', 'welome-email-editor' ); ?></h2>
107
  <div class="heatbox-content">
108
  <p><?php _e( 'Use the template tag below in your <strong>Admin Email</strong>.', 'welcome-email-editor' ); ?></p>
109
  <p><?php _e( 'This will print BuddyPress custom fields.', 'welcome-email-editor' ); ?></p>
@@ -115,7 +115,7 @@ return function () {
115
  <?php endif; ?>
116
 
117
  <div class="heatbox weed-tags-metabox">
118
- <h2><?php _e( 'Debugging', 'welome-email-editor' ); ?></h2>
119
  <div class="heatbox-content">
120
  <p><?php _e( 'Use the template tag below in your <strong>Admin Email</strong> for debugging.', 'welcome-email-editor' ); ?></p>
121
  <p><?php _e( 'This will print $_REQUEST.', 'welcome-email-editor' ); ?></p>
92
 
93
  <div class="heatbox-sidebar">
94
  <div class="heatbox weed-tags-metabox">
95
+ <h2><?php _e( 'Template Tags', 'welcome-email-editor' ); ?></h2>
96
  <div class="heatbox-content">
97
  <p><?php _e( 'Use the template tags below in any fields to output certain information.', 'welcome-email-editor' ); ?></p>
98
  <p class="tags-wrapper">
103
 
104
  <?php if ( defined( 'BP_PLUGIN_URL' ) ) : ?>
105
  <div class="heatbox weed-tags-metabox">
106
+ <h2><?php _e( 'BuddyPress Template Tags', 'welcome-email-editor' ); ?></h2>
107
  <div class="heatbox-content">
108
  <p><?php _e( 'Use the template tag below in your <strong>Admin Email</strong>.', 'welcome-email-editor' ); ?></p>
109
  <p><?php _e( 'This will print BuddyPress custom fields.', 'welcome-email-editor' ); ?></p>
115
  <?php endif; ?>
116
 
117
  <div class="heatbox weed-tags-metabox">
118
+ <h2><?php _e( 'Debugging', 'welcome-email-editor' ); ?></h2>
119
  <div class="heatbox-content">
120
  <p><?php _e( 'Use the template tag below in your <strong>Admin Email</strong> for debugging.', 'welcome-email-editor' ); ?></p>
121
  <p><?php _e( 'This will print $_REQUEST.', 'welcome-email-editor' ); ?></p>
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: davidvongries, seanbarton
3
  Tags: welcome email, wordpress welcome email, welcome email editor, mail, email, new user email, password reminder, lost password, welcome email attachment, mail attachment, email attachment
4
  Requires at least: 4.6
5
- Tested up to: 5.9
6
- Stable tag: 5.0.3
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -55,6 +55,10 @@ Since version 4.3 the password is no longer sent to the user via email and inste
55
  1. Welcome Email Editor Settings Page
56
 
57
  == Changelog ==
 
 
 
 
58
  = 5.0.3 | April 27, 2022 =
59
  * Fixed: Wrong link target in the recommended section
60
  = 5.0.2 | March 02, 2022 =
2
  Contributors: davidvongries, seanbarton
3
  Tags: welcome email, wordpress welcome email, welcome email editor, mail, email, new user email, password reminder, lost password, welcome email attachment, mail attachment, email attachment
4
  Requires at least: 4.6
5
+ Tested up to: 6.0
6
+ Stable tag: 5.0.4
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
55
  1. Welcome Email Editor Settings Page
56
 
57
  == Changelog ==
58
+ = 5.0.4 | May 11, 2022 =
59
+ * Tweak: Replace [reset_url] with [reset_pass_url] to keep things uniform
60
+ * Fixed: Some links were not rendered properly in some cases if Mail Content Type was set to HTML
61
+ * Fixed: Wrong textdomains
62
  = 5.0.3 | April 27, 2022 =
63
  * Fixed: Wrong link target in the recommended section
64
  = 5.0.2 | March 02, 2022 =
sb_welcome_email_editor.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Plugin Name: Welcome Email Editor
4
  * Description: Welcome Email Editor allows you to change the default WordPress welcome & reset password emails.
5
- * Version: 5.0.3
6
  * Author: David Vongries
7
  * Author URI: https://davidvongries.com/
8
  * Text Domain: welcome-email-editor
@@ -15,7 +15,7 @@ defined( 'ABSPATH' ) || die( "Can't access directly" );
15
  // Plugin constants.
16
  define( 'WEED_PLUGIN_DIR', rtrim( plugin_dir_path( __FILE__ ), '/' ) );
17
  define( 'WEED_PLUGIN_URL', rtrim( plugin_dir_url( __FILE__ ), '/' ) );
18
- define( 'WEED_PLUGIN_VERSION', '5.0.3' );
19
  define( 'WEED_PLUGIN_NAME', 'Welcome Email Editor' );
20
  define( 'WEED_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
21
 
2
  /**
3
  * Plugin Name: Welcome Email Editor
4
  * Description: Welcome Email Editor allows you to change the default WordPress welcome & reset password emails.
5
+ * Version: 5.0.4
6
  * Author: David Vongries
7
  * Author URI: https://davidvongries.com/
8
  * Text Domain: welcome-email-editor
15
  // Plugin constants.
16
  define( 'WEED_PLUGIN_DIR', rtrim( plugin_dir_path( __FILE__ ), '/' ) );
17
  define( 'WEED_PLUGIN_URL', rtrim( plugin_dir_url( __FILE__ ), '/' ) );
18
+ define( 'WEED_PLUGIN_VERSION', '5.0.4' );
19
  define( 'WEED_PLUGIN_NAME', 'Welcome Email Editor' );
20
  define( 'WEED_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
21
 
wp-new-user-notification.php CHANGED
@@ -321,7 +321,7 @@ if ( ! function_exists( 'wp_new_user_notification' ) ) {
321
  $admin_email,
322
  wp_login_url(),
323
  $reset_pass_url,
324
- '<a href="' . $reset_pass_url . '" target="_blank">' . __( 'Click to set', 'welome-email-editor' ) . '</a>',
325
  '*****',
326
  '*****',
327
  );
321
  $admin_email,
322
  wp_login_url(),
323
  $reset_pass_url,
324
+ '<a href="' . $reset_pass_url . '" target="_blank">' . __( 'Click to set', 'welcome-email-editor' ) . '</a>',
325
  '*****',
326
  '*****',
327
  );