Theme My Login - Version 6.4.10

Version Description

  • Add weak password confirmation checkbox to password reset form
  • Introduce tml_enforce_private_site filter
  • Introduce tml_minimum_password_length filter
  • Hide admin bar checkbox on themed profiles when admin is disabled
Download this release

Release Info

Developer jfarthing84
Plugin Icon 128x128 Theme My Login
Version 6.4.10
Comparing to
See all releases

Code changes from version 6.4.9 to 6.4.10

includes/class-theme-my-login.php CHANGED
@@ -21,7 +21,7 @@ class Theme_My_Login extends Theme_My_Login_Abstract {
21
  * @since 6.3.2
22
  * @const string
23
  */
24
- const VERSION = '6.4.9';
25
 
26
  /**
27
  * Holds options key
@@ -198,7 +198,7 @@ class Theme_My_Login extends Theme_My_Login_Abstract {
198
  $this->errors = new WP_Error();
199
 
200
  if ( ! is_admin() && 'wp-login.php' != $pagenow && $this->get_option( 'enable_css' ) )
201
- wp_enqueue_style( 'theme-my-login', self::get_stylesheet(), false, $this->get_option( 'version' ) );
202
  }
203
 
204
  /**
21
  * @since 6.3.2
22
  * @const string
23
  */
24
+ const VERSION = '6.4.10';
25
 
26
  /**
27
  * Holds options key
198
  $this->errors = new WP_Error();
199
 
200
  if ( ! is_admin() && 'wp-login.php' != $pagenow && $this->get_option( 'enable_css' ) )
201
+ wp_enqueue_style( 'theme-my-login', self::get_stylesheet(), array( 'dashicons' ), $this->get_option( 'version' ) );
202
  }
203
 
204
  /**
modules/custom-passwords/custom-passwords.php CHANGED
@@ -153,7 +153,7 @@ class Theme_My_Login_Custom_Passwords extends Theme_My_Login_Abstract {
153
  $errors->add( 'password_mismatch', __( '<strong>ERROR</strong>: Please enter the same password in the two password fields.', 'theme-my-login' ) );
154
 
155
  // Make sure password is long enough
156
- } elseif ( strlen( $_POST['pass1'] ) < 6 ) {
157
  $errors->add( 'password_length', __( '<strong>ERROR</strong>: Your password must be at least 6 characters in length.', 'theme-my-login' ) );
158
 
159
  // All is good, assign password to a friendlier key
@@ -311,4 +311,3 @@ class Theme_My_Login_Custom_Passwords extends Theme_My_Login_Abstract {
311
  Theme_My_Login_Custom_Passwords::get_object();
312
 
313
  endif;
314
-
153
  $errors->add( 'password_mismatch', __( '<strong>ERROR</strong>: Please enter the same password in the two password fields.', 'theme-my-login' ) );
154
 
155
  // Make sure password is long enough
156
+ } elseif ( strlen( $_POST['pass1'] ) < apply_filters( 'tml_minimum_password_length', 6 ) ) {
157
  $errors->add( 'password_length', __( '<strong>ERROR</strong>: Your password must be at least 6 characters in length.', 'theme-my-login' ) );
158
 
159
  // All is good, assign password to a friendlier key
311
  Theme_My_Login_Custom_Passwords::get_object();
312
 
313
  endif;
 
modules/security/security.php CHANGED
@@ -117,7 +117,7 @@ class Theme_My_Login_Security extends Theme_My_Login_Abstract {
117
  * @access public
118
  */
119
  public function template_redirect() {
120
- if ( $this->get_option( 'private_site' ) ) {
121
  if ( ! ( is_user_logged_in() || Theme_My_Login::is_tml_page() ) ) {
122
  $redirect_to = apply_filters( 'tml_security_private_site_redirect', wp_login_url( $_SERVER['REQUEST_URI'], true ) );
123
  wp_safe_redirect( $redirect_to );
117
  * @access public
118
  */
119
  public function template_redirect() {
120
+ if ( $private_site = apply_filters( 'tml_enforce_private_site', $this->get_option( 'private_site' ) ) ) {
121
  if ( ! ( is_user_logged_in() || Theme_My_Login::is_tml_page() ) ) {
122
  $redirect_to = apply_filters( 'tml_security_private_site_redirect', wp_login_url( $_SERVER['REQUEST_URI'], true ) );
123
  wp_safe_redirect( $redirect_to );
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: jfarthing84
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=EZLVANPT4A9SW
4
  Tags: widget, login, registration, theme, custom, log in, register, sidebar, gravatar, redirection, e-mail
5
  Requires at least: 4.5
6
- Tested up to: 4.7.2
7
- Stable tag: 6.4.9
8
 
9
  Themes the WordPress login pages according to your theme.
10
 
@@ -57,6 +57,12 @@ Please visit https://wordpress.org/support/plugin/theme-my-login.
57
 
58
  == Changelog ==
59
 
 
 
 
 
 
 
60
  = 6.4.9 =
61
  * Fix fatal error from typo in previous release
62
 
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=EZLVANPT4A9SW
4
  Tags: widget, login, registration, theme, custom, log in, register, sidebar, gravatar, redirection, e-mail
5
  Requires at least: 4.5
6
+ Tested up to: 4.9.1
7
+ Stable tag: 6.4.10
8
 
9
  Themes the WordPress login pages according to your theme.
10
 
57
 
58
  == Changelog ==
59
 
60
+ = 6.4.10 =
61
+ * Add weak password confirmation checkbox to password reset form
62
+ * Introduce `tml_enforce_private_site` filter
63
+ * Introduce `tml_minimum_password_length` filter
64
+ * Hide admin bar checkbox on themed profiles when admin is disabled
65
+
66
  = 6.4.9 =
67
  * Fix fatal error from typo in previous release
68
 
templates/profile-form.php CHANGED
@@ -9,23 +9,26 @@ Theme My Login will always look in your theme's directory first, before using th
9
  <?php $template->the_errors(); ?>
10
  <form id="your-profile" action="<?php $template->the_action_url( 'profile', 'login_post' ); ?>" method="post">
11
  <?php wp_nonce_field( 'update-user_' . $current_user->ID ); ?>
12
- <p>
13
- <input type="hidden" name="from" value="profile" />
14
- <input type="hidden" name="checkuser_id" value="<?php echo $current_user->ID; ?>" />
15
- </p>
16
-
17
- <h3><?php _e( 'Personal Options', 'theme-my-login' ); ?></h3>
18
 
19
- <table class="tml-form-table">
20
- <tr class="tml-user-admin-bar-front-wrap">
21
- <th><label for="admin_bar_front"><?php _e( 'Toolbar', 'theme-my-login' )?></label></th>
22
- <td>
23
- <label for="admin_bar_front"><input type="checkbox" name="admin_bar_front" id="admin_bar_front" value="1"<?php checked( _get_admin_bar_pref( 'front', $profileuser->ID ) ); ?> />
24
- <?php _e( 'Show Toolbar when viewing site', 'theme-my-login' ); ?></label>
25
- </td>
26
- </tr>
27
- <?php do_action( 'personal_options', $profileuser ); ?>
28
- </table>
 
 
 
 
 
 
 
 
 
29
 
30
  <?php do_action( 'profile_personal_options', $profileuser ); ?>
31
 
9
  <?php $template->the_errors(); ?>
10
  <form id="your-profile" action="<?php $template->the_action_url( 'profile', 'login_post' ); ?>" method="post">
11
  <?php wp_nonce_field( 'update-user_' . $current_user->ID ); ?>
 
 
 
 
 
 
12
 
13
+ <input type="hidden" name="from" value="profile" />
14
+ <input type="hidden" name="checkuser_id" value="<?php echo $current_user->ID; ?>" />
15
+
16
+ <?php if ( apply_filters( 'show_admin_bar', true ) || has_action( 'personal_options' ) ) : ?>
17
+ <h3><?php _e( 'Personal Options', 'theme-my-login' ); ?></h3>
18
+
19
+ <table class="tml-form-table">
20
+ <?php if ( apply_filters( 'show_admin_bar', true ) ) : ?>
21
+ <tr class="tml-user-admin-bar-front-wrap">
22
+ <th><label for="admin_bar_front"><?php _e( 'Toolbar', 'theme-my-login' )?></label></th>
23
+ <td>
24
+ <label for="admin_bar_front"><input type="checkbox" name="admin_bar_front" id="admin_bar_front" value="1"<?php checked( _get_admin_bar_pref( 'front', $profileuser->ID ) ); ?> />
25
+ <?php _e( 'Show Toolbar when viewing site', 'theme-my-login' ); ?></label>
26
+ </td>
27
+ </tr>
28
+ <?php endif; ?>
29
+ <?php do_action( 'personal_options', $profileuser ); ?>
30
+ </table>
31
+ <?php endif; ?>
32
 
33
  <?php do_action( 'profile_personal_options', $profileuser ); ?>
34
 
templates/resetpass-form.php CHANGED
@@ -15,11 +15,20 @@ Theme My Login will always look in your theme's directory first, before using th
15
  </p>
16
 
17
  <div class="wp-pwd">
18
- <span class="password-input-wrapper">
19
- <input type="password" data-reveal="1" data-pw="<?php echo esc_attr( wp_generate_password( 16 ) ); ?>" name="pass1" id="pass1" class="input" size="20" value="" autocomplete="off" aria-describedby="pass-strength-result" />
20
- </span>
 
 
 
21
  <div id="pass-strength-result" class="hide-if-no-js" aria-live="polite"><?php _e( 'Strength indicator', 'theme-my-login' ); ?></div>
22
  </div>
 
 
 
 
 
 
23
  </div>
24
 
25
  <p class="user-pass2-wrap">
15
  </p>
16
 
17
  <div class="wp-pwd">
18
+ <div class="password-input-wrapper">
19
+ <input type="password" data-reveal="1" data-pw="<?php echo esc_attr( wp_generate_password( 16 ) ); ?>" name="pass1" id="pass1" class="input password-input" value="" autocomplete="off" aria-describedby="pass-strength-result" />
20
+ <span class="wp-hide-pw hide-if-no-js">
21
+ <span class="dashicons dashicons-hidden"></span>
22
+ </span>
23
+ </div>
24
  <div id="pass-strength-result" class="hide-if-no-js" aria-live="polite"><?php _e( 'Strength indicator', 'theme-my-login' ); ?></div>
25
  </div>
26
+ <div class="pw-weak">
27
+ <label>
28
+ <input type="checkbox" name="pw_weak" class="pw-checkbox" />
29
+ <?php _e( 'Confirm use of weak password', 'theme-my-login' ); ?>
30
+ </label>
31
+ </div>
32
  </div>
33
 
34
  <p class="user-pass2-wrap">
theme-my-login.css CHANGED
@@ -115,7 +115,7 @@
115
  border: 1px solid #ddd;
116
  color: #23282d;
117
  font-weight: 600;
118
- margin: 0;
119
  padding: 3px 5px;
120
  text-align: center;
121
  width: 100%;
@@ -128,30 +128,67 @@
128
  opacity: 1;
129
  }
130
 
 
 
 
 
 
131
  #pass-strength-result.bad {
132
  background-color: #fbc5a9;
133
  border-color: #f78b53;
134
  opacity: 1;
135
  }
136
 
 
 
 
 
 
137
  #pass-strength-result.good {
138
  background-color: #ffe399;
139
  border-color: #ffc733;
140
  opacity: 1;
141
  }
142
 
 
 
 
 
 
143
  #pass-strength-result.strong {
144
  background-color: #c1e1b9;
145
  border-color: #83c373;
146
  opacity: 1;
147
  }
148
 
149
- .pw-weak {
150
- display:none;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
151
  }
152
 
153
- .indicator-hint {
154
- padding-top: 8px;
 
 
 
 
 
 
155
  }
156
 
157
  #pass1,
115
  border: 1px solid #ddd;
116
  color: #23282d;
117
  font-weight: 600;
118
+ margin: -1px 0 1.5em;
119
  padding: 3px 5px;
120
  text-align: center;
121
  width: 100%;
128
  opacity: 1;
129
  }
130
 
131
+ #pass1.short,
132
+ #pass1-text.short {
133
+ border-color: #e35b5b;
134
+ }
135
+
136
  #pass-strength-result.bad {
137
  background-color: #fbc5a9;
138
  border-color: #f78b53;
139
  opacity: 1;
140
  }
