Theme My Login - Version 7.1.5

Version Description

  • Tested up to 6.0.1
  • Use raw $_POST value when setting custom user passwords
  • Fix the login link on AJAX lost password form confirmation
  • Implement fix for PATHINFO permalinks
Download this release

Release Info

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

Code changes from version 7.1.4 to 7.1.5

admin/assets/scripts/theme-my-login-admin.min.js CHANGED
@@ -1 +1 @@
1
- !function(i){i(function(){var t=i("#wp-auth-check-form");t.length&&t.attr("data-src",tmlAdmin.interimLoginUrl)})}(jQuery),function(o){o(function(){o(".tml-license-field").on("input",function(){var t=o(this),i=t.siblings(".tml-license-button").filter('[data-action="activate"]'),e=t.siblings(".tml-license-status");32==this.value.length?i.show():(i.hide(),e.html("").add(t).addClass("tml-license-inactive").removeClass("tml-license-valid tml-license-invalid"))}),o(".tml-license-button").on("click",function(t){var s=o(this),i=s.data("action"),e=s.siblings(".tml-license-button"),n=s.siblings(".tml-license-field"),l=s.siblings(".spinner"),a=s.siblings(".tml-license-status");t.preventDefault(),s.hide(),l.addClass("is-active"),o.post(tmlAdmin.ajaxUrl,{action:"tml-"+i+"-extension-license",extension:s.data("extension"),key:n.val()}).done(function(t){t.success?(e.show(),a.show().html(t.data).add(n).addClass("activate"==i?"tml-license-valid":"tml-license-inactive").removeClass("activate"==i?"tml-license-invalid":"tml-license-valid tml-license-invalid")):(s.show(),a.show().html(t.data).add(n).addClass("tml-license-invalid").removeClass("tml-license-valid"))}).fail(function(t,i,e){alert(e),s.show()}).always(function(){l.removeClass("is-active")})})})}(jQuery),function(i){i(function(){i("#tml-settings .postbox").length&&(postboxes.add_postbox_toggles(pagenow),i(".postbox").addClass("closed"),i(".metabox-holder").each(function(){var t=i(this);"off"==t.data("sortable")&&(t.find(".meta-box-sortables").sortable("destroy"),t.find(".postbox .hndle").css("cursor","default"))}))})}(jQuery),function(e){e(function(){e(".tml-notice").on("click",".notice-dismiss",function(t){var i=e(t.delegateTarget);e.post(ajaxurl,{action:"tml-dismiss-notice",notice:i.data("notice")})})})}(jQuery);
1
+ !function(i){i(function(){var t=i("#wp-auth-check-form");t.length&&t.attr("data-src",tmlAdmin.interimLoginUrl)})}(jQuery),function(o){o(function(){o(".tml-license-field").on("input",function(){var t=o(this),i=t.siblings(".tml-license-button").filter('[data-action="activate"]'),e=t.siblings(".tml-license-status");32==this.value.length?i.show():(i.hide(),e.html("").add(t).addClass("tml-license-inactive").removeClass("tml-license-valid tml-license-invalid"))}),o(".tml-license-button").on("click",function(t){var s=o(this),i=s.data("action"),e=s.siblings(".tml-license-button"),n=s.siblings(".tml-license-field"),l=s.siblings(".spinner"),a=s.siblings(".tml-license-status");t.preventDefault(),s.hide(),l.addClass("is-active"),o.post(tmlAdmin.ajaxUrl,{action:"tml-"+i+"-extension-license",extension:s.data("extension"),key:n.val()}).done(function(t){t.success?(e.show(),a.show().html(t.data).add(n).addClass("activate"==i?"tml-license-valid":"tml-license-inactive").removeClass("activate"==i?"tml-license-invalid":"tml-license-valid tml-license-invalid")):(s.show(),a.show().html(t.data).add(n).addClass("tml-license-invalid").removeClass("tml-license-valid"))}).fail(function(t,i,e){alert(e),s.show()}).always(function(){l.removeClass("is-active")})})})}(jQuery),function(i){i(function(){i("#tml-settings .postbox").length&&(postboxes.add_postbox_toggles(pagenow),i(".postbox").addClass("closed"),i(".metabox-holder").each(function(){var t=i(this);"off"==t.data("sortable")&&(t.find(".meta-box-sortables").sortable("destroy"),t.find(".postbox .hndle").css("cursor","default"))}))})}(jQuery),function(i){i(function(){i(".tml-notice").on("click",".notice-dismiss",function(t){t=i(t.delegateTarget);i.post(ajaxurl,{action:"tml-dismiss-notice",notice:t.data("notice")})})})}(jQuery);
admin/assets/styles/theme-my-login-admin.css CHANGED
@@ -1,13 +1,11 @@
1
  .tml-extensions-wrap {
2
  margin: 0 -15px;
3
  }
