Version Description
- Fix deprecated function notices
- Deprecate "tml_user_password_changed" hook in favor of "after_password_reset"
- Deprecate "tml_new_user_registered" hook in favor of "register_new_user"
Download this release
Release Info
Developer | jfarthing84 |
Plugin | Theme My Login |
Version | 6.4.2 |
Comparing to | |
See all releases |
Code changes from version 6.4.1 to 6.4.2
- admin/class-theme-my-login-admin.php +0 -1
- includes/class-theme-my-login-template.php +7 -7
- includes/class-theme-my-login.php +27 -123
- modules/custom-email/admin/custom-email-admin.php +1 -26
- modules/custom-email/custom-email.php +26 -25
- modules/custom-passwords/custom-passwords.php +12 -8
- modules/custom-redirection/admin/custom-redirection-admin.php +1 -2
- modules/custom-user-links/admin/custom-user-links-admin.php +1 -2
- modules/user-moderation/user-moderation.php +7 -7
- readme.txt +8 -3
- templates/login-form.php +1 -1
- templates/lostpassword-form.php +1 -1
- templates/ms-signup-another-blog-form.php +1 -1
- templates/ms-signup-blog-form.php +1 -1
- templates/ms-signup-user-form.php +1 -1
- templates/profile-form.php +1 -1
- templates/register-form.php +1 -1
- templates/resetpass-form.php +8 -4
- theme-my-login.php +1 -1
admin/class-theme-my-login-admin.php
CHANGED
@@ -135,7 +135,6 @@ class Theme_My_Login_Admin extends Theme_My_Login_Abstract {
|
|
135 |
) ) );
|
136 |
?>
|
137 |
<div id="<?php echo $options_key; ?>" class="wrap">
|
138 |
-
<?php screen_icon( 'options-general' ); ?>
|
139 |
<h2><?php echo esc_html( $title ); ?></h2>
|
140 |
<?php settings_errors(); ?>
|
141 |
|
135 |
) ) );
|
136 |
?>
|
137 |
<div id="<?php echo $options_key; ?>" class="wrap">
|
|
|
138 |
<h2><?php echo esc_html( $title ); ?></h2>
|
139 |
<?php settings_errors(); ?>
|
140 |
|
includes/class-theme-my-login-template.php
CHANGED
@@ -245,9 +245,10 @@ class Theme_My_Login_Template extends Theme_My_Login_Abstract {
|
|
245 |
* @access public
|
246 |
*
|
247 |
* @param string $action Action to retrieve
|
|
|
248 |
* @return string The requested action URL
|
249 |
*/
|
250 |
-
public function get_action_url( $action = '' ) {
|
251 |
|
252 |
$instance = $this->get_option( 'instance' );
|
253 |
|
@@ -260,11 +261,9 @@ class Theme_My_Login_Template extends Theme_My_Login_Abstract {
|
|
260 |
$url = Theme_My_Login::get_page_link( $action );
|
261 |
}
|
262 |
|
263 |
-
|
264 |
-
if ( 'login' == $action && force_ssl_login() )
|
265 |
-
$url = preg_replace( '|^http://|', 'https://', $url );
|
266 |
|
267 |
-
return apply_filters( 'tml_action_url', $url, $action, $instance );
|
268 |
}
|
269 |
|
270 |
/**
|
@@ -274,9 +273,10 @@ class Theme_My_Login_Template extends Theme_My_Login_Abstract {
|
|
274 |
* @access public
|
275 |
*
|
276 |
* @param string $action Action to retrieve
|
|
|
277 |
*/
|
278 |
-
public function the_action_url( $action = 'login' ) {
|
279 |
-
echo esc_url( $this->get_action_url( $action ) );
|
280 |
}
|
281 |
|
282 |
/**
|
245 |
* @access public
|
246 |
*
|
247 |
* @param string $action Action to retrieve
|
248 |
+
* @param string $scheme Scheme to give the URL context
|
249 |
* @return string The requested action URL
|
250 |
*/
|
251 |
+
public function get_action_url( $action = '', $scheme = 'login' ) {
|
252 |
|
253 |
$instance = $this->get_option( 'instance' );
|
254 |
|
261 |
$url = Theme_My_Login::get_page_link( $action );
|
262 |
}
|
263 |
|
264 |
+
$url = set_url_scheme( $url, $scheme );
|
|
|
|
|
265 |
|
266 |
+
return apply_filters( 'tml_action_url', $url, $action, $scheme, $instance );
|
267 |
}
|
268 |
|
269 |
/**
|
273 |
* @access public
|
274 |
*
|
275 |
* @param string $action Action to retrieve
|
276 |
+
* @param string $scheme Scheme to give the URL context
|
277 |
*/
|
278 |
+
public function the_action_url( $action = 'login', $scheme = 'login' ) {
|
279 |
+
echo esc_url( $this->get_action_url( $action, $scheme ) );
|
280 |
}
|
281 |
|
282 |
/**
|
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.
|
25 |
|
26 |
/**
|
27 |
* Holds options key
|
@@ -152,9 +152,6 @@ class Theme_My_Login extends Theme_My_Login_Abstract {
|
|
152 |
add_filter( 'wp_list_pages_excludes', array( &$this, 'wp_list_pages_excludes' ) );
|
153 |
add_filter( 'page_link', array( &$this, 'page_link' ), 10, 2 );
|
154 |
|
155 |
-
add_action( 'tml_new_user_registered', 'wp_new_user_notification', 10, 3 );
|
156 |
-
add_action( 'tml_user_password_changed', 'wp_password_change_notification' );
|
157 |
-
|
158 |
add_shortcode( 'theme-my-login', array( &$this, 'shortcode' ) );
|
159 |
}
|
160 |
|
@@ -229,13 +226,15 @@ class Theme_My_Login extends Theme_My_Login_Abstract {
|
|
229 |
|
230 |
if ( force_ssl_admin() && ! is_ssl() ) {
|
231 |
if ( 0 === strpos( $_SERVER['REQUEST_URI'], 'http' ) ) {
|
232 |
-
wp_redirect(
|
233 |
exit;
|
234 |
} else {
|
235 |
wp_redirect( 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
|
236 |
exit;
|
237 |
}
|
238 |
}
|
|
|
|
|
239 |
}
|
240 |
}
|
241 |
|
@@ -304,11 +303,20 @@ class Theme_My_Login extends Theme_My_Login_Abstract {
|
|
304 |
$http_post = ( 'POST' == $_SERVER['REQUEST_METHOD'] );
|
305 |
switch ( $this->request_action ) {
|
306 |
case 'postpass' :
|
|
|
|
|
|
|
|
|
|
|
307 |
require_once( ABSPATH . 'wp-includes/class-phpass.php' );
|
308 |
$hasher = new PasswordHash( 8, true );
|
309 |
|
310 |
$expire = apply_filters( 'post_password_expires', time() + 10 * DAY_IN_SECONDS );
|
311 |
-
|
|
|
|
|
|
|
|
|
312 |
setcookie( 'wp-postpass_' . COOKIEHASH, $hasher->HashPassword( wp_unslash( $_POST['post_password'] ) ), $expire, COOKIEPATH, COOKIE_DOMAIN, $secure );
|
313 |
|
314 |
wp_safe_redirect( wp_get_referer() );
|
@@ -392,7 +400,7 @@ class Theme_My_Login extends Theme_My_Login_Abstract {
|
|
392 |
do_action( 'validate_password_reset', $this->errors, $user );
|
393 |
|
394 |
if ( ( ! $this->errors->get_error_code() ) && isset( $_POST['pass1'] ) && ! empty( $_POST['pass1'] ) ) {
|
395 |
-
|
396 |
setcookie( $rp_cookie, ' ', time() - YEAR_IN_SECONDS, $rp_path, COOKIE_DOMAIN, is_ssl(), true );
|
397 |
$redirect_to = site_url( 'wp-login.php?resetpass=complete' );
|
398 |
wp_safe_redirect( $redirect_to );
|
@@ -413,13 +421,13 @@ class Theme_My_Login extends Theme_My_Login_Abstract {
|
|
413 |
$user_email = '';
|
414 |
if ( $http_post ) {
|
415 |
if ( 'email' == $this->get_option( 'login_type' ) ) {
|
416 |
-
$user_login = $_POST['user_email'];
|
417 |
} else {
|
418 |
-
$user_login = $_POST['user_login'];
|
419 |
}
|
420 |
-
$user_email = $_POST['user_email'];
|
421 |
|
422 |
-
$this->errors =
|
423 |
if ( ! is_wp_error( $this->errors ) ) {
|
424 |
$redirect_to = ! empty( $_POST['redirect_to'] ) ? $_POST['redirect_to'] : site_url( 'wp-login.php?checkemail=registered' );
|
425 |
wp_safe_redirect( $redirect_to );
|
@@ -454,12 +462,6 @@ class Theme_My_Login extends Theme_My_Login_Abstract {
|
|
454 |
|
455 |
$reauth = empty( $_REQUEST['reauth'] ) ? false : true;
|
456 |
|
457 |
-
// If the user was redirected to a secure login form from a non-secure admin page, and secure login is required but secure admin is not, then don't use a secure
|
458 |
-
// cookie and redirect back to the referring non-secure admin page. This allows logins to always be POSTed over SSL while allowing the user to choose visiting
|
459 |
-
// the admin via http or https.
|
460 |
-
if ( ! $secure_cookie && is_ssl() && force_ssl_login() && ! force_ssl_admin() && ( 0 !== strpos( $redirect_to, 'https' ) ) && ( 0 === strpos( $redirect_to, 'http' ) ) )
|
461 |
-
$secure_cookie = false;
|
462 |
-
|
463 |
if ( $http_post && isset( $_POST['log'] ) ) {
|
464 |
|
465 |
$user = wp_signon( '', $secure_cookie );
|
@@ -474,7 +476,7 @@ class Theme_My_Login extends Theme_My_Login_Abstract {
|
|
474 |
elseif ( is_multisite() && ! $user->has_cap( 'read' ) )
|
475 |
$redirect_to = get_dashboard_url( $user->ID );
|
476 |
elseif ( ! $user->has_cap( 'edit_posts' ) )
|
477 |
-
$redirect_to = admin_url( 'profile.php' );
|
478 |
}
|
479 |
wp_safe_redirect( $redirect_to );
|
480 |
exit;
|
@@ -951,9 +953,7 @@ if(typeof wpOnload=='function')wpOnload()
|
|
951 |
$link = add_query_arg( array_map( 'rawurlencode', $args ), $link );
|
952 |
}
|
953 |
|
954 |
-
|
955 |
-
if ( 'login' == $action && force_ssl_login() )
|
956 |
-
$link = preg_replace( '|^http://|', 'https://', $link );
|
957 |
|
958 |
return apply_filters( 'tml_page_link', $link, $action, $query );
|
959 |
}
|
@@ -1140,7 +1140,7 @@ if(typeof wpOnload=='function')wpOnload()
|
|
1140 |
$user_data = get_user_by( 'login', $login );
|
1141 |
}
|
1142 |
|
1143 |
-
do_action( 'lostpassword_post' );
|
1144 |
|
1145 |
if ( $errors->get_error_code() )
|
1146 |
return $errors;
|
@@ -1153,29 +1153,11 @@ if(typeof wpOnload=='function')wpOnload()
|
|
1153 |
// redefining user_login ensures we return the right case in the email
|
1154 |
$user_login = $user_data->user_login;
|
1155 |
$user_email = $user_data->user_email;
|
|
|
1156 |
|
1157 |
-
|
1158 |
-
|
1159 |
-
|
1160 |
-
$allow = apply_filters( 'allow_password_reset', true, $user_data->ID );
|
1161 |
-
|
1162 |
-
if ( ! $allow )
|
1163 |
-
return new WP_Error( 'no_password_reset', __( 'Password reset is not allowed for this user', 'theme-my-login' ) );
|
1164 |
-
else if ( is_wp_error( $allow ) )
|
1165 |
-
return $allow;
|
1166 |
-
|
1167 |
-
// Generate something random for a password reset key.
|
1168 |
-
$key = wp_generate_password( 20, false );
|
1169 |
-
|
1170 |
-
do_action( 'retrieve_password_key', $user_login, $key );
|
1171 |
-
|
1172 |
-
// Now insert the key, hashed, into the DB.
|
1173 |
-
if ( empty( $wp_hasher ) ) {
|
1174 |
-
require_once ABSPATH . WPINC . '/class-phpass.php';
|
1175 |
-
$wp_hasher = new PasswordHash( 8, true );
|
1176 |
}
|
1177 |
-
$hashed = time() . ':' . $wp_hasher->HashPassword( $key );
|
1178 |
-
$wpdb->update( $wpdb->users, array( 'user_activation_key' => $hashed ), array( 'user_login' => $user_login ) );
|
1179 |
|
1180 |
$message = __( 'Someone requested that the password be reset for the following account:', 'theme-my-login' ) . "\r\n\r\n";
|
1181 |
$message .= network_home_url( '/' ) . "\r\n\r\n";
|
@@ -1194,92 +1176,14 @@ if(typeof wpOnload=='function')wpOnload()
|
|
1194 |
|
1195 |
$title = sprintf( __( '[%s] Password Reset', 'theme-my-login' ), $blogname );
|
1196 |
|
1197 |
-
$title = apply_filters( 'retrieve_password_title', $title, $user_data
|
1198 |
-
$message = apply_filters( 'retrieve_password_message', $message, $key, $user_data
|
1199 |
|
1200 |
if ( $message && ! wp_mail( $user_email, $title, $message ) )
|
1201 |
wp_die( __( 'The e-mail could not be sent.', 'theme-my-login' ) . "<br />\n" . __( 'Possible reason: your host may have disabled the mail() function...', 'theme-my-login' ) );
|
1202 |
|
1203 |
return true;
|
1204 |
}
|
1205 |
-
|
1206 |
-
/**
|
1207 |
-
* Handles resetting the user's password.
|
1208 |
-
*
|
1209 |
-
* @since 6.0
|
1210 |
-
* @access public
|
1211 |
-
* @uses $wpdb WordPress Database object
|
1212 |
-
*
|
1213 |
-
* @param WP_User $user The user
|
1214 |
-
* @param string $new_pass New password for the user
|
1215 |
-
*/
|
1216 |
-
public static function reset_password( $user, $new_pass ) {
|
1217 |
-
do_action( 'password_reset', $user, $new_pass );
|
1218 |
-
|
1219 |
-
wp_set_password( $new_pass, $user->ID );
|
1220 |
-
update_user_option( $user->ID, 'default_password_nag', false, true );
|
1221 |
-
|
1222 |
-
do_action_ref_array( 'tml_user_password_changed', array( &$user ) );
|
1223 |
-
}
|
1224 |
-
|
1225 |
-
/**
|
1226 |
-
* Handles registering a new user.
|
1227 |
-
*
|
1228 |
-
* @since 6.0
|
1229 |
-
* @access public
|
1230 |
-
*
|
1231 |
-
* @param string $user_login User's username for logging in
|
1232 |
-
* @param string $user_email User's email address to send password and add
|
1233 |
-
* @return int|WP_Error Either user's ID or error on failure.
|
1234 |
-
*/
|
1235 |
-
public static function register_new_user( $user_login, $user_email ) {
|
1236 |
-
global $wp_version;
|
1237 |
-
|
1238 |
-
$errors = new WP_Error();
|
1239 |
-
|
1240 |
-
$sanitized_user_login = sanitize_user( $user_login );
|
1241 |
-
$user_email = apply_filters( 'user_registration_email', $user_email );
|
1242 |
-
|
1243 |
-
// Check the username
|
1244 |
-
if ( $sanitized_user_login == '' ) {
|
1245 |
-
$errors->add( 'empty_username', __( '<strong>ERROR</strong>: Please enter a username.', 'theme-my-login' ) );
|
1246 |
-
} elseif ( ! validate_username( $user_login ) ) {
|
1247 |
-
$errors->add( 'invalid_username', __( '<strong>ERROR</strong>: This username is invalid because it uses illegal characters. Please enter a valid username.', 'theme-my-login' ) );
|
1248 |
-
$sanitized_user_login = '';
|
1249 |
-
} elseif ( username_exists( $sanitized_user_login ) ) {
|
1250 |
-
$errors->add( 'username_exists', __( '<strong>ERROR</strong>: This username is already registered, please choose another one.', 'theme-my-login' ) );
|
1251 |
-
}
|
1252 |
-
|
1253 |
-
// Check the e-mail address
|
1254 |
-
if ( '' == $user_email ) {
|
1255 |
-
$errors->add( 'empty_email', __( '<strong>ERROR</strong>: Please type your e-mail address.', 'theme-my-login' ) );
|
1256 |
-
} elseif ( ! is_email( $user_email ) ) {
|
1257 |
-
$errors->add( 'invalid_email', __( '<strong>ERROR</strong>: The email address isn’t correct.', 'theme-my-login' ) );
|
1258 |
-
$user_email = '';
|
1259 |
-
} elseif ( email_exists( $user_email ) ) {
|
1260 |
-
$errors->add( 'email_exists', __( '<strong>ERROR</strong>: This email is already registered, please choose another one.', 'theme-my-login' ) );
|
1261 |
-
}
|
1262 |
-
|
1263 |
-
do_action( 'register_post', $sanitized_user_login, $user_email, $errors );
|
1264 |
-
|
1265 |
-
$errors = apply_filters( 'registration_errors', $errors, $sanitized_user_login, $user_email );
|
1266 |
-
|
1267 |
-
if ( $errors->get_error_code() )
|
1268 |
-
return $errors;
|
1269 |
-
|
1270 |
-
$user_pass = apply_filters( 'tml_user_registration_pass', wp_generate_password( 12, false ) );
|
1271 |
-
$user_id = wp_create_user( $sanitized_user_login, $user_pass, $user_email );
|
1272 |
-
if ( ! $user_id || is_wp_error( $user_id ) ) {
|
1273 |
-
$errors->add( 'registerfail', sprintf( __( '<strong>ERROR</strong>: Couldn’t register you... please contact the <a href="mailto:%s">webmaster</a> !', 'theme-my-login' ), get_option( 'admin_email' ) ) );
|
1274 |
-
return $errors;
|
1275 |
-
}
|
1276 |
-
|
1277 |
-
update_user_option( $user_id, 'default_password_nag', true, true ); //Set up the Password change nag.
|
1278 |
-
|
1279 |
-
do_action( 'tml_new_user_registered', $user_id, null, 'both' );
|
1280 |
-
|
1281 |
-
return $user_id;
|
1282 |
-
}
|
1283 |
}
|
1284 |
endif; // Class exists
|
1285 |
|
21 |
* @since 6.3.2
|
22 |
* @const string
|
23 |
*/
|
24 |
+
const VERSION = '6.4.2';
|
25 |
|
26 |
/**
|
27 |
* Holds options key
|
152 |
add_filter( 'wp_list_pages_excludes', array( &$this, 'wp_list_pages_excludes' ) );
|
153 |
add_filter( 'page_link', array( &$this, 'page_link' ), 10, 2 );
|
154 |
|
|
|
|
|
|
|
155 |
add_shortcode( 'theme-my-login', array( &$this, 'shortcode' ) );
|
156 |
}
|
157 |
|
226 |
|
227 |
if ( force_ssl_admin() && ! is_ssl() ) {
|
228 |
if ( 0 === strpos( $_SERVER['REQUEST_URI'], 'http' ) ) {
|
229 |
+
wp_redirect( set_url_scheme( $_SERVER['REQUEST_URI'], 'https' ) );
|
230 |
exit;
|
231 |
} else {
|
232 |
wp_redirect( 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
|
233 |
exit;
|
234 |
}
|
235 |
}
|
236 |
+
|
237 |
+
nocache_headers();
|
238 |
}
|
239 |
}
|
240 |
|
303 |
$http_post = ( 'POST' == $_SERVER['REQUEST_METHOD'] );
|
304 |
switch ( $this->request_action ) {
|
305 |
case 'postpass' :
|
306 |
+
if ( ! array_key_exists( 'post_password', $_POST ) ) {
|
307 |
+
wp_safe_redirect( wp_get_referer() );
|
308 |
+
exit();
|
309 |
+
}
|
310 |
+
|
311 |
require_once( ABSPATH . 'wp-includes/class-phpass.php' );
|
312 |
$hasher = new PasswordHash( 8, true );
|
313 |
|
314 |
$expire = apply_filters( 'post_password_expires', time() + 10 * DAY_IN_SECONDS );
|
315 |
+
if ( $referer ) {
|
316 |
+
$secure = ( 'https' === parse_url( $referer, PHP_URL_SCHEME ) );
|
317 |
+
} else {
|
318 |
+
$secure = false;
|
319 |
+
}
|
320 |
setcookie( 'wp-postpass_' . COOKIEHASH, $hasher->HashPassword( wp_unslash( $_POST['post_password'] ) ), $expire, COOKIEPATH, COOKIE_DOMAIN, $secure );
|
321 |
|
322 |
wp_safe_redirect( wp_get_referer() );
|
400 |
do_action( 'validate_password_reset', $this->errors, $user );
|
401 |
|
402 |
if ( ( ! $this->errors->get_error_code() ) && isset( $_POST['pass1'] ) && ! empty( $_POST['pass1'] ) ) {
|
403 |
+
reset_password( $user, $_POST['pass1'] );
|
404 |
setcookie( $rp_cookie, ' ', time() - YEAR_IN_SECONDS, $rp_path, COOKIE_DOMAIN, is_ssl(), true );
|
405 |
$redirect_to = site_url( 'wp-login.php?resetpass=complete' );
|
406 |
wp_safe_redirect( $redirect_to );
|
421 |
$user_email = '';
|
422 |
if ( $http_post ) {
|
423 |
if ( 'email' == $this->get_option( 'login_type' ) ) {
|
424 |
+
$user_login = isset( $_POST['user_email'] ) ? $_POST['user_email'] : '';
|
425 |
} else {
|
426 |
+
$user_login = isset( $_POST['user_login'] ) ? $_POST['user_login'] : '';
|
427 |
}
|
428 |
+
$user_email = isset( $_POST['user_email'] ) ? $_POST['user_email'] : '';
|
429 |
|
430 |
+
$this->errors = register_new_user( $user_login, $user_email );
|
431 |
if ( ! is_wp_error( $this->errors ) ) {
|
432 |
$redirect_to = ! empty( $_POST['redirect_to'] ) ? $_POST['redirect_to'] : site_url( 'wp-login.php?checkemail=registered' );
|
433 |
wp_safe_redirect( $redirect_to );
|
462 |
|
463 |
$reauth = empty( $_REQUEST['reauth'] ) ? false : true;
|
464 |
|
|
|
|
|
|
|
|
|
|
|
|
|
465 |
if ( $http_post && isset( $_POST['log'] ) ) {
|
466 |
|
467 |
$user = wp_signon( '', $secure_cookie );
|
476 |
elseif ( is_multisite() && ! $user->has_cap( 'read' ) )
|
477 |
$redirect_to = get_dashboard_url( $user->ID );
|
478 |
elseif ( ! $user->has_cap( 'edit_posts' ) )
|
479 |
+
$redirect_to = $user->has_cap( 'read' ) ? admin_url( 'profile.php' ) : home_url();
|
480 |
}
|
481 |
wp_safe_redirect( $redirect_to );
|
482 |
exit;
|
953 |
$link = add_query_arg( array_map( 'rawurlencode', $args ), $link );
|
954 |
}
|
955 |
|
956 |
+
$link = set_url_scheme( $link, 'login' );
|
|
|
|
|
957 |
|
958 |
return apply_filters( 'tml_page_link', $link, $action, $query );
|
959 |
}
|
1140 |
$user_data = get_user_by( 'login', $login );
|
1141 |
}
|
1142 |
|
1143 |
+
do_action( 'lostpassword_post', $errors );
|
1144 |
|
1145 |
if ( $errors->get_error_code() )
|
1146 |
return $errors;
|
1153 |
// redefining user_login ensures we return the right case in the email
|
1154 |
$user_login = $user_data->user_login;
|
1155 |
$user_email = $user_data->user_email;
|
1156 |
+
$key = get_password_reset_key( $user_data );
|
1157 |
|
1158 |
+
if ( is_wp_error( $key ) ) {
|
1159 |
+
return $key;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1160 |
}
|
|
|
|
|
1161 |
|
1162 |
$message = __( 'Someone requested that the password be reset for the following account:', 'theme-my-login' ) . "\r\n\r\n";
|
1163 |
$message .= network_home_url( '/' ) . "\r\n\r\n";
|
1176 |
|
1177 |
$title = sprintf( __( '[%s] Password Reset', 'theme-my-login' ), $blogname );
|
1178 |
|
1179 |
+
$title = apply_filters( 'retrieve_password_title', $title, $user_login, $user_data );
|
1180 |
+
$message = apply_filters( 'retrieve_password_message', $message, $key, $user_login, $user_data );
|
1181 |
|
1182 |
if ( $message && ! wp_mail( $user_email, $title, $message ) )
|
1183 |
wp_die( __( 'The e-mail could not be sent.', 'theme-my-login' ) . "<br />\n" . __( 'Possible reason: your host may have disabled the mail() function...', 'theme-my-login' ) );
|
1184 |
|
1185 |
return true;
|
1186 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1187 |
}
|
1188 |
endif; // Class exists
|
1189 |
|
modules/custom-email/admin/custom-email-admin.php
CHANGED
@@ -50,8 +50,6 @@ class Theme_My_Login_Custom_Email_Admin extends Theme_My_Login_Abstract {
|
|
50 |
add_action( 'admin_init', array( &$this, 'admin_init' ) );
|
51 |
|
52 |
add_action( 'load-tml_page_theme_my_login_email', array( &$this, 'load_settings_page' ) );
|
53 |
-
|
54 |
-
add_action( 'user_register', array( &$this, 'user_register' ) );
|
55 |
}
|
56 |
|
57 |
/**
|
@@ -146,8 +144,7 @@ class Theme_My_Login_Custom_Email_Admin extends Theme_My_Login_Abstract {
|
|
146 |
global $current_screen;
|
147 |
?>
|
148 |
<div class="wrap">
|
149 |
-
|
150 |
-
<h2><?php echo esc_html_e( 'Theme My Login Custom E-mail Settings', 'theme-my-login' ); ?></h2>
|
151 |
<?php settings_errors(); ?>
|
152 |
|
153 |
<form method="post" action="options.php">
|
@@ -584,28 +581,6 @@ class Theme_My_Login_Custom_Email_Admin extends Theme_My_Login_Abstract {
|
|
584 |
<?php
|
585 |
}
|
586 |
|
587 |
-
/**
|
588 |
-
* Do 'tml_new_user_registered' action when a new user is created
|
589 |
-
*
|
590 |
-
* @since 6.3
|
591 |
-
*
|
592 |
-
* @param int $user_id User ID
|
593 |
-
*/
|
594 |
-
public function user_register( $user_id ) {
|
595 |
-
$screen = get_current_screen();
|
596 |
-
|
597 |
-
if ( 'user' == $screen->base && 'add' == $screen->action ) {
|
598 |
-
do_action( 'tml_new_user_registered', $user_id, null, 'both' );
|
599 |
-
|
600 |
-
if ( current_user_can( 'list_users' ) )
|
601 |
-
$redirect = 'users.php?update=add&id=' . $user_id;
|
602 |
-
else
|
603 |
-
$redirect = add_query_arg( 'update', 'add', 'user-new.php' );
|
604 |
-
wp_redirect( $redirect );
|
605 |
-
exit;
|
606 |
-
}
|
607 |
-
}
|
608 |
-
|
609 |
/**
|
610 |
* Sanitizes settings
|
611 |
*
|
50 |
add_action( 'admin_init', array( &$this, 'admin_init' ) );
|
51 |
|
52 |
add_action( 'load-tml_page_theme_my_login_email', array( &$this, 'load_settings_page' ) );
|
|
|
|
|
53 |
}
|
54 |
|
55 |
/**
|
144 |
global $current_screen;
|
145 |
?>
|
146 |
<div class="wrap">
|
147 |
+
<h2><?php esc_html_e( 'Theme My Login Custom E-mail Settings', 'theme-my-login' ); ?></h2>
|
|
|
148 |
<?php settings_errors(); ?>
|
149 |
|
150 |
<form method="post" action="options.php">
|
581 |
<?php
|
582 |
}
|
583 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
584 |
/**
|
585 |
* Sanitizes settings
|
586 |
*
|
modules/custom-email/custom-email.php
CHANGED
@@ -112,24 +112,24 @@ class Theme_My_Login_Custom_Email extends Theme_My_Login_Abstract {
|
|
112 |
* @access protected
|
113 |
*/
|
114 |
protected function load() {
|
115 |
-
add_filter( 'wp_mail_from', array( &$this, 'mail_from_filter'
|
116 |
-
add_filter( 'wp_mail_from_name', array( &$this, 'mail_from_name_filter') );
|
117 |
-
add_filter( 'wp_mail_content_type', array( &$this, 'mail_content_type_filter') );
|
118 |
|
119 |
-
add_action( 'retrieve_password',
|
120 |
-
add_action( 'password_reset',
|
121 |
-
add_action( '
|
122 |
|
123 |
-
remove_action( '
|
124 |
-
remove_action( '
|
125 |
|
126 |
-
add_action( '
|
127 |
-
add_action( '
|
128 |
|
129 |
add_action( 'register_post', array( &$this, 'apply_user_moderation_notification_filters' ) );
|
130 |
add_action( 'tml_user_activation_resend', array( &$this, 'apply_user_moderation_notification_filters' ) );
|
131 |
-
add_action( 'approve_user', array( &$this, 'apply_user_approval_notification_filters'
|
132 |
-
add_action( 'deny_user', array( &$this, 'apply_user_denial_notification_filters'
|
133 |
}
|
134 |
|
135 |
/**
|
@@ -163,8 +163,8 @@ class Theme_My_Login_Custom_Email extends Theme_My_Login_Abstract {
|
|
163 |
$this->get_option( array( 'retrieve_pass', 'mail_from_name' ) ),
|
164 |
$this->get_option( array( 'retrieve_pass', 'mail_content_type' ) )
|
165 |
);
|
166 |
-
add_filter( 'retrieve_password_title', array( &$this, 'retrieve_pass_title_filter' ), 10,
|
167 |
-
add_filter( 'retrieve_password_message', array( &$this, 'retrieve_pass_message_filter' ), 10,
|
168 |
}
|
169 |
|
170 |
/**
|
@@ -265,12 +265,13 @@ class Theme_My_Login_Custom_Email extends Theme_My_Login_Abstract {
|
|
265 |
* @access public
|
266 |
*
|
267 |
* @param string $title Default subject
|
268 |
-
* @param
|
|
|
269 |
* @return string New subject
|
270 |
*/
|
271 |
-
public function retrieve_pass_title_filter( $title, $
|
272 |
$_title = $this->get_option( array( 'retrieve_pass', 'title' ) );
|
273 |
-
return empty( $_title ) ? $title : Theme_My_Login_Common::replace_vars( $_title, $
|
274 |
}
|
275 |
|
276 |
/**
|
@@ -284,16 +285,16 @@ class Theme_My_Login_Custom_Email extends Theme_My_Login_Abstract {
|
|
284 |
*
|
285 |
* @param string $message Default message
|
286 |
* @param string $key The user's reset key
|
287 |
-
* @param
|
|
|
288 |
* @return string New message
|
289 |
*/
|
290 |
-
public function retrieve_pass_message_filter( $message, $key, $
|
291 |
$_message = $this->get_option( array( 'retrieve_pass', 'message' ) );
|
292 |
if ( ! empty( $_message ) ) {
|
293 |
-
$
|
294 |
-
$message = Theme_My_Login_Common::replace_vars( $_message, $user_id, array(
|
295 |
'%loginurl%' => site_url( 'wp-login.php', 'login' ),
|
296 |
-
'%reseturl%' => site_url( "wp-login.php?action=rp&key=$key&login=" . rawurlencode( $
|
297 |
) );
|
298 |
}
|
299 |
return $message;
|
@@ -822,10 +823,9 @@ class Theme_My_Login_Custom_Email extends Theme_My_Login_Abstract {
|
|
822 |
* @access public
|
823 |
*
|
824 |
* @param int $user_id User ID
|
825 |
-
* @param null Not used (argument deprecated)
|
826 |
* @param string $notify Type of notification that should happen
|
827 |
*/
|
828 |
-
public function new_user_notification( $user_id, $
|
829 |
global $wpdb;
|
830 |
|
831 |
$user = get_userdata( $user_id );
|
@@ -889,8 +889,9 @@ class Theme_My_Login_Custom_Email extends Theme_My_Login_Abstract {
|
|
889 |
* @access public
|
890 |
*
|
891 |
* @param object $user User object
|
|
|
892 |
*/
|
893 |
-
public function password_change_notification( &$user ) {
|
894 |
global $current_site;
|
895 |
|
896 |
$to = apply_filters( 'password_change_notification_mail_to', get_option( 'admin_email' ) );
|
112 |
* @access protected
|
113 |
*/
|
114 |
protected function load() {
|
115 |
+
add_filter( 'wp_mail_from', array( &$this, 'mail_from_filter' ) );
|
116 |
+
add_filter( 'wp_mail_from_name', array( &$this, 'mail_from_name_filter' ) );
|
117 |
+
add_filter( 'wp_mail_content_type', array( &$this, 'mail_content_type_filter' ) );
|
118 |
|
119 |
+
add_action( 'retrieve_password', array( &$this, 'apply_retrieve_pass_filters' ) );
|
120 |
+
add_action( 'password_reset', array( &$this, 'apply_password_reset_filters' ) );
|
121 |
+
add_action( 'register_post', array( &$this, 'apply_new_user_filters' ) );
|
122 |
|
123 |
+
remove_action( 'register_new_user', 'wp_send_new_user_notifications' );
|
124 |
+
remove_action( 'after_password_reset', 'wp_password_change_notification' );
|
125 |
|
126 |
+
add_action( 'register_new_user', array( &$this, 'new_user_notification' ) );
|
127 |
+
add_action( 'after_password_reset', array( &$this, 'password_change_notification' ) );
|
128 |
|
129 |
add_action( 'register_post', array( &$this, 'apply_user_moderation_notification_filters' ) );
|
130 |
add_action( 'tml_user_activation_resend', array( &$this, 'apply_user_moderation_notification_filters' ) );
|
131 |
+
add_action( 'approve_user', array( &$this, 'apply_user_approval_notification_filters' ) );
|
132 |
+
add_action( 'deny_user', array( &$this, 'apply_user_denial_notification_filters' ) );
|
133 |
}
|
134 |
|
135 |
/**
|
163 |
$this->get_option( array( 'retrieve_pass', 'mail_from_name' ) ),
|
164 |
$this->get_option( array( 'retrieve_pass', 'mail_content_type' ) )
|
165 |
);
|
166 |
+
add_filter( 'retrieve_password_title', array( &$this, 'retrieve_pass_title_filter' ), 10, 3 );
|
167 |
+
add_filter( 'retrieve_password_message', array( &$this, 'retrieve_pass_message_filter' ), 10, 4 );
|
168 |
}
|
169 |
|
170 |
/**
|
265 |
* @access public
|
266 |
*
|
267 |
* @param string $title Default subject
|
268 |
+
* @param string $user_login User login
|
269 |
+
* @param object $user_data User data
|
270 |
* @return string New subject
|
271 |
*/
|
272 |
+
public function retrieve_pass_title_filter( $title, $user_login, $user_data ) {
|
273 |
$_title = $this->get_option( array( 'retrieve_pass', 'title' ) );
|
274 |
+
return empty( $_title ) ? $title : Theme_My_Login_Common::replace_vars( $_title, $user_data->ID );
|
275 |
}
|
276 |
|
277 |
/**
|
285 |
*
|
286 |
* @param string $message Default message
|
287 |
* @param string $key The user's reset key
|
288 |
+
* @param string $user_login User login
|
289 |
+
* @param object $user_data User data
|
290 |
* @return string New message
|
291 |
*/
|
292 |
+
public function retrieve_pass_message_filter( $message, $key, $user_login, $user_data ) {
|
293 |
$_message = $this->get_option( array( 'retrieve_pass', 'message' ) );
|
294 |
if ( ! empty( $_message ) ) {
|
295 |
+
$message = Theme_My_Login_Common::replace_vars( $_message, $user_data->ID, array(
|
|
|
296 |
'%loginurl%' => site_url( 'wp-login.php', 'login' ),
|
297 |
+
'%reseturl%' => site_url( "wp-login.php?action=rp&key=$key&login=" . rawurlencode( $user_login ), 'login' )
|
298 |
) );
|
299 |
}
|
300 |
return $message;
|
823 |
* @access public
|
824 |
*
|
825 |
* @param int $user_id User ID
|
|
|
826 |
* @param string $notify Type of notification that should happen
|
827 |
*/
|
828 |
+
public function new_user_notification( $user_id, $notify = 'both' ) {
|
829 |
global $wpdb;
|
830 |
|
831 |
$user = get_userdata( $user_id );
|
889 |
* @access public
|
890 |
*
|
891 |
* @param object $user User object
|
892 |
+
* @param string $newpass New password
|
893 |
*/
|
894 |
+
public function password_change_notification( &$user, $newpass ) {
|
895 |
global $current_site;
|
896 |
|
897 |
$to = apply_filters( 'password_change_notification_mail_to', get_option( 'admin_email' ) );
|
modules/custom-passwords/custom-passwords.php
CHANGED
@@ -44,8 +44,8 @@ class Theme_My_Login_Custom_Passwords extends Theme_My_Login_Abstract {
|
|
44 |
add_filter( 'wpmu_validate_user_signup', array( &$this, 'ms_password_errors' ) );
|
45 |
add_filter( 'add_signup_meta', array( &$this, 'ms_save_password' ) );
|
46 |
|
47 |
-
add_action( '
|
48 |
-
add_action( 'approve_user',
|
49 |
|
50 |
add_filter( 'tml_register_passmail_template_message', array( &$this, 'register_passmail_template_message' ) );
|
51 |
add_action( 'tml_request', array( &$this, 'action_messages' ) );
|
@@ -65,10 +65,14 @@ class Theme_My_Login_Custom_Passwords extends Theme_My_Login_Abstract {
|
|
65 |
public function password_fields() {
|
66 |
$template = Theme_My_Login::get_object()->get_active_instance();
|
67 |
?>
|
68 |
-
<p
|
69 |
-
|
70 |
-
|
71 |
-
|
|
|
|
|
|
|
|
|
72 |
<?php
|
73 |
}
|
74 |
|
@@ -239,9 +243,9 @@ class Theme_My_Login_Custom_Passwords extends Theme_My_Login_Abstract {
|
|
239 |
/**
|
240 |
* Removes the default password nag
|
241 |
*
|
242 |
-
* Callback for "
|
243 |
*
|
244 |
-
* @see
|
245 |
* @since 6.0
|
246 |
* @access public
|
247 |
*
|
44 |
add_filter( 'wpmu_validate_user_signup', array( &$this, 'ms_password_errors' ) );
|
45 |
add_filter( 'add_signup_meta', array( &$this, 'ms_save_password' ) );
|
46 |
|
47 |
+
add_action( 'register_new_user', array( &$this, 'remove_default_password_nag' ) );
|
48 |
+
add_action( 'approve_user', array( &$this, 'remove_default_password_nag' ) );
|
49 |
|
50 |
add_filter( 'tml_register_passmail_template_message', array( &$this, 'register_passmail_template_message' ) );
|
51 |
add_action( 'tml_request', array( &$this, 'action_messages' ) );
|
65 |
public function password_fields() {
|
66 |
$template = Theme_My_Login::get_object()->get_active_instance();
|
67 |
?>
|
68 |
+
<p class="tml-user-pass1-wrap">
|
69 |
+
<label for="pass1<?php $template->the_instance(); ?>"><?php _e( 'Password', 'theme-my-login' ); ?></label>
|
70 |
+
<input autocomplete="off" name="pass1" id="pass1<?php $template->the_instance(); ?>" class="input" size="20" value="" type="password" />
|
71 |
+
</p>
|
72 |
+
<p class="tml-user-pass2-wrap">
|
73 |
+
<label for="pass2<?php $template->the_instance(); ?>"><?php _e( 'Confirm Password', 'theme-my-login' ); ?></label>
|
74 |
+
<input autocomplete="off" name="pass2" id="pass2<?php $template->the_instance(); ?>" class="input" size="20" value="" type="password" />
|
75 |
+
</p>
|
76 |
<?php
|
77 |
}
|
78 |
|
243 |
/**
|
244 |
* Removes the default password nag
|
245 |
*
|
246 |
+
* Callback for "register_new_user" hook in register_new_user()
|
247 |
*
|
248 |
+
* @see register_new_user()
|
249 |
* @since 6.0
|
250 |
* @access public
|
251 |
*
|
modules/custom-redirection/admin/custom-redirection-admin.php
CHANGED
@@ -130,8 +130,7 @@ class Theme_My_Login_Custom_Redirection_Admin extends Theme_My_Login_Abstract {
|
|
130 |
global $current_screen;
|
131 |
?>
|
132 |
<div class="wrap">
|
133 |
-
|
134 |
-
<h2><?php echo esc_html_e( 'Theme My Login Custom Redirection Settings', 'theme-my-login' ); ?></h2>
|
135 |
<?php settings_errors(); ?>
|
136 |
|
137 |
<form method="post" action="options.php">
|
130 |
global $current_screen;
|
131 |
?>
|
132 |
<div class="wrap">
|
133 |
+
<h2><?php esc_html_e( 'Theme My Login Custom Redirection Settings', 'theme-my-login' ); ?></h2>
|
|
|
134 |
<?php settings_errors(); ?>
|
135 |
|
136 |
<form method="post" action="options.php">
|
modules/custom-user-links/admin/custom-user-links-admin.php
CHANGED
@@ -141,8 +141,7 @@ class Theme_My_Login_Custom_User_Links_Admin extends Theme_My_Login_Abstract {
|
|
141 |
global $current_screen;
|
142 |
?>
|
143 |
<div class="wrap">
|
144 |
-
|
145 |
-
<h2><?php echo esc_html_e( 'Theme My Login Custom User Links Settings', 'theme-my-login' ); ?></h2>
|
146 |
<?php settings_errors(); ?>
|
147 |
|
148 |
<form method="post" action="options.php">
|
141 |
global $current_screen;
|
142 |
?>
|
143 |
<div class="wrap">
|
144 |
+
<h2><?php esc_html_e( 'Theme My Login Custom User Links Settings', 'theme-my-login' ); ?></h2>
|
|
|
145 |
<?php settings_errors(); ?>
|
146 |
|
147 |
<form method="post" action="options.php">
|
modules/user-moderation/user-moderation.php
CHANGED
@@ -89,18 +89,18 @@ class Theme_My_Login_User_Moderation extends Theme_My_Login_Abstract {
|
|
89 |
*/
|
90 |
public function register_post() {
|
91 |
// Remove default new user notification
|
92 |
-
if ( has_action( '
|
93 |
-
remove_action( '
|
94 |
|
95 |
// Remove Custom Email new user notification
|
96 |
if ( class_exists( 'Theme_My_Login_Custom_Email' ) ) {
|
97 |
$custom_email = Theme_My_Login_Custom_Email::get_object();
|
98 |
-
if ( has_action( '
|
99 |
-
remove_action( '
|
100 |
}
|
101 |
|
102 |
// Moderate user upon registration
|
103 |
-
add_action( '
|
104 |
}
|
105 |
|
106 |
/**
|
@@ -374,7 +374,7 @@ class Theme_My_Login_User_Moderation extends Theme_My_Login_Abstract {
|
|
374 |
}
|
375 |
|
376 |
/**
|
377 |
-
* Calls the "
|
378 |
*
|
379 |
* @since 6.0
|
380 |
* @access public
|
@@ -382,7 +382,7 @@ class Theme_My_Login_User_Moderation extends Theme_My_Login_Abstract {
|
|
382 |
* @param int $user_id The user's ID
|
383 |
*/
|
384 |
public function new_user_activated( $user_id ) {
|
385 |
-
do_action( '
|
386 |
}
|
387 |
|
388 |
/**
|
89 |
*/
|
90 |
public function register_post() {
|
91 |
// Remove default new user notification
|
92 |
+
if ( has_action( 'register_new_user', 'wp_send_new_user_notifications' ) )
|
93 |
+
remove_action( 'register_new_user', 'wp_send_new_user_notifications' );
|
94 |
|
95 |
// Remove Custom Email new user notification
|
96 |
if ( class_exists( 'Theme_My_Login_Custom_Email' ) ) {
|
97 |
$custom_email = Theme_My_Login_Custom_Email::get_object();
|
98 |
+
if ( has_action( 'register_new_user', array( &$custom_email, 'new_user_notification' ) ) )
|
99 |
+
remove_action( 'register_new_user', array( &$custom_email, 'new_user_notification' ) );
|
100 |
}
|
101 |
|
102 |
// Moderate user upon registration
|
103 |
+
add_action( 'register_new_user', array( &$this, 'moderate_user' ), 100 );
|
104 |
}
|
105 |
|
106 |
/**
|
374 |
}
|
375 |
|
376 |
/**
|
377 |
+
* Calls the "register_new_user" hook
|
378 |
*
|
379 |
* @since 6.0
|
380 |
* @access public
|
382 |
* @param int $user_id The user's ID
|
383 |
*/
|
384 |
public function new_user_activated( $user_id ) {
|
385 |
+
do_action( 'register_new_user', $user_id );
|
386 |
}
|
387 |
|
388 |
/**
|
readme.txt
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
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.
|
6 |
-
Tested up to: 4.
|
7 |
-
Stable tag: 6.4.
|
8 |
|
9 |
Themes the WordPress login pages according to your theme.
|
10 |
|
@@ -57,6 +57,11 @@ Please visit http://www.jfarthing.com/development/theme-my-login.
|
|
57 |
|
58 |
== Changelog ==
|
59 |
|
|
|
|
|
|
|
|
|
|
|
60 |
= 6.4.1 =
|
61 |
* Allow array of actions in Theme_My_Login::is_tml_page()
|
62 |
* Lost Password nav menu item will only show when not logged in
|
2 |
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.4
|
6 |
+
Tested up to: 4.4
|
7 |
+
Stable tag: 6.4.2
|
8 |
|
9 |
Themes the WordPress login pages according to your theme.
|
10 |
|
57 |
|
58 |
== Changelog ==
|
59 |
|
60 |
+
= 6.4.2 =
|
61 |
+
* Fix deprecated function notices
|
62 |
+
* Deprecate "tml_user_password_changed" hook in favor of "after_password_reset"
|
63 |
+
* Deprecate "tml_new_user_registered" hook in favor of "register_new_user"
|
64 |
+
|
65 |
= 6.4.1 =
|
66 |
* Allow array of actions in Theme_My_Login::is_tml_page()
|
67 |
* Lost Password nav menu item will only show when not logged in
|
templates/login-form.php
CHANGED
@@ -7,7 +7,7 @@ Theme My Login will always look in your theme's directory first, before using th
|
|
7 |
<div class="tml tml-login" id="theme-my-login<?php $template->the_instance(); ?>">
|
8 |
<?php $template->the_action_template_message( 'login' ); ?>
|
9 |
<?php $template->the_errors(); ?>
|
10 |
-
<form name="loginform" id="loginform<?php $template->the_instance(); ?>" action="<?php $template->the_action_url( 'login' ); ?>" method="post">
|
11 |
<p class="tml-user-login-wrap">
|
12 |
<label for="user_login<?php $template->the_instance(); ?>"><?php
|
13 |
if ( 'email' == $theme_my_login->get_option( 'login_type' ) )
|
7 |
<div class="tml tml-login" id="theme-my-login<?php $template->the_instance(); ?>">
|
8 |
<?php $template->the_action_template_message( 'login' ); ?>
|
9 |
<?php $template->the_errors(); ?>
|
10 |
+
<form name="loginform" id="loginform<?php $template->the_instance(); ?>" action="<?php $template->the_action_url( 'login', 'login_post' ); ?>" method="post">
|
11 |
<p class="tml-user-login-wrap">
|
12 |
<label for="user_login<?php $template->the_instance(); ?>"><?php
|
13 |
if ( 'email' == $theme_my_login->get_option( 'login_type' ) )
|
templates/lostpassword-form.php
CHANGED
@@ -7,7 +7,7 @@ Theme My Login will always look in your theme's directory first, before using th
|
|
7 |
<div class="tml tml-lostpassword" id="theme-my-login<?php $template->the_instance(); ?>">
|
8 |
<?php $template->the_action_template_message( 'lostpassword' ); ?>
|
9 |
<?php $template->the_errors(); ?>
|
10 |
-
<form name="lostpasswordform" id="lostpasswordform<?php $template->the_instance(); ?>" action="<?php $template->the_action_url( 'lostpassword' ); ?>" method="post">
|
11 |
<p class="tml-user-login-wrap">
|
12 |
<label for="user_login<?php $template->the_instance(); ?>"><?php _e( 'Username or E-mail:', 'theme-my-login' ); ?></label>
|
13 |
<input type="text" name="user_login" id="user_login<?php $template->the_instance(); ?>" class="input" value="<?php $template->the_posted_value( 'user_login' ); ?>" size="20" />
|
7 |
<div class="tml tml-lostpassword" id="theme-my-login<?php $template->the_instance(); ?>">
|
8 |
<?php $template->the_action_template_message( 'lostpassword' ); ?>
|
9 |
<?php $template->the_errors(); ?>
|
10 |
+
<form name="lostpasswordform" id="lostpasswordform<?php $template->the_instance(); ?>" action="<?php $template->the_action_url( 'lostpassword', 'login_post' ); ?>" method="post">
|
11 |
<p class="tml-user-login-wrap">
|
12 |
<label for="user_login<?php $template->the_instance(); ?>"><?php _e( 'Username or E-mail:', 'theme-my-login' ); ?></label>
|
13 |
<input type="text" name="user_login" id="user_login<?php $template->the_instance(); ?>" class="input" value="<?php $template->the_posted_value( 'user_login' ); ?>" size="20" />
|
templates/ms-signup-another-blog-form.php
CHANGED
@@ -25,7 +25,7 @@ if ( ! empty( $blogs ) ) { ?>
|
|
25 |
<?php } ?>
|
26 |
|
27 |
<p><?php _e( 'If you’re not going to use a great site domain, leave it for a new user. Now have at it!', 'theme-my-login' ); ?></p>
|
28 |
-
<form id="setupform" method="post" action="<?php $template->the_action_url( 'register' ); ?>">
|
29 |
<input type="hidden" name="action" value="register" />
|
30 |
<input type="hidden" name="stage" value="gimmeanotherblog" />
|
31 |
<?php do_action( 'signup_hidden_fields' ); ?>
|
25 |
<?php } ?>
|
26 |
|
27 |
<p><?php _e( 'If you’re not going to use a great site domain, leave it for a new user. Now have at it!', 'theme-my-login' ); ?></p>
|
28 |
+
<form id="setupform" method="post" action="<?php $template->the_action_url( 'register', 'login_post' ); ?>">
|
29 |
<input type="hidden" name="action" value="register" />
|
30 |
<input type="hidden" name="stage" value="gimmeanotherblog" />
|
31 |
<?php do_action( 'signup_hidden_fields' ); ?>
|
templates/ms-signup-blog-form.php
CHANGED
@@ -4,7 +4,7 @@ If you would like to edit this file, copy it to your current theme's directory a
|
|
4 |
Theme My Login will always look in your theme's directory first, before using this default template.
|
5 |
*/
|
6 |
?>
|
7 |
-
<form id="setupform" method="post" action="<?php $template->the_action_url( 'register' ); ?>">
|
8 |
<input type="hidden" name="action" value="register" />
|
9 |
<input type="hidden" name="stage" value="validate-blog-signup" />
|
10 |
<input type="hidden" name="user_name" value="<?php echo esc_attr( $user_name ); ?>" />
|
4 |
Theme My Login will always look in your theme's directory first, before using this default template.
|
5 |
*/
|
6 |
?>
|
7 |
+
<form id="setupform" method="post" action="<?php $template->the_action_url( 'register', 'login_post' ); ?>">
|
8 |
<input type="hidden" name="action" value="register" />
|
9 |
<input type="hidden" name="stage" value="validate-blog-signup" />
|
10 |
<input type="hidden" name="user_name" value="<?php echo esc_attr( $user_name ); ?>" />
|
templates/ms-signup-user-form.php
CHANGED
@@ -6,7 +6,7 @@ Theme My Login will always look in your theme's directory first, before using th
|
|
6 |
?>
|
7 |
<h2><?php printf( __( 'Get your own %s account in seconds', 'theme-my-login' ), $current_site->site_name ); ?></h2>
|
8 |
|
9 |
-
<form id="setupform" method="post" action="<?php $template->the_action_url( 'register' ); ?>">
|
10 |
<input type="hidden" name="action" value="register" />
|
11 |
<input type="hidden" name="stage" value="validate-user-signup" />
|
12 |
<?php do_action( 'signup_hidden_fields' ); ?>
|
6 |
?>
|
7 |
<h2><?php printf( __( 'Get your own %s account in seconds', 'theme-my-login' ), $current_site->site_name ); ?></h2>
|
8 |
|
9 |
+
<form id="setupform" method="post" action="<?php $template->the_action_url( 'register', 'login_post' ); ?>">
|
10 |
<input type="hidden" name="action" value="register" />
|
11 |
<input type="hidden" name="stage" value="validate-user-signup" />
|
12 |
<?php do_action( 'signup_hidden_fields' ); ?>
|
templates/profile-form.php
CHANGED
@@ -7,7 +7,7 @@ Theme My Login will always look in your theme's directory first, before using th
|
|
7 |
<div class="tml tml-profile" id="theme-my-login<?php $template->the_instance(); ?>">
|
8 |
<?php $template->the_action_template_message( 'profile' ); ?>
|
9 |
<?php $template->the_errors(); ?>
|
10 |
-
<form id="your-profile" action="<?php $template->the_action_url( 'profile' ); ?>" method="post">
|
11 |
<?php wp_nonce_field( 'update-user_' . $current_user->ID ); ?>
|
12 |
<p>
|
13 |
<input type="hidden" name="from" value="profile" />
|
7 |
<div class="tml tml-profile" id="theme-my-login<?php $template->the_instance(); ?>">
|
8 |
<?php $template->the_action_template_message( 'profile' ); ?>
|
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" />
|
templates/register-form.php
CHANGED
@@ -7,7 +7,7 @@ Theme My Login will always look in your theme's directory first, before using th
|
|
7 |
<div class="tml tml-register" id="theme-my-login<?php $template->the_instance(); ?>">
|
8 |
<?php $template->the_action_template_message( 'register' ); ?>
|
9 |
<?php $template->the_errors(); ?>
|
10 |
-
<form name="registerform" id="registerform<?php $template->the_instance(); ?>" action="<?php $template->the_action_url( 'register' ); ?>" method="post">
|
11 |
<?php if ( 'email' != $theme_my_login->get_option( 'login_type' ) ) : ?>
|
12 |
<p class="tml-user-login-wrap">
|
13 |
<label for="user_login<?php $template->the_instance(); ?>"><?php _e( 'Username', 'theme-my-login' ); ?></label>
|
7 |
<div class="tml tml-register" id="theme-my-login<?php $template->the_instance(); ?>">
|
8 |
<?php $template->the_action_template_message( 'register' ); ?>
|
9 |
<?php $template->the_errors(); ?>
|
10 |
+
<form name="registerform" id="registerform<?php $template->the_instance(); ?>" action="<?php $template->the_action_url( 'register', 'login_post' ); ?>" method="post">
|
11 |
<?php if ( 'email' != $theme_my_login->get_option( 'login_type' ) ) : ?>
|
12 |
<p class="tml-user-login-wrap">
|
13 |
<label for="user_login<?php $template->the_instance(); ?>"><?php _e( 'Username', 'theme-my-login' ); ?></label>
|
templates/resetpass-form.php
CHANGED
@@ -7,16 +7,20 @@ Theme My Login will always look in your theme's directory first, before using th
|
|
7 |
<div class="tml tml-resetpass" id="theme-my-login<?php $template->the_instance(); ?>">
|
8 |
<?php $template->the_action_template_message( 'resetpass' ); ?>
|
9 |
<?php $template->the_errors(); ?>
|
10 |
-
<form name="resetpassform" id="resetpassform<?php $template->the_instance(); ?>" action="<?php $template->the_action_url( 'resetpass' ); ?>" method="post" autocomplete="off">
|
11 |
-
|
12 |
-
|
|
|
|
|
|
|
|
|
13 |
<div class="wp-pwd">
|
14 |
<span class="password-input-wrapper">
|
15 |
<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" />
|
16 |
</span>
|
17 |
<div id="pass-strength-result" class="hide-if-no-js" aria-live="polite"><?php _e( 'Strength indicator', 'theme-my-login' ); ?></div>
|
18 |
</div>
|
19 |
-
</
|
20 |
|
21 |
<p class="user-pass2-wrap">
|
22 |
<label for="pass2"><?php _e( 'Confirm new password', 'theme-my-login' ); ?></label>
|
7 |
<div class="tml tml-resetpass" id="theme-my-login<?php $template->the_instance(); ?>">
|
8 |
<?php $template->the_action_template_message( 'resetpass' ); ?>
|
9 |
<?php $template->the_errors(); ?>
|
10 |
+
<form name="resetpassform" id="resetpassform<?php $template->the_instance(); ?>" action="<?php $template->the_action_url( 'resetpass', 'login_post' ); ?>" method="post" autocomplete="off">
|
11 |
+
|
12 |
+
<div class="user-pass1-wrap">
|
13 |
+
<p>
|
14 |
+
<label for="pass1"><?php _e( 'New password', 'theme-my-login' ); ?></label>
|
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">
|
26 |
<label for="pass2"><?php _e( 'Confirm new password', 'theme-my-login' ); ?></label>
|
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.
|
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.2
|
7 |
Author: Jeff Farthing
|
8 |
Author URI: http://www.jfarthing.com
|
9 |
Text Domain: theme-my-login
|