Version Description
- Add option to login using either username only, email only or both
- Add option to disable user denial notification when admin approval is active
- Update reCAPTCHA module to API version 2.0
- Login and Register nav menu items only show when not logged in
- Logout and Profile nav menu items only show when logged in
- Better default stylesheet
- Fix TML pages displaying in search results
- Fix logout redirect
- Fix broken interim login when wp-login.php is disabled
- Remove AJAX module
- Require WordPress 4.3.1
Download this release
Release Info
Developer | jfarthing84 |
Plugin | Theme My Login |
Version | 6.4 |
Comparing to | |
See all releases |
Code changes from version 6.3.12 to 6.4
- admin/class-theme-my-login-admin.php +41 -17
- includes/class-theme-my-login-ms-signup.php +2 -7
- includes/class-theme-my-login-widget.php +1 -1
- includes/class-theme-my-login.php +106 -29
- language/theme-my-login.pot +191 -169
- modules/ajax/ajax.php +0 -204
- modules/ajax/css/ajax.css +0 -68
- modules/ajax/js/ajax.js +0 -122
- modules/custom-email/admin/custom-email-admin.php +24 -8
- modules/custom-email/custom-email.php +88 -46
- modules/custom-user-links/admin/custom-user-links-admin.php +1 -1
- modules/recaptcha/admin/recaptcha-admin.php +5 -7
- modules/recaptcha/js/recaptcha.js +0 -26
- modules/recaptcha/recaptcha.php +31 -58
- modules/security/security.php +5 -0
- modules/themed-profiles/themed-profiles.css +33 -60
- modules/themed-profiles/themed-profiles.js +5 -0
- modules/themed-profiles/themed-profiles.php +68 -3
- modules/user-moderation/admin/user-moderation-admin.php +22 -11
- modules/user-moderation/user-moderation.php +21 -41
- readme.txt +18 -4
- templates/login-form.php +25 -14
- templates/lostpassword-form.php +3 -3
- templates/profile-form.php +68 -24
- templates/register-form.php +7 -5
- templates/resetpass-form.php +15 -12
- templates/user-panel.php +2 -2
- theme-my-login.css +168 -42
- theme-my-login.php +1 -1
admin/class-theme-my-login-admin.php
CHANGED
@@ -80,15 +80,6 @@ class Theme_My_Login_Admin extends Theme_My_Login_Abstract {
|
|
80 |
'theme_my_login',
|
81 |
array( 'Theme_My_Login_Admin', 'settings_page' )
|
82 |
);
|
83 |
-
|
84 |
-
// General section
|
85 |
-
add_settings_section( 'general', __( 'General', 'theme-my-login' ), '__return_false', $this->options_key );
|
86 |
-
add_settings_section( 'modules', __( 'Modules', 'theme-my-login' ), '__return_false', $this->options_key );
|
87 |
-
|
88 |
-
// General fields
|
89 |
-
add_settings_field( 'enable_css', __( 'Stylesheet', 'theme-my-login' ), array( &$this, 'settings_field_enable_css' ), $this->options_key, 'general' );
|
90 |
-
add_settings_field( 'email_login', __( 'E-mail Login', 'theme-my-login' ), array( &$this, 'settings_field_email_login' ), $this->options_key, 'general' );
|
91 |
-
add_settings_field( 'modules', __( 'Modules', 'theme-my-login' ), array( &$this, 'settings_field_modules' ), $this->options_key, 'modules' );
|
92 |
}
|
93 |
|
94 |
/**
|
@@ -100,10 +91,22 @@ class Theme_My_Login_Admin extends Theme_My_Login_Abstract {
|
|
100 |
* @access public
|
101 |
*/
|
102 |
public function admin_init() {
|
|
|
|
|
103 |
register_setting( 'theme_my_login', 'theme_my_login', array( &$this, 'save_settings' ) );
|
104 |
|
|
|
105 |
if ( version_compare( $this->get_option( 'version', 0 ), Theme_My_Login::version, '<' ) )
|
106 |
$this->install();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
107 |
}
|
108 |
|
109 |
/**
|
@@ -162,16 +165,29 @@ class Theme_My_Login_Admin extends Theme_My_Login_Abstract {
|
|
162 |
}
|
163 |
|
164 |
/**
|
165 |
-
* Renders
|
166 |
*
|
167 |
* @since 6.3
|
168 |
* @access public
|
169 |
*/
|
170 |
-
public function
|
171 |
?>
|
172 |
-
|
173 |
-
<
|
174 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
175 |
<?php
|
176 |
}
|
177 |
|
@@ -206,7 +222,7 @@ class Theme_My_Login_Admin extends Theme_My_Login_Abstract {
|
|
206 |
*/
|
207 |
public function save_settings( $settings ) {
|
208 |
$settings['enable_css'] = ! empty( $settings['enable_css'] );
|
209 |
-
$settings['
|
210 |
$settings['active_modules'] = isset( $settings['active_modules'] ) ? (array) $settings['active_modules'] : array();
|
211 |
|
212 |
// If we have modules to activate
|
@@ -244,7 +260,7 @@ class Theme_My_Login_Admin extends Theme_My_Login_Abstract {
|
|
244 |
|
245 |
// Check if legacy page exists
|
246 |
if ( $page_id = $this->get_option( 'page_id' ) ) {
|
247 |
-
$page =
|
248 |
} else {
|
249 |
$page = get_page_by_title( 'Login' );
|
250 |
}
|
@@ -295,7 +311,7 @@ class Theme_My_Login_Admin extends Theme_My_Login_Abstract {
|
|
295 |
}
|
296 |
}
|
297 |
|
298 |
-
// 6.
|
299 |
if ( version_compare( $version, '6.3.7', '<' ) ) {
|
300 |
// Convert TML pages to regular pages
|
301 |
$wpdb->update( $wpdb->posts, array( 'post_type' => 'page' ), array( 'post_type' => 'tml_page' ) );
|
@@ -304,6 +320,14 @@ class Theme_My_Login_Admin extends Theme_My_Login_Abstract {
|
|
304 |
flush_rewrite_rules( false );
|
305 |
}
|
306 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
307 |
// Setup default pages
|
308 |
foreach ( Theme_My_Login::default_pages() as $action => $title ) {
|
309 |
if ( ! $page_id = Theme_My_Login::get_page_id( $action ) ) {
|
80 |
'theme_my_login',
|
81 |
array( 'Theme_My_Login_Admin', 'settings_page' )
|
82 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
}
|
84 |
|
85 |
/**
|
91 |
* @access public
|
92 |
*/
|
93 |
public function admin_init() {
|
94 |
+
|
95 |
+
// Register setting
|
96 |
register_setting( 'theme_my_login', 'theme_my_login', array( &$this, 'save_settings' ) );
|
97 |
|
98 |
+
// Install/Upgrade
|
99 |
if ( version_compare( $this->get_option( 'version', 0 ), Theme_My_Login::version, '<' ) )
|
100 |
$this->install();
|
101 |
+
|
102 |
+
// Add sections
|
103 |
+
add_settings_section( 'general', __( 'General', 'theme-my-login' ), '__return_false', $this->options_key );
|
104 |
+
add_settings_section( 'modules', __( 'Modules', 'theme-my-login' ), '__return_false', $this->options_key );
|
105 |
+
|
106 |
+
// Add fields
|
107 |
+
add_settings_field( 'enable_css', __( 'Stylesheet', 'theme-my-login' ), array( &$this, 'settings_field_enable_css' ), $this->options_key, 'general' );
|
108 |
+
add_settings_field( 'login_type', __( 'Login Type', 'theme-my-login' ), array( &$this, 'settings_field_login_type' ), $this->options_key, 'general' );
|
109 |
+
add_settings_field( 'modules', __( 'Modules', 'theme-my-login' ), array( &$this, 'settings_field_modules' ), $this->options_key, 'modules' );
|
110 |
}
|
111 |
|
112 |
/**
|
165 |
}
|
166 |
|
167 |
/**
|
168 |
+
* Renders Login Type settings field
|
169 |
*
|
170 |
* @since 6.3
|
171 |
* @access public
|
172 |
*/
|
173 |
+
public function settings_field_login_type() {
|
174 |
?>
|
175 |
+
|
176 |
+
<ul>
|
177 |
+
|
178 |
+
<li><input name="theme_my_login[login_type]" type="radio" id="theme_my_login_login_type_default" value="default"<?php checked( 'default', $this->get_option( 'login_type' ) ); ?> />
|
179 |
+
<label for="theme_my_login_login_type_default"><?php _e( 'Username only', 'theme-my-login' ); ?></label></li>
|
180 |
+
|
181 |
+
<li><input name="theme_my_login[login_type]" type="radio" id="theme_my_login_login_type_email" value="email"<?php checked( 'email', $this->get_option( 'login_type' ) ); ?> />
|
182 |
+
<label for="theme_my_login_login_type_email"><?php _e( 'E-mail only', 'theme-my-login' ); ?></label></li>
|
183 |
+
|
184 |
+
<li><input name="theme_my_login[login_type]" type="radio" id="theme_my_login_login_type_both" value="both"<?php checked( 'both', $this->get_option( 'login_type' ) ); ?> />
|
185 |
+
<label for="theme_my_login_login_type_both"><?php _e( 'Username or E-mail', 'theme-my-login' ); ?></label></li>
|
186 |
+
|
187 |
+
</ul>
|
188 |
+
|
189 |
+
<p class="description"><?php _e( 'Allow users to login using their username and/or e-mail address.', 'theme-my-login' ); ?></p>
|
190 |
+
|
191 |
<?php
|
192 |
}
|
193 |
|
222 |
*/
|
223 |
public function save_settings( $settings ) {
|
224 |
$settings['enable_css'] = ! empty( $settings['enable_css'] );
|
225 |
+
$settings['login_type'] = in_array( $settings['login_type'], array( 'default', 'email', 'both' ) ) ? $settings['login_type'] : 'default';
|
226 |
$settings['active_modules'] = isset( $settings['active_modules'] ) ? (array) $settings['active_modules'] : array();
|
227 |
|
228 |
// If we have modules to activate
|
260 |
|
261 |
// Check if legacy page exists
|
262 |
if ( $page_id = $this->get_option( 'page_id' ) ) {
|
263 |
+
$page = get_post( $page_id );
|
264 |
} else {
|
265 |
$page = get_page_by_title( 'Login' );
|
266 |
}
|
311 |
}
|
312 |
}
|
313 |
|
314 |
+
// 6.3.7 upgrade
|
315 |
if ( version_compare( $version, '6.3.7', '<' ) ) {
|
316 |
// Convert TML pages to regular pages
|
317 |
$wpdb->update( $wpdb->posts, array( 'post_type' => 'page' ), array( 'post_type' => 'tml_page' ) );
|
320 |
flush_rewrite_rules( false );
|
321 |
}
|
322 |
|
323 |
+
// 6.4 upgrade
|
324 |
+
if ( version_compare( $version, '6.4', '<' ) ) {
|
325 |
+
// Convert e-mail login option
|
326 |
+
if ( $this->get_option( 'email_login' ) )
|
327 |
+
$this->set_option( 'login_type', 'both' );
|
328 |
+
$this->delete_option( 'email_login' );
|
329 |
+
}
|
330 |
+
|
331 |
// Setup default pages
|
332 |
foreach ( Theme_My_Login::default_pages() as $action => $title ) {
|
333 |
if ( ! $page_id = Theme_My_Login::get_page_id( $action ) ) {
|
includes/class-theme-my-login-ms-signup.php
CHANGED
@@ -61,14 +61,9 @@ class Theme_My_Login_MS_Signup extends Theme_My_Login_Abstract {
|
|
61 |
* @param object $theme_my_login Theme_My_Login object
|
62 |
*/
|
63 |
public function tml_request_register( &$theme_my_login ) {
|
64 |
-
global $current_site
|
65 |
|
66 |
-
|
67 |
-
add_filter( 'pre_option_blog_public', '__return_zero' );
|
68 |
-
add_action( 'wp_head', 'noindex' );
|
69 |
-
} else {
|
70 |
-
add_action( 'wp_head', 'wp_no_robots' );
|
71 |
-
}
|
72 |
add_action( 'wp_head', array( &$this, 'signup_header' ) );
|
73 |
|
74 |
if ( is_array( get_site_option( 'illegal_names' )) && isset( $_GET[ 'new' ] ) && in_array( $_GET[ 'new' ], get_site_option( 'illegal_names' ) ) == true ) {
|
61 |
* @param object $theme_my_login Theme_My_Login object
|
62 |
*/
|
63 |
public function tml_request_register( &$theme_my_login ) {
|
64 |
+
global $current_site;
|
65 |
|
66 |
+
add_action( 'wp_head', 'wp_no_robots' );
|
|
|
|
|
|
|
|
|
|
|
67 |
add_action( 'wp_head', array( &$this, 'signup_header' ) );
|
68 |
|
69 |
if ( is_array( get_site_option( 'illegal_names' )) && isset( $_GET[ 'new' ] ) && in_array( $_GET[ 'new' ], get_site_option( 'illegal_names' ) ) == true ) {
|
includes/class-theme-my-login-widget.php
CHANGED
@@ -23,7 +23,7 @@ class Theme_My_Login_Widget extends WP_Widget {
|
|
23 |
'classname' => 'widget_theme_my_login',
|
24 |
'description' => __( 'A login form for your blog.', 'theme-my-login' )
|
25 |
);
|
26 |
-
|
27 |
}
|
28 |
|
29 |
/**
|
23 |
'classname' => 'widget_theme_my_login',
|
24 |
'description' => __( 'A login form for your blog.', 'theme-my-login' )
|
25 |
);
|
26 |
+
parent::__construct( 'theme-my-login', __( 'Theme My Login', 'theme-my-login' ), $widget_options );
|
27 |
}
|
28 |
|
29 |
/**
|
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.
|
25 |
|
26 |
/**
|
27 |
* Holds options key
|
@@ -99,7 +99,7 @@ class Theme_My_Login extends Theme_My_Login_Abstract {
|
|
99 |
public static function default_options() {
|
100 |
return apply_filters( 'tml_default_options', array(
|
101 |
'enable_css' => true,
|
102 |
-
'
|
103 |
'active_modules' => array()
|
104 |
) );
|
105 |
}
|
@@ -136,6 +136,7 @@ class Theme_My_Login extends Theme_My_Login_Abstract {
|
|
136 |
add_action( 'init', array( &$this, 'init' ) );
|
137 |
add_action( 'widgets_init', array( &$this, 'widgets_init' ) );
|
138 |
add_action( 'wp', array( &$this, 'wp' ) );
|
|
|
139 |
add_action( 'template_redirect', array( &$this, 'template_redirect' ) );
|
140 |
add_action( 'wp_enqueue_scripts', array( &$this, 'wp_enqueue_scripts' ) );
|
141 |
add_action( 'wp_head', array( &$this, 'wp_head' ) );
|
@@ -151,7 +152,7 @@ class Theme_My_Login extends Theme_My_Login_Abstract {
|
|
151 |
add_filter( 'wp_list_pages_excludes', array( &$this, 'wp_list_pages_excludes' ) );
|
152 |
add_filter( 'page_link', array( &$this, 'page_link' ), 10, 2 );
|
153 |
|
154 |
-
add_action( 'tml_new_user_registered', 'wp_new_user_notification', 10,
|
155 |
add_action( 'tml_user_password_changed', 'wp_password_change_notification' );
|
156 |
|
157 |
add_shortcode( 'theme-my-login', array( &$this, 'shortcode' ) );
|
@@ -183,11 +184,13 @@ class Theme_My_Login extends Theme_My_Login_Abstract {
|
|
183 |
* @access public
|
184 |
*/
|
185 |
public function init() {
|
|
|
|
|
186 |
self::load_textdomain();
|
187 |
|
188 |
$this->errors = new WP_Error();
|
189 |
|
190 |
-
if ( ! is_admin() && $this->get_option( 'enable_css' ) )
|
191 |
wp_enqueue_style( 'theme-my-login', self::get_stylesheet(), false, $this->get_option( 'version' ) );
|
192 |
}
|
193 |
|
@@ -236,6 +239,46 @@ class Theme_My_Login extends Theme_My_Login_Abstract {
|
|
236 |
}
|
237 |
}
|
238 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
239 |
/**
|
240 |
* Proccesses the request
|
241 |
*
|
@@ -261,16 +304,12 @@ class Theme_My_Login extends Theme_My_Login_Abstract {
|
|
261 |
$http_post = ( 'POST' == $_SERVER['REQUEST_METHOD'] );
|
262 |
switch ( $this->request_action ) {
|
263 |
case 'postpass' :
|
264 |
-
|
265 |
-
|
266 |
-
if ( empty( $wp_hasher ) ) {
|
267 |
-
require_once( ABSPATH . 'wp-includes/class-phpass.php' );
|
268 |
-
// By default, use the portable hash from phpass
|
269 |
-
$wp_hasher = new PasswordHash( 8, true );
|
270 |
-
}
|
271 |
|
272 |
-
|
273 |
-
|
|
|
274 |
|
275 |
wp_safe_redirect( wp_get_referer() );
|
276 |
exit;
|
@@ -283,7 +322,14 @@ class Theme_My_Login extends Theme_My_Login_Abstract {
|
|
283 |
|
284 |
wp_logout();
|
285 |
|
286 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
287 |
wp_safe_redirect( $redirect_to );
|
288 |
exit;
|
289 |
break;
|
@@ -300,9 +346,9 @@ class Theme_My_Login extends Theme_My_Login_Abstract {
|
|
300 |
|
301 |
if ( isset( $_REQUEST['error'] ) ) {
|
302 |
if ( 'invalidkey' == $_REQUEST['error'] )
|
303 |
-
$this->errors->add( 'invalidkey', __( '
|
304 |
elseif ( 'expiredkey' == $_REQUEST['error'] )
|
305 |
-
$this->errors->add( 'expiredkey', __( '
|
306 |
}
|
307 |
|
308 |
do_action( 'lost_password' );
|
@@ -366,7 +412,11 @@ class Theme_My_Login extends Theme_My_Login_Abstract {
|
|
366 |
$user_login = '';
|
367 |
$user_email = '';
|
368 |
if ( $http_post ) {
|
369 |
-
|
|
|
|
|
|
|
|
|
370 |
$user_email = $_POST['user_email'];
|
371 |
|
372 |
$this->errors = self::register_new_user( $user_login, $user_email );
|
@@ -566,7 +616,7 @@ if(typeof wpOnload=='function')wpOnload()
|
|
566 |
}
|
567 |
|
568 |
/**
|
569 |
-
* Handles
|
570 |
*
|
571 |
* @since 6.0
|
572 |
* @access public
|
@@ -576,11 +626,18 @@ if(typeof wpOnload=='function')wpOnload()
|
|
576 |
*/
|
577 |
public function wp_authenticate( &$user_login ) {
|
578 |
global $wpdb;
|
579 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
580 |
if ( $found = $wpdb->get_var( $wpdb->prepare( "SELECT user_login FROM $wpdb->users WHERE user_email = %s", $user_login ) ) )
|
581 |
$user_login = $found;
|
582 |
}
|
583 |
-
return;
|
584 |
}
|
585 |
|
586 |
|
@@ -653,7 +710,7 @@ if(typeof wpOnload=='function')wpOnload()
|
|
653 |
public function logout_url( $logout_url, $redirect ) {
|
654 |
$logout_url = self::get_page_link( 'logout' );
|
655 |
if ( $redirect )
|
656 |
-
$
|
657 |
return $logout_url;
|
658 |
}
|
659 |
|
@@ -700,7 +757,7 @@ if(typeof wpOnload=='function')wpOnload()
|
|
700 |
}
|
701 |
|
702 |
/**
|
703 |
-
*
|
704 |
*
|
705 |
* Callback for "wp_setup_nav_menu_item" hook in wp_setup_nav_menu_item()
|
706 |
*
|
@@ -715,12 +772,30 @@ if(typeof wpOnload=='function')wpOnload()
|
|
715 |
if ( is_admin() )
|
716 |
return $menu_item;
|
717 |
|
718 |
-
if ( 'page'
|
719 |
-
|
720 |
-
|
721 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
722 |
}
|
723 |
}
|
|
|
724 |
return $menu_item;
|
725 |
}
|
726 |
|
@@ -1100,7 +1175,7 @@ if(typeof wpOnload=='function')wpOnload()
|
|
1100 |
require_once ABSPATH . WPINC . '/class-phpass.php';
|
1101 |
$wp_hasher = new PasswordHash( 8, true );
|
1102 |
}
|
1103 |
-
$hashed = $wp_hasher->HashPassword( $key );
|
1104 |
$wpdb->update( $wpdb->users, array( 'user_activation_key' => $hashed ), array( 'user_login' => $user_login ) );
|
1105 |
|
1106 |
$message = __( 'Someone requested that the password be reset for the following account:', 'theme-my-login' ) . "\r\n\r\n";
|
@@ -1159,6 +1234,8 @@ if(typeof wpOnload=='function')wpOnload()
|
|
1159 |
* @return int|WP_Error Either user's ID or error on failure.
|
1160 |
*/
|
1161 |
public static function register_new_user( $user_login, $user_email ) {
|
|
|
|
|
1162 |
$errors = new WP_Error();
|
1163 |
|
1164 |
$sanitized_user_login = sanitize_user( $user_login );
|
@@ -1193,14 +1270,14 @@ if(typeof wpOnload=='function')wpOnload()
|
|
1193 |
|
1194 |
$user_pass = apply_filters( 'tml_user_registration_pass', wp_generate_password( 12, false ) );
|
1195 |
$user_id = wp_create_user( $sanitized_user_login, $user_pass, $user_email );
|
1196 |
-
if ( ! $user_id ) {
|
1197 |
$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' ) ) );
|
1198 |
return $errors;
|
1199 |
}
|
1200 |
|
1201 |
update_user_option( $user_id, 'default_password_nag', true, true ); //Set up the Password change nag.
|
1202 |
|
1203 |
-
do_action( 'tml_new_user_registered', $user_id,
|
1204 |
|
1205 |
return $user_id;
|
1206 |
}
|
21 |
* @since 6.3.2
|
22 |
* @const string
|
23 |
*/
|
24 |
+
const version = '6.4';
|
25 |
|
26 |
/**
|
27 |
* Holds options key
|
99 |
public static function default_options() {
|
100 |
return apply_filters( 'tml_default_options', array(
|
101 |
'enable_css' => true,
|
102 |
+
'login_type' => 'default',
|
103 |
'active_modules' => array()
|
104 |
) );
|
105 |
}
|
136 |
add_action( 'init', array( &$this, 'init' ) );
|
137 |
add_action( 'widgets_init', array( &$this, 'widgets_init' ) );
|
138 |
add_action( 'wp', array( &$this, 'wp' ) );
|
139 |
+
add_action( 'pre_get_posts', array( &$this, 'pre_get_posts' ) );
|
140 |
add_action( 'template_redirect', array( &$this, 'template_redirect' ) );
|
141 |
add_action( 'wp_enqueue_scripts', array( &$this, 'wp_enqueue_scripts' ) );
|
142 |
add_action( 'wp_head', array( &$this, 'wp_head' ) );
|
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' ) );
|
184 |
* @access public
|
185 |
*/
|
186 |
public function init() {
|
187 |
+
global $pagenow;
|
188 |
+
|
189 |
self::load_textdomain();
|
190 |
|
191 |
$this->errors = new WP_Error();
|
192 |
|
193 |
+
if ( ! is_admin() && 'wp-login.php' != $pagenow && $this->get_option( 'enable_css' ) )
|
194 |
wp_enqueue_style( 'theme-my-login', self::get_stylesheet(), false, $this->get_option( 'version' ) );
|
195 |
}
|
196 |
|
239 |
}
|
240 |
}
|
241 |
|
242 |
+
/**
|
243 |
+
* Exclude TML pages from search
|
244 |
+
*
|
245 |
+
* @since 6.1.13
|
246 |
+
* @access public
|
247 |
+
*/
|
248 |
+
public function pre_get_posts( &$query ) {
|
249 |
+
|
250 |
+
// Bail if not a search
|
251 |
+
if ( ! $query->is_search )
|
252 |
+
return;
|
253 |
+
|
254 |
+
// Get the requested post type
|
255 |
+
$post_type = $query->get( 'post_type' );
|
256 |
+
|
257 |
+
// Bail if not querying pages
|
258 |
+
if ( ! empty( $post_type ) && ! in_array( 'page', (array) $post_type ) )
|
259 |
+
return;
|
260 |
+
|
261 |
+
// Get TML pages
|
262 |
+
$pages = get_posts( array(
|
263 |
+
'post_type' => 'page',
|
264 |
+
'post_status' => 'any',
|
265 |
+
'meta_key' => '_tml_action',
|
266 |
+
'posts_per_page' => -1
|
267 |
+
) );
|
268 |
+
|
269 |
+
// Get the page IDs
|
270 |
+
$pages = wp_list_pluck( $pages, 'ID' );
|
271 |
+
|
272 |
+
// Get any currently exclude posts
|
273 |
+
$excludes = (array) $query->get( 'post__not_in' );
|
274 |
+
|
275 |
+
// Merge the excludes
|
276 |
+
$excludes = array_merge( $excludes, $pages );
|
277 |
+
|
278 |
+
// Set the excludes
|
279 |
+
$query->set( 'post__not_in', $excludes );
|
280 |
+
}
|
281 |
+
|
282 |
/**
|
283 |
* Proccesses the request
|
284 |
*
|
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 |
+
$secure = ( 'https' === parse_url( home_url(), PHP_URL_SCHEME ) );
|
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() );
|
315 |
exit;
|
322 |
|
323 |
wp_logout();
|
324 |
|
325 |
+
if ( ! empty( $_REQUEST['redirect_to'] ) ) {
|
326 |
+
$redirect_to = $requested_redirect_to = $_REQUEST['redirect_to'];
|
327 |
+
} else {
|
328 |
+
$redirect_to = site_url( 'wp-login.php?loggedout=true' );
|
329 |
+
$requested_redirect_to = '';
|
330 |
+
}
|
331 |
+
|
332 |
+
$redirect_to = apply_filters( 'logout_redirect', $redirect_to, $requested_redirect_to, $user );
|
333 |
wp_safe_redirect( $redirect_to );
|
334 |
exit;
|
335 |
break;
|
346 |
|
347 |
if ( isset( $_REQUEST['error'] ) ) {
|
348 |
if ( 'invalidkey' == $_REQUEST['error'] )
|
349 |
+
$this->errors->add( 'invalidkey', __( 'Your password reset link appears to be invalid. Please request a new link below.', 'theme-my-login' ) );
|
350 |
elseif ( 'expiredkey' == $_REQUEST['error'] )
|
351 |
+
$this->errors->add( 'expiredkey', __( 'Your password reset link has expired. Please request a new link below.', 'theme-my-login' ) );
|
352 |
}
|
353 |
|
354 |
do_action( 'lost_password' );
|
412 |
$user_login = '';
|
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 = self::register_new_user( $user_login, $user_email );
|
616 |
}
|
617 |
|
618 |
/**
|
619 |
+
* Handles login type enforcement
|
620 |
*
|
621 |
* @since 6.0
|
622 |
* @access public
|
626 |
*/
|
627 |
public function wp_authenticate( &$user_login ) {
|
628 |
global $wpdb;
|
629 |
+
|
630 |
+
$login_type = $this->get_option( 'login_type' );
|
631 |
+
|
632 |
+
if ( 'default' == $login_type )
|
633 |
+
return;
|
634 |
+
|
635 |
+
if ( ! is_email( $user_login ) && 'email' == $login_type ) {
|
636 |
+
$user_login = -1;
|
637 |
+
} elseif ( is_email( $user_login ) ) {
|
638 |
if ( $found = $wpdb->get_var( $wpdb->prepare( "SELECT user_login FROM $wpdb->users WHERE user_email = %s", $user_login ) ) )
|
639 |
$user_login = $found;
|
640 |
}
|
|
|
641 |
}
|
642 |
|
643 |
|
710 |
public function logout_url( $logout_url, $redirect ) {
|
711 |
$logout_url = self::get_page_link( 'logout' );
|
712 |
if ( $redirect )
|
713 |
+
$logout_url = add_query_arg( 'redirect_to', urlencode( $redirect ), $logout_url );
|
714 |
return $logout_url;
|
715 |
}
|
716 |
|
757 |
}
|
758 |
|
759 |
/**
|
760 |
+
* Hide Login & Register if user is logged in, hide Logout if not
|
761 |
*
|
762 |
* Callback for "wp_setup_nav_menu_item" hook in wp_setup_nav_menu_item()
|
763 |
*
|
772 |
if ( is_admin() )
|
773 |
return $menu_item;
|
774 |
|
775 |
+
if ( 'page' != $menu_item->object )
|
776 |
+
return $menu_item;
|
777 |
+
|
778 |
+
// User is logged in
|
779 |
+
if ( is_user_logged_in() ) {
|
780 |
+
|
781 |
+
// Change Login to Logout
|
782 |
+
if ( self::is_tml_page( 'login', $menu_item->object_id ) ) {
|
783 |
+
$menu_item->_invalid = true;
|
784 |
+
|
785 |
+
// Hide Register
|
786 |
+
} elseif ( self::is_tml_page( 'register', $menu_item->object_id ) ) {
|
787 |
+
$menu_item->_invalid = true;
|
788 |
+
}
|
789 |
+
|
790 |
+
// User is not logged in
|
791 |
+
} else {
|
792 |
+
|
793 |
+
// Hide Logout
|
794 |
+
if ( self::is_tml_page( 'logout', $menu_item->object_id ) ) {
|
795 |
+
$menu_item->_invalid = true;
|
796 |
}
|
797 |
}
|
798 |
+
|
799 |
return $menu_item;
|
800 |
}
|
801 |
|
1175 |
require_once ABSPATH . WPINC . '/class-phpass.php';
|
1176 |
$wp_hasher = new PasswordHash( 8, true );
|
1177 |
}
|
1178 |
+
$hashed = time() . ':' . $wp_hasher->HashPassword( $key );
|
1179 |
$wpdb->update( $wpdb->users, array( 'user_activation_key' => $hashed ), array( 'user_login' => $user_login ) );
|
1180 |
|
1181 |
$message = __( 'Someone requested that the password be reset for the following account:', 'theme-my-login' ) . "\r\n\r\n";
|
1234 |
* @return int|WP_Error Either user's ID or error on failure.
|
1235 |
*/
|
1236 |
public static function register_new_user( $user_login, $user_email ) {
|
1237 |
+
global $wp_version;
|
1238 |
+
|
1239 |
$errors = new WP_Error();
|
1240 |
|
1241 |
$sanitized_user_login = sanitize_user( $user_login );
|
1270 |
|
1271 |
$user_pass = apply_filters( 'tml_user_registration_pass', wp_generate_password( 12, false ) );
|
1272 |
$user_id = wp_create_user( $sanitized_user_login, $user_pass, $user_email );
|
1273 |
+
if ( ! $user_id || is_wp_error( $user_id ) ) {
|
1274 |
$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' ) ) );
|
1275 |
return $errors;
|
1276 |
}
|
1277 |
|
1278 |
update_user_option( $user_id, 'default_password_nag', true, true ); //Set up the Password change nag.
|
1279 |
|
1280 |
+
do_action( 'tml_new_user_registered', $user_id, null, 'both' );
|
1281 |
|
1282 |
return $user_id;
|
1283 |
}
|
language/theme-my-login.pot
CHANGED
@@ -2,9 +2,9 @@
|
|
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 6.
|
6 |
-
"Report-Msgid-Bugs-To:
|
7 |
-
"POT-Creation-Date: 2015-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -13,7 +13,7 @@ msgstr ""
|
|
13 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
|
15 |
#: admin/class-theme-my-login-admin.php:68
|
16 |
-
#: admin/class-theme-my-login-admin.php:
|
17 |
msgid "Theme My Login Settings"
|
18 |
msgstr ""
|
19 |
|
@@ -23,43 +23,50 @@ msgstr ""
|
|
23 |
|
24 |
#: admin/class-theme-my-login-admin.php:77
|
25 |
#: admin/class-theme-my-login-admin.php:78
|
26 |
-
#: admin/class-theme-my-login-admin.php:
|
27 |
msgid "General"
|
28 |
msgstr ""
|
29 |
|
30 |
-
#: admin/class-theme-my-login-admin.php:
|
31 |
-
#: admin/class-theme-my-login-admin.php:
|
32 |
msgid "Modules"
|
33 |
msgstr ""
|
34 |
|
35 |
-
#: admin/class-theme-my-login-admin.php:
|
36 |
msgid "Stylesheet"
|
37 |
msgstr ""
|
38 |
|
39 |
-
#: admin/class-theme-my-login-admin.php:
|
40 |
-
msgid "
|
41 |
msgstr ""
|
42 |
|
43 |
-
#: admin/class-theme-my-login-admin.php:
|
44 |
msgid "Enable \"theme-my-login.css\""
|
45 |
msgstr ""
|
46 |
|
47 |
-
#: admin/class-theme-my-login-admin.php:
|
48 |
msgid ""
|
49 |
"In order to keep changes between upgrades, you can store your customized "
|
50 |
"\"theme-my-login.css\" in your current theme directory."
|
51 |
msgstr ""
|
52 |
|
53 |
-
#: admin/class-theme-my-login-admin.php:
|
54 |
-
msgid "
|
55 |
msgstr ""
|
56 |
|
57 |
-
#: admin/class-theme-my-login-admin.php:
|
58 |
-
msgid ""
|
59 |
-
|
|
|
|
|
|
|
60 |
msgstr ""
|
61 |
|
62 |
#: admin/class-theme-my-login-admin.php:189
|
|
|
|
|
|
|
|
|
63 |
msgid "Enable %s"
|
64 |
msgstr ""
|
65 |
|
@@ -275,7 +282,7 @@ msgstr ""
|
|
275 |
|
276 |
#: includes/class-theme-my-login-template.php:157
|
277 |
#: includes/class-theme-my-login-widget.php:111
|
278 |
-
#: includes/class-theme-my-login.php:119 templates/register-form.php:
|
279 |
msgid "Register"
|
280 |
msgstr ""
|
281 |
|
@@ -286,7 +293,7 @@ msgid "Lost Password"
|
|
286 |
msgstr ""
|
287 |
|
288 |
#: includes/class-theme-my-login-template.php:167
|
289 |
-
#: includes/class-theme-my-login.php:117 templates/login-form.php:
|
290 |
msgid "Log In"
|
291 |
msgstr ""
|
292 |
|
@@ -318,7 +325,7 @@ msgstr ""
|
|
318 |
msgid "A login form for your blog."
|
319 |
msgstr ""
|
320 |
|
321 |
-
#. #-#-#-#-# plugin.pot (Theme My Login 6.
|
322 |
#. Plugin Name of the plugin/theme
|
323 |
#: includes/class-theme-my-login-widget.php:26
|
324 |
msgid "Theme My Login"
|
@@ -370,142 +377,144 @@ msgstr ""
|
|
370 |
|
371 |
#: includes/class-theme-my-login.php:121
|
372 |
#: modules/custom-email/admin/custom-email-admin.php:102
|
373 |
-
#: templates/resetpass-form.php:
|
374 |
msgid "Reset Password"
|
375 |
msgstr ""
|
376 |
|
377 |
-
#: includes/class-theme-my-login.php:
|
378 |
-
msgid "
|
|
|
|
|
379 |
msgstr ""
|
380 |
|
381 |
-
#: includes/class-theme-my-login.php:
|
382 |
-
msgid "
|
383 |
msgstr ""
|
384 |
|
385 |
-
#: includes/class-theme-my-login.php:
|
386 |
msgid "The passwords do not match."
|
387 |
msgstr ""
|
388 |
|
389 |
-
#: includes/class-theme-my-login.php:
|
390 |
msgid "You are now logged out."
|
391 |
msgstr ""
|
392 |
|
393 |
-
#: includes/class-theme-my-login.php:
|
394 |
msgid "User registration is currently not allowed."
|
395 |
msgstr ""
|
396 |
|
397 |
-
#: includes/class-theme-my-login.php:
|
398 |
msgid "Check your e-mail for the confirmation link."
|
399 |
msgstr ""
|
400 |
|
401 |
-
#: includes/class-theme-my-login.php:
|
402 |
msgid "Your password has been reset."
|
403 |
msgstr ""
|
404 |
|
405 |
-
#: includes/class-theme-my-login.php:
|
406 |
msgid "Registration complete. Please check your e-mail."
|
407 |
msgstr ""
|
408 |
|
409 |
-
#: includes/class-theme-my-login.php:
|
410 |
msgid "Your session has expired. Please log-in again."
|
411 |
msgstr ""
|
412 |
|
413 |
-
#: includes/class-theme-my-login.php:
|
414 |
msgid ""
|
415 |
"<strong>You have successfully updated WordPress!</strong> Please log back in "
|
416 |
"to experience the awesomeness."
|
417 |
msgstr ""
|
418 |
|
419 |
-
#: includes/class-theme-my-login.php:
|
420 |
msgid "Please log in to continue."
|
421 |
msgstr ""
|
422 |
|
423 |
-
#: includes/class-theme-my-login.php:
|
424 |
msgid "<strong>ERROR</strong>: Enter a username or e-mail address."
|
425 |
msgstr ""
|
426 |
|
427 |
-
#: includes/class-theme-my-login.php:
|
428 |
msgid ""
|
429 |
"<strong>ERROR</strong>: There is no user registered with that email address."
|
430 |
msgstr ""
|
431 |
|
432 |
-
#: includes/class-theme-my-login.php:
|
433 |
msgid "<strong>ERROR</strong>: Invalid username or e-mail."
|
434 |
msgstr ""
|
435 |
|
436 |
-
#: includes/class-theme-my-login.php:
|
437 |
msgid "Password reset is not allowed for this user"
|
438 |
msgstr ""
|
439 |
|
440 |
-
#: includes/class-theme-my-login.php:
|
441 |
msgid "Someone requested that the password be reset for the following account:"
|
442 |
msgstr ""
|
443 |
|
444 |
-
#: includes/class-theme-my-login.php:
|
445 |
-
#: modules/custom-email/custom-email.php:
|
446 |
-
#: modules/custom-email/custom-email.php:
|
447 |
-
#: modules/user-moderation/admin/user-moderation-admin.php:
|
448 |
-
#: modules/user-moderation/user-moderation.php:
|
449 |
msgid "Username: %s"
|
450 |
msgstr ""
|
451 |
|
452 |
-
#: includes/class-theme-my-login.php:
|
453 |
msgid "If this was a mistake, just ignore this email and nothing will happen."
|
454 |
msgstr ""
|
455 |
|
456 |
-
#: includes/class-theme-my-login.php:
|
457 |
msgid "To reset your password, visit the following address:"
|
458 |
msgstr ""
|
459 |
|
460 |
-
#: includes/class-theme-my-login.php:
|
461 |
msgid "[%s] Password Reset"
|
462 |
msgstr ""
|
463 |
|
464 |
-
#: includes/class-theme-my-login.php:
|
465 |
#: modules/user-moderation/admin/user-moderation-admin.php:252
|
466 |
-
#: modules/user-moderation/admin/user-moderation-admin.php:
|
467 |
-
#: modules/user-moderation/admin/user-moderation-admin.php:
|
468 |
msgid "The e-mail could not be sent."
|
469 |
msgstr ""
|
470 |
|
471 |
-
#: includes/class-theme-my-login.php:
|
472 |
#: modules/user-moderation/admin/user-moderation-admin.php:252
|
473 |
-
#: modules/user-moderation/admin/user-moderation-admin.php:
|
474 |
-
#: modules/user-moderation/admin/user-moderation-admin.php:
|
475 |
msgid "Possible reason: your host may have disabled the mail() function..."
|
476 |
msgstr ""
|
477 |
|
478 |
-
#: includes/class-theme-my-login.php:
|
479 |
msgid "<strong>ERROR</strong>: Please enter a username."
|
480 |
msgstr ""
|
481 |
|
482 |
-
#: includes/class-theme-my-login.php:
|
483 |
msgid ""
|
484 |
"<strong>ERROR</strong>: This username is invalid because it uses illegal "
|
485 |
"characters. Please enter a valid username."
|
486 |
msgstr ""
|
487 |
|
488 |
-
#: includes/class-theme-my-login.php:
|
489 |
msgid ""
|
490 |
"<strong>ERROR</strong>: This username is already registered, please choose "
|
491 |
"another one."
|
492 |
msgstr ""
|
493 |
|
494 |
-
#: includes/class-theme-my-login.php:
|
495 |
msgid "<strong>ERROR</strong>: Please type your e-mail address."
|
496 |
msgstr ""
|
497 |
|
498 |
-
#: includes/class-theme-my-login.php:
|
499 |
msgid "<strong>ERROR</strong>: The email address isn’t correct."
|
500 |
msgstr ""
|
501 |
|
502 |
-
#: includes/class-theme-my-login.php:
|
503 |
msgid ""
|
504 |
"<strong>ERROR</strong>: This email is already registered, please choose "
|
505 |
"another one."
|
506 |
msgstr ""
|
507 |
|
508 |
-
#: includes/class-theme-my-login.php:
|
509 |
msgid ""
|
510 |
"<strong>ERROR</strong>: Couldn’t register you... please contact the <a "
|
511 |
"href=\"mailto:%s\">webmaster</a> !"
|
@@ -517,7 +526,8 @@ msgid "Theme My Login Custom E-mail Settings"
|
|
517 |
msgstr ""
|
518 |
|
519 |
#: modules/custom-email/admin/custom-email-admin.php:93
|
520 |
-
#: templates/
|
|
|
521 |
msgid "E-mail"
|
522 |
msgstr ""
|
523 |
|
@@ -554,10 +564,11 @@ msgid "This e-mail will be sent to a new user upon registration."
|
|
554 |
msgstr ""
|
555 |
|
556 |
#: modules/custom-email/admin/custom-email-admin.php:180
|
|
|
557 |
#: modules/custom-email/admin/custom-email-admin.php:439
|
558 |
msgid ""
|
559 |
-
"Please be sure to include the variable %
|
560 |
-
"
|
561 |
msgstr ""
|
562 |
|
563 |
#: modules/custom-email/admin/custom-email-admin.php:181
|
@@ -684,12 +695,6 @@ msgid ""
|
|
684 |
"password."
|
685 |
msgstr ""
|
686 |
|
687 |
-
#: modules/custom-email/admin/custom-email-admin.php:285
|
688 |
-
msgid ""
|
689 |
-
"Please be sure to include the variable %reseturl% or else the user will not "
|
690 |
-
"be able to recover their password!"
|
691 |
-
msgstr ""
|
692 |
-
|
693 |
#: modules/custom-email/admin/custom-email-admin.php:332
|
694 |
msgid ""
|
695 |
"This e-mail will be sent to the e-mail address or addresses (multiple "
|
@@ -729,42 +734,47 @@ msgid ""
|
|
729 |
"\"Pending\"."
|
730 |
msgstr ""
|
731 |
|
732 |
-
#: modules/custom-email/custom-email.php:
|
|
|
|
|
|
|
|
|
733 |
msgid "New user registration on your site %s:"
|
734 |
msgstr ""
|
735 |
|
736 |
-
#: modules/custom-email/custom-email.php:
|
737 |
-
#: modules/user-moderation/user-moderation.php:
|
738 |
msgid "E-mail: %s"
|
739 |
msgstr ""
|
740 |
|
741 |
-
#: modules/custom-email/custom-email.php:
|
742 |
msgid "[%s] New User Registration"
|
743 |
msgstr ""
|
744 |
|
745 |
-
#: modules/custom-email/custom-email.php:
|
746 |
-
#: modules/user-moderation/admin/user-moderation-admin.php:
|
747 |
-
msgid "
|
748 |
msgstr ""
|
749 |
|
750 |
-
#: modules/custom-email/custom-email.php:
|
751 |
-
msgid "[%s] Your username and password"
|
752 |
msgstr ""
|
753 |
|
754 |
-
#: modules/custom-email/custom-email.php:
|
755 |
msgid "[%s] Password Lost/Changed"
|
756 |
msgstr ""
|
757 |
|
758 |
-
#: modules/custom-email/custom-email.php:
|
759 |
msgid "Password Lost and Changed for user: %s"
|
760 |
msgstr ""
|
761 |
|
762 |
#: modules/custom-passwords/custom-passwords.php:68
|
763 |
-
#: templates/login-form.php:
|
764 |
msgid "Password"
|
765 |
msgstr ""
|
766 |
|
767 |
#: modules/custom-passwords/custom-passwords.php:70
|
|
|
768 |
msgid "Confirm Password"
|
769 |
msgstr ""
|
770 |
|
@@ -894,7 +904,7 @@ msgid "Update"
|
|
894 |
msgstr ""
|
895 |
|
896 |
#: modules/recaptcha/admin/recaptcha-admin.php:89
|
897 |
-
#: modules/recaptcha/admin/recaptcha-admin.php:
|
898 |
msgid "Theme My Login reCAPTCHA Settings"
|
899 |
msgstr ""
|
900 |
|
@@ -903,11 +913,11 @@ msgid "reCAPTCHA"
|
|
903 |
msgstr ""
|
904 |
|
905 |
#: modules/recaptcha/admin/recaptcha-admin.php:98
|
906 |
-
msgid "
|
907 |
msgstr ""
|
908 |
|
909 |
#: modules/recaptcha/admin/recaptcha-admin.php:99
|
910 |
-
msgid "
|
911 |
msgstr ""
|
912 |
|
913 |
#: modules/recaptcha/admin/recaptcha-admin.php:100
|
@@ -916,37 +926,25 @@ msgstr ""
|
|
916 |
|
917 |
#: modules/recaptcha/admin/recaptcha-admin.php:123
|
918 |
msgctxt "recaptcha theme"
|
919 |
-
msgid "
|
920 |
msgstr ""
|
921 |
|
922 |
#: modules/recaptcha/admin/recaptcha-admin.php:124
|
923 |
msgctxt "recaptcha theme"
|
924 |
-
msgid "
|
925 |
-
msgstr ""
|
926 |
-
|
927 |
-
#: modules/recaptcha/admin/recaptcha-admin.php:125
|
928 |
-
msgctxt "recaptcha theme"
|
929 |
-
msgid "Black Glass"
|
930 |
-
msgstr ""
|
931 |
-
|
932 |
-
#: modules/recaptcha/admin/recaptcha-admin.php:126
|
933 |
-
msgctxt "recaptcha theme"
|
934 |
-
msgid "Clean"
|
935 |
-
msgstr ""
|
936 |
-
|
937 |
-
#: modules/recaptcha/recaptcha.php:128
|
938 |
-
msgid "<strong>ERROR</strong>: Invalid reCAPTCHA private key."
|
939 |
msgstr ""
|
940 |
|
941 |
-
#: modules/recaptcha/recaptcha.php:
|
942 |
-
msgid "<strong>ERROR</strong>: Invalid reCAPTCHA
|
943 |
msgstr ""
|
944 |
|
945 |
-
#: modules/recaptcha/recaptcha.php:
|
946 |
-
msgid "
|
|
|
|
|
947 |
msgstr ""
|
948 |
|
949 |
-
#: modules/recaptcha/recaptcha.php:
|
950 |
msgid "<strong>ERROR</strong>: Unable to reach the reCAPTCHA server."
|
951 |
msgstr ""
|
952 |
|
@@ -1020,63 +1018,63 @@ msgstr ""
|
|
1020 |
msgid "Lock"
|
1021 |
msgstr ""
|
1022 |
|
1023 |
-
#: modules/security/security.php:
|
1024 |
msgid "Your account has been unlocked. You may now log in."
|
1025 |
msgstr ""
|
1026 |
|
1027 |
-
#: modules/security/security.php:
|
1028 |
-
#: modules/security/security.php:
|
1029 |
-
#: modules/user-moderation/user-moderation.php:
|
1030 |
-
#: modules/user-moderation/user-moderation.php:
|
1031 |
-
#: modules/user-moderation/user-moderation.php:
|
1032 |
msgid "Invalid key"
|
1033 |
msgstr ""
|
1034 |
|
1035 |
-
#: modules/security/security.php:
|
1036 |
msgid ""
|
1037 |
"<strong>ERROR</strong>: This account has been locked because of too many "
|
1038 |
"failed login attempts. You may try again in %s."
|
1039 |
msgstr ""
|
1040 |
|
1041 |
-
#: modules/security/security.php:
|
1042 |
msgid "<strong>ERROR</strong>: This account has been locked."
|
1043 |
msgstr ""
|
1044 |
|
1045 |
-
#: modules/security/security.php:
|
1046 |
msgid "Failed Login Attempts"
|
1047 |
msgstr ""
|
1048 |
|
1049 |
-
#: modules/security/security.php:
|
1050 |
msgid "IP Address"
|
1051 |
msgstr ""
|
1052 |
|
1053 |
-
#: modules/security/security.php:
|
1054 |
msgid "Date"
|
1055 |
msgstr ""
|
1056 |
|
1057 |
-
#: modules/security/security.php:
|
1058 |
msgid "Y/m/d g:i:s A"
|
1059 |
msgstr ""
|
1060 |
|
1061 |
-
#: modules/security/security.php:
|
1062 |
msgid "%s ago"
|
1063 |
msgstr ""
|
1064 |
|
1065 |
-
#: modules/security/security.php:
|
1066 |
msgid "Y/m/d"
|
1067 |
msgstr ""
|
1068 |
|
1069 |
-
#: modules/security/security.php:
|
1070 |
msgid "[%s] Account Locked"
|
1071 |
msgstr ""
|
1072 |
|
1073 |
-
#: modules/security/security.php:
|
1074 |
msgid ""
|
1075 |
"For your security, your account has been locked because of too many failed "
|
1076 |
"login attempts. To unlock your account please click the following link: "
|
1077 |
msgstr ""
|
1078 |
|
1079 |
-
#: modules/security/security.php:
|
1080 |
msgid "The following attempts resulted in the lock:"
|
1081 |
msgstr ""
|
1082 |
|
@@ -1098,11 +1096,11 @@ msgstr ""
|
|
1098 |
msgid "Restrict Admin Access"
|
1099 |
msgstr ""
|
1100 |
|
1101 |
-
#: modules/themed-profiles/themed-profiles.php:
|
1102 |
msgid "You do not have permission to edit this user."
|
1103 |
msgstr ""
|
1104 |
|
1105 |
-
#: modules/themed-profiles/themed-profiles.php:
|
1106 |
msgid "Profile updated."
|
1107 |
msgstr ""
|
1108 |
|
@@ -1167,19 +1165,19 @@ msgstr ""
|
|
1167 |
msgid "Approve"
|
1168 |
msgstr ""
|
1169 |
|
1170 |
-
#: modules/user-moderation/admin/user-moderation-admin.php:
|
1171 |
msgid "You have been approved access to %s"
|
1172 |
msgstr ""
|
1173 |
|
1174 |
-
#: modules/user-moderation/admin/user-moderation-admin.php:
|
1175 |
msgid "[%s] Registration Approved"
|
1176 |
msgstr ""
|
1177 |
|
1178 |
-
#: modules/user-moderation/admin/user-moderation-admin.php:
|
1179 |
msgid "You have been denied access to %s"
|
1180 |
msgstr ""
|
1181 |
|
1182 |
-
#: modules/user-moderation/admin/user-moderation-admin.php:
|
1183 |
msgid "[%s] Registration Denied"
|
1184 |
msgstr ""
|
1185 |
|
@@ -1230,34 +1228,34 @@ msgid ""
|
|
1230 |
"registered. Please check your email and click on the link provided."
|
1231 |
msgstr ""
|
1232 |
|
1233 |
-
#: modules/user-moderation/user-moderation.php:
|
1234 |
msgid "[%s] Activate Your Account"
|
1235 |
msgstr ""
|
1236 |
|
1237 |
-
#: modules/user-moderation/user-moderation.php:
|
1238 |
msgid ""
|
1239 |
"Thanks for registering at %s! To complete the activation of your account "
|
1240 |
"please click the following link: "
|
1241 |
msgstr ""
|
1242 |
|
1243 |
-
#: modules/user-moderation/user-moderation.php:
|
1244 |
msgid "[%s] New User Awaiting Approval"
|
1245 |
msgstr ""
|
1246 |
|
1247 |
-
#: modules/user-moderation/user-moderation.php:
|
1248 |
msgid "New user requires approval on your blog %s:"
|
1249 |
msgstr ""
|
1250 |
|
1251 |
-
#: modules/user-moderation/user-moderation.php:
|
1252 |
msgid "To approve or deny this user:"
|
1253 |
msgstr ""
|
1254 |
|
1255 |
-
#: templates/login-form.php:
|
1256 |
-
#: templates/register-form.php:
|
1257 |
msgid "Username"
|
1258 |
msgstr ""
|
1259 |
|
1260 |
-
#: templates/login-form.php:
|
1261 |
msgid "Remember Me"
|
1262 |
msgstr ""
|
1263 |
|
@@ -1389,99 +1387,119 @@ msgstr ""
|
|
1389 |
msgid "Next"
|
1390 |
msgstr ""
|
1391 |
|
1392 |
-
#: templates/profile-form.php:
|
1393 |
msgid "Personal Options"
|
1394 |
msgstr ""
|
1395 |
|
1396 |
-
#: templates/profile-form.php:
|
1397 |
msgid "Toolbar"
|
1398 |
msgstr ""
|
1399 |
|
1400 |
-
#: templates/profile-form.php:
|
1401 |
msgid "Show Toolbar when viewing site"
|
1402 |
msgstr ""
|
1403 |
|
1404 |
-
#: templates/profile-form.php:
|
1405 |
msgid "Name"
|
1406 |
msgstr ""
|
1407 |
|
1408 |
-
#: templates/profile-form.php:
|
1409 |
-
msgid "
|
1410 |
msgstr ""
|
1411 |
|
1412 |
-
#: templates/profile-form.php:
|
1413 |
msgid "First Name"
|
1414 |
msgstr ""
|
1415 |
|
1416 |
-
#: templates/profile-form.php:
|
1417 |
msgid "Last Name"
|
1418 |
msgstr ""
|
1419 |
|
1420 |
-
#: templates/profile-form.php:
|
1421 |
msgid "Nickname"
|
1422 |
msgstr ""
|
1423 |
|
1424 |
-
#: templates/profile-form.php:
|
1425 |
msgid "(required)"
|
1426 |
msgstr ""
|
1427 |
|
1428 |
-
#: templates/profile-form.php:
|
1429 |
msgid "Display name publicly as"
|
1430 |
msgstr ""
|
1431 |
|
1432 |
-
#: templates/profile-form.php:
|
1433 |
msgid "Contact Info"
|
1434 |
msgstr ""
|
1435 |
|
1436 |
-
#: templates/profile-form.php:
|
|
|
|
|
|
|
|
|
|
|
1437 |
msgid "Website"
|
1438 |
msgstr ""
|
1439 |
|
1440 |
-
#: templates/profile-form.php:
|
1441 |
msgid "About Yourself"
|
1442 |
msgstr ""
|
1443 |
|
1444 |
-
#: templates/profile-form.php:
|
1445 |
msgid "Biographical Info"
|
1446 |
msgstr ""
|
1447 |
|
1448 |
-
#: templates/profile-form.php:
|
1449 |
msgid ""
|
1450 |
"Share a little biographical information to fill out your profile. This may "
|
1451 |
"be shown publicly."
|
1452 |
msgstr ""
|
1453 |
|
1454 |
-
#: templates/profile-form.php:
|
|
|
|
|
|
|
|
|
1455 |
msgid "New Password"
|
1456 |
msgstr ""
|
1457 |
|
1458 |
-
#: templates/profile-form.php:
|
1459 |
-
msgid ""
|
1460 |
-
"If you would like to change the password type a new one. Otherwise leave "
|
1461 |
-
"this blank."
|
1462 |
msgstr ""
|
1463 |
|
1464 |
-
#: templates/profile-form.php:
|
1465 |
-
msgid "
|
1466 |
msgstr ""
|
1467 |
|
1468 |
-
#: templates/profile-form.php:
|
1469 |
-
msgid "
|
1470 |
msgstr ""
|
1471 |
|
1472 |
-
#: templates/profile-form.php:
|
1473 |
-
msgid ""
|
1474 |
-
|
1475 |
-
|
1476 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1477 |
msgstr ""
|
1478 |
|
1479 |
-
#: templates/profile-form.php:
|
1480 |
msgid "Update Profile"
|
1481 |
msgstr ""
|
1482 |
|
1483 |
-
#: templates/register-form.php:
|
1484 |
-
msgid "
|
1485 |
msgstr ""
|
1486 |
|
1487 |
#: templates/resetpass-form.php:12
|
@@ -1489,6 +1507,10 @@ msgid "New password"
|
|
1489 |
msgstr ""
|
1490 |
|
1491 |
#: templates/resetpass-form.php:17
|
|
|
|
|
|
|
|
|
1492 |
msgid "Confirm new password"
|
1493 |
msgstr ""
|
1494 |
|
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 6.4\n"
|
6 |
+
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/theme-my-login\n"
|
7 |
+
"POT-Creation-Date: 2015-08-31 18:58:35+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
13 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
|
15 |
#: admin/class-theme-my-login-admin.php:68
|
16 |
+
#: admin/class-theme-my-login-admin.php:133
|
17 |
msgid "Theme My Login Settings"
|
18 |
msgstr ""
|
19 |
|
23 |
|
24 |
#: admin/class-theme-my-login-admin.php:77
|
25 |
#: admin/class-theme-my-login-admin.php:78
|
26 |
+
#: admin/class-theme-my-login-admin.php:103
|
27 |
msgid "General"
|
28 |
msgstr ""
|
29 |
|
30 |
+
#: admin/class-theme-my-login-admin.php:104
|
31 |
+
#: admin/class-theme-my-login-admin.php:109
|
32 |
msgid "Modules"
|
33 |
msgstr ""
|
34 |
|
35 |
+
#: admin/class-theme-my-login-admin.php:107
|
36 |
msgid "Stylesheet"
|
37 |
msgstr ""
|
38 |
|
39 |
+
#: admin/class-theme-my-login-admin.php:108
|
40 |
+
msgid "Login Type"
|
41 |
msgstr ""
|
42 |
|
43 |
+
#: admin/class-theme-my-login-admin.php:162
|
44 |
msgid "Enable \"theme-my-login.css\""
|
45 |
msgstr ""
|
46 |
|
47 |
+
#: admin/class-theme-my-login-admin.php:163
|
48 |
msgid ""
|
49 |
"In order to keep changes between upgrades, you can store your customized "
|
50 |
"\"theme-my-login.css\" in your current theme directory."
|
51 |
msgstr ""
|
52 |
|
53 |
+
#: admin/class-theme-my-login-admin.php:179
|
54 |
+
msgid "Username only"
|
55 |
msgstr ""
|
56 |
|
57 |
+
#: admin/class-theme-my-login-admin.php:182
|
58 |
+
msgid "E-mail only"
|
59 |
+
msgstr ""
|
60 |
+
|
61 |
+
#: admin/class-theme-my-login-admin.php:185 templates/login-form.php:16
|
62 |
+
msgid "Username or E-mail"
|
63 |
msgstr ""
|
64 |
|
65 |
#: admin/class-theme-my-login-admin.php:189
|
66 |
+
msgid "Allow users to login using their username and/or e-mail address."
|
67 |
+
msgstr ""
|
68 |
+
|
69 |
+
#: admin/class-theme-my-login-admin.php:205
|
70 |
msgid "Enable %s"
|
71 |
msgstr ""
|
72 |
|
282 |
|
283 |
#: includes/class-theme-my-login-template.php:157
|
284 |
#: includes/class-theme-my-login-widget.php:111
|
285 |
+
#: includes/class-theme-my-login.php:119 templates/register-form.php:28
|
286 |
msgid "Register"
|
287 |
msgstr ""
|
288 |
|
293 |
msgstr ""
|
294 |
|
295 |
#: includes/class-theme-my-login-template.php:167
|
296 |
+
#: includes/class-theme-my-login.php:117 templates/login-form.php:37
|
297 |
msgid "Log In"
|
298 |
msgstr ""
|
299 |
|
325 |
msgid "A login form for your blog."
|
326 |
msgstr ""
|
327 |
|
328 |
+
#. #-#-#-#-# plugin.pot (Theme My Login 6.4) #-#-#-#-#
|
329 |
#. Plugin Name of the plugin/theme
|
330 |
#: includes/class-theme-my-login-widget.php:26
|
331 |
msgid "Theme My Login"
|
377 |
|
378 |
#: includes/class-theme-my-login.php:121
|
379 |
#: modules/custom-email/admin/custom-email-admin.php:102
|
380 |
+
#: templates/resetpass-form.php:31
|
381 |
msgid "Reset Password"
|
382 |
msgstr ""
|
383 |
|
384 |
+
#: includes/class-theme-my-login.php:349
|
385 |
+
msgid ""
|
386 |
+
"Your password reset link appears to be invalid. Please request a new link "
|
387 |
+
"below."
|
388 |
msgstr ""
|
389 |
|
390 |
+
#: includes/class-theme-my-login.php:351
|
391 |
+
msgid "Your password reset link has expired. Please request a new link below."
|
392 |
msgstr ""
|
393 |
|
394 |
+
#: includes/class-theme-my-login.php:390
|
395 |
msgid "The passwords do not match."
|
396 |
msgstr ""
|
397 |
|
398 |
+
#: includes/class-theme-my-login.php:492
|
399 |
msgid "You are now logged out."
|
400 |
msgstr ""
|
401 |
|
402 |
+
#: includes/class-theme-my-login.php:494
|
403 |
msgid "User registration is currently not allowed."
|
404 |
msgstr ""
|
405 |
|
406 |
+
#: includes/class-theme-my-login.php:496
|
407 |
msgid "Check your e-mail for the confirmation link."
|
408 |
msgstr ""
|
409 |
|
410 |
+
#: includes/class-theme-my-login.php:498
|
411 |
msgid "Your password has been reset."
|
412 |
msgstr ""
|
413 |
|
414 |
+
#: includes/class-theme-my-login.php:500
|
415 |
msgid "Registration complete. Please check your e-mail."
|
416 |
msgstr ""
|
417 |
|
418 |
+
#: includes/class-theme-my-login.php:502
|
419 |
msgid "Your session has expired. Please log-in again."
|
420 |
msgstr ""
|
421 |
|
422 |
+
#: includes/class-theme-my-login.php:504
|
423 |
msgid ""
|
424 |
"<strong>You have successfully updated WordPress!</strong> Please log back in "
|
425 |
"to experience the awesomeness."
|
426 |
msgstr ""
|
427 |
|
428 |
+
#: includes/class-theme-my-login.php:506
|
429 |
msgid "Please log in to continue."
|
430 |
msgstr ""
|
431 |
|
432 |
+
#: includes/class-theme-my-login.php:1134
|
433 |
msgid "<strong>ERROR</strong>: Enter a username or e-mail address."
|
434 |
msgstr ""
|
435 |
|
436 |
+
#: includes/class-theme-my-login.php:1138
|
437 |
msgid ""
|
438 |
"<strong>ERROR</strong>: There is no user registered with that email address."
|
439 |
msgstr ""
|
440 |
|
441 |
+
#: includes/class-theme-my-login.php:1150
|
442 |
msgid "<strong>ERROR</strong>: Invalid username or e-mail."
|
443 |
msgstr ""
|
444 |
|
445 |
+
#: includes/class-theme-my-login.php:1164
|
446 |
msgid "Password reset is not allowed for this user"
|
447 |
msgstr ""
|
448 |
|
449 |
+
#: includes/class-theme-my-login.php:1181
|
450 |
msgid "Someone requested that the password be reset for the following account:"
|
451 |
msgstr ""
|
452 |
|
453 |
+
#: includes/class-theme-my-login.php:1183
|
454 |
+
#: modules/custom-email/custom-email.php:840
|
455 |
+
#: modules/custom-email/custom-email.php:869
|
456 |
+
#: modules/user-moderation/admin/user-moderation-admin.php:382
|
457 |
+
#: modules/user-moderation/user-moderation.php:460
|
458 |
msgid "Username: %s"
|
459 |
msgstr ""
|
460 |
|
461 |
+
#: includes/class-theme-my-login.php:1184
|
462 |
msgid "If this was a mistake, just ignore this email and nothing will happen."
|
463 |
msgstr ""
|
464 |
|
465 |
+
#: includes/class-theme-my-login.php:1185
|
466 |
msgid "To reset your password, visit the following address:"
|
467 |
msgstr ""
|
468 |
|
469 |
+
#: includes/class-theme-my-login.php:1196
|
470 |
msgid "[%s] Password Reset"
|
471 |
msgstr ""
|
472 |
|
473 |
+
#: includes/class-theme-my-login.php:1202
|
474 |
#: modules/user-moderation/admin/user-moderation-admin.php:252
|
475 |
+
#: modules/user-moderation/admin/user-moderation-admin.php:394
|
476 |
+
#: modules/user-moderation/admin/user-moderation-admin.php:436
|
477 |
msgid "The e-mail could not be sent."
|
478 |
msgstr ""
|
479 |
|
480 |
+
#: includes/class-theme-my-login.php:1202
|
481 |
#: modules/user-moderation/admin/user-moderation-admin.php:252
|
482 |
+
#: modules/user-moderation/admin/user-moderation-admin.php:394
|
483 |
+
#: modules/user-moderation/admin/user-moderation-admin.php:436
|
484 |
msgid "Possible reason: your host may have disabled the mail() function..."
|
485 |
msgstr ""
|
486 |
|
487 |
+
#: includes/class-theme-my-login.php:1244
|
488 |
msgid "<strong>ERROR</strong>: Please enter a username."
|
489 |
msgstr ""
|
490 |
|
491 |
+
#: includes/class-theme-my-login.php:1246
|
492 |
msgid ""
|
493 |
"<strong>ERROR</strong>: This username is invalid because it uses illegal "
|
494 |
"characters. Please enter a valid username."
|
495 |
msgstr ""
|
496 |
|
497 |
+
#: includes/class-theme-my-login.php:1249
|
498 |
msgid ""
|
499 |
"<strong>ERROR</strong>: This username is already registered, please choose "
|
500 |
"another one."
|
501 |
msgstr ""
|
502 |
|
503 |
+
#: includes/class-theme-my-login.php:1254
|
504 |
msgid "<strong>ERROR</strong>: Please type your e-mail address."
|
505 |
msgstr ""
|
506 |
|
507 |
+
#: includes/class-theme-my-login.php:1256
|
508 |
msgid "<strong>ERROR</strong>: The email address isn’t correct."
|
509 |
msgstr ""
|
510 |
|
511 |
+
#: includes/class-theme-my-login.php:1259
|
512 |
msgid ""
|
513 |
"<strong>ERROR</strong>: This email is already registered, please choose "
|
514 |
"another one."
|
515 |
msgstr ""
|
516 |
|
517 |
+
#: includes/class-theme-my-login.php:1272
|
518 |
msgid ""
|
519 |
"<strong>ERROR</strong>: Couldn’t register you... please contact the <a "
|
520 |
"href=\"mailto:%s\">webmaster</a> !"
|
526 |
msgstr ""
|
527 |
|
528 |
#: modules/custom-email/admin/custom-email-admin.php:93
|
529 |
+
#: templates/login-form.php:14 templates/profile-form.php:96
|
530 |
+
#: templates/register-form.php:19
|
531 |
msgid "E-mail"
|
532 |
msgstr ""
|
533 |
|
564 |
msgstr ""
|
565 |
|
566 |
#: modules/custom-email/admin/custom-email-admin.php:180
|
567 |
+
#: modules/custom-email/admin/custom-email-admin.php:285
|
568 |
#: modules/custom-email/admin/custom-email-admin.php:439
|
569 |
msgid ""
|
570 |
+
"Please be sure to include the variable %reseturl% or else the user will not "
|
571 |
+
"be able to recover their password!"
|
572 |
msgstr ""
|
573 |
|
574 |
#: modules/custom-email/admin/custom-email-admin.php:181
|
695 |
"password."
|
696 |
msgstr ""
|
697 |
|
|
|
|
|
|
|
|
|
|
|
|
|
698 |
#: modules/custom-email/admin/custom-email-admin.php:332
|
699 |
msgid ""
|
700 |
"This e-mail will be sent to the e-mail address or addresses (multiple "
|
734 |
"\"Pending\"."
|
735 |
msgstr ""
|
736 |
|
737 |
+
#: modules/custom-email/admin/custom-email-admin.php:580
|
738 |
+
msgid "Disable Notification"
|
739 |
+
msgstr ""
|
740 |
+
|
741 |
+
#: modules/custom-email/custom-email.php:839
|
742 |
msgid "New user registration on your site %s:"
|
743 |
msgstr ""
|
744 |
|
745 |
+
#: modules/custom-email/custom-email.php:841
|
746 |
+
#: modules/user-moderation/user-moderation.php:461
|
747 |
msgid "E-mail: %s"
|
748 |
msgstr ""
|
749 |
|
750 |
+
#: modules/custom-email/custom-email.php:843
|
751 |
msgid "[%s] New User Registration"
|
752 |
msgstr ""
|
753 |
|
754 |
+
#: modules/custom-email/custom-email.php:870
|
755 |
+
#: modules/user-moderation/admin/user-moderation-admin.php:383
|
756 |
+
msgid "To set your password, visit the following address:"
|
757 |
msgstr ""
|
758 |
|
759 |
+
#: modules/custom-email/custom-email.php:875
|
760 |
+
msgid "[%s] Your username and password info"
|
761 |
msgstr ""
|
762 |
|
763 |
+
#: modules/custom-email/custom-email.php:903
|
764 |
msgid "[%s] Password Lost/Changed"
|
765 |
msgstr ""
|
766 |
|
767 |
+
#: modules/custom-email/custom-email.php:904
|
768 |
msgid "Password Lost and Changed for user: %s"
|
769 |
msgstr ""
|
770 |
|
771 |
#: modules/custom-passwords/custom-passwords.php:68
|
772 |
+
#: templates/login-form.php:24
|
773 |
msgid "Password"
|
774 |
msgstr ""
|
775 |
|
776 |
#: modules/custom-passwords/custom-passwords.php:70
|
777 |
+
#: templates/profile-form.php:174
|
778 |
msgid "Confirm Password"
|
779 |
msgstr ""
|
780 |
|
904 |
msgstr ""
|
905 |
|
906 |
#: modules/recaptcha/admin/recaptcha-admin.php:89
|
907 |
+
#: modules/recaptcha/admin/recaptcha-admin.php:139
|
908 |
msgid "Theme My Login reCAPTCHA Settings"
|
909 |
msgstr ""
|
910 |
|
913 |
msgstr ""
|
914 |
|
915 |
#: modules/recaptcha/admin/recaptcha-admin.php:98
|
916 |
+
msgid "Site Key"
|
917 |
msgstr ""
|
918 |
|
919 |
#: modules/recaptcha/admin/recaptcha-admin.php:99
|
920 |
+
msgid "Secret Key"
|
921 |
msgstr ""
|
922 |
|
923 |
#: modules/recaptcha/admin/recaptcha-admin.php:100
|
926 |
|
927 |
#: modules/recaptcha/admin/recaptcha-admin.php:123
|
928 |
msgctxt "recaptcha theme"
|
929 |
+
msgid "Light"
|
930 |
msgstr ""
|
931 |
|
932 |
#: modules/recaptcha/admin/recaptcha-admin.php:124
|
933 |
msgctxt "recaptcha theme"
|
934 |
+
msgid "Dark"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
935 |
msgstr ""
|
936 |
|
937 |
+
#: modules/recaptcha/recaptcha.php:108
|
938 |
+
msgid "<strong>ERROR</strong>: Invalid reCAPTCHA secret key."
|
939 |
msgstr ""
|
940 |
|
941 |
+
#: modules/recaptcha/recaptcha.php:112
|
942 |
+
msgid ""
|
943 |
+
"<strong>ERROR</strong>: Please check the box to prove that you are not a "
|
944 |
+
"robot."
|
945 |
msgstr ""
|
946 |
|
947 |
+
#: modules/recaptcha/recaptcha.php:116
|
948 |
msgid "<strong>ERROR</strong>: Unable to reach the reCAPTCHA server."
|
949 |
msgstr ""
|
950 |
|
1018 |
msgid "Lock"
|
1019 |
msgstr ""
|
1020 |
|
1021 |
+
#: modules/security/security.php:167
|
1022 |
msgid "Your account has been unlocked. You may now log in."
|
1023 |
msgstr ""
|
1024 |
|
1025 |
+
#: modules/security/security.php:185 modules/security/security.php:188
|
1026 |
+
#: modules/security/security.php:191 modules/security/security.php:194
|
1027 |
+
#: modules/user-moderation/user-moderation.php:344
|
1028 |
+
#: modules/user-moderation/user-moderation.php:347
|
1029 |
+
#: modules/user-moderation/user-moderation.php:352
|
1030 |
msgid "Invalid key"
|
1031 |
msgstr ""
|
1032 |
|
1033 |
+
#: modules/security/security.php:226 modules/security/security.php:249
|
1034 |
msgid ""
|
1035 |
"<strong>ERROR</strong>: This account has been locked because of too many "
|
1036 |
"failed login attempts. You may try again in %s."
|
1037 |
msgstr ""
|
1038 |
|
1039 |
+
#: modules/security/security.php:228
|
1040 |
msgid "<strong>ERROR</strong>: This account has been locked."
|
1041 |
msgstr ""
|
1042 |
|
1043 |
+
#: modules/security/security.php:293
|
1044 |
msgid "Failed Login Attempts"
|
1045 |
msgstr ""
|
1046 |
|
1047 |
+
#: modules/security/security.php:297
|
1048 |
msgid "IP Address"
|
1049 |
msgstr ""
|
1050 |
|
1051 |
+
#: modules/security/security.php:298
|
1052 |
msgid "Date"
|
1053 |
msgstr ""
|
1054 |
|
1055 |
+
#: modules/security/security.php:301 modules/security/security.php:604
|
1056 |
msgid "Y/m/d g:i:s A"
|
1057 |
msgstr ""
|
1058 |
|
1059 |
+
#: modules/security/security.php:306
|
1060 |
msgid "%s ago"
|
1061 |
msgstr ""
|
1062 |
|
1063 |
+
#: modules/security/security.php:308
|
1064 |
msgid "Y/m/d"
|
1065 |
msgstr ""
|
1066 |
|
1067 |
+
#: modules/security/security.php:596
|
1068 |
msgid "[%s] Account Locked"
|
1069 |
msgstr ""
|
1070 |
|
1071 |
+
#: modules/security/security.php:597
|
1072 |
msgid ""
|
1073 |
"For your security, your account has been locked because of too many failed "
|
1074 |
"login attempts. To unlock your account please click the following link: "
|
1075 |
msgstr ""
|
1076 |
|
1077 |
+
#: modules/security/security.php:602
|
1078 |
msgid "The following attempts resulted in the lock:"
|
1079 |
msgstr ""
|
1080 |
|
1096 |
msgid "Restrict Admin Access"
|
1097 |
msgstr ""
|
1098 |
|
1099 |
+
#: modules/themed-profiles/themed-profiles.php:257
|
1100 |
msgid "You do not have permission to edit this user."
|
1101 |
msgstr ""
|
1102 |
|
1103 |
+
#: modules/themed-profiles/themed-profiles.php:294
|
1104 |
msgid "Profile updated."
|
1105 |
msgstr ""
|
1106 |
|
1165 |
msgid "Approve"
|
1166 |
msgstr ""
|
1167 |
|
1168 |
+
#: modules/user-moderation/admin/user-moderation-admin.php:381
|
1169 |
msgid "You have been approved access to %s"
|
1170 |
msgstr ""
|
1171 |
|
1172 |
+
#: modules/user-moderation/admin/user-moderation-admin.php:388
|
1173 |
msgid "[%s] Registration Approved"
|
1174 |
msgstr ""
|
1175 |
|
1176 |
+
#: modules/user-moderation/admin/user-moderation-admin.php:429
|
1177 |
msgid "You have been denied access to %s"
|
1178 |
msgstr ""
|
1179 |
|
1180 |
+
#: modules/user-moderation/admin/user-moderation-admin.php:430
|
1181 |
msgid "[%s] Registration Denied"
|
1182 |
msgstr ""
|
1183 |
|
1228 |
"registered. Please check your email and click on the link provided."
|
1229 |
msgstr ""
|
1230 |
|
1231 |
+
#: modules/user-moderation/user-moderation.php:420
|
1232 |
msgid "[%s] Activate Your Account"
|
1233 |
msgstr ""
|
1234 |
|
1235 |
+
#: modules/user-moderation/user-moderation.php:421
|
1236 |
msgid ""
|
1237 |
"Thanks for registering at %s! To complete the activation of your account "
|
1238 |
"please click the following link: "
|
1239 |
msgstr ""
|
1240 |
|
1241 |
+
#: modules/user-moderation/user-moderation.php:457
|
1242 |
msgid "[%s] New User Awaiting Approval"
|
1243 |
msgstr ""
|
1244 |
|
1245 |
+
#: modules/user-moderation/user-moderation.php:459
|
1246 |
msgid "New user requires approval on your blog %s:"
|
1247 |
msgstr ""
|
1248 |
|
1249 |
+
#: modules/user-moderation/user-moderation.php:462
|
1250 |
msgid "To approve or deny this user:"
|
1251 |
msgstr ""
|
1252 |
|
1253 |
+
#: templates/login-form.php:18 templates/profile-form.php:36
|
1254 |
+
#: templates/register-form.php:13
|
1255 |
msgid "Username"
|
1256 |
msgstr ""
|
1257 |
|
1258 |
+
#: templates/login-form.php:33
|
1259 |
msgid "Remember Me"
|
1260 |
msgstr ""
|
1261 |
|
1387 |
msgid "Next"
|
1388 |
msgstr ""
|
1389 |
|
1390 |
+
#: templates/profile-form.php:17
|
1391 |
msgid "Personal Options"
|
1392 |
msgstr ""
|
1393 |
|
1394 |
+
#: templates/profile-form.php:21
|
1395 |
msgid "Toolbar"
|
1396 |
msgstr ""
|
1397 |
|
1398 |
+
#: templates/profile-form.php:24
|
1399 |
msgid "Show Toolbar when viewing site"
|
1400 |
msgstr ""
|
1401 |
|
1402 |
+
#: templates/profile-form.php:32
|
1403 |
msgid "Name"
|
1404 |
msgstr ""
|
1405 |
|
1406 |
+
#: templates/profile-form.php:37
|
1407 |
+
msgid "Usernames cannot be changed."
|
1408 |
msgstr ""
|
1409 |
|
1410 |
+
#: templates/profile-form.php:41
|
1411 |
msgid "First Name"
|
1412 |
msgstr ""
|
1413 |
|
1414 |
+
#: templates/profile-form.php:46
|
1415 |
msgid "Last Name"
|
1416 |
msgstr ""
|
1417 |
|
1418 |
+
#: templates/profile-form.php:51
|
1419 |
msgid "Nickname"
|
1420 |
msgstr ""
|
1421 |
|
1422 |
+
#: templates/profile-form.php:51 templates/profile-form.php:96
|
1423 |
msgid "(required)"
|
1424 |
msgstr ""
|
1425 |
|
1426 |
+
#: templates/profile-form.php:56
|
1427 |
msgid "Display name publicly as"
|
1428 |
msgstr ""
|
1429 |
|
1430 |
+
#: templates/profile-form.php:92
|
1431 |
msgid "Contact Info"
|
1432 |
msgstr ""
|
1433 |
|
1434 |
+
#: templates/profile-form.php:104
|
1435 |
+
msgid ""
|
1436 |
+
"There is a pending change of your e-mail to %1$s. <a href=\"%2$s\">Cancel</a>"
|
1437 |
+
msgstr ""
|
1438 |
+
|
1439 |
+
#: templates/profile-form.php:113
|
1440 |
msgid "Website"
|
1441 |
msgstr ""
|
1442 |
|
1443 |
+
#: templates/profile-form.php:129
|
1444 |
msgid "About Yourself"
|
1445 |
msgstr ""
|
1446 |
|
1447 |
+
#: templates/profile-form.php:133
|
1448 |
msgid "Biographical Info"
|
1449 |
msgstr ""
|
1450 |
|
1451 |
+
#: templates/profile-form.php:135
|
1452 |
msgid ""
|
1453 |
"Share a little biographical information to fill out your profile. This may "
|
1454 |
"be shown publicly."
|
1455 |
msgstr ""
|
1456 |
|
1457 |
+
#: templates/profile-form.php:144
|
1458 |
+
msgid "Account Management"
|
1459 |
+
msgstr ""
|
1460 |
+
|
1461 |
+
#: templates/profile-form.php:147
|
1462 |
msgid "New Password"
|
1463 |
msgstr ""
|
1464 |
|
1465 |
+
#: templates/profile-form.php:150
|
1466 |
+
msgid "Generate Password"
|
|
|
|
|
1467 |
msgstr ""
|
1468 |
|
1469 |
+
#: templates/profile-form.php:156
|
1470 |
+
msgid "Hide password"
|
1471 |
msgstr ""
|
1472 |
|
1473 |
+
#: templates/profile-form.php:158
|
1474 |
+
msgid "Hide"
|
1475 |
msgstr ""
|
1476 |
|
1477 |
+
#: templates/profile-form.php:160
|
1478 |
+
msgid "Cancel password change"
|
1479 |
+
msgstr ""
|
1480 |
+
|
1481 |
+
#: templates/profile-form.php:161
|
1482 |
+
msgid "Cancel"
|
1483 |
+
msgstr ""
|
1484 |
+
|
1485 |
+
#: templates/profile-form.php:167
|
1486 |
+
msgid "Repeat New Password"
|
1487 |
+
msgstr ""
|
1488 |
+
|
1489 |
+
#: templates/profile-form.php:170
|
1490 |
+
msgid "Type your new password again."
|
1491 |
+
msgstr ""
|
1492 |
+
|
1493 |
+
#: templates/profile-form.php:178
|
1494 |
+
msgid "Confirm use of weak password"
|
1495 |
msgstr ""
|
1496 |
|
1497 |
+
#: templates/profile-form.php:192
|
1498 |
msgid "Update Profile"
|
1499 |
msgstr ""
|
1500 |
|
1501 |
+
#: templates/register-form.php:25
|
1502 |
+
msgid "Registration confirmation will be e-mailed to you."
|
1503 |
msgstr ""
|
1504 |
|
1505 |
#: templates/resetpass-form.php:12
|
1507 |
msgstr ""
|
1508 |
|
1509 |
#: templates/resetpass-form.php:17
|
1510 |
+
msgid "Strength indicator"
|
1511 |
+
msgstr ""
|
1512 |
+
|
1513 |
+
#: templates/resetpass-form.php:22
|
1514 |
msgid "Confirm new password"
|
1515 |
msgstr ""
|
1516 |
|
modules/ajax/ajax.php
DELETED
@@ -1,204 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Plugin Name: AJAX
|
4 |
-
* Description: Enabling this module will initialize and enable AJAX. There are no other settings for this module.
|
5 |
-
*
|
6 |
-
* Class: Theme_My_Login_Ajax
|
7 |
-
*
|
8 |
-
* Holds the Theme My Login Ajax class
|
9 |
-
*
|
10 |
-
* @package Theme_My_Login
|
11 |
-
* @subpackage Theme_My_Login_Ajax
|
12 |
-
* @since 6.3
|
13 |
-
*/
|
14 |
-
|
15 |
-
if ( ! class_exists( 'Theme_My_Login_Ajax' ) ) :
|
16 |
-
/**
|
17 |
-
* Theme My Login AJAX module class
|
18 |
-
*
|
19 |
-
* @since 6.3
|
20 |
-
*/
|
21 |
-
class Theme_My_Login_Ajax extends Theme_My_Login_Abstract {
|
22 |
-
/**
|
23 |
-
* Returns singleton instance
|
24 |
-
*
|
25 |
-
* @since 6.3
|
26 |
-
* @access public
|
27 |
-
* @return object
|
28 |
-
*/
|
29 |
-
public static function get_object( $class = null ) {
|
30 |
-
return parent::get_object( __CLASS__ );
|
31 |
-
}
|
32 |
-
|
33 |
-
/**
|
34 |
-
* Loads the module
|
35 |
-
*
|
36 |
-
* @since 6.3
|
37 |
-
* @access protected
|
38 |
-
*/
|
39 |
-
protected function load() {
|
40 |
-
add_action( 'template_redirect', array( &$this, 'template_redirect' ) );
|
41 |
-
add_action( 'wp_enqueue_scripts', array( &$this, 'wp_enqueue_scripts' ) );
|
42 |
-
|
43 |
-
add_filter( 'tml_action_url', array( &$this, 'tml_action_url' ), 100, 3 );
|
44 |
-
add_filter( 'tml_redirect_url', array( &$this, 'tml_redirect_url' ), 100, 2 );
|
45 |
-
add_filter( 'page_css_class', array( &$this, 'page_css_class' ), 10, 2 );
|
46 |
-
add_filter( 'wp_setup_nav_menu_item', array( &$this, 'wp_setup_nav_menu_item' ) );
|
47 |
-
}
|
48 |
-
|
49 |
-
/**
|
50 |
-
* Returns default AJAX actions
|
51 |
-
*
|
52 |
-
* @since 6.3
|
53 |
-
* @access public
|
54 |
-
*
|
55 |
-
* @return array AJAX actions
|
56 |
-
*/
|
57 |
-
public static function default_actions() {
|
58 |
-
$actions = array( 'login', 'register', 'lostpassword' );
|
59 |
-
if ( is_multisite() )
|
60 |
-
$actions[] = 'activate';
|
61 |
-
return apply_filters( 'tml_ajax_actions', $actions );
|
62 |
-
}
|
63 |
-
|
64 |
-
/**
|
65 |
-
* Handles AJAX response
|
66 |
-
*
|
67 |
-
* @since 6.3
|
68 |
-
* @access public
|
69 |
-
*/
|
70 |
-
public function template_redirect() {
|
71 |
-
|
72 |
-
$theme_my_login = Theme_My_Login::get_object();
|
73 |
-
|
74 |
-
if ( Theme_My_Login::is_tml_page() && isset( $_GET['ajax'] ) ) {
|
75 |
-
define( 'DOING_AJAX', true );
|
76 |
-
|
77 |
-
$instance = $theme_my_login->get_instance();
|
78 |
-
|
79 |
-
$instance->set_option( 'default_action', ! empty( $theme_my_login->request_action ) ? $theme_my_login->request_action : 'login' );
|
80 |
-
$instance->set_option( 'gravatar_size', 75 );
|
81 |
-
$instance->set_option( 'before_title', '<h2>' );
|
82 |
-
$instance->set_option( 'after_title', '</h2>' );
|
83 |
-
|
84 |
-
$data = $instance->display();
|
85 |
-
|
86 |
-
send_origin_headers();
|
87 |
-
|
88 |
-
@header( 'Content-Type: text/html; charset=' . get_option( 'blog_charset' ) );
|
89 |
-
@header( 'X-Robots-Tag: noindex' );
|
90 |
-
|
91 |
-
send_nosniff_header();
|
92 |
-
nocache_headers();
|
93 |
-
|
94 |
-
$x = new WP_Ajax_Response( array(
|
95 |
-
'what' => 'login',
|
96 |
-
'action' => $theme_my_login->request_action,
|
97 |
-
'data' => $theme_my_login->errors->get_error_code() ? $theme_my_login->errors : $data,
|
98 |
-
'supplemental' => array(
|
99 |
-
'html' => $data,
|
100 |
-
'success' => is_user_logged_in()
|
101 |
-
)
|
102 |
-
) );
|
103 |
-
$x->send();
|
104 |
-
exit;
|
105 |
-
}
|
106 |
-
}
|
107 |
-
|
108 |
-
/**
|
109 |
-
* Enqueues styles and scripts
|
110 |
-
*
|
111 |
-
* @since 6.3
|
112 |
-
* @access public
|
113 |
-
*/
|
114 |
-
public function wp_enqueue_scripts() {
|
115 |
-
wp_enqueue_style( 'theme-my-login-ajax', plugins_url( 'theme-my-login/modules/ajax/css/ajax.css' ) );
|
116 |
-
|
117 |
-
wp_enqueue_script( 'theme-my-login-ajax', plugins_url( 'theme-my-login/modules/ajax/js/ajax.js' ), array( 'jquery', 'wp-ajax-response' ) );
|
118 |
-
}
|
119 |
-
|
120 |
-
/**
|
121 |
-
* Adds ajax parameter to TML action URL's
|
122 |
-
*
|
123 |
-
* Callback for "tml_action_url" filter
|
124 |
-
*
|
125 |
-
* @since 6.3
|
126 |
-
* @access public
|
127 |
-
*
|
128 |
-
* @param string $url The action URL
|
129 |
-
* @param string $action The action
|
130 |
-
* @param int $instance The instance
|
131 |
-
* @return string The action URL
|
132 |
-
*/
|
133 |
-
public function tml_action_url( $url, $action, $instance ) {
|
134 |
-
if ( Theme_My_Login::is_tml_page() && in_array( $action, self::default_actions() ) && isset( $_GET['ajax'] ) )
|
135 |
-
$url = Theme_My_Login::get_page_link( $action, 'ajax=1' );
|
136 |
-
return $url;
|
137 |
-
}
|
138 |
-
|
139 |
-
/**
|
140 |
-
* Adds ajax parameter to TML redirect URL's
|
141 |
-
*
|
142 |
-
* Callback for "tml_redirect_url" filter
|
143 |
-
*
|
144 |
-
* @since 6.3
|
145 |
-
* @access public
|
146 |
-
*
|
147 |
-
* @param string $url The redirect URL
|
148 |
-
* @param string $action The action
|
149 |
-
* @return string The redirect URL
|
150 |
-
*/
|
151 |
-
public function tml_redirect_url( $url, $action ) {
|
152 |
-
if ( Theme_My_Login::is_tml_page() && in_array( $action, self::default_actions() ) && isset( $_GET['ajax'] ) ) {
|
153 |
-
switch ( $action ) {
|
154 |
-
case 'lostpassword' :
|
155 |
-
case 'retrievepassword' :
|
156 |
-
case 'register' :
|
157 |
-
$url = add_query_arg( 'ajax', 1, $url );
|
158 |
-
break;
|
159 |
-
case 'login' :
|
160 |
-
$url = Theme_My_Login::get_page_link( 'login', 'ajax=1' );
|
161 |
-
break;
|
162 |
-
}
|
163 |
-
}
|
164 |
-
return $url;
|
165 |
-
}
|
166 |
-
|
167 |
-
/**
|
168 |
-
* Adds CSS class to TML pages
|
169 |
-
*
|
170 |
-
* @since 6.3
|
171 |
-
* @access public
|
172 |
-
*
|
173 |
-
* @param array $classes CSS classes
|
174 |
-
* @param object $page Post object
|
175 |
-
* @return array CSS classes
|
176 |
-
*/
|
177 |
-
public function page_css_class( $classes, $page ) {
|
178 |
-
if ( ! is_user_logged_in() && Theme_My_Login::is_tml_page( '', $page->ID ) )
|
179 |
-
$classes[] = 'tml_ajax_link';
|
180 |
-
return $classes;
|
181 |
-
}
|
182 |
-
|
183 |
-
/**
|
184 |
-
* Adds CSS class to TML pages
|
185 |
-
*
|
186 |
-
* @since 6.3
|
187 |
-
* @access public
|
188 |
-
*
|
189 |
-
* @param object $menu_item Nav menu item
|
190 |
-
* @return object Nav menu item
|
191 |
-
*/
|
192 |
-
public function wp_setup_nav_menu_item( $menu_item ) {
|
193 |
-
if ( 'tml_page' == $menu_item->object && Theme_My_Login::is_tml_page( '', $menu_item->object_id ) ) {
|
194 |
-
if ( ! is_user_logged_in() )
|
195 |
-
$menu_item->classes[] = 'tml_ajax_link';
|
196 |
-
}
|
197 |
-
return $menu_item;
|
198 |
-
}
|
199 |
-
}
|
200 |
-
|
201 |
-
Theme_My_Login_Ajax::get_object();
|
202 |
-
|
203 |
-
endif;
|
204 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
modules/ajax/css/ajax.css
DELETED
@@ -1,68 +0,0 @@
|
|
1 |
-
#tml_ajax_overlay {
|
2 |
-
position: fixed;
|
3 |
-
z-index: 10000;
|
4 |
-
top: 0;
|
5 |
-
left: 0;
|
6 |
-
width: 100%;
|
7 |
-
height: 100%;
|
8 |
-
background-color: #000;
|
9 |
-
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
|
10 |
-
filter: alpha(opacity=0);
|
11 |
-
-moz-opacity: 0;
|
12 |
-
opacity: 0;
|
13 |
-
}
|
14 |
-
#tml_ajax_window {
|
15 |
-
width: 400px;
|
16 |
-
position: fixed;
|
17 |
-
background: #ffffff;
|
18 |
-
z-index: 10002;
|
19 |
-
color: #000;
|
20 |
-
text-align: left;
|
21 |
-
top: 50%;
|
22 |
-
left: 50%;
|
23 |
-
display: none;
|
24 |
-
-moz-box-shadow: rgba(0,0,0,1) 0 4px 30px;
|
25 |
-
-webkit-box-shadow: rgba(0,0,0,1) 0 4px 30px;
|
26 |
-
-khtml-box-shadow: rgba(0,0,0,1) 0 4px 30px;
|
27 |
-
box-shadow: rgba(0,0,0,1) 0 4px 30px;
|
28 |
-
-moz-border-radius: 10px;
|
29 |
-
-webkit-border-radius: 10px;
|
30 |
-
-khtml-border-radius: 10px;
|
31 |
-
border-radius: 10px;
|
32 |
-
}
|
33 |
-
#tml_ajax_content{
|
34 |
-
clear: both;
|
35 |
-
padding: 15px;
|
36 |
-
overflow: auto;
|
37 |
-
text-align: left;
|
38 |
-
}
|
39 |
-
#tml_ajax_content h2 {
|
40 |
-
font-size: 1.5em;
|
41 |
-
margin: 0 0 10px;
|
42 |
-
}
|
43 |
-
#tml_ajax_content input[type="text"],
|
44 |
-
#tml_ajax_content input[type="password"],
|
45 |
-
#tml_ajax_content input[type="submit"] {
|
46 |
-
width: 100%;
|
47 |
-
padding: 5px;
|
48 |
-
-moz-box-sizing: border-box;
|
49 |
-
-webkit-box-sizing: border-box;
|
50 |
-
box-sizing: border-box;
|
51 |
-
}
|
52 |
-
#tml_ajax_content p {
|
53 |
-
margin: 5px 0;
|
54 |
-
}
|
55 |
-
#tml_ajax_content ul {
|
56 |
-
margin: 5px 0;
|
57 |
-
list-style-position: inside;
|
58 |
-
}
|
59 |
-
#tml_ajax_content li {
|
60 |
-
margin: 5px 0;
|
61 |
-
}
|
62 |
-
#tml_ajax_content .tml-user-avatar {
|
63 |
-
float: left;
|
64 |
-
}
|
65 |
-
#tml_ajax_content .tml-user-links {
|
66 |
-
float: left;
|
67 |
-
margin: 0 0 0 10px;
|
68 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
modules/ajax/js/ajax.js
DELETED
@@ -1,122 +0,0 @@
|
|
1 |
-
var tmlAjax;
|
2 |
-
|
3 |
-
(function($) {
|
4 |
-
tmlAjax = {
|
5 |
-
overlay : $('<div id="tml_ajax_overlay" />'),
|
6 |
-
|
7 |
-
window : $('<div id="tml_ajax_window" />'),
|
8 |
-
|
9 |
-
content : $('<div id="tml_ajax_content" />'),
|
10 |
-
|
11 |
-
init : function() {
|
12 |
-
$('li.tml_ajax_link a, a.tml_ajax_link')
|
13 |
-
.attr('href', function(i, href) {
|
14 |
-
if (href.indexOf('?') === -1)
|
15 |
-
return href + '?ajax=1';
|
16 |
-
else
|
17 |
-
return href + '&ajax=1';
|
18 |
-
})
|
19 |
-
.click(function(e) {
|
20 |
-
e.preventDefault();
|
21 |
-
this.blur();
|
22 |
-
tmlAjax.process(this.href, 'GET');
|
23 |
-
});
|
24 |
-
|
25 |
-
$(window).resize(function() {
|
26 |
-
tmlAjax.reposition();
|
27 |
-
});
|
28 |
-
},
|
29 |
-
|
30 |
-
process : function(url, type, data) {
|
31 |
-
var t = this;
|
32 |
-
|
33 |
-
$.ajax({
|
34 |
-
url: url,
|
35 |
-
data: data,
|
36 |
-
type: type,
|
37 |
-
success: function(data) {
|
38 |
-
var r = wpAjax.parseAjaxResponse(data);
|
39 |
-
|
40 |
-
if (r === false ) {
|
41 |
-
t.show(data);
|
42 |
-
} else {
|
43 |
-
if (r.errors) {
|
44 |
-
$.each(r.responses, function() {
|
45 |
-
t.show(this.supplemental.html);
|
46 |
-
});
|
47 |
-
} else {
|
48 |
-
$.each(r.responses, function() {
|
49 |
-
t.show(this.data);
|
50 |
-
if (this.supplemental.success == 1) {
|
51 |
-
t.overlay.off('click').click(function() {
|
52 |
-
t.hide();
|
53 |
-
setTimeout(function() {
|
54 |
-
location.reload();
|
55 |
-
}, 500);
|
56 |
-
});
|
57 |
-
}
|
58 |
-
});
|
59 |
-
}
|
60 |
-
}
|
61 |
-
}
|
62 |
-
});
|
63 |
-
},
|
64 |
-
|
65 |
-
show : function(content) {
|
66 |
-
if (document.getElementById('tmlAjaxOverlay') === null) {
|
67 |
-
this.overlay.appendTo('body').fadeTo('slow', 0.75);
|
68 |
-
this.overlay.click(this.hide);
|
69 |
-
}
|
70 |
-
|
71 |
-
if (document.getElementById('tmlAjaxWindow') === null) {
|
72 |
-
this.window.appendTo('body').fadeIn('slow');
|
73 |
-
}
|
74 |
-
|
75 |
-
if (document.getElementById('tmlAjaxContent') === null) {
|
76 |
-
this.content.appendTo(this.window);
|
77 |
-
}
|
78 |
-
|
79 |
-
this.content.html(content);
|
80 |
-
|
81 |
-
this.window.trigger('show');
|
82 |
-
|
83 |
-
this.content.find(':input:visible:first').focus();
|
84 |
-
|
85 |
-
this.window.find('form').submit(function(e) {
|
86 |
-
e.preventDefault();
|
87 |
-
tmlAjax.process($(this).attr('action'), 'POST', $(this).serialize());
|
88 |
-
});
|
89 |
-
|
90 |
-
this.window.find('.tml-action-links a').click(function(e) {
|
91 |
-
e.preventDefault();
|
92 |
-
this.blur();
|
93 |
-
tmlAjax.process(this.href, 'GET');
|
94 |
-
});
|
95 |
-
|
96 |
-
this.window.find('.tml-user-links a').attr('target', '_parent');
|
97 |
-
|
98 |
-
this.reposition();
|
99 |
-
},
|
100 |
-
|
101 |
-
hide : function() {
|
102 |
-
tmlAjax.window
|
103 |
-
.trigger('hide')
|
104 |
-
.fadeOut('slow', function() {
|
105 |
-
tmlAjax.window.unbind().remove();
|
106 |
-
});
|
107 |
-
tmlAjax.overlay
|
108 |
-
.fadeTo('slow', 0, function() {
|
109 |
-
tmlAjax.overlay.unbind().remove();
|
110 |
-
});
|
111 |
-
},
|
112 |
-
|
113 |
-
reposition : function() {
|
114 |
-
this.window.css({
|
115 |
-
marginTop: '-' + parseInt((this.window.outerHeight() / 2),10) + 'px',
|
116 |
-
marginLeft: '-' + parseInt((this.window.outerWidth() / 2),10) + 'px'
|
117 |
-
});
|
118 |
-
}
|
119 |
-
}
|
120 |
-
|
121 |
-
$(document).ready(tmlAjax.init);
|
122 |
-
})(jQuery);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
modules/custom-email/admin/custom-email-admin.php
CHANGED
@@ -177,7 +177,7 @@ class Theme_My_Login_Custom_Email_Admin extends Theme_My_Login_Abstract {
|
|
177 |
?>
|
178 |
<p class="description">
|
179 |
<?php _e( 'This e-mail will be sent to a new user upon registration.', 'theme-my-login' ); ?>
|
180 |
-
<?php _e( 'Please be sure to include the variable %
|
181 |
<?php _e( 'If any field is left empty, the default will be used instead.', 'theme-my-login' ); ?>
|
182 |
</p>
|
183 |
<table class="form-table">
|
@@ -205,7 +205,7 @@ class Theme_My_Login_Custom_Email_Admin extends Theme_My_Login_Abstract {
|
|
205 |
<tr valign="top">
|
206 |
<th scope="row"><label for="<?php echo $this->options_key; ?>_new_user_message"><?php _e( 'Message', 'theme-my-login' ); ?></label></th>
|
207 |
<td>
|
208 |
-
<p class="description"><?php _e( 'Available Variables', 'theme-my-login' ); ?>: %blogname%, %siteurl%, %
|
209 |
<textarea name="<?php echo $this->options_key; ?>[new_user][message]" id="<?php echo $this->options_key; ?>_new_user_message" class="large-text" rows="10"><?php echo $this->get_option( array( 'new_user', 'message' ) ); ?></textarea></p>
|
210 |
</td>
|
211 |
</tr>
|
@@ -436,7 +436,7 @@ class Theme_My_Login_Custom_Email_Admin extends Theme_My_Login_Abstract {
|
|
436 |
?>
|
437 |
<p class="description">
|
438 |
<?php _e( 'This e-mail will be sent to a new user upon admin approval when "Admin Approval" is checked for "User Moderation".', 'theme-my-login' ); ?>
|
439 |
-
<?php _e( 'Please be sure to include the variable %
|
440 |
<?php _e( 'If any field is left empty, the default will be used instead.', 'theme-my-login' ); ?>
|
441 |
</p>
|
442 |
<table class="form-table">
|
@@ -464,7 +464,7 @@ class Theme_My_Login_Custom_Email_Admin extends Theme_My_Login_Abstract {
|
|
464 |
<tr valign="top">
|
465 |
<th scope="row"><label for="<?php echo $this->options_key; ?>_user_approval_message"><?php _e( 'Message', 'theme-my-login' ); ?></label></th>
|
466 |
<td>
|
467 |
-
<p class="description"><?php _e( 'Available Variables', 'theme-my-login' ); ?>: %blogname%, %siteurl%, %loginurl%, %user_login%, %user_email
|
468 |
<textarea name="<?php echo $this->options_key; ?>[user_approval][message]" id="<?php echo $this->options_key; ?>_user_approval_message" class="large-text" rows="10"><?php echo $this->get_option( array( 'user_approval', 'message' ) ); ?></textarea></td>
|
469 |
</td>
|
470 |
</tr>
|
@@ -573,15 +573,29 @@ class Theme_My_Login_Custom_Email_Admin extends Theme_My_Login_Abstract {
|
|
573 |
<textarea name="<?php echo $this->options_key; ?>[user_denial][message]" id="<?php echo $this->options_key; ?>_user_denial_message" class="large-text" rows="10"><?php echo $this->get_option( array( 'user_denial', 'message' ) ); ?></textarea>
|
574 |
</td>
|
575 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
576 |
</table>
|
577 |
<?php
|
578 |
}
|
579 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
580 |
public function user_register( $user_id ) {
|
581 |
$screen = get_current_screen();
|
582 |
|
583 |
if ( 'user' == $screen->base && 'add' == $screen->action ) {
|
584 |
-
do_action( 'tml_new_user_registered', $user_id,
|
585 |
|
586 |
if ( current_user_can( 'list_users' ) )
|
587 |
$redirect = 'users.php?update=add&id=' . $user_id;
|
@@ -604,11 +618,13 @@ class Theme_My_Login_Custom_Email_Admin extends Theme_My_Login_Abstract {
|
|
604 |
* @return string|array Sanitized settings
|
605 |
*/
|
606 |
public function save_settings( $settings ) {
|
607 |
-
$settings['new_user']['admin_disable'] =
|
608 |
-
$settings['reset_pass']['admin_disable'] =
|
609 |
|
610 |
-
if ( class_exists( 'Theme_My_Login_User_Moderation' ) )
|
611 |
$settings['user_approval']['admin_disable'] = isset( $settings['user_approval']['admin_disable'] );
|
|
|
|
|
612 |
|
613 |
$settings = Theme_My_Login_Common::array_merge_recursive( $this->get_options(), $settings );
|
614 |
|
177 |
?>
|
178 |
<p class="description">
|
179 |
<?php _e( 'This e-mail will be sent to a new user upon registration.', 'theme-my-login' ); ?>
|
180 |
+
<?php _e( 'Please be sure to include the variable %reseturl% or else the user will not be able to recover their password!', 'theme-my-login' ); ?>
|
181 |
<?php _e( 'If any field is left empty, the default will be used instead.', 'theme-my-login' ); ?>
|
182 |
</p>
|
183 |
<table class="form-table">
|
205 |
<tr valign="top">
|
206 |
<th scope="row"><label for="<?php echo $this->options_key; ?>_new_user_message"><?php _e( 'Message', 'theme-my-login' ); ?></label></th>
|
207 |
<td>
|
208 |
+
<p class="description"><?php _e( 'Available Variables', 'theme-my-login' ); ?>: %blogname%, %siteurl%, %reseturl%, %user_login%, %user_email%, %user_ip%</p>
|
209 |
<textarea name="<?php echo $this->options_key; ?>[new_user][message]" id="<?php echo $this->options_key; ?>_new_user_message" class="large-text" rows="10"><?php echo $this->get_option( array( 'new_user', 'message' ) ); ?></textarea></p>
|
210 |
</td>
|
211 |
</tr>
|
436 |
?>
|
437 |
<p class="description">
|
438 |
<?php _e( 'This e-mail will be sent to a new user upon admin approval when "Admin Approval" is checked for "User Moderation".', 'theme-my-login' ); ?>
|
439 |
+
<?php _e( 'Please be sure to include the variable %reseturl% or else the user will not be able to recover their password!', 'theme-my-login' ); ?>
|
440 |
<?php _e( 'If any field is left empty, the default will be used instead.', 'theme-my-login' ); ?>
|
441 |
</p>
|
442 |
<table class="form-table">
|
464 |
<tr valign="top">
|
465 |
<th scope="row"><label for="<?php echo $this->options_key; ?>_user_approval_message"><?php _e( 'Message', 'theme-my-login' ); ?></label></th>
|
466 |
<td>
|
467 |
+
<p class="description"><?php _e( 'Available Variables', 'theme-my-login' ); ?>: %blogname%, %siteurl%, %reseturl%, %loginurl%, %user_login%, %user_email%</p>
|
468 |
<textarea name="<?php echo $this->options_key; ?>[user_approval][message]" id="<?php echo $this->options_key; ?>_user_approval_message" class="large-text" rows="10"><?php echo $this->get_option( array( 'user_approval', 'message' ) ); ?></textarea></td>
|
469 |
</td>
|
470 |
</tr>
|
573 |
<textarea name="<?php echo $this->options_key; ?>[user_denial][message]" id="<?php echo $this->options_key; ?>_user_denial_message" class="large-text" rows="10"><?php echo $this->get_option( array( 'user_denial', 'message' ) ); ?></textarea>
|
574 |
</td>
|
575 |
</tr>
|
576 |
+
<tr valign="top">
|
577 |
+
<th scope="row"> </th>
|
578 |
+
<td>
|
579 |
+
<input name="<?php echo $this->options_key; ?>[user_denial][disable]" type="checkbox" id="<?php echo $this->options_key; ?>_user_denial_disable" value="1"<?php checked( 1, $this->get_option( array( 'user_denial', 'disable' ) ) ); ?> />
|
580 |
+
<label for="<?php echo $this->options_key; ?>_user_denial_disable"><?php _e( 'Disable Notification', 'theme-my-login' ); ?></label>
|
581 |
+
</td>
|
582 |
+
</tr>
|
583 |
</table>
|
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;
|
618 |
* @return string|array Sanitized settings
|
619 |
*/
|
620 |
public function save_settings( $settings ) {
|
621 |
+
$settings['new_user']['admin_disable'] = isset( $settings['new_user']['admin_disable'] );
|
622 |
+
$settings['reset_pass']['admin_disable'] = isset( $settings['reset_pass']['admin_disable'] );
|
623 |
|
624 |
+
if ( class_exists( 'Theme_My_Login_User_Moderation' ) ) {
|
625 |
$settings['user_approval']['admin_disable'] = isset( $settings['user_approval']['admin_disable'] );
|
626 |
+
$settings['user_denial']['disable'] = isset( $settings['user_denial']['disable'] );
|
627 |
+
}
|
628 |
|
629 |
$settings = Theme_My_Login_Common::array_merge_recursive( $this->get_options(), $settings );
|
630 |
|
modules/custom-email/custom-email.php
CHANGED
@@ -120,10 +120,10 @@ class Theme_My_Login_Custom_Email extends Theme_My_Login_Abstract {
|
|
120 |
add_action( 'password_reset', array( &$this, 'apply_password_reset_filters' ) );
|
121 |
add_action( 'tml_new_user_notification', array( &$this, 'apply_new_user_filters' ) );
|
122 |
|
123 |
-
remove_action( 'tml_new_user_registered', 'wp_new_user_notification'
|
124 |
remove_action( 'tml_user_password_changed', 'wp_password_change_notification' );
|
125 |
|
126 |
-
add_action( 'tml_new_user_registered', array( &$this, 'new_user_notification' ), 10,
|
127 |
add_action( 'tml_user_password_changed', array( &$this, 'password_change_notification' ) );
|
128 |
|
129 |
add_action( 'register_post', array( &$this, 'apply_user_moderation_notification_filters' ) );
|
@@ -406,16 +406,17 @@ class Theme_My_Login_Custom_Email extends Theme_My_Login_Abstract {
|
|
406 |
* @access public
|
407 |
*
|
408 |
* @param string $title Default message
|
409 |
-
* @param string $
|
410 |
* @param int $user_id User ID
|
411 |
* @return string New message
|
412 |
*/
|
413 |
-
public function new_user_notification_message_filter( $message, $
|
414 |
$_message = $this->get_option( array( 'new_user', 'message' ) );
|
415 |
if ( ! empty( $_message ) ) {
|
|
|
416 |
$message = Theme_My_Login_Common::replace_vars( $_message, $user_id, array(
|
417 |
-
'%
|
418 |
-
'%
|
419 |
) );
|
420 |
}
|
421 |
return $message;
|
@@ -553,9 +554,10 @@ class Theme_My_Login_Custom_Email extends Theme_My_Login_Abstract {
|
|
553 |
$this->get_option( array( 'user_approval', 'admin_mail_from_name' ) ),
|
554 |
$this->get_option( array( 'user_approval', 'admin_mail_content_type' ) )
|
555 |
);
|
556 |
-
add_filter( 'user_approval_admin_notification_mail_to',
|
557 |
-
add_filter( 'user_approval_admin_notification_title',
|
558 |
-
add_filter( 'user_approval_admin_notification_message',
|
|
|
559 |
break;
|
560 |
}
|
561 |
}
|
@@ -594,8 +596,9 @@ class Theme_My_Login_Custom_Email extends Theme_My_Login_Abstract {
|
|
594 |
$this->get_option( array( 'user_denial', 'mail_from_name' ) ),
|
595 |
$this->get_option( array( 'user_denial', 'mail_content_type' ) )
|
596 |
);
|
597 |
-
add_filter( 'user_denial_notification_title',
|
598 |
-
add_filter( 'user_denial_notification_message',
|
|
|
599 |
}
|
600 |
|
601 |
/**
|
@@ -668,16 +671,17 @@ class Theme_My_Login_Custom_Email extends Theme_My_Login_Abstract {
|
|
668 |
* @access public
|
669 |
*
|
670 |
* @param string $title The default message
|
671 |
-
* @param string $
|
672 |
* @param int $user_id The user's ID
|
673 |
* @return string The filtered message
|
674 |
*/
|
675 |
-
public function user_approval_notification_message_filter( $message, $
|
676 |
$_message = $this->get_option( array( 'user_approval', 'message' ) );
|
677 |
if ( ! empty( $_message ) ) {
|
|
|
678 |
$message = Theme_My_Login_Common::replace_vars( $_message, $user_id, array(
|
679 |
-
'%loginurl%'
|
680 |
-
'%
|
681 |
) );
|
682 |
}
|
683 |
return $message;
|
@@ -741,6 +745,24 @@ class Theme_My_Login_Custom_Email extends Theme_My_Login_Abstract {
|
|
741 |
return $message;
|
742 |
}
|
743 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
744 |
/**
|
745 |
* Changes the user denial e-mail subject
|
746 |
*
|
@@ -777,6 +799,22 @@ class Theme_My_Login_Custom_Email extends Theme_My_Login_Abstract {
|
|
777 |
return empty( $_message ) ? $message : Theme_My_Login_Common::replace_vars( $_message, $user_id );
|
778 |
}
|
779 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
780 |
/**
|
781 |
* Notify the blog admin of a new user
|
782 |
*
|
@@ -784,30 +822,24 @@ class Theme_My_Login_Custom_Email extends Theme_My_Login_Abstract {
|
|
784 |
* @access public
|
785 |
*
|
786 |
* @param int $user_id User ID
|
787 |
-
* @param
|
|
|
788 |
*/
|
789 |
-
public function new_user_notification( $user_id, $
|
790 |
-
global $
|
791 |
|
792 |
-
$user =
|
793 |
|
794 |
-
do_action( 'tml_new_user_notification', $user_id, $
|
795 |
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
-
if ( is_multisite() ) {
|
800 |
-
$blogname = $current_site->site_name;
|
801 |
-
} else {
|
802 |
-
// The blogname option is escaped with esc_html on the way into the database in sanitize_option
|
803 |
-
// we want to reverse this for the plain text arena of emails.
|
804 |
-
$blogname = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES );
|
805 |
-
}
|
806 |
|
807 |
if ( apply_filters( 'send_new_user_admin_notification', true ) ) {
|
808 |
$message = sprintf( __( 'New user registration on your site %s:', 'theme-my-login' ), $blogname ) . "\r\n\r\n";
|
809 |
-
$message .= sprintf( __( 'Username: %s' , 'theme-my-login' ), $user_login ) . "\r\n\r\n";
|
810 |
-
$message .= sprintf( __( 'E-mail: %s' , 'theme-my-login' ), $user_email ) . "\r\n";
|
811 |
|
812 |
$title = sprintf( __( '[%s] New User Registration' , 'theme-my-login' ), $blogname );
|
813 |
|
@@ -819,20 +851,34 @@ class Theme_My_Login_Custom_Email extends Theme_My_Login_Abstract {
|
|
819 |
@wp_mail( $to, $title, $message );
|
820 |
}
|
821 |
|
822 |
-
if ( empty( $
|
823 |
return;
|
824 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
825 |
if ( apply_filters( 'send_new_user_notification', true ) ) {
|
826 |
-
$message = sprintf( __( 'Username: %s', 'theme-my-login' ), $user_login ) . "\r\n";
|
827 |
-
$message .=
|
|
|
|
|
828 |
$message .= wp_login_url() . "\r\n";
|
829 |
|
830 |
-
$title = sprintf( __( '[%s] Your username and password', 'theme-my-login' ), $blogname );
|
831 |
|
832 |
-
$title = apply_filters( 'new_user_notification_title', $title, $user_id
|
833 |
-
$message = apply_filters( 'new_user_notification_message', $message, $
|
834 |
|
835 |
-
wp_mail( $user_email, $title, $message );
|
836 |
}
|
837 |
}
|
838 |
|
@@ -851,13 +897,9 @@ class Theme_My_Login_Custom_Email extends Theme_My_Login_Abstract {
|
|
851 |
// send a copy of password change notification to the admin
|
852 |
// but check to see if it's the admin whose password we're changing, and skip this
|
853 |
if ( $user->user_email != $to && apply_filters( 'send_password_change_notification', true ) ) {
|
854 |
-
|
855 |
-
|
856 |
-
|
857 |
-
// The blogname option is escaped with esc_html on the way into the database in sanitize_option
|
858 |
-
// we want to reverse this for the plain text arena of emails.
|
859 |
-
$blogname = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES );
|
860 |
-
}
|
861 |
|
862 |
$title = sprintf( __( '[%s] Password Lost/Changed' , 'theme-my-login' ), $blogname );
|
863 |
$message = sprintf( __( 'Password Lost and Changed for user: %s', 'theme-my-login' ), $user->user_login ) . "\r\n";
|
120 |
add_action( 'password_reset', array( &$this, 'apply_password_reset_filters' ) );
|
121 |
add_action( 'tml_new_user_notification', array( &$this, 'apply_new_user_filters' ) );
|
122 |
|
123 |
+
remove_action( 'tml_new_user_registered', 'wp_new_user_notification' );
|
124 |
remove_action( 'tml_user_password_changed', 'wp_password_change_notification' );
|
125 |
|
126 |
+
add_action( 'tml_new_user_registered', array( &$this, 'new_user_notification' ), 10, 3 );
|
127 |
add_action( 'tml_user_password_changed', array( &$this, 'password_change_notification' ) );
|
128 |
|
129 |
add_action( 'register_post', array( &$this, 'apply_user_moderation_notification_filters' ) );
|
406 |
* @access public
|
407 |
*
|
408 |
* @param string $title Default message
|
409 |
+
* @param string $key The user's password reset key
|
410 |
* @param int $user_id User ID
|
411 |
* @return string New message
|
412 |
*/
|
413 |
+
public function new_user_notification_message_filter( $message, $key, $user_id ) {
|
414 |
$_message = $this->get_option( array( 'new_user', 'message' ) );
|
415 |
if ( ! empty( $_message ) ) {
|
416 |
+
$user = get_userdata( $user_id );
|
417 |
$message = Theme_My_Login_Common::replace_vars( $_message, $user_id, array(
|
418 |
+
'%reseturl%' => network_site_url( "wp-login.php?action=rp&key=$key&login=" . rawurlencode( $user->user_login ), 'login' ),
|
419 |
+
'%loginurl%' => site_url( 'wp-login.php', 'login' )
|
420 |
) );
|
421 |
}
|
422 |
return $message;
|
554 |
$this->get_option( array( 'user_approval', 'admin_mail_from_name' ) ),
|
555 |
$this->get_option( array( 'user_approval', 'admin_mail_content_type' ) )
|
556 |
);
|
557 |
+
add_filter( 'user_approval_admin_notification_mail_to', array( &$this, 'user_approval_admin_notification_mail_to_filter' ) );
|
558 |
+
add_filter( 'user_approval_admin_notification_title', array( &$this, 'user_approval_admin_notification_title_filter' ), 10, 2 );
|
559 |
+
add_filter( 'user_approval_admin_notification_message', array( &$this, 'user_approval_admin_notification_message_filter' ), 10, 2 );
|
560 |
+
add_filter( 'send_new_user_approval_admin_notification', array( &$this, 'send_new_user_approval_admin_notification_filter' ) );
|
561 |
break;
|
562 |
}
|
563 |
}
|
596 |
$this->get_option( array( 'user_denial', 'mail_from_name' ) ),
|
597 |
$this->get_option( array( 'user_denial', 'mail_content_type' ) )
|
598 |
);
|
599 |
+
add_filter( 'user_denial_notification_title', array( &$this, 'user_denial_notification_title_filter' ), 10, 2 );
|
600 |
+
add_filter( 'user_denial_notification_message', array( &$this, 'user_denial_notification_message_filter' ), 10, 2 );
|
601 |
+
add_filter( 'send_new_user_denial_notification', array( &$this, 'send_new_user_denial_notification_filter' ) );
|
602 |
}
|
603 |
|
604 |
/**
|
671 |
* @access public
|
672 |
*
|
673 |
* @param string $title The default message
|
674 |
+
* @param string $key The user's reset key
|
675 |
* @param int $user_id The user's ID
|
676 |
* @return string The filtered message
|
677 |
*/
|
678 |
+
public function user_approval_notification_message_filter( $message, $key, $user_id ) {
|
679 |
$_message = $this->get_option( array( 'user_approval', 'message' ) );
|
680 |
if ( ! empty( $_message ) ) {
|
681 |
+
$user = get_user_by( 'id', $user_id );
|
682 |
$message = Theme_My_Login_Common::replace_vars( $_message, $user_id, array(
|
683 |
+
'%loginurl%' => Theme_My_Login::get_object()->get_page_link( 'login' ),
|
684 |
+
'%reseturl%' => site_url( "wp-login.php?action=rp&key=$key&login=" . rawurlencode( $user->user_login ), 'login' )
|
685 |
) );
|
686 |
}
|
687 |
return $message;
|
745 |
return $message;
|
746 |
}
|
747 |
|
748 |
+
/**
|
749 |
+
* Determines whether or not to send the new user admin approval notification e-mail
|
750 |
+
*
|
751 |
+
* Callback for "send_new_user_approval_admin_notification" hook
|
752 |
+
*
|
753 |
+
* @since 6.4
|
754 |
+
* @access public
|
755 |
+
*
|
756 |
+
* @param bool $enable Default setting
|
757 |
+
* @return bool New setting
|
758 |
+
*/
|
759 |
+
public function send_new_user_approval_admin_notification_filter( $enable ) {
|
760 |
+
if ( $this->get_option( array( 'user_approval', 'admin_disable' ) ) )
|
761 |
+
return false;
|
762 |
+
|
763 |
+
return $enable;
|
764 |
+
}
|
765 |
+
|
766 |
/**
|
767 |
* Changes the user denial e-mail subject
|
768 |
*
|
799 |
return empty( $_message ) ? $message : Theme_My_Login_Common::replace_vars( $_message, $user_id );
|
800 |
}
|
801 |
|
802 |
+
/**
|
803 |
+
* Determines whether or not to send the new user denial notification e-mail
|
804 |
+
*
|
805 |
+
* @since 6.4
|
806 |
+
* @access public
|
807 |
+
*
|
808 |
+
* @param bool $enable Default setting
|
809 |
+
* @return bool New setting
|
810 |
+
*/
|
811 |
+
public function send_new_user_denial_notification_filter( $enable ) {
|
812 |
+
if ( $this->get_option( array( 'user_denial', 'disable' ) ) )
|
813 |
+
return false;
|
814 |
+
|
815 |
+
return $enable;
|
816 |
+
}
|
817 |
+
|
818 |
/**
|
819 |
* Notify the blog admin of a new user
|
820 |
*
|
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, $deprecated = null, $notify = '' ) {
|
829 |
+
global $wpdb;
|
830 |
|
831 |
+
$user = get_userdata( $user_id );
|
832 |
|
833 |
+
do_action( 'tml_new_user_notification', $user_id, $notify );
|
834 |
|
835 |
+
// The blogname option is escaped with esc_html on the way into the database in sanitize_option
|
836 |
+
// we want to reverse this for the plain text arena of emails.
|
837 |
+
$blogname = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
838 |
|
839 |
if ( apply_filters( 'send_new_user_admin_notification', true ) ) {
|
840 |
$message = sprintf( __( 'New user registration on your site %s:', 'theme-my-login' ), $blogname ) . "\r\n\r\n";
|
841 |
+
$message .= sprintf( __( 'Username: %s' , 'theme-my-login' ), $user->user_login ) . "\r\n\r\n";
|
842 |
+
$message .= sprintf( __( 'E-mail: %s' , 'theme-my-login' ), $user->user_email ) . "\r\n";
|
843 |
|
844 |
$title = sprintf( __( '[%s] New User Registration' , 'theme-my-login' ), $blogname );
|
845 |
|
851 |
@wp_mail( $to, $title, $message );
|
852 |
}
|
853 |
|
854 |
+
if ( 'admin' == $notify || empty( $notify ) )
|
855 |
return;
|
856 |
|
857 |
+
// Generate something random for a password reset key
|
858 |
+
$key = wp_generate_password( 20, false );
|
859 |
+
|
860 |
+
do_action( 'retrieve_password_key', $user->user_login, $key );
|
861 |
+
|
862 |
+
// Now insert the key, hashed, into the DB
|
863 |
+
require_once ABSPATH . WPINC . '/class-phpass.php';
|
864 |
+
$wp_hasher = new PasswordHash( 8, true );
|
865 |
+
|
866 |
+
$hashed = time() . ':' . $wp_hasher->HashPassword( $key );
|
867 |
+
$wpdb->update( $wpdb->users, array( 'user_activation_key' => $hashed ), array( 'user_login' => $user->user_login ) );
|
868 |
+
|
869 |
if ( apply_filters( 'send_new_user_notification', true ) ) {
|
870 |
+
$message = sprintf( __( 'Username: %s', 'theme-my-login' ), $user->user_login ) . "\r\n\r\n";
|
871 |
+
$message .= __( 'To set your password, visit the following address:', 'theme-my-login' ) . "\r\n\r\n";
|
872 |
+
$message .= '<' . network_site_url( "wp-login.php?action=rp&key=$key&login=" . rawurlencode( $user->user_login ), 'login' ) . ">\r\n\r\n";
|
873 |
+
|
874 |
$message .= wp_login_url() . "\r\n";
|
875 |
|
876 |
+
$title = sprintf( __( '[%s] Your username and password info', 'theme-my-login' ), $blogname );
|
877 |
|
878 |
+
$title = apply_filters( 'new_user_notification_title', $title, $user_id );
|
879 |
+
$message = apply_filters( 'new_user_notification_message', $message, $key, $user_id );
|
880 |
|
881 |
+
wp_mail( $user->user_email, $title, $message );
|
882 |
}
|
883 |
}
|
884 |
|
897 |
// send a copy of password change notification to the admin
|
898 |
// but check to see if it's the admin whose password we're changing, and skip this
|
899 |
if ( $user->user_email != $to && apply_filters( 'send_password_change_notification', true ) ) {
|
900 |
+
// The blogname option is escaped with esc_html on the way into the database in sanitize_option
|
901 |
+
// we want to reverse this for the plain text arena of emails.
|
902 |
+
$blogname = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES );
|
|
|
|
|
|
|
|
|
903 |
|
904 |
$title = sprintf( __( '[%s] Password Lost/Changed' , 'theme-my-login' ), $blogname );
|
905 |
$message = sprintf( __( 'Password Lost and Changed for user: %s', 'theme-my-login' ), $user->user_login ) . "\r\n";
|
modules/custom-user-links/admin/custom-user-links-admin.php
CHANGED
@@ -220,7 +220,7 @@ class Theme_My_Login_Custom_User_Links_Admin extends Theme_My_Login_Abstract {
|
|
220 |
*
|
221 |
* @param array $link Link data
|
222 |
* @param string $role Name of user role
|
223 |
-
* @return
|
224 |
*/
|
225 |
private static function get_link_row( $link, $role ) {
|
226 |
$r = '';
|
220 |
*
|
221 |
* @param array $link Link data
|
222 |
* @param string $role Name of user role
|
223 |
+
* @return string Link row
|
224 |
*/
|
225 |
private static function get_link_row( $link, $role ) {
|
226 |
$r = '';
|
modules/recaptcha/admin/recaptcha-admin.php
CHANGED
@@ -95,9 +95,9 @@ class Theme_My_Login_Recaptcha_Admin extends Theme_My_Login_Abstract {
|
|
95 |
|
96 |
add_settings_section( 'general', null, '__return_false', $this->options_key );
|
97 |
|
98 |
-
add_settings_field( 'public_key', __( '
|
99 |
-
add_settings_field( 'private_key', __( '
|
100 |
-
add_settings_field( 'theme', __( 'Theme',
|
101 |
}
|
102 |
|
103 |
/**
|
@@ -120,10 +120,8 @@ class Theme_My_Login_Recaptcha_Admin extends Theme_My_Login_Abstract {
|
|
120 |
*/
|
121 |
public function get_themes() {
|
122 |
$recaptcha_themes = array(
|
123 |
-
'
|
124 |
-
'
|
125 |
-
'blackglass' => _x( 'Black Glass', 'recaptcha theme', 'theme-my-login' ),
|
126 |
-
'clean' => _x( 'Clean', 'recaptcha theme', 'theme-my-login' )
|
127 |
);
|
128 |
return apply_filters( 'theme_my_login_recaptcha_themes', $recaptcha_themes );
|
129 |
}
|
95 |
|
96 |
add_settings_section( 'general', null, '__return_false', $this->options_key );
|
97 |
|
98 |
+
add_settings_field( 'public_key', __( 'Site Key', 'theme-my-login' ), array( &$this, 'settings_field_public_key' ), $this->options_key, 'general' );
|
99 |
+
add_settings_field( 'private_key', __( 'Secret Key', 'theme-my-login' ), array( &$this, 'settings_field_private_key' ), $this->options_key, 'general' );
|
100 |
+
add_settings_field( 'theme', __( 'Theme', 'theme-my-login' ), array( &$this, 'settings_field_theme' ), $this->options_key, 'general' );
|
101 |
}
|
102 |
|
103 |
/**
|
120 |
*/
|
121 |
public function get_themes() {
|
122 |
$recaptcha_themes = array(
|
123 |
+
'light' => _x( 'Light', 'recaptcha theme', 'theme-my-login' ),
|
124 |
+
'dark' => _x( 'Dark', 'recaptcha theme', 'theme-my-login' )
|
|
|
|
|
125 |
);
|
126 |
return apply_filters( 'theme_my_login_recaptcha_themes', $recaptcha_themes );
|
127 |
}
|
modules/recaptcha/js/recaptcha.js
DELETED
@@ -1,26 +0,0 @@
|
|
1 |
-
(function($) {
|
2 |
-
$(document)
|
3 |
-
.on('ready', function() {
|
4 |
-
if ( $('#recaptcha').length ) {
|
5 |
-
Recaptcha.create(tmlRecaptcha.publickey, 'recaptcha', {
|
6 |
-
theme: tmlRecaptcha.theme
|
7 |
-
});
|
8 |
-
}
|
9 |
-
})
|
10 |
-
.on('show', '#tml_ajax_window', function() {
|
11 |
-
if ( $(this).find('#recaptcha').length ) {
|
12 |
-
Recaptcha.create(tmlRecaptcha.publickey, $(this).find('#recaptcha').get(0), {
|
13 |
-
theme: tmlRecaptcha.theme
|
14 |
-
});
|
15 |
-
}
|
16 |
-
})
|
17 |
-
.on('hide', '#tml_ajax_window', function() {
|
18 |
-
Recaptcha.destroy();
|
19 |
-
|
20 |
-
if ( $('#recaptcha').length ) {
|
21 |
-
Recaptcha.create(tmlRecaptcha.publickey, 'recaptcha', {
|
22 |
-
theme: tmlRecaptcha.theme
|
23 |
-
});
|
24 |
-
}
|
25 |
-
});
|
26 |
-
})(jQuery);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
modules/recaptcha/recaptcha.php
CHANGED
@@ -19,22 +19,6 @@ if ( ! class_exists( 'Theme_My_Login_Recaptcha' ) ) :
|
|
19 |
* @since 6.3
|
20 |
*/
|
21 |
class Theme_My_Login_Recaptcha extends Theme_My_Login_Abstract {
|
22 |
-
/**
|
23 |
-
* Holds reCAPTCHA API URI
|
24 |
-
*
|
25 |
-
* @since 6.3
|
26 |
-
* @const string
|
27 |
-
*/
|
28 |
-
const RECAPTCHA_API_URI = 'www.google.com/recaptcha/api';
|
29 |
-
|
30 |
-
/**
|
31 |
-
* Holds reCAPTCHA API URL
|
32 |
-
*
|
33 |
-
* @since 6.3.7
|
34 |
-
* @var string
|
35 |
-
*/
|
36 |
-
private $recaptcha_api_url;
|
37 |
-
|
38 |
/**
|
39 |
* Holds options key
|
40 |
*
|
@@ -67,7 +51,7 @@ class Theme_My_Login_Recaptcha extends Theme_My_Login_Abstract {
|
|
67 |
return array(
|
68 |
'public_key' => '',
|
69 |
'private_key' => '',
|
70 |
-
'theme' => '
|
71 |
);
|
72 |
}
|
73 |
|
@@ -81,8 +65,6 @@ class Theme_My_Login_Recaptcha extends Theme_My_Login_Abstract {
|
|
81 |
if ( ! ( $this->get_option( 'public_key' ) || $this->get_option( 'private_key' ) ) )
|
82 |
return;
|
83 |
|
84 |
-
$this->recaptcha_api_url = ( is_ssl() ? 'https://' : 'http://' ) . self::RECAPTCHA_API_URI;
|
85 |
-
|
86 |
add_action( 'wp_enqueue_scripts', array( &$this, 'wp_enqueue_scripts' ) );
|
87 |
|
88 |
add_action( 'register_form', array( &$this, 'recaptcha_display' ) );
|
@@ -101,12 +83,7 @@ class Theme_My_Login_Recaptcha extends Theme_My_Login_Abstract {
|
|
101 |
* @since 6.3
|
102 |
*/
|
103 |
function wp_enqueue_scripts() {
|
104 |
-
wp_enqueue_script( 'recaptcha',
|
105 |
-
wp_enqueue_script( 'theme-my-login-recaptcha', plugins_url( 'theme-my-login/modules/recaptcha/js/recaptcha.js' ), array( 'recaptcha', 'jquery' ) );
|
106 |
-
wp_localize_script( 'theme-my-login-recaptcha', 'tmlRecaptcha', array(
|
107 |
-
'publickey' => $this->get_option( 'public_key' ),
|
108 |
-
'theme' => $this->get_option( 'theme' )
|
109 |
-
) );
|
110 |
}
|
111 |
|
112 |
/**
|
@@ -118,24 +95,25 @@ class Theme_My_Login_Recaptcha extends Theme_My_Login_Abstract {
|
|
118 |
* @return WP_Error WP_Error object
|
119 |
*/
|
120 |
public function registration_errors( $errors ) {
|
121 |
-
$response =
|
122 |
-
|
|
|
|
|
123 |
|
124 |
-
$error_code = $
|
125 |
|
126 |
switch ( $error_code ) {
|
127 |
-
case '
|
128 |
-
|
|
|
129 |
break;
|
130 |
-
case '
|
131 |
-
|
132 |
-
|
133 |
-
case 'incorrect-captcha-sol' :
|
134 |
-
$errors->add( 'recaptcha', __( '<strong>ERROR</strong>: Incorrect captcha code.', 'theme-my-login' ), 'incorrect-captcha-sol' );
|
135 |
break;
|
136 |
case 'recaptcha-not-reachable' :
|
137 |
default :
|
138 |
-
$errors->add( 'recaptcha', __( '<strong>ERROR</strong>: Unable to reach the reCAPTCHA server.', 'theme-my-login' ),
|
139 |
break;
|
140 |
}
|
141 |
}
|
@@ -163,19 +141,10 @@ class Theme_My_Login_Recaptcha extends Theme_My_Login_Abstract {
|
|
163 |
*/
|
164 |
public function recaptcha_display( $errors = null ) {
|
165 |
if ( is_multisite() ) {
|
166 |
-
if ( $error = $errors->get_error_message( 'recaptcha' ) )
|
167 |
-
|
168 |
-
<?php }
|
169 |
}
|
170 |
-
|
171 |
-
<div id="recaptcha">
|
172 |
-
<noscript>
|
173 |
-
<iframe src="<?php echo self::RECAPTCHA_API_URI; ?>/noscript?k=<?php echo $this->get_option( 'public_key' ); ?>" height="300" width="500" frameborder="0"></iframe><br>
|
174 |
-
<textarea name="recaptcha_challenge_field" rows="3" cols="40"></textarea>
|
175 |
-
<input type="hidden" name="recaptcha_response_field" value="manual_challenge">
|
176 |
-
</noscript>
|
177 |
-
</div>
|
178 |
-
<?php
|
179 |
}
|
180 |
|
181 |
/**
|
@@ -184,27 +153,31 @@ class Theme_My_Login_Recaptcha extends Theme_My_Login_Abstract {
|
|
184 |
* @since 6.3
|
185 |
* @access public
|
186 |
*/
|
187 |
-
public function recaptcha_validate( $
|
188 |
-
|
|
|
|
|
|
|
|
|
189 |
'body' => array(
|
190 |
-
'
|
191 |
-
'
|
192 |
-
'
|
193 |
-
'response' => $response
|
194 |
)
|
195 |
) );
|
196 |
|
197 |
$response_code = wp_remote_retrieve_response_code( $response );
|
198 |
$response_message = wp_remote_retrieve_response_message( $response );
|
|
|
199 |
|
200 |
if ( 200 == $response_code ) {
|
201 |
-
// Parse the response
|
202 |
-
list( $is_valid, $error_code ) = array_map( 'trim', explode( "\n", wp_remote_retrieve_body( $response ) ) );
|
203 |
|
204 |
-
|
|
|
|
|
205 |
return true;
|
206 |
|
207 |
-
return new WP_Error( 'recaptcha', $
|
208 |
}
|
209 |
|
210 |
return new WP_Error( 'recaptcha', 'recaptcha-not-reachable' );
|
19 |
* @since 6.3
|
20 |
*/
|
21 |
class Theme_My_Login_Recaptcha extends Theme_My_Login_Abstract {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
/**
|
23 |
* Holds options key
|
24 |
*
|
51 |
return array(
|
52 |
'public_key' => '',
|
53 |
'private_key' => '',
|
54 |
+
'theme' => 'light'
|
55 |
);
|
56 |
}
|
57 |
|
65 |
if ( ! ( $this->get_option( 'public_key' ) || $this->get_option( 'private_key' ) ) )
|
66 |
return;
|
67 |
|
|
|
|
|
68 |
add_action( 'wp_enqueue_scripts', array( &$this, 'wp_enqueue_scripts' ) );
|
69 |
|
70 |
add_action( 'register_form', array( &$this, 'recaptcha_display' ) );
|
83 |
* @since 6.3
|
84 |
*/
|
85 |
function wp_enqueue_scripts() {
|
86 |
+
wp_enqueue_script( 'recaptcha', 'https://www.google.com/recaptcha/api.js' );
|
|
|
|
|
|
|
|
|
|
|
87 |
}
|
88 |
|
89 |
/**
|
95 |
* @return WP_Error WP_Error object
|
96 |
*/
|
97 |
public function registration_errors( $errors ) {
|
98 |
+
$response = isset( $_POST['g-recaptcha-response'] ) ? $_POST['g-recaptcha-response'] : '';
|
99 |
+
$result = $this->recaptcha_validate( $response );
|
100 |
+
|
101 |
+
if ( is_wp_error( $result ) ) {
|
102 |
|
103 |
+
$error_code = $result->get_error_message();
|
104 |
|
105 |
switch ( $error_code ) {
|
106 |
+
case 'missing-input-secret' :
|
107 |
+
case 'invalid-input-secret' :
|
108 |
+
$errors->add( 'recaptcha', __( '<strong>ERROR</strong>: Invalid reCAPTCHA secret key.', 'theme-my-login' ), $error_code );
|
109 |
break;
|
110 |
+
case 'missing-input-response' :
|
111 |
+
case 'invalid-input-response' :
|
112 |
+
$errors->add( 'recaptcha', __( '<strong>ERROR</strong>: Please check the box to prove that you are not a robot.', 'theme-my-login' ), $error_code );
|
|
|
|
|
113 |
break;
|
114 |
case 'recaptcha-not-reachable' :
|
115 |
default :
|
116 |
+
$errors->add( 'recaptcha', __( '<strong>ERROR</strong>: Unable to reach the reCAPTCHA server.', 'theme-my-login' ), $error_code );
|
117 |
break;
|
118 |
}
|
119 |
}
|
141 |
*/
|
142 |
public function recaptcha_display( $errors = null ) {
|
143 |
if ( is_multisite() ) {
|
144 |
+
if ( $error = $errors->get_error_message( 'recaptcha' ) )
|
145 |
+
echo '<p class="error">' . $error . '</p>';
|
|
|
146 |
}
|
147 |
+
echo '<div class="g-recaptcha" data-sitekey="' . esc_attr( $this->get_option( 'public_key' ) ) . '" data-theme="' . esc_attr( $this->get_option( 'theme' ) ) . '"></div>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
148 |
}
|
149 |
|
150 |
/**
|
153 |
* @since 6.3
|
154 |
* @access public
|
155 |
*/
|
156 |
+
public function recaptcha_validate( $response, $remote_ip = '' ) {
|
157 |
+
|
158 |
+
if ( empty( $remote_ip ) )
|
159 |
+
$remote_ip = $_SERVER['REMOTE_ADDR'];
|
160 |
+
|
161 |
+
$response = wp_remote_post( 'https://www.google.com/recaptcha/api/siteverify', array(
|
162 |
'body' => array(
|
163 |
+
'secret' => $this->get_option( 'private_key' ),
|
164 |
+
'response' => $response,
|
165 |
+
'remoteip' => $remote_ip
|
|
|
166 |
)
|
167 |
) );
|
168 |
|
169 |
$response_code = wp_remote_retrieve_response_code( $response );
|
170 |
$response_message = wp_remote_retrieve_response_message( $response );
|
171 |
+
$response_body = wp_remote_retrieve_body( $response );
|
172 |
|
173 |
if ( 200 == $response_code ) {
|
|
|
|
|
174 |
|
175 |
+
$result = json_decode( $response_body, true );
|
176 |
+
|
177 |
+
if ( $result['success'] )
|
178 |
return true;
|
179 |
|
180 |
+
return new WP_Error( 'recaptcha', reset( $result['error-codes'] ) );
|
181 |
}
|
182 |
|
183 |
return new WP_Error( 'recaptcha', 'recaptcha-not-reachable' );
|
modules/security/security.php
CHANGED
@@ -92,6 +92,11 @@ class Theme_My_Login_Security extends Theme_My_Login_Abstract {
|
|
92 |
global $wp_query, $pagenow;
|
93 |
|
94 |
if ( 'wp-login.php' == $pagenow && $this->get_option( 'private_login' ) ) {
|
|
|
|
|
|
|
|
|
|
|
95 |
$pagenow = 'index.php';
|
96 |
$wp_query->set_404();
|
97 |
status_header( 404 );
|
92 |
global $wp_query, $pagenow;
|
93 |
|
94 |
if ( 'wp-login.php' == $pagenow && $this->get_option( 'private_login' ) ) {
|
95 |
+
|
96 |
+
parse_str( $_SERVER['QUERY_STRING'], $q );
|
97 |
+
if ( ! empty( $q['interim-login'] ) || ! empty( $_REQUEST['interim-login'] ) )
|
98 |
+
return;
|
99 |
+
|
100 |
$pagenow = 'index.php';
|
101 |
$wp_query->set_404();
|
102 |
status_header( 404 );
|
modules/themed-profiles/themed-profiles.css
CHANGED
@@ -1,78 +1,51 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
vertical-align: middle;
|
4 |
-
}
|
5 |
-
|
6 |
-
#your-profile fieldset {
|
7 |
-
border: 0 none;
|
8 |
-
margin: 0;
|
9 |
-
padding: 0;
|
10 |
}
|
11 |
|
12 |
-
|
13 |
-
cursor: pointer;
|
14 |
-
margin: 0;
|
15 |
-
padding: 0;
|
16 |
-
}
|
17 |
-
|
18 |
-
#your-profile .form-table {
|
19 |
border-collapse: collapse;
|
20 |
}
|
21 |
|
22 |
-
|
23 |
-
|
24 |
-
text-align: left;
|
25 |
-
vertical-align: top;
|
26 |
-
width: 150px;
|
27 |
-
}
|
28 |
-
|
29 |
-
#your-profile .form-table td {
|
30 |
-
font-size: 11px;
|
31 |
-
line-height: 20px;
|
32 |
-
margin-bottom: 9px;
|
33 |
-
padding: 8px 10px;
|
34 |
-
}
|
35 |
-
|
36 |
-
#your-profile .form-table div.color-option {
|
37 |
display: block;
|
38 |
-
|
39 |
-
|
40 |
}
|
41 |
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
|
|
|
|
|
|
46 |
}
|
47 |
|
48 |
-
|
49 |
-
|
50 |
-
margin-right: 2px;
|
51 |
-
float: left;
|
52 |
}
|
53 |
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
width:
|
59 |
-
|
60 |
}
|
61 |
|
62 |
-
|
63 |
-
|
64 |
-
border-style: solid solid none;
|
65 |
-
border-color: #fff;
|
66 |
-
height: 10px;
|
67 |
-
line-height: 20px;
|
68 |
-
width: 10px;
|
69 |
}
|
70 |
|
71 |
-
|
72 |
-
|
73 |
-
|
|
|
74 |
}
|
75 |
|
76 |
-
|
77 |
-
|
78 |
-
|
|
|
|
1 |
+
.tml-profile {
|
2 |
+
max-width: 100%;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
}
|
4 |
|
5 |
+
.tml-profile .tml-form-table {
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
border-collapse: collapse;
|
7 |
}
|
8 |
|
9 |
+
.tml-profile .tml-form-table th,
|
10 |
+
.tml-profile .tml-form-table td {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
display: block;
|
12 |
+
vertical-align: middle;
|
13 |
+
width: auto;
|
14 |
}
|
15 |
|
16 |
+
.tml-profile .screen-reader-text,
|
17 |
+
.tml-profile .screen-reader-text span {
|
18 |
+
height: 1px;
|
19 |
+
left: -1000em;
|
20 |
+
overflow: hidden;
|
21 |
+
position: absolute;
|
22 |
+
width: 1px;
|
23 |
}
|
24 |
|
25 |
+
.tml-profile .wp-pwd {
|
26 |
+
text-align: right;
|
|
|
|
|
27 |
}
|
28 |
|
29 |
+
.tml-profile .wp-pwd .dashicons {
|
30 |
+
font-size: 1em;
|
31 |
+
line-height: 1;
|
32 |
+
height: 1em;
|
33 |
+
width: 1em;
|
34 |
+
vertical-align: middle;
|
35 |
}
|
36 |
|
37 |
+
.tml-profile #pass-strength-result {
|
38 |
+
margin: 0.5em 0;
|
|
|
|
|
|
|
|
|
|
|
39 |
}
|
40 |
|
41 |
+
.hidden,
|
42 |
+
.no-js .hide-if-no-js,
|
43 |
+
.js .hide-if-js {
|
44 |
+
display: none;
|
45 |
}
|
46 |
|
47 |
+
@media screen and (min-width: 768px) {
|
48 |
+
.tml-profile .tml-submit-wrap input {
|
49 |
+
width: auto;
|
50 |
+
}
|
51 |
+
}
|
modules/themed-profiles/themed-profiles.js
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function($){
|
2 |
+
$(document).ready(function(){
|
3 |
+
$('body').addClass('js').removeClass('no-js');
|
4 |
+
});
|
5 |
+
})(jQuery);
|
modules/themed-profiles/themed-profiles.php
CHANGED
@@ -74,12 +74,16 @@ class Theme_My_Login_Themed_Profiles extends Theme_My_Login_Abstract {
|
|
74 |
protected function load() {
|
75 |
add_action( 'tml_modules_loaded', array( &$this, 'modules_loaded' ) );
|
76 |
|
77 |
-
add_action( 'init',
|
78 |
-
add_action( 'template_redirect',
|
79 |
-
add_filter( 'show_admin_bar',
|
|
|
|
|
80 |
|
81 |
add_action( 'tml_request_profile', array( &$this, 'tml_request_profile' ) );
|
82 |
add_action( 'tml_display_profile', array( &$this, 'tml_display_profile' ) );
|
|
|
|
|
83 |
}
|
84 |
|
85 |
/**
|
@@ -191,6 +195,36 @@ class Theme_My_Login_Themed_Profiles extends Theme_My_Login_Abstract {
|
|
191 |
return $show_admin_bar;
|
192 |
}
|
193 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
194 |
/**
|
195 |
* Handles profile action
|
196 |
*
|
@@ -320,6 +354,37 @@ class Theme_My_Login_Themed_Profiles extends Theme_My_Login_Abstract {
|
|
320 |
}
|
321 |
return $url;
|
322 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
323 |
}
|
324 |
|
325 |
Theme_My_Login_Themed_Profiles::get_object();
|
74 |
protected function load() {
|
75 |
add_action( 'tml_modules_loaded', array( &$this, 'modules_loaded' ) );
|
76 |
|
77 |
+
add_action( 'init', array( &$this, 'init' ) );
|
78 |
+
add_action( 'template_redirect', array( &$this, 'template_redirect' ) );
|
79 |
+
add_filter( 'show_admin_bar', array( &$this, 'show_admin_bar' ) );
|
80 |
+
add_action( 'wp_enqueue_scripts', array( &$this, 'wp_enqueue_scripts' ) );
|
81 |
+
add_filter( 'body_class', array( &$this, 'body_class' ) );
|
82 |
|
83 |
add_action( 'tml_request_profile', array( &$this, 'tml_request_profile' ) );
|
84 |
add_action( 'tml_display_profile', array( &$this, 'tml_display_profile' ) );
|
85 |
+
|
86 |
+
add_filter( 'wp_setup_nav_menu_item', array( &$this, 'wp_setup_nav_menu_item' ), 12 );
|
87 |
}
|
88 |
|
89 |
/**
|
195 |
return $show_admin_bar;
|
196 |
}
|
197 |
|
198 |
+
/**
|
199 |
+
* Enqueue scripts
|
200 |
+
*
|
201 |
+
* @since 6.4
|
202 |
+
* @access public
|
203 |
+
*/
|
204 |
+
public function wp_enqueue_scripts() {
|
205 |
+
wp_enqueue_script( 'tml-themed-profiles', plugins_url( 'theme-my-login/modules/themed-profiles/themed-profiles.js' ), array( 'jquery' ) );
|
206 |
+
}
|
207 |
+
|
208 |
+
/**
|
209 |
+
* Add a 'no-js' class to the body
|
210 |
+
*
|
211 |
+
* @since 6.4
|
212 |
+
* @access public
|
213 |
+
*
|
214 |
+
* @param array $classes Body classes
|
215 |
+
* @return array Body classes
|
216 |
+
*/
|
217 |
+
public function body_class( $classes ) {
|
218 |
+
|
219 |
+
if ( ! Theme_My_Login::is_tml_page( 'profile' ) )
|
220 |
+
return $classes;
|
221 |
+
|
222 |
+
if ( ! in_array( 'no-js', $classes ) )
|
223 |
+
$classes[] = 'no-js';
|
224 |
+
|
225 |
+
return $classes;
|
226 |
+
}
|
227 |
+
|
228 |
/**
|
229 |
* Handles profile action
|
230 |
*
|
354 |
}
|
355 |
return $url;
|
356 |
}
|
357 |
+
|
358 |
+
/**
|
359 |
+
* Hide Profile link if user is not logged in
|
360 |
+
*
|
361 |
+
* Callback for "wp_setup_nav_menu_item" hook in wp_setup_nav_menu_item()
|
362 |
+
*
|
363 |
+
* @see wp_setup_nav_menu_item()
|
364 |
+
* @since 6.4
|
365 |
+
* @access public
|
366 |
+
*
|
367 |
+
* @param object $menu_item The menu item
|
368 |
+
* @return object The (possibly) modified menu item
|
369 |
+
*/
|
370 |
+
public function wp_setup_nav_menu_item( $menu_item ) {
|
371 |
+
if ( is_admin() )
|
372 |
+
return $menu_item;
|
373 |
+
|
374 |
+
if ( 'page' != $menu_item->object )
|
375 |
+
return $menu_item;
|
376 |
+
|
377 |
+
// User is not logged in
|
378 |
+
if ( ! is_user_logged_in() ) {
|
379 |
+
|
380 |
+
// Hide Profile
|
381 |
+
if ( Theme_My_Login::is_tml_page( 'profile', $menu_item->object_id ) ) {
|
382 |
+
$menu_item->_invalid = true;
|
383 |
+
}
|
384 |
+
}
|
385 |
+
|
386 |
+
return $menu_item;
|
387 |
+
}
|
388 |
}
|
389 |
|
390 |
Theme_My_Login_Themed_Profiles::get_object();
|
modules/user-moderation/admin/user-moderation-admin.php
CHANGED
@@ -355,14 +355,8 @@ class Theme_My_Login_User_Moderation_Admin extends Theme_My_Login_Abstract {
|
|
355 |
$user_object->set_role( $approval_role );
|
356 |
unset( $user_object );
|
357 |
|
358 |
-
|
359 |
-
|
360 |
-
$user_pass = wp_generate_password();
|
361 |
-
wp_set_password( $user_pass, $user->ID );
|
362 |
-
}
|
363 |
-
|
364 |
-
// Delete plaintext pass
|
365 |
-
delete_user_meta( $user->ID, 'user_pass' );
|
366 |
|
367 |
if ( is_multisite() ) {
|
368 |
$blogname = $current_site->site_name;
|
@@ -372,15 +366,29 @@ class Theme_My_Login_User_Moderation_Admin extends Theme_My_Login_Abstract {
|
|
372 |
$blogname = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES );
|
373 |
}
|
374 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
375 |
$message = sprintf( __( 'You have been approved access to %s', 'theme-my-login' ), $blogname ) . "\r\n\r\n";
|
376 |
$message .= sprintf( __( 'Username: %s', 'theme-my-login' ), $user->user_login ) . "\r\n";
|
377 |
-
$message .=
|
|
|
|
|
378 |
$message .= site_url( 'wp-login.php', 'login' ) . "\r\n";
|
379 |
|
380 |
$title = sprintf( __( '[%s] Registration Approved', 'theme-my-login' ), $blogname );
|
381 |
|
382 |
-
$title = apply_filters( 'user_approval_notification_title', $title,
|
383 |
-
$message = apply_filters( 'user_approval_notification_message', $message, $
|
384 |
|
385 |
if ( $message && ! wp_mail( $user->user_email, $title, $message ) )
|
386 |
die( '<p>' . __( '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' ) . '</p>' );
|
@@ -407,6 +415,9 @@ class Theme_My_Login_User_Moderation_Admin extends Theme_My_Login_Abstract {
|
|
407 |
|
408 |
do_action( 'deny_user', $user->ID );
|
409 |
|
|
|
|
|
|
|
410 |
if ( is_multisite() ) {
|
411 |
$blogname = $current_site->site_name;
|
412 |
} else {
|
355 |
$user_object->set_role( $approval_role );
|
356 |
unset( $user_object );
|
357 |
|
358 |
+
if ( ! apply_filters( 'send_new_user_approval_notification', true ) )
|
359 |
+
return;
|
|
|
|
|
|
|
|
|
|
|
|
|
360 |
|
361 |
if ( is_multisite() ) {
|
362 |
$blogname = $current_site->site_name;
|
366 |
$blogname = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES );
|
367 |
}
|
368 |
|
369 |
+
// Generate something random for a password reset key
|
370 |
+
$key = wp_generate_password( 20, false );
|
371 |
+
|
372 |
+
do_action( 'retrieve_password_key', $user->user_login, $key );
|
373 |
+
|
374 |
+
// Now insert the key, hashed, into the DB
|
375 |
+
require_once ABSPATH . WPINC . '/class-phpass.php';
|
376 |
+
$wp_hasher = new PasswordHash( 8, true );
|
377 |
+
|
378 |
+
$hashed = time() . ':' . $wp_hasher->HashPassword( $key );
|
379 |
+
$wpdb->update( $wpdb->users, array( 'user_activation_key' => $hashed ), array( 'user_login' => $user->user_login ) );
|
380 |
+
|
381 |
$message = sprintf( __( 'You have been approved access to %s', 'theme-my-login' ), $blogname ) . "\r\n\r\n";
|
382 |
$message .= sprintf( __( 'Username: %s', 'theme-my-login' ), $user->user_login ) . "\r\n";
|
383 |
+
$message .= __( 'To set your password, visit the following address:', 'theme-my-login' ) . "\r\n\r\n";
|
384 |
+
$message .= '<' . network_site_url( "wp-login.php?action=rp&key=$key&login=" . rawurlencode( $user->user_login ), 'login' ) . ">\r\n\r\n";
|
385 |
+
|
386 |
$message .= site_url( 'wp-login.php', 'login' ) . "\r\n";
|
387 |
|
388 |
$title = sprintf( __( '[%s] Registration Approved', 'theme-my-login' ), $blogname );
|
389 |
|
390 |
+
$title = apply_filters( 'user_approval_notification_title', $title, $user->ID );
|
391 |
+
$message = apply_filters( 'user_approval_notification_message', $message, $key, $user->ID );
|
392 |
|
393 |
if ( $message && ! wp_mail( $user->user_email, $title, $message ) )
|
394 |
die( '<p>' . __( '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' ) . '</p>' );
|
415 |
|
416 |
do_action( 'deny_user', $user->ID );
|
417 |
|
418 |
+
if ( ! apply_filters( 'send_new_user_denial_notification', true ) )
|
419 |
+
return;
|
420 |
+
|
421 |
if ( is_multisite() ) {
|
422 |
$blogname = $current_site->site_name;
|
423 |
} else {
|
modules/user-moderation/user-moderation.php
CHANGED
@@ -71,8 +71,8 @@ class Theme_My_Login_User_Moderation extends Theme_My_Login_Abstract {
|
|
71 |
add_action( 'authenticate', array( &$this, 'authenticate' ), 100, 3 );
|
72 |
add_filter( 'allow_password_reset', array( &$this, 'allow_password_reset' ), 10, 2 );
|
73 |
|
74 |
-
add_action( 'tml_request', array( &$this, 'action_messages' )
|
75 |
-
add_action( 'tml_new_user_activated', array( &$this, 'new_user_activated' )
|
76 |
|
77 |
if ( 'email' == $this->get_option( 'type' ) ) {
|
78 |
add_action( 'tml_request_activate', array( &$this, 'user_activation' ) );
|
@@ -90,17 +90,17 @@ class Theme_My_Login_User_Moderation extends Theme_My_Login_Abstract {
|
|
90 |
public function register_post() {
|
91 |
// Remove default new user notification
|
92 |
if ( has_action( 'tml_new_user_registered', 'wp_new_user_notification' ) )
|
93 |
-
remove_action( 'tml_new_user_registered', 'wp_new_user_notification'
|
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( 'tml_new_user_registered', array( &$custom_email, 'new_user_notification' ) ) )
|
99 |
-
remove_action( 'tml_new_user_registered', array( &$custom_email, 'new_user_notification' )
|
100 |
}
|
101 |
|
102 |
// Moderate user upon registration
|
103 |
-
add_action( 'tml_new_user_registered', array( &$this, 'moderate_user' ), 100
|
104 |
}
|
105 |
|
106 |
/**
|
@@ -241,9 +241,8 @@ class Theme_My_Login_User_Moderation extends Theme_My_Login_Abstract {
|
|
241 |
* @access public
|
242 |
*
|
243 |
* @param int $user_id The user's ID
|
244 |
-
* @param string $user_pass The user's password
|
245 |
*/
|
246 |
-
public function moderate_user( $user_id
|
247 |
global $wpdb;
|
248 |
|
249 |
// Set user role to "pending"
|
@@ -256,23 +255,14 @@ class Theme_My_Login_User_Moderation extends Theme_My_Login_Abstract {
|
|
256 |
// Set user to "Pending" role
|
257 |
$user->set_role( 'pending' );
|
258 |
|
259 |
-
// Temporarily save plaintext pass
|
260 |
-
if ( isset( $_POST['user_pass'] ) )
|
261 |
-
update_user_meta( $user_id, 'user_pass', $_POST['user_pass'] );
|
262 |
-
|
263 |
// Send appropriate e-mail depending on moderation type
|
264 |
if ( 'email' == $this->get_option( 'type' ) ) {
|
265 |
-
// Generate an activation key
|
266 |
-
$key = wp_generate_password( 20, false );
|
267 |
-
|
268 |
-
// Set the activation key for the user
|
269 |
-
$wpdb->update( $wpdb->users, array( 'user_activation_key' => $key ), array( 'user_login' => $user->user_login ) );
|
270 |
-
|
271 |
// Send activation e-mail
|
272 |
-
self::new_user_activation_notification( $user_id
|
273 |
} elseif ( 'admin' == $this->get_option( 'type' ) ) {
|
274 |
// Send approval e-mail
|
275 |
-
|
|
|
276 |
}
|
277 |
}
|
278 |
|
@@ -378,16 +368,7 @@ class Theme_My_Login_User_Moderation extends Theme_My_Login_Abstract {
|
|
378 |
$user_object = new WP_User( $user->ID );
|
379 |
$user_object->set_role( get_option( 'default_role' ) );
|
380 |
|
381 |
-
|
382 |
-
if ( ! $user_pass = get_user_meta( $user->ID, 'user_pass', true ) ) {
|
383 |
-
$user_pass = wp_generate_password();
|
384 |
-
wp_set_password( $user_pass, $user->ID );
|
385 |
-
}
|
386 |
-
|
387 |
-
// Delete plaintext pass
|
388 |
-
delete_user_meta( $user->ID, 'user_pass' );
|
389 |
-
|
390 |
-
do_action( 'tml_new_user_activated', $user->ID, $user_pass );
|
391 |
|
392 |
return true;
|
393 |
}
|
@@ -399,10 +380,9 @@ class Theme_My_Login_User_Moderation extends Theme_My_Login_Abstract {
|
|
399 |
* @access public
|
400 |
*
|
401 |
* @param int $user_id The user's ID
|
402 |
-
* @param string $user_pass The user's password
|
403 |
*/
|
404 |
-
public function new_user_activated( $user_id
|
405 |
-
do_action( 'tml_new_user_registered', $user_id,
|
406 |
}
|
407 |
|
408 |
/**
|
@@ -412,9 +392,8 @@ class Theme_My_Login_User_Moderation extends Theme_My_Login_Abstract {
|
|
412 |
* @access public
|
413 |
*
|
414 |
* @param int $user_id The user's ID
|
415 |
-
* @param string $key The unique activation key
|
416 |
*/
|
417 |
-
public static function new_user_activation_notification( $user_id
|
418 |
global $wpdb, $current_site;
|
419 |
|
420 |
$user = new WP_User( $user_id );
|
@@ -422,13 +401,11 @@ class Theme_My_Login_User_Moderation extends Theme_My_Login_Abstract {
|
|
422 |
$user_login = stripslashes( $user->user_login );
|
423 |
$user_email = stripslashes( $user->user_email );
|
424 |
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
}
|
431 |
-
}
|
432 |
|
433 |
if ( is_multisite() ) {
|
434 |
$blogname = $current_site->site_name;
|
@@ -461,6 +438,9 @@ class Theme_My_Login_User_Moderation extends Theme_My_Login_Abstract {
|
|
461 |
public static function new_user_approval_admin_notification( $user_id ) {
|
462 |
global $current_site;
|
463 |
|
|
|
|
|
|
|
464 |
$user = new WP_User( $user_id );
|
465 |
|
466 |
$user_login = stripslashes( $user->user_login );
|
71 |
add_action( 'authenticate', array( &$this, 'authenticate' ), 100, 3 );
|
72 |
add_filter( 'allow_password_reset', array( &$this, 'allow_password_reset' ), 10, 2 );
|
73 |
|
74 |
+
add_action( 'tml_request', array( &$this, 'action_messages' ) );
|
75 |
+
add_action( 'tml_new_user_activated', array( &$this, 'new_user_activated' ) );
|
76 |
|
77 |
if ( 'email' == $this->get_option( 'type' ) ) {
|
78 |
add_action( 'tml_request_activate', array( &$this, 'user_activation' ) );
|
90 |
public function register_post() {
|
91 |
// Remove default new user notification
|
92 |
if ( has_action( 'tml_new_user_registered', 'wp_new_user_notification' ) )
|
93 |
+
remove_action( 'tml_new_user_registered', 'wp_new_user_notification' );
|
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( 'tml_new_user_registered', array( &$custom_email, 'new_user_notification' ) ) )
|
99 |
+
remove_action( 'tml_new_user_registered', array( &$custom_email, 'new_user_notification' ) );
|
100 |
}
|
101 |
|
102 |
// Moderate user upon registration
|
103 |
+
add_action( 'tml_new_user_registered', array( &$this, 'moderate_user' ), 100 );
|
104 |
}
|
105 |
|
106 |
/**
|
241 |
* @access public
|
242 |
*
|
243 |
* @param int $user_id The user's ID
|
|
|
244 |
*/
|
245 |
+
public function moderate_user( $user_id ) {
|
246 |
global $wpdb;
|
247 |
|
248 |
// Set user role to "pending"
|
255 |
// Set user to "Pending" role
|
256 |
$user->set_role( 'pending' );
|
257 |
|
|
|
|
|
|
|
|
|
258 |
// Send appropriate e-mail depending on moderation type
|
259 |
if ( 'email' == $this->get_option( 'type' ) ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
260 |
// Send activation e-mail
|
261 |
+
self::new_user_activation_notification( $user_id );
|
262 |
} elseif ( 'admin' == $this->get_option( 'type' ) ) {
|
263 |
// Send approval e-mail
|
264 |
+
if ( apply_filters( 'send_new_user_approval_admin_notification', true ) )
|
265 |
+
self::new_user_approval_admin_notification( $user_id );
|
266 |
}
|
267 |
}
|
268 |
|
368 |
$user_object = new WP_User( $user->ID );
|
369 |
$user_object->set_role( get_option( 'default_role' ) );
|
370 |
|
371 |
+
do_action( 'tml_new_user_activated', $user->ID );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
372 |
|
373 |
return true;
|
374 |
}
|
380 |
* @access public
|
381 |
*
|
382 |
* @param int $user_id The user's ID
|
|
|
383 |
*/
|
384 |
+
public function new_user_activated( $user_id ) {
|
385 |
+
do_action( 'tml_new_user_registered', $user_id, null, 'both' );
|
386 |
}
|
387 |
|
388 |
/**
|
392 |
* @access public
|
393 |
*
|
394 |
* @param int $user_id The user's ID
|
|
|
395 |
*/
|
396 |
+
public static function new_user_activation_notification( $user_id ) {
|
397 |
global $wpdb, $current_site;
|
398 |
|
399 |
$user = new WP_User( $user_id );
|
401 |
$user_login = stripslashes( $user->user_login );
|
402 |
$user_email = stripslashes( $user->user_email );
|
403 |
|
404 |
+
// Generate an activation key
|
405 |
+
$key = wp_generate_password( 20, false );
|
406 |
+
|
407 |
+
// Set the activation key for the user
|
408 |
+
$wpdb->update( $wpdb->users, array( 'user_activation_key' => $key ), array( 'user_login' => $user->user_login ) );
|
|
|
|
|
409 |
|
410 |
if ( is_multisite() ) {
|
411 |
$blogname = $current_site->site_name;
|
438 |
public static function new_user_approval_admin_notification( $user_id ) {
|
439 |
global $current_site;
|
440 |
|
441 |
+
if ( ! apply_filters( 'send_new_user_approval_admin_notification', true ) )
|
442 |
+
return;
|
443 |
+
|
444 |
$user = new WP_User( $user_id );
|
445 |
|
446 |
$user_login = stripslashes( $user->user_login );
|
readme.txt
CHANGED
@@ -1,9 +1,10 @@
|
|
1 |
=== Theme My Login ===
|
2 |
Contributors: jfarthing84
|
|
|
3 |
Tags: widget, login, registration, theme, custom, log in, register, sidebar, gravatar, redirection, e-mail
|
4 |
-
Requires at least: 3.
|
5 |
-
Tested up to: 4.
|
6 |
-
Stable tag: 6.
|
7 |
|
8 |
Themes the WordPress login pages according to your theme.
|
9 |
|
@@ -47,7 +48,7 @@ Visit yoursite.com/wp-login.php.
|
|
47 |
|
48 |
= What happened to the language folder? =
|
49 |
|
50 |
-
As of version 6.3, Theme My Login no longer ships with translation files. Translations will be available at http://
|
51 |
|
52 |
= How do I obtain additional assistance? =
|
53 |
|
@@ -56,6 +57,19 @@ Please visit http://www.jfarthing.com/development/theme-my-login.
|
|
56 |
|
57 |
== Changelog ==
|
58 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
= 6.3.12 =
|
60 |
* Fix multiple widget custom redirect error
|
61 |
* Add autocomplete="off" to login form password field
|
1 |
=== Theme My Login ===
|
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.3.1
|
6 |
+
Tested up to: 4.3
|
7 |
+
Stable tag: 6.4
|
8 |
|
9 |
Themes the WordPress login pages according to your theme.
|
10 |
|
48 |
|
49 |
= What happened to the language folder? =
|
50 |
|
51 |
+
As of version 6.3, Theme My Login no longer ships with translation files. Translations will be available at http://translate.thememylogin.com.
|
52 |
|
53 |
= How do I obtain additional assistance? =
|
54 |
|
57 |
|
58 |
== Changelog ==
|
59 |
|
60 |
+
= 6.4 =
|
61 |
+
* Add option to login using either username only, email only or both
|
62 |
+
* Add option to disable user denial notification when admin approval is active
|
63 |
+
* Update reCAPTCHA module to API version 2.0
|
64 |
+
* Login and Register nav menu items only show when not logged in
|
65 |
+
* Logout and Profile nav menu items only show when logged in
|
66 |
+
* Better default stylesheet
|
67 |
+
* Fix TML pages displaying in search results
|
68 |
+
* Fix logout redirect
|
69 |
+
* Fix broken interim login when wp-login.php is disabled
|
70 |
+
* Remove AJAX module
|
71 |
+
* Require WordPress 4.3.1
|
72 |
+
|
73 |
= 6.3.12 =
|
74 |
* Fix multiple widget custom redirect error
|
75 |
* Add autocomplete="off" to login form password field
|
templates/login-form.php
CHANGED
@@ -4,31 +4,42 @@ 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 |
-
<div class="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>
|
12 |
-
<label for="user_login<?php $template->the_instance(); ?>"><?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
<input type="text" name="log" id="user_login<?php $template->the_instance(); ?>" class="input" value="<?php $template->the_posted_value( 'log' ); ?>" size="20" />
|
14 |
</p>
|
15 |
-
|
|
|
16 |
<label for="user_pass<?php $template->the_instance(); ?>"><?php _e( 'Password', 'theme-my-login' ); ?></label>
|
17 |
<input type="password" name="pwd" id="user_pass<?php $template->the_instance(); ?>" class="input" value="" size="20" autocomplete="off" />
|
18 |
</p>
|
19 |
|
20 |
<?php do_action( 'login_form' ); ?>
|
21 |
|
22 |
-
<
|
23 |
-
<
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
<
|
29 |
-
|
30 |
-
|
31 |
-
|
|
|
|
|
|
|
32 |
</form>
|
33 |
<?php $template->the_action_links( array( 'login' => false ) ); ?>
|
34 |
</div>
|
4 |
Theme My Login will always look in your theme's directory first, before using this default template.
|
5 |
*/
|
6 |
?>
|
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' ) )
|
14 |
+
_e( 'E-mail', 'theme-my-login' );
|
15 |
+
elseif ( 'both' == $theme_my_login->get_option( 'login_type' ) )
|
16 |
+
_e( 'Username or E-mail', 'theme-my-login' );
|
17 |
+
else
|
18 |
+
_e( 'Username', 'theme-my-login' );
|
19 |
+
?></label>
|
20 |
<input type="text" name="log" id="user_login<?php $template->the_instance(); ?>" class="input" value="<?php $template->the_posted_value( 'log' ); ?>" size="20" />
|
21 |
</p>
|
22 |
+
|
23 |
+
<p class="tml-user-pass-wrap">
|
24 |
<label for="user_pass<?php $template->the_instance(); ?>"><?php _e( 'Password', 'theme-my-login' ); ?></label>
|
25 |
<input type="password" name="pwd" id="user_pass<?php $template->the_instance(); ?>" class="input" value="" size="20" autocomplete="off" />
|
26 |
</p>
|
27 |
|
28 |
<?php do_action( 'login_form' ); ?>
|
29 |
|
30 |
+
<div class="tml-rememberme-submit-wrap">
|
31 |
+
<p class="tml-rememberme-wrap">
|
32 |
+
<input name="rememberme" type="checkbox" id="rememberme<?php $template->the_instance(); ?>" value="forever" />
|
33 |
+
<label for="rememberme<?php $template->the_instance(); ?>"><?php esc_attr_e( 'Remember Me', 'theme-my-login' ); ?></label>
|
34 |
+
</p>
|
35 |
+
|
36 |
+
<p class="tml-submit-wrap">
|
37 |
+
<input type="submit" name="wp-submit" id="wp-submit<?php $template->the_instance(); ?>" value="<?php esc_attr_e( 'Log In', 'theme-my-login' ); ?>" />
|
38 |
+
<input type="hidden" name="redirect_to" value="<?php $template->the_redirect_url( 'login' ); ?>" />
|
39 |
+
<input type="hidden" name="instance" value="<?php $template->the_instance(); ?>" />
|
40 |
+
<input type="hidden" name="action" value="login" />
|
41 |
+
</p>
|
42 |
+
</div>
|
43 |
</form>
|
44 |
<?php $template->the_action_links( array( 'login' => false ) ); ?>
|
45 |
</div>
|
templates/lostpassword-form.php
CHANGED
@@ -4,18 +4,18 @@ 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 |
-
<div class="
|
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>
|
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" />
|
14 |
</p>
|
15 |
|
16 |
<?php do_action( 'lostpassword_form' ); ?>
|
17 |
|
18 |
-
<p class="submit">
|
19 |
<input type="submit" name="wp-submit" id="wp-submit<?php $template->the_instance(); ?>" value="<?php esc_attr_e( 'Get New Password', 'theme-my-login' ); ?>" />
|
20 |
<input type="hidden" name="redirect_to" value="<?php $template->the_redirect_url( 'lostpassword' ); ?>" />
|
21 |
<input type="hidden" name="instance" value="<?php $template->the_instance(); ?>" />
|
4 |
Theme My Login will always look in your theme's directory first, before using this default template.
|
5 |
*/
|
6 |
?>
|
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" />
|
14 |
</p>
|
15 |
|
16 |
<?php do_action( 'lostpassword_form' ); ?>
|
17 |
|
18 |
+
<p class="tml-submit-wrap">
|
19 |
<input type="submit" name="wp-submit" id="wp-submit<?php $template->the_instance(); ?>" value="<?php esc_attr_e( 'Get New Password', 'theme-my-login' ); ?>" />
|
20 |
<input type="hidden" name="redirect_to" value="<?php $template->the_redirect_url( 'lostpassword' ); ?>" />
|
21 |
<input type="hidden" name="instance" value="<?php $template->the_instance(); ?>" />
|
templates/profile-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 |
-
<div class="
|
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">
|
@@ -14,11 +14,10 @@ Theme My Login will always look in your theme's directory first, before using th
|
|
14 |
<input type="hidden" name="checkuser_id" value="<?php echo $current_user->ID; ?>" />
|
15 |
</p>
|
16 |
|
17 |
-
|
18 |
<h3><?php _e( 'Personal Options', 'theme-my-login' ); ?></h3>
|
19 |
|
20 |
-
<table class="form-table">
|
21 |
-
<tr class="
|
22 |
<th><label for="admin_bar_front"><?php _e( 'Toolbar', 'theme-my-login' )?></label></th>
|
23 |
<td>
|
24 |
<label for="admin_bar_front"><input type="checkbox" name="admin_bar_front" id="admin_bar_front" value="1"<?php checked( _get_admin_bar_pref( 'front', $profileuser->ID ) ); ?> />
|
@@ -32,28 +31,28 @@ Theme My Login will always look in your theme's directory first, before using th
|
|
32 |
|
33 |
<h3><?php _e( 'Name', 'theme-my-login' ); ?></h3>
|
34 |
|
35 |
-
<table class="form-table">
|
36 |
-
<tr>
|
37 |
<th><label for="user_login"><?php _e( 'Username', 'theme-my-login' ); ?></label></th>
|
38 |
-
<td><input type="text" name="user_login" id="user_login" value="<?php echo esc_attr( $profileuser->user_login ); ?>" disabled="disabled" class="regular-text" /> <span class="description"><?php _e( '
|
39 |
</tr>
|
40 |
|
41 |
-
<tr>
|
42 |
<th><label for="first_name"><?php _e( 'First Name', 'theme-my-login' ); ?></label></th>
|
43 |
<td><input type="text" name="first_name" id="first_name" value="<?php echo esc_attr( $profileuser->first_name ); ?>" class="regular-text" /></td>
|
44 |
</tr>
|
45 |
|
46 |
-
<tr>
|
47 |
<th><label for="last_name"><?php _e( 'Last Name', 'theme-my-login' ); ?></label></th>
|
48 |
<td><input type="text" name="last_name" id="last_name" value="<?php echo esc_attr( $profileuser->last_name ); ?>" class="regular-text" /></td>
|
49 |
</tr>
|
50 |
|
51 |
-
<tr>
|
52 |
<th><label for="nickname"><?php _e( 'Nickname', 'theme-my-login' ); ?> <span class="description"><?php _e( '(required)', 'theme-my-login' ); ?></span></label></th>
|
53 |
<td><input type="text" name="nickname" id="nickname" value="<?php echo esc_attr( $profileuser->nickname ); ?>" class="regular-text" /></td>
|
54 |
</tr>
|
55 |
|
56 |
-
<tr>
|
57 |
<th><label for="display_name"><?php _e( 'Display name publicly as', 'theme-my-login' ); ?></label></th>
|
58 |
<td>
|
59 |
<select name="display_name" id="display_name">
|
@@ -92,13 +91,25 @@ Theme My Login will always look in your theme's directory first, before using th
|
|
92 |
|
93 |
<h3><?php _e( 'Contact Info', 'theme-my-login' ); ?></h3>
|
94 |
|
95 |
-
<table class="form-table">
|
96 |
-
<tr>
|
97 |
<th><label for="email"><?php _e( 'E-mail', 'theme-my-login' ); ?> <span class="description"><?php _e( '(required)', 'theme-my-login' ); ?></span></label></th>
|
98 |
<td><input type="text" name="email" id="email" value="<?php echo esc_attr( $profileuser->user_email ); ?>" class="regular-text" /></td>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
99 |
</tr>
|
100 |
|
101 |
-
<tr>
|
102 |
<th><label for="url"><?php _e( 'Website', 'theme-my-login' ); ?></label></th>
|
103 |
<td><input type="text" name="url" id="url" value="<?php echo esc_attr( $profileuser->user_url ); ?>" class="regular-text code" /></td>
|
104 |
</tr>
|
@@ -106,7 +117,7 @@ Theme My Login will always look in your theme's directory first, before using th
|
|
106 |
<?php
|
107 |
foreach ( wp_get_user_contact_methods() as $name => $desc ) {
|
108 |
?>
|
109 |
-
<tr>
|
110 |
<th><label for="<?php echo $name; ?>"><?php echo apply_filters( 'user_'.$name.'_label', $desc ); ?></label></th>
|
111 |
<td><input type="text" name="<?php echo $name; ?>" id="<?php echo $name; ?>" value="<?php echo esc_attr( $profileuser->$name ); ?>" class="regular-text" /></td>
|
112 |
</tr>
|
@@ -117,8 +128,8 @@ Theme My Login will always look in your theme's directory first, before using th
|
|
117 |
|
118 |
<h3><?php _e( 'About Yourself', 'theme-my-login' ); ?></h3>
|
119 |
|
120 |
-
<table class="form-table">
|
121 |
-
<tr>
|
122 |
<th><label for="description"><?php _e( 'Biographical Info', 'theme-my-login' ); ?></label></th>
|
123 |
<td><textarea name="description" id="description" rows="5" cols="30"><?php echo esc_html( $profileuser->description ); ?></textarea><br />
|
124 |
<span class="description"><?php _e( 'Share a little biographical information to fill out your profile. This may be shown publicly.', 'theme-my-login' ); ?></span></td>
|
@@ -128,24 +139,57 @@ Theme My Login will always look in your theme's directory first, before using th
|
|
128 |
$show_password_fields = apply_filters( 'show_password_fields', true, $profileuser );
|
129 |
if ( $show_password_fields ) :
|
130 |
?>
|
131 |
-
|
|
|
|
|
|
|
|
|
132 |
<th><label for="pass1"><?php _e( 'New Password', 'theme-my-login' ); ?></label></th>
|
133 |
-
<td
|
134 |
-
<input
|
135 |
-
<
|
136 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
137 |
</td>
|
138 |
</tr>
|
139 |
<?php endif; ?>
|
|
|
140 |
</table>
|
141 |
|
142 |
<?php do_action( 'show_user_profile', $profileuser ); ?>
|
143 |
|
144 |
-
<p class="submit">
|
145 |
<input type="hidden" name="action" value="profile" />
|
146 |
<input type="hidden" name="instance" value="<?php $template->the_instance(); ?>" />
|
147 |
<input type="hidden" name="user_id" id="user_id" value="<?php echo esc_attr( $current_user->ID ); ?>" />
|
148 |
-
<input type="submit" class="button-primary" value="<?php esc_attr_e( 'Update Profile', 'theme-my-login' ); ?>" name="submit" />
|
149 |
</p>
|
150 |
</form>
|
151 |
</div>
|
4 |
Theme My Login will always look in your theme's directory first, before using this default template.
|
5 |
*/
|
6 |
?>
|
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">
|
14 |
<input type="hidden" name="checkuser_id" value="<?php echo $current_user->ID; ?>" />
|
15 |
</p>
|
16 |
|
|
|
17 |
<h3><?php _e( 'Personal Options', 'theme-my-login' ); ?></h3>
|
18 |
|
19 |
+
<table class="tml-form-table">
|
20 |
+
<tr class="tml-user-admin-bar-front-wrap">
|
21 |
<th><label for="admin_bar_front"><?php _e( 'Toolbar', 'theme-my-login' )?></label></th>
|
22 |
<td>
|
23 |
<label for="admin_bar_front"><input type="checkbox" name="admin_bar_front" id="admin_bar_front" value="1"<?php checked( _get_admin_bar_pref( 'front', $profileuser->ID ) ); ?> />
|
31 |
|
32 |
<h3><?php _e( 'Name', 'theme-my-login' ); ?></h3>
|
33 |
|
34 |
+
<table class="tml-form-table">
|
35 |
+
<tr class="tml-user-login-wrap">
|
36 |
<th><label for="user_login"><?php _e( 'Username', 'theme-my-login' ); ?></label></th>
|
37 |
+
<td><input type="text" name="user_login" id="user_login" value="<?php echo esc_attr( $profileuser->user_login ); ?>" disabled="disabled" class="regular-text" /> <span class="description"><?php _e( 'Usernames cannot be changed.', 'theme-my-login' ); ?></span></td>
|
38 |
</tr>
|
39 |
|
40 |
+
<tr class="tml-first-name-wrap">
|
41 |
<th><label for="first_name"><?php _e( 'First Name', 'theme-my-login' ); ?></label></th>
|
42 |
<td><input type="text" name="first_name" id="first_name" value="<?php echo esc_attr( $profileuser->first_name ); ?>" class="regular-text" /></td>
|
43 |
</tr>
|
44 |
|
45 |
+
<tr class="tml-last-name-wrap">
|
46 |
<th><label for="last_name"><?php _e( 'Last Name', 'theme-my-login' ); ?></label></th>
|
47 |
<td><input type="text" name="last_name" id="last_name" value="<?php echo esc_attr( $profileuser->last_name ); ?>" class="regular-text" /></td>
|
48 |
</tr>
|
49 |
|
50 |
+
<tr class="tml-nickname-wrap">
|
51 |
<th><label for="nickname"><?php _e( 'Nickname', 'theme-my-login' ); ?> <span class="description"><?php _e( '(required)', 'theme-my-login' ); ?></span></label></th>
|
52 |
<td><input type="text" name="nickname" id="nickname" value="<?php echo esc_attr( $profileuser->nickname ); ?>" class="regular-text" /></td>
|
53 |
</tr>
|
54 |
|
55 |
+
<tr class="tml-display-name-wrap">
|
56 |
<th><label for="display_name"><?php _e( 'Display name publicly as', 'theme-my-login' ); ?></label></th>
|
57 |
<td>
|
58 |
<select name="display_name" id="display_name">
|
91 |
|
92 |
<h3><?php _e( 'Contact Info', 'theme-my-login' ); ?></h3>
|
93 |
|
94 |
+
<table class="tml-form-table">
|
95 |
+
<tr class="tml-user-email-wrap">
|
96 |
<th><label for="email"><?php _e( 'E-mail', 'theme-my-login' ); ?> <span class="description"><?php _e( '(required)', 'theme-my-login' ); ?></span></label></th>
|
97 |
<td><input type="text" name="email" id="email" value="<?php echo esc_attr( $profileuser->user_email ); ?>" class="regular-text" /></td>
|
98 |
+
<?php
|
99 |
+
$new_email = get_option( $current_user->ID . '_new_email' );
|
100 |
+
if ( $new_email && $new_email['newemail'] != $current_user->user_email ) : ?>
|
101 |
+
<div class="updated inline">
|
102 |
+
<p><?php
|
103 |
+
printf(
|
104 |
+
__( 'There is a pending change of your e-mail to %1$s. <a href="%2$s">Cancel</a>', 'theme-my-login' ),
|
105 |
+
'<code>' . $new_email['newemail'] . '</code>',
|
106 |
+
esc_url( self_admin_url( 'profile.php?dismiss=' . $current_user->ID . '_new_email' ) )
|
107 |
+
); ?></p>
|
108 |
+
</div>
|
109 |
+
<?php endif; ?>
|
110 |
</tr>
|
111 |
|
112 |
+
<tr class="tml-user-url-wrap">
|
113 |
<th><label for="url"><?php _e( 'Website', 'theme-my-login' ); ?></label></th>
|
114 |
<td><input type="text" name="url" id="url" value="<?php echo esc_attr( $profileuser->user_url ); ?>" class="regular-text code" /></td>
|
115 |
</tr>
|
117 |
<?php
|
118 |
foreach ( wp_get_user_contact_methods() as $name => $desc ) {
|
119 |
?>
|
120 |
+
<tr class="tml-user-contact-method-<?php echo $name; ?>-wrap">
|
121 |
<th><label for="<?php echo $name; ?>"><?php echo apply_filters( 'user_'.$name.'_label', $desc ); ?></label></th>
|
122 |
<td><input type="text" name="<?php echo $name; ?>" id="<?php echo $name; ?>" value="<?php echo esc_attr( $profileuser->$name ); ?>" class="regular-text" /></td>
|
123 |
</tr>
|
128 |
|
129 |
<h3><?php _e( 'About Yourself', 'theme-my-login' ); ?></h3>
|
130 |
|
131 |
+
<table class="tml-form-table">
|
132 |
+
<tr class="tml-user-description-wrap">
|
133 |
<th><label for="description"><?php _e( 'Biographical Info', 'theme-my-login' ); ?></label></th>
|
134 |
<td><textarea name="description" id="description" rows="5" cols="30"><?php echo esc_html( $profileuser->description ); ?></textarea><br />
|
135 |
<span class="description"><?php _e( 'Share a little biographical information to fill out your profile. This may be shown publicly.', 'theme-my-login' ); ?></span></td>
|
139 |
$show_password_fields = apply_filters( 'show_password_fields', true, $profileuser );
|
140 |
if ( $show_password_fields ) :
|
141 |
?>
|
142 |
+
</table>
|
143 |
+
|
144 |
+
<h3><?php _e( 'Account Management', 'theme-my-login' ); ?></h3>
|
145 |
+
<table class="tml-form-table">
|
146 |
+
<tr id="password" class="user-pass1-wrap">
|
147 |
<th><label for="pass1"><?php _e( 'New Password', 'theme-my-login' ); ?></label></th>
|
148 |
+
<td>
|
149 |
+
<input class="hidden" value=" " /><!-- #24364 workaround -->
|
150 |
+
<button type="button" class="button button-secondary wp-generate-pw hide-if-no-js"><?php _e( 'Generate Password', 'theme-my-login' ); ?></button>
|
151 |
+
<div class="wp-pwd hide-if-js">
|
152 |
+
<span class="password-input-wrapper">
|
153 |
+
<input type="password" name="pass1" id="pass1" class="regular-text" value="" autocomplete="off" data-pw="<?php echo esc_attr( wp_generate_password( 24 ) ); ?>" aria-describedby="pass-strength-result" />
|
154 |
+
</span>
|
155 |
+
<div style="display:none" id="pass-strength-result" aria-live="polite"></div>
|
156 |
+
<button type="button" class="button button-secondary wp-hide-pw hide-if-no-js" data-toggle="0" aria-label="<?php esc_attr_e( 'Hide password', 'theme-my-login' ); ?>">
|
157 |
+
<span class="dashicons dashicons-hidden"></span>
|
158 |
+
<span class="text"><?php _e( 'Hide', 'theme-my-login' ); ?></span>
|
159 |
+
</button>
|
160 |
+
<button type="button" class="button button-secondary wp-cancel-pw hide-if-no-js" data-toggle="0" aria-label="<?php esc_attr_e( 'Cancel password change', 'theme-my-login' ); ?>">
|
161 |
+
<span class="text"><?php _e( 'Cancel', 'theme-my-login' ); ?></span>
|
162 |
+
</button>
|
163 |
+
</div>
|
164 |
+
</td>
|
165 |
+
</tr>
|
166 |
+
<tr class="user-pass2-wrap hide-if-js">
|
167 |
+
<th scope="row"><label for="pass2"><?php _e( 'Repeat New Password', 'theme-my-login' ); ?></label></th>
|
168 |
+
<td>
|
169 |
+
<input name="pass2" type="password" id="pass2" class="regular-text" value="" autocomplete="off" />
|
170 |
+
<p class="description"><?php _e( 'Type your new password again.', 'theme-my-login' ); ?></p>
|
171 |
+
</td>
|
172 |
+
</tr>
|
173 |
+
<tr class="pw-weak">
|
174 |
+
<th><?php _e( 'Confirm Password', 'theme-my-login' ); ?></th>
|
175 |
+
<td>
|
176 |
+
<label>
|
177 |
+
<input type="checkbox" name="pw_weak" class="pw-checkbox" />
|
178 |
+
<?php _e( 'Confirm use of weak password', 'theme-my-login' ); ?>
|
179 |
+
</label>
|
180 |
</td>
|
181 |
</tr>
|
182 |
<?php endif; ?>
|
183 |
+
|
184 |
</table>
|
185 |
|
186 |
<?php do_action( 'show_user_profile', $profileuser ); ?>
|
187 |
|
188 |
+
<p class="tml-submit-wrap">
|
189 |
<input type="hidden" name="action" value="profile" />
|
190 |
<input type="hidden" name="instance" value="<?php $template->the_instance(); ?>" />
|
191 |
<input type="hidden" name="user_id" id="user_id" value="<?php echo esc_attr( $current_user->ID ); ?>" />
|
192 |
+
<input type="submit" class="button-primary" value="<?php esc_attr_e( 'Update Profile', 'theme-my-login' ); ?>" name="submit" id="submit" />
|
193 |
</p>
|
194 |
</form>
|
195 |
</div>
|
templates/register-form.php
CHANGED
@@ -4,25 +4,27 @@ 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 |
-
<div class="
|
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 |
-
|
|
|
12 |
<label for="user_login<?php $template->the_instance(); ?>"><?php _e( 'Username', '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" />
|
14 |
</p>
|
|
|
15 |
|
16 |
-
<p>
|
17 |
<label for="user_email<?php $template->the_instance(); ?>"><?php _e( 'E-mail', 'theme-my-login' ); ?></label>
|
18 |
<input type="text" name="user_email" id="user_email<?php $template->the_instance(); ?>" class="input" value="<?php $template->the_posted_value( 'user_email' ); ?>" size="20" />
|
19 |
</p>
|
20 |
|
21 |
<?php do_action( 'register_form' ); ?>
|
22 |
|
23 |
-
<p id="reg_passmail<?php $template->the_instance(); ?>"><?php echo apply_filters( 'tml_register_passmail_template_message', __( '
|
24 |
|
25 |
-
<p class="submit">
|
26 |
<input type="submit" name="wp-submit" id="wp-submit<?php $template->the_instance(); ?>" value="<?php esc_attr_e( 'Register', 'theme-my-login' ); ?>" />
|
27 |
<input type="hidden" name="redirect_to" value="<?php $template->the_redirect_url( 'register' ); ?>" />
|
28 |
<input type="hidden" name="instance" value="<?php $template->the_instance(); ?>" />
|
4 |
Theme My Login will always look in your theme's directory first, before using this default template.
|
5 |
*/
|
6 |
?>
|
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>
|
14 |
<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" />
|
15 |
</p>
|
16 |
+
<?php endif; ?>
|
17 |
|
18 |
+
<p class="tml-user-email-wrap">
|
19 |
<label for="user_email<?php $template->the_instance(); ?>"><?php _e( 'E-mail', 'theme-my-login' ); ?></label>
|
20 |
<input type="text" name="user_email" id="user_email<?php $template->the_instance(); ?>" class="input" value="<?php $template->the_posted_value( 'user_email' ); ?>" size="20" />
|
21 |
</p>
|
22 |
|
23 |
<?php do_action( 'register_form' ); ?>
|
24 |
|
25 |
+
<p class="tml-registration-confirmation" id="reg_passmail<?php $template->the_instance(); ?>"><?php echo apply_filters( 'tml_register_passmail_template_message', __( 'Registration confirmation will be e-mailed to you.', 'theme-my-login' ) ); ?></p>
|
26 |
|
27 |
+
<p class="tml-submit-wrap">
|
28 |
<input type="submit" name="wp-submit" id="wp-submit<?php $template->the_instance(); ?>" value="<?php esc_attr_e( 'Register', 'theme-my-login' ); ?>" />
|
29 |
<input type="hidden" name="redirect_to" value="<?php $template->the_redirect_url( 'register' ); ?>" />
|
30 |
<input type="hidden" name="instance" value="<?php $template->the_instance(); ?>" />
|
templates/resetpass-form.php
CHANGED
@@ -4,27 +4,30 @@ 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 |
-
<div class="
|
8 |
<?php $template->the_action_template_message( 'resetpass' ); ?>
|
9 |
<?php $template->the_errors(); ?>
|
10 |
-
<form name="
|
11 |
-
<p>
|
12 |
-
<label for="pass1
|
13 |
-
<
|
|
|
|
|
|
|
|
|
|
|
14 |
</p>
|
15 |
|
16 |
-
<p>
|
17 |
-
<label for="pass2
|
18 |
-
<input
|
19 |
</p>
|
20 |
|
21 |
-
<
|
22 |
-
|
23 |
-
<p class="description indicator-hint"><?php _e( 'Hint: The password should be at least seven characters long. To make it stronger, use upper and lower case letters, numbers and symbols like ! " ? $ % ^ & ).', 'theme-my-login' ); ?></p>
|
24 |
|
25 |
<?php do_action( 'resetpassword_form' ); ?>
|
26 |
|
27 |
-
<p class="submit">
|
28 |
<input type="submit" name="wp-submit" id="wp-submit<?php $template->the_instance(); ?>" value="<?php esc_attr_e( 'Reset Password', 'theme-my-login' ); ?>" />
|
29 |
<input type="hidden" id="user_login" value="<?php echo esc_attr( $GLOBALS['rp_login'] ); ?>" autocomplete="off" />
|
30 |
<input type="hidden" name="rp_key" value="<?php echo esc_attr( $GLOBALS['rp_key'] ); ?>" />
|
4 |
Theme My Login will always look in your theme's directory first, before using this default template.
|
5 |
*/
|
6 |
?>
|
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 |
+
<p class="user-pass1-wrap">
|
12 |
+
<label for="pass1"><?php _e( 'New password', 'theme-my-login' ); ?></label>
|
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 |
</p>
|
20 |
|
21 |
+
<p class="user-pass2-wrap">
|
22 |
+
<label for="pass2"><?php _e( 'Confirm new password', 'theme-my-login' ); ?></label>
|
23 |
+
<input type="password" name="pass2" id="pass2" class="input" size="20" value="" autocomplete="off" />
|
24 |
</p>
|
25 |
|
26 |
+
<p class="description indicator-hint"><?php echo wp_get_password_hint(); ?></p>
|
|
|
|
|
27 |
|
28 |
<?php do_action( 'resetpassword_form' ); ?>
|
29 |
|
30 |
+
<p class="tml-submit-wrap">
|
31 |
<input type="submit" name="wp-submit" id="wp-submit<?php $template->the_instance(); ?>" value="<?php esc_attr_e( 'Reset Password', 'theme-my-login' ); ?>" />
|
32 |
<input type="hidden" id="user_login" value="<?php echo esc_attr( $GLOBALS['rp_login'] ); ?>" autocomplete="off" />
|
33 |
<input type="hidden" name="rp_key" value="<?php echo esc_attr( $GLOBALS['rp_key'] ); ?>" />
|
templates/user-panel.php
CHANGED
@@ -4,12 +4,12 @@ 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 |
-
<div class="
|
8 |
<?php if ( $template->options['show_gravatar'] ) : ?>
|
9 |
<div class="tml-user-avatar"><?php $template->the_user_avatar(); ?></div>
|
10 |
<?php endif; ?>
|
11 |
|
12 |
<?php $template->the_user_links(); ?>
|
13 |
-
|
14 |
<?php do_action( 'tml_user_panel' ); ?>
|
15 |
</div>
|
4 |
Theme My Login will always look in your theme's directory first, before using this default template.
|
5 |
*/
|
6 |
?>
|
7 |
+
<div class="tml tml-user-panel" id="theme-my-login<?php $template->the_instance(); ?>">
|
8 |
<?php if ( $template->options['show_gravatar'] ) : ?>
|
9 |
<div class="tml-user-avatar"><?php $template->the_user_avatar(); ?></div>
|
10 |
<?php endif; ?>
|
11 |
|
12 |
<?php $template->the_user_links(); ?>
|
13 |
+
|
14 |
<?php do_action( 'tml_user_panel' ); ?>
|
15 |
</div>
|
theme-my-login.css
CHANGED
@@ -1,74 +1,200 @@
|
|
1 |
-
.
|
2 |
-
|
3 |
}
|
4 |
-
|
5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
border: 1px solid #c00;
|
7 |
background-color: #ffebe8;
|
8 |
-
color: #333;
|
9 |
}
|
10 |
-
|
11 |
-
|
12 |
border: 1px solid #e6db55;
|
13 |
background-color: #ffffe0;
|
14 |
-
color: #333;
|
15 |
}
|
16 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
display: block;
|
|
|
18 |
}
|
19 |
-
|
|
|
20 |
display: inline;
|
21 |
}
|
22 |
-
|
23 |
-
|
|
|
|
|
|
|
|
|
24 |
}
|
25 |
-
|
26 |
-
.
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
width: 1px;
|
32 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
.mu_register .hint {
|
34 |
font-size: 12px;
|
35 |
margin-bottom: 10px;
|
36 |
display: block;
|
37 |
}
|
|
|
38 |
.mu_register label.checkbox {
|
39 |
display: inline;
|
40 |
}
|
|
|
41 |
#pass-strength-result {
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
font-weight: bold;
|
52 |
}
|
53 |
-
|
54 |
-
|
55 |
-
|
|
|
|
|
56 |
}
|
57 |
|
58 |
#pass-strength-result.bad {
|
59 |
-
|
60 |
-
|
|
|
61 |
}
|
62 |
|
63 |
#pass-strength-result.good {
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
#pass-strength-result.short {
|
68 |
-
background-color: #ffa0a0;
|
69 |
-
border-color: #f04040 !important;
|
70 |
}
|
|
|
71 |
#pass-strength-result.strong {
|
72 |
-
|
73 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
}
|
1 |
+
.tml {
|
2 |
+
max-width: 320px;
|
3 |
}
|
4 |
+
|
5 |
+
.tml * {
|
6 |
+
-webkit-box-sizing: border-box;
|
7 |
+
-moz-box-sizing: border-box;
|
8 |
+
box-sizing: border-box;
|
9 |
+
}
|
10 |
+
|
11 |
+
.tml .error,
|
12 |
+
.tml .message {
|
13 |
+
color: #333;
|
14 |
+
padding: 0.5em;
|
15 |
+
}
|
16 |
+
|
17 |
+
.tml .error {
|
18 |
border: 1px solid #c00;
|
19 |
background-color: #ffebe8;
|
|
|
20 |
}
|
21 |
+
|
22 |
+
.tml .message {
|
23 |
border: 1px solid #e6db55;
|
24 |
background-color: #ffffe0;
|
|
|
25 |
}
|
26 |
+
|
27 |
+
.tml p {
|
28 |
+
margin: 0 0 1.5em 0;
|
29 |
+
padding: 0;
|
30 |
+
}
|
31 |
+
|
32 |
+
.tml label {
|
33 |
display: block;
|
34 |
+
text-align: left;
|
35 |
}
|
36 |
+
|
37 |
+
.tml .tml-rememberme-wrap label {
|
38 |
display: inline;
|
39 |
}
|
40 |
+
|
41 |
+
.tml input,
|
42 |
+
.tml textarea,
|
43 |
+
.tml select {
|
44 |
+
margin: 0.5em 0;
|
45 |
+
width: 100%;
|
46 |
}
|
47 |
+
|
48 |
+
.tml input[type="checkbox"],
|
49 |
+
.tml input[type="radio"],
|
50 |
+
.tml .tml-rememberme-wrap input {
|
51 |
+
vertical-align: middle;
|
52 |
+
width: auto;
|
|
|
53 |
}
|
54 |
+
|
55 |
+
.tml .tml-action-links {
|
56 |
+
display: inline-block;
|
57 |
+
list-style: none;
|
58 |
+
margin: 0.5em auto;
|
59 |
+
padding: 0;
|
60 |
+
text-align: center;
|
61 |
+
}
|
62 |
+
|
63 |
+
.tml .tml-action-links li {
|
64 |
+
border: none;
|
65 |
+
border-right: 1px solid rgba(0, 0, 0, 0.1);
|
66 |
+
float: left;
|
67 |
+
line-height: 1;
|
68 |
+
list-style: none;
|
69 |
+
margin: 0 0.5em 0 0;
|
70 |
+
padding: 0 0.5em 0 0;
|
71 |
+
}
|
72 |
+
|
73 |
+
.tml .tml-action-links li:last-child {
|
74 |
+
border-right: none;
|
75 |
+
margin-right: 0;
|
76 |
+
padding-right: 0;
|
77 |
+
}
|
78 |
+
|
79 |
+
.tml .tml-action-links a {
|
80 |
+
border: none;
|
81 |
+
display: block;
|
82 |
+
padding: 0;
|
83 |
+
text-decoration: none;
|
84 |
+
}
|
85 |
+
|
86 |
+
.tml .tml-rememberme-submit-wrap:before,
|
87 |
+
.tml .tml-rememberme-submit-wrap:after,
|
88 |
+
.tml .tml-action-links:before,
|
89 |
+
.tml .tml-action-links:after {
|
90 |
+
content: "";
|
91 |
+
display: table;
|
92 |
+
}
|
93 |
+
|
94 |
+
.tml .tml-rememberme-submit-wrap:after,
|
95 |
+
.tml .tml-action-links:after {
|
96 |
+
clear: both;
|
97 |
+
}
|
98 |
+
|
99 |
+
.tml .tml-user-avatar {
|
100 |
+
text-align: left;
|
101 |
+
}
|
102 |
+
|
103 |
.mu_register .hint {
|
104 |
font-size: 12px;
|
105 |
margin-bottom: 10px;
|
106 |
display: block;
|
107 |
}
|
108 |
+
|
109 |
.mu_register label.checkbox {
|
110 |
display: inline;
|
111 |
}
|
112 |
+
|
113 |
#pass-strength-result {
|
114 |
+
background-color: #eee;
|
115 |
+
border: 1px solid #ddd;
|
116 |
+
color: #23282d;
|
117 |
+
font-weight: 600;
|
118 |
+
margin: 0;
|
119 |
+
padding: 3px 5px;
|
120 |
+
text-align: center;
|
121 |
+
width: 100%;
|
122 |
+
opacity: 0;
|
|
|
123 |
}
|
124 |
+
|
125 |
+
#pass-strength-result.short {
|
126 |
+
background-color: #f1adad;
|
127 |
+
border-color: #e35b5b;
|
128 |
+
opacity: 1;
|
129 |
}
|
130 |
|
131 |
#pass-strength-result.bad {
|
132 |
+
background-color: #fbc5a9;
|
133 |
+
border-color: #f78b53;
|
134 |
+
opacity: 1;
|
135 |
}
|
136 |
|
137 |
#pass-strength-result.good {
|
138 |
+
background-color: #ffe399;
|
139 |
+
border-color: #ffc733;
|
140 |
+
opacity: 1;
|
|
|
|
|
|
|
141 |
}
|
142 |
+
|
143 |
#pass-strength-result.strong {
|
144 |
+
background-color: #c1e1b9;
|
145 |
+
border-color: #83c373;
|
146 |
+
opacity: 1;
|
147 |
+
}
|
148 |
+
|
149 |
+
.pw-weak {
|
150 |
+
display:none;
|
151 |
+
}
|
152 |
+
|
153 |
+
.indicator-hint {
|
154 |
+
padding-top: 8px;
|
155 |
+
}
|
156 |
+
|
157 |
+
#pass1,
|
158 |
+
#pass1-text {
|
159 |
+
width: 100%;
|
160 |
+
}
|
161 |
+
|
162 |
+
#pass1-text,
|
163 |
+
.show-password #pass1 {
|
164 |
+
display: none;
|
165 |
+
}
|
166 |
+
|
167 |
+
.show-password #pass1-text
|
168 |
+
{
|
169 |
+
display: inline-block;
|
170 |
+
}
|
171 |
+
|
172 |
+
@media screen and (min-width: 768px) {
|
173 |
+
.tml .tml-submit-wrap input {
|
174 |
+
width: auto;
|
175 |
+
}
|
176 |
+
|
177 |
+
.tml-login .tml-rememberme-submit-wrap {
|
178 |
+
display: table;
|
179 |
+
margin-bottom: 1.5em;
|
180 |
+
width: 100%;
|
181 |
+
}
|
182 |
+
|
183 |
+
.tml-login .tml-rememberme-wrap {
|
184 |
+
display: table-cell;
|
185 |
+
}
|
186 |
+
|
187 |
+
.tml-login .tml-rememberme-wrap input {
|
188 |
+
margin: 0;
|
189 |
+
}
|
190 |
+
|
191 |
+
.tml-login .tml-submit-wrap {
|
192 |
+
display: table-cell;
|
193 |
+
text-align: right;
|
194 |
+
}
|
195 |
+
|
196 |
+
.tml-login .tml-submit-wrap input {
|
197 |
+
margin: 0;
|
198 |
+
width: auto;
|
199 |
+
}
|
200 |
}
|
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.
|
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
|
7 |
Author: Jeff Farthing
|
8 |
Author URI: http://www.jfarthing.com
|
9 |
Text Domain: theme-my-login
|