Theme My Login - Version 7.0.12

Version Description

  • Ensure that styles are more likely to be applied
  • Ensure checkbox labels are inline
  • Ensure password errors are only applied on register action
  • Pass page slug for rewrites if a matching page exists
  • Ensure query args are encoded when rewriting URLs
  • Ensure query args are passed for actions redirected from login
  • Add license activation notice to extension update messages
  • Add action links to plugins screen
  • Ensure PHP 5.2 support for development
  • Ensure hierarchical slugs work properly
Download this release

Release Info

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

Code changes from version 7.0.11 to 7.0.12

admin/extensions.php CHANGED
@@ -184,3 +184,28 @@ function tml_admin_check_extension_licenses() {
184
  }
185
  }
186
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
184
  }
185
  }
186
  }
187
+
188
+ /**
189
+ * Add the extension update messages.
190
+ *
191
+ * @since 7.0.12
192
+ */
193
+ function tml_admin_add_extension_update_messages() {
194
+ foreach ( tml_get_extensions() as $extension ) {
195
+ add_action( 'in_plugin_update_message-' . $extension->get_basename(), 'tml_admin_extension_update_message', 10, 2 );
196
+ }
197
+ }
198
+
199
+ /**
200
+ * Display the extension update message.
201
+ *
202
+ * @since 7.0.12
203
+ */
204
+ function tml_admin_extension_update_message( $data, $response ) {
205
+ if ( empty( $response->package ) ) {
206
+ echo ' ' . sprintf(
207
+ '<em>In order to enable automatic updates, please enter and activate your <a href="%1$s">license key</a>.',
208
+ admin_url( 'admin.php?page=theme-my-login-licenses' )
209
+ );
210
+ }
211
+ }
admin/functions.php CHANGED
@@ -399,3 +399,30 @@ function tml_admin_deactivation_survey() {
399
  <?php wp_die( ob_get_clean(), __( 'Deactivating Theme My Login', 'theme-my-login' ) );
400
  }
401
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
399
  <?php wp_die( ob_get_clean(), __( 'Deactivating Theme My Login', 'theme-my-login' ) );
400
  }
401
  }
402
+
403
+ /**
404
+ * Filter the plugin action links.
405
+ *
406
+ * @since 7.0.12
407
+ *
408
+ * @param array $actions The plugin action links.
409
+ * @param string $file The path to the plugin file.
410
+ * @param array $data The plugin data.
411
+ * @param string $context The plugin context.
412
+ * @return array The plugin action links.
413
+ */
414
+ function tml_admin_filter_plugin_action_links( $actions, $file, $data, $context ) {
415
+
416
+ if ( 'theme-my-login/theme-my-login.php' == $file ) {
417
+ $actions['settings'] = sprintf( '<a href="%1$s">%2$s</a>',
418
+ admin_url( 'admin.php?page=theme-my-login' ),
419
+ __( 'Settings' )
420
+ );
421
+ $actions['extensions'] = sprintf( '<a href="%1$s">%2$s</a>',
422
+ admin_url( 'admin.php?page=theme-my-login-extensions' ),
423
+ __( 'Extensions', 'theme-my-login' )
424
+ );
425
+ }
426
+
427
+ return $actions;
428
+ }
admin/hooks.php CHANGED
@@ -7,6 +7,10 @@
7
  * @subpackage Administration
8
  */
9
 
 
 
 
 
10
  // General
11
  add_action( 'admin_enqueue_scripts', 'tml_admin_enqueue_style_and_scripts' );
12
 
@@ -15,8 +19,9 @@ add_action( 'admin_notices', 'tml_admin_notices' );
15
  add_action( 'wp_ajax_tml-dismiss-notice', 'tml_admin_ajax_dismiss_notice' );
16
 
17
  // Extensions
18
- add_action( 'admin_init', 'tml_admin_handle_extension_licenses' );
19
- add_action( 'admin_init', 'tml_admin_check_extension_licenses' );
 
20
 
21
  // Settings
