Skip to content

Commit 52ecf83

Browse files
committed
fix bad replace in templates
1 parent 5fc21c4 commit 52ecf83

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

classes/helpers/default-settings.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@
271271
'name' => 'registration_member_admin_content',
272272
'label' => __( 'Content mail', 'mpt' ),
273273
'type' => 'textarea',
274-
'default' => __( "New member registration on your site %%blog_name%% :\n\nUsername: %%username%%\nMail: %%user_email%%", 'mpt' ),
274+
'default' => __( "New member registration on your site %%blog_name%% :\n\nUsername: %%user_name%%\nMail: %%user_email%%", 'mpt' ),
275275
'desc' => __( 'Values ​"​%% %%" will be replaced dynamically sending mail.', 'mpt' ),
276276
'sanitize_callback' => 'strip_tags'
277277
),
@@ -291,7 +291,7 @@
291291
'name' => 'register_member_content',
292292
'label' => __( 'Content mail', 'mpt' ),
293293
'type' => 'textarea',
294-
'default' => __( "Username: %%username%%\nPassword: %%password%%\n\n%%login_url%%", 'mpt' ),
294+
'default' => __( "Username: %%user_name%%\nPassword: %%password%%\n\n%%login_url%%", 'mpt' ),
295295
'desc' => __( 'Values ​"​%% %%" will be replaced dynamically sending mail.', 'mpt' ),
296296
'sanitize_callback' => 'strip_tags'
297297
),
@@ -338,7 +338,7 @@
338338
'name' => 'lost_password_admin_content',
339339
'label' => __( 'Content mail', 'mpt' ),
340340
'type' => 'textarea',
341-
'default' => __( 'Password Lost and Changed for member: %%username%%', 'mpt' ),
341+
'default' => __( 'Password Lost and Changed for member: %%user_name%%', 'mpt' ),
342342
'desc' => __( 'Values ​"​%% %%" will be replaced dynamically sending email', 'mpt' ),
343343
'sanitize_callback' => 'strip_tags'
344344
),
@@ -358,7 +358,7 @@
358358
'name' => 'lost_password_member_content',
359359
'label' => __( 'Content mail', 'mpt' ),
360360
'type' => 'textarea',
361-
'default' => __( "Someone requested that the password be reset for the following account:\n\n%%site_url%%\n\nUsername: %%username%%\n\nIf this was a mistake, just ignore this email and nothing will happen.\n\nTo reset your password, visit the following address:\n\n%%reset_pwd_link%%", 'mpt' ),
361+
'default' => __( "Someone requested that the password be reset for the following account:\n\n%%site_url%%\n\nUsername: %%user_name%%\n\nIf this was a mistake, just ignore this email and nothing will happen.\n\nTo reset your password, visit the following address:\n\n%%reset_pwd_link%%", 'mpt' ),
362362
'desc' => __( 'Values ​"​%% %%" will be replaced dynamically sending email', 'mpt' ),
363363
'sanitize_callback' => 'strip_tags'
364364
),

classes/models/class-member.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ public function password_change_notification( ) {
263263

264264
// Replace with good values
265265
$subject = str_replace( '%%blog_name%%', $blogname, $subject );
266-
$content = str_replace( '%%username%%', $this->username, $content );
266+
$content = str_replace( '%%user_name%%', $this->username, $content );
267267

268268
wp_mail( stripslashes( $mail ), $subject, $content );
269269
return true;
@@ -498,7 +498,7 @@ public function reset_password_link( ) {
498498

499499
// Build message text
500500
$message = str_replace( '%%site_url%%', network_site_url( ), $message );
501-
$message = str_replace( '%%username%%', $this->get_display_name( ), $message );
501+
$message = str_replace( '%%user_name%%', $this->get_display_name( ), $message );
502502
$message = str_replace( '%%reset_pwd_link%%', add_query_arg( array( 'mpt-action' => 'lost-password', 'key' => $key, 'id' => $this->id ), mpt_get_lost_password_permalink( ) ), $message );
503503

504504
// Allow plugins hooks

0 commit comments

Comments
 (0)