4
-
5
  .tml-extensions-wrap:after {
6
  content: "";
7
  clear: both;
8
  display: table;
9
  }
10
-
11
  .tml-extensions-wrap * {
12
  box-sizing: border-box;
13
  }
@@ -20,13 +18,11 @@
20
  margin: 15px;
21
  max-width: 350px;
22
  }
23
-
24
  @media (min-width: 576px) {
25
  .tml-extension {
26
  width: 40%;
27
  }
28
  }
29
-
30
  @media (min-width: 783px) {
31
  .tml-extension {
32
  width: 30%;
@@ -41,7 +37,6 @@
41
  .tml-extension-body {
42
  padding: 15px;
43
  }
44
-
45
  .tml-extension-body p {
46
  min-height: 5em;
47
  }
@@ -83,25 +78,21 @@
83
  text-decoration: none;
84
  }
85
 
86
- #tml-settings input[type="text"].tml-license-valid {
87
  background-color: #b5e1b9;
88
  border-color: #46b450;
89
  }
90
-
91
- #tml-settings input[type="text"].tml-license-invalid {
92
  background-color: #f1adad;
93
  border-color: #dc3232;
94
  }
95
-
96
  #tml-settings p.tml-license-valid {
97
  color: #46b450;
98
  }
99
-
100
  #tml-settings p.tml-license-invalid {
101
  color: #dc3232;
102
  }
103
-
104
  #tml-settings .spinner {
105
  float: none;
106
  margin-top: 0;
107
- }
1
  .tml-extensions-wrap {
2
  margin: 0 -15px;
3
  }
 
4
  .tml-extensions-wrap:after {
5
  content: "";
6
  clear: both;
7
  display: table;
8
  }
 
9
  .tml-extensions-wrap * {
10
  box-sizing: border-box;
11
  }
18
  margin: 15px;
19
  max-width: 350px;
20
  }
 
21
  @media (min-width: 576px) {
22
  .tml-extension {
23
  width: 40%;
24
  }
25
  }
 
26
  @media (min-width: 783px) {
27
  .tml-extension {
28
  width: 30%;
37
  .tml-extension-body {
38
  padding: 15px;
39
  }
 
40
  .tml-extension-body p {
41
  min-height: 5em;
42
  }
78
  text-decoration: none;
79
  }
80
 
81
+ #tml-settings input[type=text].tml-license-valid {
82
  background-color: #b5e1b9;
83
  border-color: #46b450;
84
  }
85
+ #tml-settings input[type=text].tml-license-invalid {
 
86
  background-color: #f1adad;
87
  border-color: #dc3232;
88
  }
 
89
  #tml-settings p.tml-license-valid {
90
  color: #46b450;
91
  }
 
92
  #tml-settings p.tml-license-invalid {
93
  color: #dc3232;
94
  }
 
95
  #tml-settings .spinner {
96
  float: none;
97
  margin-top: 0;