22
  if ( is_multisite() ) {
@@ -33,8 +38,17 @@ add_action( 'current_screen', 'tml_admin_add_settings_help_tabs' );
33
  add_action( 'admin_init', 'tml_admin_update' );
34
 
35
  // Nav menus
36
- add_action( 'admin_head-nav-menus.php', 'tml_admin_add_nav_menu_meta_box', 10 );
37
- add_filter( 'wp_edit_nav_menu_walker', 'tml_admin_filter_edit_nav_menu_walker', 99 );
38
 
39
  // Deactivation
40
  add_action( 'admin_init', 'tml_admin_deactivation_survey' );
 
 
 
 
 
 
 
 
 
 
7
  * @subpackage Administration
8
  */
9
 
10
+ /**
11
+ * Add actions
12
+ */
13
+
14
  // General
15
  add_action( 'admin_enqueue_scripts', 'tml_admin_enqueue_style_and_scripts' );
16
 
19
  add_action( 'wp_ajax_tml-dismiss-notice', 'tml_admin_ajax_dismiss_notice' );
20
 
21
  // Extensions
22
+ add_action( 'admin_init', 'tml_admin_handle_extension_licenses' );
23
+ add_action( 'admin_init', 'tml_admin_check_extension_licenses' );
24
+ add_action( 'admin_init', 'tml_admin_add_extension_update_messages' );
25
 
26
  // Settings
27
  if ( is_multisite() ) {
38
  add_action( 'admin_init', 'tml_admin_update' );
39
 
40
  // Nav menus
41
+ add_action( 'admin_head-nav-menus.php', 'tml_admin_add_nav_menu_meta_box', 10 );
 
42
 
43
  // Deactivation
44
  add_action( 'admin_init', 'tml_admin_deactivation_survey' );
45
+
46
+ /**
47
+ * Add filters
48
+ */
49
+
50
+ // General
51
+ add_filter( 'plugin_action_links', 'tml_admin_filter_plugin_action_links', 10, 4 );
52
+
53
+ // Nav menus
54
+ add_filter( 'wp_edit_nav_menu_walker', 'tml_admin_filter_edit_nav_menu_walker', 99 );
assets/styles/theme-my-login.css CHANGED
@@ -7,41 +7,41 @@
7
  box-sizing: border-box;
8
  }
9
 
10
- .tml-field-wrap {
11
  margin-bottom: 1em;
12
  }
13
 
14
- .tml-label {
15
  display: block;
16
  margin: 0.5em 0;
17
  }
18
 
19
- .tml-checkbox + .tml-label {
20
  display: inline;
21
  }
22
 
23
- .tml-field {
24
  width: 100%;
25
  }
26
 
27
- .tml-description {
28
  display: block;
29
  font-size: 0.85em;
30
  font-style: italic;
31
  margin: 0.5em 0;
32
  }
33
 
34
- .tml-errors,
35
- .tml-messages {
36
  list-style: none;
37
  margin: 0;
38
  padding: 0;
39
  }
40
 
41
- .tml-error,
42
- .tml-message,
43
- .tml-success,
44
- .tml-action-confirmaction .success {
45
  border-left: 4px solid #00a0d2;
46
  -webkit-box-shadow: 1px 1px 2px 1px rgba(0, 0, 0, 0.1);
47
  box-shadow: 1px 1px 2px 1px rgba(0, 0, 0, 0.1);
@@ -50,12 +50,12 @@
50
  padding: 0.75em;
51
  }
52
 
53
- .tml-error {
54
  border-left-color: #dc3232;
55
  }
56
 
57
- .tml-success,
58
- .tml-action-confirmaction .success {
59
  border-left-color: #46b450;
60
  }
61
 
7
  box-sizing: border-box;
8
  }
9
 
10
+ .tml .tml-field-wrap {
11
  margin-bottom: 1em;
12
  }
13
 
14
+ .tml .tml-label {
15
  display: block;
16
  margin: 0.5em 0;
17
  }
18
 
19
+ .tml .tml-checkbox + .tml-label {
20
  display: inline;
21
  }
22
 
23
+ .tml .tml-field {
24
  width: 100%;
25
  }
26
 
27
+ .tml .tml-description {
28
  display: block;
29
  font-size: 0.85em;
30
  font-style: italic;
31
  margin: 0.5em 0;
32
  }
33
 
34
+ .tml .tml-errors,
35
+ .tml .tml-messages {
36
  list-style: none;
37
  margin: 0;
38
  padding: 0;
39
  }
40
 
41
+ .tml .tml-error,
42
+ .tml .tml-message,
43
+ .tml .tml-success,
44
+ .tml .tml-action-confirmaction .success {
45
  border-left: 4px solid #00a0d2;
46
  -webkit-box-shadow: 1px 1px 2px 1px rgba(0, 0, 0, 0.1);
47
  box-shadow: 1px 1px 2px 1px rgba(0, 0, 0, 0.1);
50
  padding: 0.75em;
51
  }
52
 
53
+ .tml .tml-error {
54
  border-left-color: #dc3232;
55
  }
56
 
57
+ .tml .tml-success,
58
+ .tml .tml-action-confirmaction .success {
59
  border-left-color: #46b450;
60
  }
61
 
