Skip to content

Commit 80353b6

Browse files
committed
Password reset form username field label now conditional based on the chosen authentication method.
1 parent e9e3bf1 commit 80353b6

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

includes/wpum-forms/class-wpum-form-password-recovery.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,19 @@ public function init_fields() {
9898
return;
9999
}
100100

101+
$authentication_method = wpum_get_option( 'login_method' );
102+
$username_label = __( 'Username or email', 'wp-user-manager' );
103+
if ( $authentication_method == 'username' ) {
104+
$username_label = __( 'Username', 'wp-user-manager' );
105+
}
106+
if ( $authentication_method == 'email' ) {
107+
$username_label = __( 'Email', 'wp-user-manager' );
108+
}
109+
101110
$this->fields = apply_filters( 'password_recover_form_fields', array(
102111
'user' => array(
103112
'username_email' => array(
104-
'label' => __( 'Username or email', 'wp-user-manager' ),
113+
'label' => $username_label,
105114
'type' => 'text',
106115
'required' => true,
107116
'placeholder' => '',

0 commit comments

Comments
 (0)