98
+ }
assets/scripts/theme-my-login.min.js CHANGED
@@ -1 +1 @@
1
- !function(n){n(".tml").on("submit",'form[data-ajax="1"]',function(a){var e=n(this),s=e.find(":input"),t=e.find(":submit"),r=n(a.delegateTarget).find(".tml-alerts");a.preventDefault(),r.empty(),s.prop("readonly",!0),t.prop("disabled",!0),n.ajax({data:e.serialize()+"&ajax=1",method:e.attr("method")||"get",url:e.attr("action")}).always(function(){s.prop("readonly",!1),t.prop("disabled",!1)}).done(function(a){a.success?a.data.refresh?location.reload(!0):a.data.redirect?location.href=a.data.redirect:a.data.notice&&r.hide().html(a.data.notice).fadeIn():r.hide().html(a.data.errors).fadeIn()}).fail(function(a,e,s){a.responseJSON.data.errors&&r.hide().html(a.responseJSON.data.errors).fadeIn()})})}(jQuery),function(s){s(function(){var a,e;if(!themeMyLogin.action)return;switch(a=s("#user_login"),themeMyLogin.action){case"activate":(e=s("#key")).length&&e.focus();break;case"lostpassword":case"retrievepassword":case"register":a.focus();break;case"resetpass":case"rp":s("#pass1").focus();break;case"login":-1!=themeMyLogin.errors.indexOf("invalid_username")&&a.val(""),a.val()?s("#user_pass").focus():a.focus()}})}(jQuery),function(s){function a(){var a=s("#pass1").val(),e=s("#pass-strength-result");if(e.removeClass("short bad good strong empty"),a&&""!==a.trim())switch(wp.passwordStrength.meter(a,wp.passwordStrength.userInputDisallowedList(),a)){case-1:e.addClass("bad").html(pwsL10n.unknown);break;case 2:e.addClass("bad").html(pwsL10n.bad);break;case 3:e.addClass("good").html(pwsL10n.good);break;case 4:e.addClass("strong").html(pwsL10n.strong);break;case 5:e.addClass("short").html(pwsL10n.mismatch);break;default:e.addClass("short").html(pwsL10n.short)}else e.addClass("empty").html(" ")}s(document).ready(function(){s("#pass1").val("").on("keyup paste",a)})}(jQuery);
1
+ !function(n){n(".tml").on("submit",'form[data-ajax="1"]',function(a){var e=n(this),s=e.find(":input"),t=e.find(":submit"),r=n(a.delegateTarget).find(".tml-alerts");a.preventDefault(),r.empty(),s.prop("readonly",!0),t.prop("disabled",!0),n.ajax({data:e.serialize()+"&ajax=1",method:e.attr("method")||"get",url:e.attr("action")}).always(function(){s.prop("readonly",!1),t.prop("disabled",!1)}).done(function(a){a.success?a.data.refresh?location.reload(!0):a.data.redirect?location.href=a.data.redirect:a.data.notice&&r.hide().html(a.data.notice).fadeIn():r.hide().html(a.data.errors).fadeIn()}).fail(function(a,e,s){a.responseJSON.data.errors&&r.hide().html(a.responseJSON.data.errors).fadeIn()})})}(jQuery),function(s){s(function(){var a,e;if(themeMyLogin.action)switch(a=s("#user_login"),themeMyLogin.action){case"activate":(e=s("#key")).length&&e.focus();break;case"lostpassword":case"retrievepassword":case"register":a.focus();break;case"resetpass":case"rp":s("#pass1").focus();break;case"login":-1!=themeMyLogin.errors.indexOf("invalid_username")&&a.val(""),(a.val()?s("#user_pass"):a).focus()}})}(jQuery),function(s){function a(){var a=s("#pass1").val(),e=s("#pass-strength-result");if(e.removeClass("short bad good strong empty"),a&&""!==a.trim())switch(wp.passwordStrength.meter(a,wp.passwordStrength.userInputDisallowedList(),a)){case-1:e.addClass("bad").html(pwsL10n.unknown);break;case 2:e.addClass("bad").html(pwsL10n.bad);break;case 3:e.addClass("good").html(pwsL10n.good);break;case 4:e.addClass("strong").html(pwsL10n.strong);break;case 5:e.addClass("short").html(pwsL10n.mismatch);break;default:e.addClass("short").html(pwsL10n.short)}else e.addClass("empty").html(" ")}s(document).ready(function(){s("#pass1").val("").on("keyup paste",a)})}(jQuery);
assets/styles/theme-my-login.css CHANGED
@@ -1,28 +1,22 @@
1
  .tml {
2
  font-size: 1em;
3
  }
4
-
5
  .tml * {
6
  box-sizing: border-box;
7
  }
8
-
9
  .tml .tml-field-wrap {
10
  margin-bottom: 1em;
11
  }
12
-
13
  .tml .tml-label {
14
  display: block;
15
  margin: 0.5em 0;
16
  }
17
-
18
  .tml .tml-checkbox + .tml-label {
19
  display: inline;
20
  }
21
-
22
  .tml .tml-field {
23
  width: 100%;
24
  }
25
-
26
  .tml .tml-description {
27
  display: block;
28
  font-size: 0.85em;
@@ -36,7 +30,6 @@
36
  margin: 0;
37
  padding: 0;
38
  }
39
-
40
  .tml .tml-error,
41
  .tml .tml-message,
42
  .tml .tml-success,