assets/styles/theme-my-login.min.css CHANGED
@@ -1 +1 @@
1
- .tml{font-size:1em}.tml *{-webkit-box-sizing:border-box;box-sizing:border-box}.tml-field-wrap{margin-bottom:1em}.tml-label{display:block;margin:.5em 0}.tml-checkbox+.tml-label{display:inline}.tml-field{width:100%}.tml-description{display:block;font-size:.85em;font-style:italic;margin:.5em 0}.tml-errors,.tml-messages{list-style:none;margin:0;padding:0}.tml-action-confirmaction .success,.tml-error,.tml-message,.tml-success{border-left:4px solid #00a0d2;-webkit-box-shadow:1px 1px 2px 1px rgba(0,0,0,.1);box-shadow:1px 1px 2px 1px rgba(0,0,0,.1);display:block;margin:0 0 1em;padding:.75em}.tml-error{border-left-color:#dc3232}.tml-action-confirmaction .success,.tml-success{border-left-color:#46b450}#pass-strength-result{background-color:#eee;border:1px solid #ddd;color:#23282d;font-weight:700;opacity:0;margin-bottom:1em;padding:.5em}#pass-strength-result.strong{background-color:#c1e1b9;border-color:#83c373;opacity:1}#pass-strength-result.good{background-color:#ffe399;border-color:#ffc733;opacity:1}#pass-strength-result.bad{background-color:#fbc5a9;border-color:#f78b53;opacity:1}#pass-strength-result.short{background-color:#f1adad;border-color:#e35b5b;opacity:1}
1
+ .tml{font-size:1em}.tml *{-webkit-box-sizing:border-box;box-sizing:border-box}.tml .tml-field-wrap{margin-bottom:1em}.tml .tml-label{display:block;margin:.5em 0}.tml .tml-checkbox+.tml-label{display:inline}.tml .tml-field{width:100%}.tml .tml-description{display:block;font-size:.85em;font-style:italic;margin:.5em 0}.tml .tml-errors,.tml .tml-messages{list-style:none;margin:0;padding:0}.tml .tml-action-confirmaction .success,.tml .tml-error,.tml .tml-message,.tml .tml-success{border-left:4px solid #00a0d2;-webkit-box-shadow:1px 1px 2px 1px rgba(0,0,0,.1);box-shadow:1px 1px 2px 1px rgba(0,0,0,.1);display:block;margin:0 0 1em;padding:.75em}.tml .tml-error{border-left-color:#dc3232}.tml .tml-action-confirmaction .success,.tml .tml-success{border-left-color:#46b450}#pass-strength-result{background-color:#eee;border:1px solid #ddd;color:#23282d;font-weight:700;opacity:0;margin-bottom:1em;padding:.5em}#pass-strength-result.strong{background-color:#c1e1b9;border-color:#83c373;opacity:1}#pass-strength-result.good{background-color:#ffe399;border-color:#ffc733;opacity:1}#pass-strength-result.bad{background-color:#fbc5a9;border-color:#f78b53;opacity:1}#pass-strength-result.short{background-color:#f1adad;border-color:#e35b5b;opacity:1}
includes/actions.php CHANGED
@@ -297,7 +297,14 @@ function tml_action_handler() {
297
  $action = 'resetpass';
298
  }
299
 
 
300
  if ( $url = tml_get_action_url( $action ) ) {
 
 
 
 
 
 
301
  wp_redirect( $url );
302
  exit;
303
  }
297
  $action = 'resetpass';
298
  }
299
 
300
+ // Get the action URL
301
  if ( $url = tml_get_action_url( $action ) ) {
302
+ // Add the query string to the URL
303
+ if ( $query = parse_url( $_SERVER['REQUEST_URI'], PHP_URL_QUERY ) ) {
304
+ parse_str( $query, $args );
305
+ unset( $args['action'] );
306
+ $url = add_query_arg( array_map( 'rawurlencode', $args ), $url );
307
+ }
308
  wp_redirect( $url );
309
  exit;
310
  }
includes/functions.php CHANGED
@@ -286,11 +286,11 @@ function tml_add_rewrite_rules() {
286
  return;
287
  }
288
  foreach ( tml_get_actions() as $action ) {
289
- add_rewrite_rule(
290
- tml_get_action_slug( $action ) . '/?$',
291
- 'index.php?action=' . $action->get_name(),
292
- 'top'
293
- );
294
  }
295
  }
296
 
