Theme My Login - Version 7.0.11

Version Description

  • Ensure that actions use their own page
  • Ensure the lostpassword action uses a TML link
  • Fix undefined variable notice when recovering password
  • Fix password strength meter script loading on every request
  • Only show TML notices on the Dashboard or TML pages
  • Fix undefined variable notices when handling an action
  • Fix stomping of other plugins actions
Download this release

Release Info

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

Code changes from version 7.0.10 to 7.0.11

admin/functions.php CHANGED
@@ -142,6 +142,13 @@ function tml_admin_enqueue_style_and_scripts() {
142
  function tml_admin_notices() {
143
  global $plugin_page;
144
 
 
 
 
 
 
 
 
145
  // Bail if the user cannot activate plugins
146
  if ( ! current_user_can( 'activate_plugins' ) ) {
147
  return;
142
  function tml_admin_notices() {
143
  global $plugin_page;
144
 
145
+ $screen = get_current_screen();
146
+
147
+ // Bail if not on Dashboard or a TML page
148
+ if ( 'dashboard' != $screen->id && 'theme-my-login' != $screen->parent_base ) {
149
+ return;
150
+ }
151
+
152
  // Bail if the user cannot activate plugins
153
  if ( ! current_user_can( 'activate_plugins' ) ) {
154
  return;
includes/actions.php CHANGED
@@ -287,6 +287,23 @@ function tml_action_handler() {
287
  }
288
  }
289
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
290
  nocache_headers();
291
 
292
  // Set a test cookie to test if cookies are enabled
287
  }
288
  }
289
 
290
+ // Redirect other actions from the login action
291
+ if ( $action = tml_get_request_value( 'action' ) ) {
292
+ if ( tml_is_action( 'login' ) && 'login' != $action ) {
293
+ // Fix some alias actions
294
+ if ( 'retrievepassword' == $action ) {
295
+ $action = 'lostpassword';
296
+ } elseif ( 'rp' == $action ) {
297
+ $action = 'resetpass';
298
+ }
299
+
300
+ if ( $url = tml_get_action_url( $action ) ) {
301
+ wp_redirect( $url );
302
+ exit;
303
+ }
304
+ }
305
+ }
306
+
307
  nocache_headers();
308
 
309
  // Set a test cookie to test if cookies are enabled
includes/compat.php CHANGED
@@ -140,14 +140,14 @@ function tml_retrieve_password_notification( $user, $key ) {
140
  * @type string $message The body of the email.
141
  * @type string $headers The headers of the email.
142
  * }
143
- * @param WP_User $user The user object..
144
- * @param string $blogname The site title.
145
  */
146
- $retrieve_password_email = apply_filters( 'tml_retrieve_password_email', $retrieve_password_email, $user, $blogname );
147
 
148
  if ( $retrieve_password_email['message'] && ! wp_mail(
149
  $retrieve_password_email['to'],
150
- wp_specialchars_decode( sprintf( $retrieve_password_email['subject'], $blogname ) ),
151
  $retrieve_password_email['message'],
152
  $retrieve_password_email['headers']
153
  ) ) {
140
  * @type string $message The body of the email.
141
  * @type string $headers The headers of the email.
142
  * }
143
+ * @param WP_User $user The user object..
144
+ * @param string $site_name The site title.
145
  */
146
+ $retrieve_password_email = apply_filters( 'tml_retrieve_password_email', $retrieve_password_email, $user, $site_name );
147
 
148
  if ( $retrieve_password_email['message'] && ! wp_mail(
149
  $retrieve_password_email['to'],
150
+ wp_specialchars_decode( sprintf( $retrieve_password_email['subject'], $site_name ) ),
151
  $retrieve_password_email['message'],
152
  $retrieve_password_email['headers']
153
  ) ) {
includes/functions.php CHANGED
@@ -50,9 +50,9 @@ function tml_parse_request( $wp ) {
50
  }
51
  }
52
 
53
- // Default the action to login if an action is set and it's not a TML action
54
- if ( ! empty( $action ) && ! tml_action_exists( $action ) ) {
55
- $action = 'login';
56
  }
57
 
58
  // Set the proper action
@@ -247,7 +247,12 @@ function tml_enqueue_styles() {
247
  function tml_enqueue_scripts() {
248
  $suffix = SCRIPT_DEBUG ? '' : '.min';
249
 
250
- wp_enqueue_script( 'theme-my-login', THEME_MY_LOGIN_URL . "assets/scripts/theme-my-login$suffix.js", array( 'jquery', 'password-strength-meter' ), THEME_MY_LOGIN_VERSION );
 
 
 
 
 
251
  wp_localize_script( 'theme-my-login', 'themeMyLogin', array(
252
  'action' => tml_is_action() ? tml_get_action()->get_name() : '',
253
  'errors' => tml_get_errors()->get_error_codes(),
@@ -399,11 +404,6 @@ function tml_filter_site_url( $url, $path, $scheme ) {
399
  */
400
  function tml_filter_logout_url( $url, $redirect ) {
401
 
402
- // Bail if not using permalinks
403
- if ( ! tml_use_permalinks() ) {
404
- return $url;
405
- }
406
-
407
  // Bail if logout action doesn't exist for some reason
408
  if ( ! tml_action_exists( 'logout' ) ) {
409
  return $url;
@@ -423,6 +423,33 @@ function tml_filter_logout_url( $url, $redirect ) {
423
  return $url;
424
  }
425
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
426
  /**
427
  * Filter the result of get_edit_post_link().
428
  *
50
  }
51
  }
52
 
53
+ // Bail if not a TML action
54
+ if ( ! tml_action_exists( $action ) ) {
55
+ return;
56
  }
57
 
58
  // Set the proper action
247
  function tml_enqueue_scripts() {
248
  $suffix = SCRIPT_DEBUG ? '' : '.min';
249
 
250
+ $dependencies = array( 'jquery' );
251
+ if ( tml_is_action( 'resetpass' ) || ( tml_is_action( 'register' ) && tml_allow_user_passwords() ) ) {
252
+ $dependencies[] = 'password-strength-meter';
253
+ }
254
+
255
+ wp_enqueue_script( 'theme-my-login', THEME_MY_LOGIN_URL . "assets/scripts/theme-my-login$suffix.js", $dependencies, THEME_MY_LOGIN_VERSION );
256
  wp_localize_script( 'theme-my-login', 'themeMyLogin', array(
257
  'action' => tml_is_action() ? tml_get_action()->get_name() : '',
258
  'errors' => tml_get_errors()->get_error_codes(),
404
  */
405
  function tml_filter_logout_url( $url, $redirect ) {
406
 
 
 
 
 
 
407
  // Bail if logout action doesn't exist for some reason
408
  if ( ! tml_action_exists( 'logout' ) ) {
409
  return $url;
423
  return $url;
424
  }
425
 
426
+ /**
427
+ * Filter the result of wp_lostpassword_url().
428
+ *
429
+ * @since 7.0.11
430
+ *
431
+ * @param string $url The URL.
432
+ * @param string $redirect The redirect.
433
+ * @return string The lostpassword URL.
434
+ */
435
+ function tml_filter_lostpassword_url( $url, $redirect ) {
436
+
437
+ // Bail if logout action doesn't exist for some reason
438
+ if ( ! tml_action_exists( 'lostpassword' ) ) {
439
+ return $url;
440
+ }
441
+
442
+ // Get the lostpassword URL
443
+ $url = tml_get_action_url( 'lostpassword' );
444
+
445
+ // Add the redirect query argument if needed
446
+ if ( ! empty( $redirect ) ) {
447
+ $url = add_query_arg( 'redirect_to', urlencode( $redirect ), $url );
448
+ }
449
+
450
+ return $url;
451
+ }
452
+
453
  /**
454
  * Filter the result of get_edit_post_link().
455
  *
includes/hooks.php CHANGED
@@ -69,9 +69,10 @@ add_filter( 'get_edit_post_link', 'tml_filter_get_edit_post_link', 10, 2 );
69
  add_filter( 'comments_array', 'tml_filter_comments_array', 10, 1 );
70
 
71
  // URLs
72
- add_filter( 'site_url', 'tml_filter_site_url', 10, 3 );
73
- add_filter( 'network_site_url', 'tml_filter_site_url', 10, 3 );
74
- add_filter( 'logout_url', 'tml_filter_logout_url', 10, 2 );
 
75
 
76
  // Authentication
77
  add_filter( 'authenticate', 'tml_enforce_login_type', 20, 3 );
69
  add_filter( 'comments_array', 'tml_filter_comments_array', 10, 1 );
70
 
71
  // URLs
72
+ add_filter( 'site_url', 'tml_filter_site_url', 10, 3 );
73
+ add_filter( 'network_site_url', 'tml_filter_site_url', 10, 3 );
74
+ add_filter( 'logout_url', 'tml_filter_logout_url', 10, 2 );
75
+ add_filter( 'lostpassword_url', 'tml_filter_lostpassword_url', 10, 2 );
76
 
77
  // Authentication
78
  add_filter( 'authenticate', 'tml_enforce_login_type', 20, 3 );
languages/theme-my-login.pot CHANGED
@@ -2,45 +2,45 @@
2
  # This file is distributed under the same license as the Theme My Login package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Theme My Login 7.0.10\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/theme-my-login\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "POT-Creation-Date: 2018-08-02T18:14:45-04:00\n"
13
- "PO-Revision-Date: 2018-08-02T18:14:45-04:00\n"
14
  "X-Domain: theme-my-login\n"
15
 
16
- #: includes/functions.php:467
17
- #: admin/functions.php:271
18
  msgid "Theme My Login Actions"
19
  msgstr ""
20
 
21
- #: includes/functions.php:468
22
  msgid "Theme My Login Action"
23
  msgstr ""
24
 
25
- #: includes/functions.php:496
26
  #: includes/functions.php:523
27
- #: includes/functions.php:538
 
28
  msgid "TML Action"
29
  msgstr ""
30
 
31
- #: includes/functions.php:600
32
  msgid "<strong>ERROR</strong>: Please enter a password."
33
  msgstr ""
34
 
35
- #: includes/functions.php:603
36
  msgid "<strong>ERROR</strong>: Passwords may not contain the character \"\\\"."
37
  msgstr ""
38
 
39
- #: includes/functions.php:606
40
  msgid "<strong>ERROR</strong>: Please enter the same password in both password fields."
41
  msgstr ""
42
 
43
- #: includes/functions.php:622
44
  msgid "If you have already set your own password, you may disregard this email and use the password you have already set."
45
  msgstr ""
46
 
@@ -48,7 +48,7 @@ msgstr ""
48
  msgid "Your Data Request"
49
  msgstr ""
50
 
51
- #: includes/actions.php:427
52
  msgid "Registration complete. You may now log in."
53
  msgstr ""
54
 
@@ -119,37 +119,37 @@ msgstr ""
119
  msgid "Extensions"
120
  msgstr ""
121
 
122
- #: admin/functions.php:156
123
  msgid "As a token of our gratitude, we would like to offer your an incentive for upgrading Theme My Login to version 7.0. For a limited time, we are offering a <strong>20% discount</strong> when you use the code <strong>SAVINGFACE</strong> at checkout. Act now - this offer won't last!"
124
  msgstr ""
125
 
126
- #: admin/functions.php:172
127
  msgid "A new <strong>Theme My Login</strong> extension is available!"
128
  msgstr ""
129
 
130
- #: admin/functions.php:179
131
  #: admin/extensions.php:95
132
  msgid "Get This Extension"
133
  msgstr ""
134
 
135
- #: admin/functions.php:379
136
- #: admin/functions.php:392
137
  msgid "Deactivating Theme My Login"
138
  msgstr ""
139
 
140
- #: admin/functions.php:380
141
  msgid "Before you go, please take a moment to let us know why you are deactivating:"
142
  msgstr ""
143
 
144
- #: admin/functions.php:384
145
  msgid "Submitting this form will also include your WordPress version, TML version, PHP version and whether this is a multisite installation or not."
146
  msgstr ""
147
 
148
- #: admin/functions.php:387
149
  msgid "Submit & Deactivate"
150
  msgstr ""
151
 
152
- #: admin/functions.php:388
153
  msgid "No thanks, just deactivate"
154
  msgstr ""
155
 
2
  # This file is distributed under the same license as the Theme My Login package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Theme My Login 7.0.11\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/theme-my-login\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "POT-Creation-Date: 2018-09-19T14:31:25-04:00\n"
13
+ "PO-Revision-Date: 2018-09-19T14:31:25-04:00\n"
14
  "X-Domain: theme-my-login\n"
15
 
16
+ #: includes/functions.php:494
17
+ #: admin/functions.php:278
18
  msgid "Theme My Login Actions"
19
  msgstr ""
20
 
21
+ #: includes/functions.php:495
22
  msgid "Theme My Login Action"
23
  msgstr ""
24
 
 
25
  #: includes/functions.php:523
26
+ #: includes/functions.php:550
27
+ #: includes/functions.php:565
28
  msgid "TML Action"
29
  msgstr ""
30
 
31
+ #: includes/functions.php:627
32
  msgid "<strong>ERROR</strong>: Please enter a password."
33
  msgstr ""
34
 
35
+ #: includes/functions.php:630
36
  msgid "<strong>ERROR</strong>: Passwords may not contain the character \"\\\"."
37
  msgstr ""
38
 
39
+ #: includes/functions.php:633
40
  msgid "<strong>ERROR</strong>: Please enter the same password in both password fields."
41
  msgstr ""
42
 
43
+ #: includes/functions.php:649
44
  msgid "If you have already set your own password, you may disregard this email and use the password you have already set."
45
  msgstr ""
46
 
48
  msgid "Your Data Request"
49
  msgstr ""
50
 
51
+ #: includes/actions.php:444
52
  msgid "Registration complete. You may now log in."
53
  msgstr ""
54
 
119
  msgid "Extensions"
120
  msgstr ""
121
 
122
+ #: admin/functions.php:163
123
  msgid "As a token of our gratitude, we would like to offer your an incentive for upgrading Theme My Login to version 7.0. For a limited time, we are offering a <strong>20% discount</strong> when you use the code <strong>SAVINGFACE</strong> at checkout. Act now - this offer won't last!"
124
  msgstr ""
125
 
126
+ #: admin/functions.php:179
127
  msgid "A new <strong>Theme My Login</strong> extension is available!"
128
  msgstr ""
129
 
130
+ #: admin/functions.php:186
131
  #: admin/extensions.php:95
132
  msgid "Get This Extension"
133
  msgstr ""
134
 
135
+ #: admin/functions.php:386
136
+ #: admin/functions.php:399
137
  msgid "Deactivating Theme My Login"
138
  msgstr ""
139
 
140
+ #: admin/functions.php:387
141
  msgid "Before you go, please take a moment to let us know why you are deactivating:"
142
  msgstr ""
143
 
144
+ #: admin/functions.php:391
145
  msgid "Submitting this form will also include your WordPress version, TML version, PHP version and whether this is a multisite installation or not."
146
  msgstr ""
147
 
148
+ #: admin/functions.php:394
149
  msgid "Submit & Deactivate"
150
  msgstr ""
151
 
152
+ #: admin/functions.php:395
153
  msgid "No thanks, just deactivate"
154
  msgstr ""
155
 
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: thememylogin, jfarthing84
3
  Tags: login, register, password, branding, customize, widget, wp-login, wp-login.php
4
  Requires at least: 4.6
5
- Tested up to: 4.9.8
6
- Stable tag: 7.0.10
7
 
8
  The ultimate login branding solution! Theme My Login offers matchless customization of your WordPress user experience!
9
 
@@ -59,6 +59,15 @@ Report bugs, suggest ideas and participate in development at [GitHub](https://gi
59
 
60
  == Changelog ==
61
 
 
 
 
 
 
 
 
 
 
62
  = 7.0.10 =
63
  * Fix admin notices displaying for non-privileged users
64
  * Reinstate default testcookie method
2
  Contributors: thememylogin, jfarthing84
3
  Tags: login, register, password, branding, customize, widget, wp-login, wp-login.php
4
  Requires at least: 4.6
5
+ Tested up to: 4.9.9
6
+ Stable tag: 7.0.11
7
 
8
  The ultimate login branding solution! Theme My Login offers matchless customization of your WordPress user experience!
9
 
59
 
60
  == Changelog ==
61
 
62
+ = 7.0.11 =
63
+ * Ensure that actions use their own page
64
+ * Ensure the lostpassword action uses a TML link
65
+ * Fix undefined variable notice when recovering password
66
+ * Fix password strength meter script loading on every request
67
+ * Only show TML notices on the Dashboard or TML pages
68
+ * Fix undefined variable notices when handling an action
69
+ * Fix stomping of other plugins actions
70
+
71
  = 7.0.10 =
72
  * Fix admin notices displaying for non-privileged users
73
  * Reinstate default testcookie method
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.0.10
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.0.10' );
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.0.11
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.0.11' );
28
 
29
  /**
30
  * Stores the path to TML.