@@ -47,11 +40,9 @@
47
  margin: 0 0 1em;
48
  padding: 0.75em;
49
  }
50
-
51
  .tml .tml-error {
52
  border-left-color: #dc3232;
53
  }
54
-
55
  .tml .tml-success,
56
  .tml .tml-action-confirmaction .success {
57
  border-left-color: #46b450;
@@ -66,27 +57,23 @@
66
  margin-bottom: 1em;
67
  padding: 0.5em;
68
  }
69
-
70
  #pass-strength-result.strong {
71
  background-color: #c1e1b9;
72
  border-color: #83c373;
73
  opacity: 1;
74
  }
75
-
76
  #pass-strength-result.good {
77
  background-color: #ffe399;
78
  border-color: #ffc733;
79
  opacity: 1;
80
  }
81
-
82
  #pass-strength-result.bad {
83
  background-color: #fbc5a9;
84
  border-color: #f78b53;
85
  opacity: 1;
86
  }
87
-
88
  #pass-strength-result.short {
89
  background-color: #f1adad;
90
  border-color: #e35b5b;
91
  opacity: 1;
92
- }
1
  .tml {
2
  font-size: 1em;
3
  }
 
4
  .tml * {
5
  box-sizing: border-box;
6
  }
 
7
  .tml .tml-field-wrap {
8
  margin-bottom: 1em;
9
  }
 
10
  .tml .tml-label {
11
  display: block;
12
  margin: 0.5em 0;
13
  }
 
14
  .tml .tml-checkbox + .tml-label {
15
  display: inline;
16
  }
 
17
  .tml .tml-field {
18
  width: 100%;
19
  }
 
20
  .tml .tml-description {
21
  display: block;
22
  font-size: 0.85em;
30
  margin: 0;
31
  padding: 0;
32
  }
 
33
  .tml .tml-error,
34
  .tml .tml-message,
35
  .tml .tml-success,
40
  margin: 0 0 1em;
41
  padding: 0.75em;
42
  }
 
43
  .tml .tml-error {
44
  border-left-color: #dc3232;
45
  }
 
46
  .tml .tml-success,
47
  .tml .tml-action-confirmaction .success {
48
  border-left-color: #46b450;
57
  margin-bottom: 1em;
58
  padding: 0.5em;
59
  }
 
60
  #pass-strength-result.strong {
61
  background-color: #c1e1b9;
62
  border-color: #83c373;
63
  opacity: 1;
64
  }
 
65
  #pass-strength-result.good {
66
  background-color: #ffe399;
67
  border-color: #ffc733;
68
  opacity: 1;
69
  }
 
70
  #pass-strength-result.bad {
71
  background-color: #fbc5a9;
72
  border-color: #f78b53;
73
  opacity: 1;
74
  }
 
75
  #pass-strength-result.short {
76
  background-color: #f1adad;
77
  border-color: #e35b5b;
78
  opacity: 1;