@@ -338,7 +338,10 @@ function tml_filter_site_url( $url, $path, $scheme ) {
338
  // Parse the query
339
  $query = array();
340
  if ( ! empty( $parsed_url['query'] ) ) {
341
- parse_str( htmlspecialchars_decode( $parsed_url['query'] ), $query );
 
 
 
342
  }
343
 
344
  /**
@@ -619,9 +622,14 @@ function tml_nav_menu_css_class( $classes, $item ) {
619
  * @return WP_Error The registration errors.
620
  */
621
  function tml_validate_new_user_password( $errors = null ) {
 
 
 
 
622
  if ( empty( $errors ) ) {
623
  $errors = new WP_Error();
624
  }
 
625
  if ( tml_allow_user_passwords() ) {
626
  if ( empty( $_POST['user_pass1'] ) || empty( $_POST['user_pass2'] ) ) {
627
  $errors->add( 'empty_password', __( '<strong>ERROR</strong>: Please enter a password.', 'theme-my-login' ) );
@@ -633,6 +641,7 @@ function tml_validate_new_user_password( $errors = null ) {
633
  $errors->add( 'password_mismatch', __( '<strong>ERROR</strong>: Please enter the same password in both password fields.', 'theme-my-login' ) );
634
  }
635
  }
 
636
  return $errors;
637
  }
638
 
286
  return;
287
  }
288
  foreach ( tml_get_actions() as $action ) {
289
+ $url = 'index.php?action=' . $action->get_name();
290
+ if ( $page = tml_action_has_page( $action ) ) {
291
+ $url .= '&pagename=' . get_page_uri( $page );
292
+ }
293
+ add_rewrite_rule( tml_get_action_slug( $action ) . '/?$', $url, 'top' );
294
  }
295
  }
296
 
338
  // Parse the query
339
  $query = array();
340
  if ( ! empty( $parsed_url['query'] ) ) {
341
+ parse_str( $parsed_url['query'], $query );
342
+
343
+ // Encode the query args
344
+ $query = array_map( 'rawurlencode', $query );
345
  }
346
 
347
  /**
622
  * @return WP_Error The registration errors.
623
  */
624
  function tml_validate_new_user_password( $errors = null ) {
625
+ if ( ! tml_is_action( 'register' ) ) {
626
+ return $errors;
627
+ }
628
+
629
  if ( empty( $errors ) ) {
630
  $errors = new WP_Error();
631
  }
632
+
633
  if ( tml_allow_user_passwords() ) {
634
  if ( empty( $_POST['user_pass1'] ) || empty( $_POST['user_pass2'] ) ) {
635
  $errors->add( 'empty_password', __( '<strong>ERROR</strong>: Please enter a password.', 'theme-my-login' ) );
641
  $errors->add( 'password_mismatch', __( '<strong>ERROR</strong>: Please enter the same password in both password fields.', 'theme-my-login' ) );
642
  }
643
  }
644
+
645
  return $errors;
646
  }
647
 
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.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,7 +48,7 @@ msgstr ""
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
 
@@ -116,6 +116,7 @@ msgid "Theme My Login Extensions"
116
  msgstr ""
117
 
118
  #: admin/functions.php:112
 
119
  msgid "Extensions"
120
  msgstr ""
121
 
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.12\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-12-24T13:13:41-05:00\n"
13
+ "PO-Revision-Date: 2018-12-24T13:13:41-05:00\n"
14
  "X-Domain: theme-my-login\n"
15
 
16
+ #: includes/functions.php:497
17
  #: admin/functions.php:278
18
  msgid "Theme My Login Actions"
19
  msgstr ""
20
 
21
+ #: includes/functions.php:498
22
  msgid "Theme My Login Action"
23
  msgstr ""
24
 
25
+ #: includes/functions.php:526
26
+ #: includes/functions.php:553
27
+ #: includes/functions.php:568
28
  msgid "TML Action"
29
  msgstr ""
30
 
31
+ #: includes/functions.php:635
32
  msgid "<strong>ERROR</strong>: Please enter a password."
33
  msgstr ""
34
 
35
+ #: includes/functions.php:638
36
  msgid "<strong>ERROR</strong>: Passwords may not contain the character \"\\\"."
37
  msgstr ""
38
 
39
+ #: includes/functions.php:641
40
  msgid "<strong>ERROR</strong>: Please enter the same password in both password fields."
41
  msgstr ""
42
 
43
+ #: includes/functions.php:658
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:451
52
  msgid "Registration complete. You may now log in."
53
  msgstr ""
54
 
116
  msgstr ""
117
 
118
  #: admin/functions.php:112
119
+ #: admin/functions.php:423
120
  msgid "Extensions"
121
  msgstr ""
122
 
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.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,6 +59,18 @@ Report bugs, suggest ideas and participate in development at [GitHub](https://gi
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
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: 5.0.2
6
+ Stable tag: 7.0.12
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.12 =
63
+ * Ensure that styles are more likely to be applied
64
+ * Ensure checkbox labels are inline
65
+ * Ensure password errors are only applied on register action
66
+ * Pass page slug for rewrites if a matching page exists
67
+ * Ensure query args are encoded when rewriting URLs
68
+ * Ensure query args are passed for actions redirected from login
69
+ * Add license activation notice to extension update messages
70
+ * Add action links to plugins screen
71
+ * Ensure PHP 5.2 support for development
72
+ * Ensure hierarchical slugs work properly
73
+
74
  = 7.0.11 =
75
  * Ensure that actions use their own page
76
  * Ensure the lostpassword action uses a TML link
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.11
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.11' );
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.12
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.12' );
28
 
29
  /**
30
  * Stores the path to TML.