141
 
142
+ #pass1.bad,
143
+ #pass1-text.bad {
144
+ border-color: #f78b53;
145
+ }
146
+
147
  #pass-strength-result.good {
148
  background-color: #ffe399;
149
  border-color: #ffc733;
150
  opacity: 1;
151
  }
152
 
153
+ #pass1.good,
154
+ #pass1-text.good {
155
+ border-color: #ffc733;
156
+ }
157
+
158
  #pass-strength-result.strong {
159
  background-color: #c1e1b9;
160
  border-color: #83c373;
161
  opacity: 1;
162
  }
163
 
164
+ #pass1.strong,
165
+ #pass1-text.strong {
166
+ border-color: #83c373;
167
+ }
168
+
169
+ .tml .password-input-wrapper {
170
+ display: table;
171
+ width: 100%;
172
+ }
173
+
174
+ .tml .input.password-input {
175
+ display: table-cell;
176
+ margin: 0;
177
+ }
178
+
179
+ .tml .pw-weak {
180
+ display: none;
181
+ margin-bottom: 1.5em;
182
  }
183
 
184
+ .tml .wp-hide-pw {
185
+ cursor: pointer;
186
+ display: table-cell;
187
+ margin: 0;
188
+ padding: 0 0.5em;
189
+ text-align: center;
190
+ vertical-align: middle;
191
+ white-space: nowrap;
192
  }
193
 
194
  #pass1,
theme-my-login.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Theme My Login
4
  Plugin URI: http://www.jfarthing.com/extend/wordpress-plugins/theme-my-login/
5
  Description: Themes the WordPress login, registration and forgot password pages according to your theme.
6
- Version: 6.4.9
7
  Author: Jeff Farthing
8
  Author URI: http://www.jfarthing.com
9
  Text Domain: theme-my-login
3
  Plugin Name: Theme My Login
4
  Plugin URI: http://www.jfarthing.com/extend/wordpress-plugins/theme-my-login/
5
  Description: Themes the WordPress login, registration and forgot password pages according to your theme.
6
+ Version: 6.4.10
7
  Author: Jeff Farthing
8
  Author URI: http://www.jfarthing.com
9
  Text Domain: theme-my-login