79
+ }
includes/actions.php CHANGED
@@ -650,7 +650,7 @@ function tml_lost_password_handler() {
650
  $errors = retrieve_password();
651
  if ( ! is_wp_error( $errors ) ) {
652
  if ( tml_is_ajax_request() ) {
653
- tml_add_error( 'confirm', __( 'Check your email for the confirmation link, then visit the <a href="%s">login page</a>.' ), 'message' );
654
  tml_send_ajax_success( array(
655
  'notice' => tml_get_form()->render_errors(),
656
  ) );
650
  $errors = retrieve_password();
651
  if ( ! is_wp_error( $errors ) ) {
652
  if ( tml_is_ajax_request() ) {
653
+ tml_add_error( 'confirm', sprintf( __( 'Check your email for the confirmation link, then visit the <a href="%s">login page</a>.' ), wp_login_url() ), 'message' );
654
  tml_send_ajax_success( array(
655
  'notice' => tml_get_form()->render_errors(),
656
  ) );
includes/class-theme-my-login-action.php CHANGED
@@ -327,6 +327,8 @@ class Theme_My_Login_Action {
327
  * @return string The action URL.
328
  */
329
  public function get_url( $scheme = 'login', $network = null ) {
 
 
330
  if ( null === $network ) {
331
  $network = $this->network;
332
  }
@@ -334,7 +336,11 @@ class Theme_My_Login_Action {
334
  $function = $network ? 'network_home_url' : 'home_url';
335
 
336
  if ( tml_use_permalinks() ) {
337
- $path = user_trailingslashit( $this->get_slug() );
 
 
 
 
338
  $url = $function( $path, $scheme );
339
  } else {
340
  $url = $function( '?action=' . $this->get_name(), $scheme );
327
  * @return string The action URL.
328
  */
329
  public function get_url( $scheme = 'login', $network = null ) {
330
+ global $wp_rewrite;
331
+
332
  if ( null === $network ) {
333
  $network = $this->network;
334
  }
336
  $function = $network ? 'network_home_url' : 'home_url';
337
 
338
  if ( tml_use_permalinks() ) {
339
+ $path = user_trailingslashit( str_replace(
340
+ '%pagename%',
341
+ $this->get_slug(),
342
+ $wp_rewrite->get_page_permastruct()
343
+ ) );
344
  $url = $function( $path, $scheme );
345
  } else {
346
  $url = $function( '?action=' . $this->get_name(), $scheme );
includes/functions.php CHANGED
@@ -828,11 +828,11 @@ function tml_set_new_user_password( $user_id ) {
828
  return;
829
  }
830
 
831
- if ( ! $password = tml_get_request_value( 'user_pass1', 'post' ) ) {
832
  return;
833
  }
834
 
835
- wp_set_password( $password, $user_id );
836
  update_user_option( $user_id, 'default_password_nag', false, true );
837
  }
838
 
828
  return;
829
  }
830
 
831
+ if ( empty( $_POST['user_pass1'] ) ) {
832
  return;
833
  }
834
 
835
+ wp_set_password( $_POST['user_pass1'], $user_id );
836
  update_user_option( $user_id, 'default_password_nag', false, true );
837
  }
838
 
readme.txt CHANGED
@@ -2,7 +2,7 @@
2
  Contributors: thememylogin, jfarthing84
3
  Tags: login, register, password, branding, customize, widget, wp-login, wp-login.php
4
  Requires at least: 5.4
5
- Tested up to: 5.9
6
  Stable tag: trunk
7
 
8
  The ultimate login branding solution! Theme My Login offers matchless customization of your WordPress user experience!
@@ -59,6 +59,12 @@ Report bugs, suggest ideas and participate in development at [GitHub](https://gi
59
 
60
  == Changelog ==
61
 
 
 
 
 
 
 
62
  = 7.1.4 =
63
  * Hide form for "check your email" step of password reset
64
  * Use retrieve_password() from WP core and deprecate compat.php
2
  Contributors: thememylogin, jfarthing84
3
  Tags: login, register, password, branding, customize, widget, wp-login, wp-login.php
4
  Requires at least: 5.4
5
+ Tested up to: 6.0.1
6
  Stable tag: trunk
7
 
8
  The ultimate login branding solution! Theme My Login offers matchless customization of your WordPress user experience!
59
 
60
  == Changelog ==
61
 
62
+ = 7.1.5 =
63
+ * Tested up to 6.0.1
64
+ * Use raw $_POST value when setting custom user passwords
65
+ * Fix the login link on AJAX lost password form confirmation
66
+ * Implement fix for PATHINFO permalinks
67
+
68
  = 7.1.4 =
69
  * Hide form for "check your email" step of password reset
70
  * Use retrieve_password() from WP core and deprecate compat.php
theme-my-login.php CHANGED
@@ -10,7 +10,7 @@
10
  Plugin Name: Theme My Login
11
  Plugin URI: https://thememylogin.com
12
  Description: Creates an alternate login, registration and password recovery experience within your theme.
13
- Version: 7.1.4
14
  Author: Theme My Login
15
  Author URI: https://thememylogin.com
16
  License: GPLv2
@@ -24,7 +24,7 @@ Network: true
24
  *
25
  * @since 7.0
26
  */
27
- define( 'THEME_MY_LOGIN_VERSION', '7.1.4' );
28
 
29
  /**
30
  * Stores the path to TML.
10
  Plugin Name: Theme My Login
11
  Plugin URI: https://thememylogin.com
12
  Description: Creates an alternate login, registration and password recovery experience within your theme.
13
+ Version: 7.1.5
14
  Author: Theme My Login
15
  Author URI: https://thememylogin.com
16
  License: GPLv2
24
  *
25
  * @since 7.0
26
  */
27
+ define( 'THEME_MY_LOGIN_VERSION', '7.1.5' );
28
 
29
  /**
30
  * Stores the path to TML.