Changeset 2814082
- Timestamp:
- 11/08/2022 09:07:07 AM (21 months ago)
- Location:
- personalize-login/trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
personalize-login/trunk/personalize-login.php
r2429376 r2814082 4 4 * Plugin Name: Personalize Login 5 5 * Description: A plugin that replaces the WordPress login flow with a custom page. 6 * Version: 1. 0.06 * Version: 1. 7 7 * Author: Jose Lazo 8 8 * License: GPL-2.0+ -
personalize-login/trunk/readme.txt
r2429376 r2814082 3 3 Tags: login, log in, signin, sig in, register, password, reset password, custom login, personalize login 4 4 Requires at least: 4.2 5 Tested up to: 5.3.35 Tested up to: 6 6 Stable tag: 5.3 7 7 Requires PHP: 5.6 … … 35 35 == Changelog == 36 36 37 = 1.1 = 37 = 1.1.1 = 38 * Tested 6.1 39 40 = 1.1.0 = 38 41 * Tested 5.5.3 39 42 * Fixed minor bugs 40 43 41 = 1.0 =44 = 1.0 = 42 45 * Initial release -
personalize-login/trunk/templates/account_info.php
r2195304 r2814082 1 1 <div class="account-container"> 2 3 4 2 <?php if ($attributes['show_title']) : ?> 3 <h2><?php _e('Sign In', 'personalize-login'); ?></h2> 4 <?php endif; ?> 5 5 6 7 8 9 10 11 12 13 6 <!-- Show errors if there are any --> 7 <?php if (count($attributes['errors']) > 0) : ?> 8 <?php foreach ($attributes['errors'] as $error) : ?> 9 <p class="login-error"> 10 <?php echo $error; ?> 11 </p> 12 <?php endforeach; ?> 13 <?php endif; ?> 14 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 15 <?php 16 $current_user = wp_get_current_user(get_current_user_id()); 17 $user_info = get_userdata($current_user->ID); 18 $user_meta = get_user_meta(get_current_user_id(), false); 19 $username = $user_info->user_login; 20 $first_name = $user_info->first_name; 21 $last_name = $user_info->last_name; 22 ?> 23 <div> 24 <h2><?php echo $first_name . $last_name; ?></h2> 25 <ul> 26 <li><b><?php _e('Nickname', 'personalize-login'); ?></b>: <?php echo $username; ?></li> 27 <li><b><?php _e('Login', 'personalize-login'); ?></b>: <?php echo $user_info->user_login; ?></li> 28 <li><b><?php _e('Nicename', 'personalize-login'); ?></b>: <?php echo $user_info->user_nicename; ?></li> 29 <li><b><?php _e('Email', 'personalize-login'); ?></b>: <?php echo $user_info->user_email; ?></li> 30 <li><b><?php _e('URL', 'personalize-login'); ?></b>: <?php echo $user_info->user_url; ?></li> 31 <li><b><?php _e('Register date', 'personalize-login'); ?></b>: <?php echo $user_info->user_registered; ?></li> 32 <li><b><?php _e('Display Name', 'personalize-login'); ?></b>: <?php echo $user_info->display_name; ?></li> 33 </ul> 34 </div> 35 35 36 36 </div> -
personalize-login/trunk/templates/login_form.php
r2195304 r2814082 1 1 <div class="login-form-container"> 2 3 4 2 <?php if ($attributes['show_title']) : ?> 3 <h2><?php _e('Sign In', 'personalize-login'); ?></h2> 4 <?php endif; ?> 5 5 6 7 8 9 10 11 12 13 6 <!-- Show errors if there are any --> 7 <?php if (count($attributes['errors']) > 0) : ?> 8 <?php foreach ($attributes['errors'] as $error) : ?> 9 <p class="login-error"> 10 <?php echo $error; ?> 11 </p> 12 <?php endforeach; ?> 13 <?php endif; ?> 14 14 15 16 17 18 19 20 15 <!-- Show logged out message if user just logged out --> 16 <?php if ($attributes['logged_out']) : ?> 17 <p class="login-info"> 18 <?php _e('You have signed out. Would you like to sign in again?', 'personalize-login'); ?> 19 </p> 20 <?php endif; ?> 21 21 22 23 24 25 26 27 22 <!-- Show change password --> 23 <?php if ($attributes['password_updated']) : ?> 24 <p class="login-info"> 25 <?php _e('Your password has been changed. You can sign in now.', 'personalize-login'); ?> 26 </p> 27 <?php endif; ?> 28 28 29 30 31 32 33 34 35 36 37 29 <?php 30 wp_login_form( 31 array( 32 'label_username' => __('Email', 'personalize-login'), 33 'label_log_in' => __('Sign In', 'personalize-login'), 34 'redirect' => $attributes['redirect'], 35 ) 36 ); 37 ?> 38 38 39 40 41 39 <a class="forgot-password" href="<?php echo wp_lostpassword_url(); ?>"> 40 <?php _e('Forgot your password?', 'personalize-login'); ?> 41 </a> 42 42 </div> 43 43 44 44 <!-- <div class="login-form-container"> 45 <form method="post" action="<?php // echo wp_login_url(); 46 45 <form method="post" action="<?php // echo wp_login_url(); 46 ?>"> 47 47 <p class="login-username"> 48 <label for="user_login"><?php // _e( 'Email', 'personalize-login' ); 49 48 <label for="user_login"><?php // _e( 'Email', 'personalize-login' ); 49 ?></label> 50 50 <input type="text" name="log" id="user_login"> 51 51 </p> 52 52 <p class="login-password"> 53 <label for="user_pass"><?php // _e( 'Password', 'personalize-login' ); 54 53 <label for="user_pass"><?php // _e( 'Password', 'personalize-login' ); 54 ?></label> 55 55 <input type="password" name="pwd" id="user_pass"> 56 56 </p> 57 57 <p class="login-submit"> 58 <input type="submit" value="<?php // _e( 'Sign In', 'personalize-login' ); 59 58 <input type="submit" value="<?php // _e( 'Sign In', 'personalize-login' ); 59 ?>"> 60 60 </p> 61 61 </form> -
personalize-login/trunk/templates/password_lost_form.php
r2195304 r2814082 1 1 <div id="password-lost-form" class="widecolumn"> 2 3 4 2 <?php if ($attributes['show_title']) : ?> 3 <h3><?php _e('Forgot Your Password?', 'personalize-login'); ?></h3> 4 <?php endif; ?> 5 5 6 7 8 9 10 6 <?php if ($attributes['lost_password_sent']) : ?> 7 <p class="login-info"> 8 <?php _e('Check your email for a link to reset your password.', 'personalize-login'); ?> 9 </p> 10 <?php endif; ?> 11 11 12 13 14 15 16 17 18 12 <?php if (count($attributes['errors']) > 0) : ?> 13 <?php foreach ($attributes['errors'] as $error) : ?> 14 <p> 15 <?php echo $error; ?> 16 </p> 17 <?php endforeach; ?> 18 <?php endif; ?> 19 19 20 21 22 23 24 25 26 27 20 <p> 21 <?php 22 _e( 23 "Enter your email address and we'll send you a link you can use to pick a new password.", 24 'personalize-login' 25 ); 26 ?> 27 </p> 28 28 29 30 31 32 33 29 <form id="lostpasswordform" action="<?php echo wp_lostpassword_url(); ?>" method="post"> 30 <p class="form-row"> 31 <label for="user_login"><?php _e('Email', 'personalize-login'); ?> 32 <input type="text" name="user_login" id="user_login"> 33 </p> 34 34 35 36 37 38 35 <p class="lostpassword-submit"> 36 <input type="submit" name="submit" class="lostpassword-button" value="<?php _e('Reset Password', 'personalize-login'); ?>" /> 37 </p> 38 </form> 39 39 </div> -
personalize-login/trunk/templates/password_reset_form.php
r2195304 r2814082 1 1 <div id="password-reset-form" class="widecolumn"> 2 <?php if ( $attributes['show_title']) : ?>3 <h3><?php _e( 'Pick a New Password', 'personalize-login'); ?></h3>4 2 ) : ?> 3 ); ?></h3> 4 <?php endif; ?> 5 5 6 <form name="resetpassform" id="resetpassform" action="<?php echo site_url( 'wp-login.php?action=resetpass'); ?>" method="post" autocomplete="off">7 <input type="hidden" id="user_login" name="rp_login" value="<?php echo esc_attr( $attributes['login']); ?>" autocomplete="off" />8 <input type="hidden" name="rp_key" value="<?php echo esc_attr( $attributes['key']); ?>" />6 ); ?>" method="post" autocomplete="off"> 7 ); ?>" autocomplete="off" /> 8 ); ?>" /> 9 9 10 <?php if ( count( $attributes['errors'] ) > 0) : ?>11 <?php foreach ( $attributes['errors'] as $error) : ?>12 13 14 15 16 10 ) : ?> 11 ) : ?> 12 <p> 13 <?php echo $error; ?> 14 </p> 15 <?php endforeach; ?> 16 <?php endif; ?> 17 17 18 19 <label for="pass1"><?php _e( 'New password', 'personalize-login') ?></label>20 21 22 23 <label for="pass2"><?php _e( 'Repeat new password', 'personalize-login') ?></label>24 25 18 <p> 19 ) ?></label> 20 <input type="password" name="pass1" id="pass1" class="input" size="20" value="" autocomplete="off" /> 21 </p> 22 <p> 23 ) ?></label> 24 <input type="password" name="pass2" id="pass2" class="input" size="20" value="" autocomplete="off" /> 25 </p> 26 26 27 27 <p class="description"><?php echo wp_get_password_hint(); ?></p> 28 28 29 <p class="resetpass-submit"> 30 <input type="submit" name="submit" id="resetpass-button" 31 class="button" value="<?php _e( 'Reset Password', 'personalize-login' ); ?>" /> 32 </p> 33 </form> 29 <p class="resetpass-submit"> 30 <input type="submit" name="submit" id="resetpass-button" class="button" value="<?php _e('Reset Password', 'personalize-login'); ?>" /> 31 </p> 32 </form> 34 33 </div> -
personalize-login/trunk/templates/register_form.php
r2195304 r2814082 1 1 <div id="register-form" class="widecolumn"> 2 <?php if ( $attributes['show_title']) : ?>3 <h3><?php _e( 'Register', 'personalize-login'); ?></h3>4 2 ) : ?> 3 ); ?></h3> 4 <?php endif; ?> 5 5 6 7 8 <label for="email"><?php _e( 'Email', 'personalize-login'); ?> <strong>*</strong></label>9 10 6 <form id="signupform" action="<?php echo wp_registration_url(); ?>" method="post"> 7 <p class="form-row"> 8 ); ?> <strong>*</strong></label> 9 <input type="text" name="email" id="email"> 10 </p> 11 11 12 13 <label for="first_name"><?php _e( 'First name', 'personalize-login'); ?></label>14 15 12 <p class="form-row"> 13 ); ?></label> 14 <input type="text" name="first_name" id="first-name"> 15 </p> 16 16 17 18 <label for="last_name"><?php _e( 'Last name', 'personalize-login'); ?></label>19 20 17 <p class="form-row"> 18 ); ?></label> 19 <input type="text" name="last_name" id="last-name"> 20 </p> 21 21 22 23 <label for="pass1"><?php _e( 'New password', 'personalize-login'); ?></label>24 25 22 <p class="form-row" style="position: relative;"> 23 ); ?></label> 24 <input type="password" name="pass1" placeholder="Password" id="password-field"><span toggle="#password-field" class="fa fa-fw fa-eye field-icon toggle-password"></span> 25 </p> 26 26 27 28 <label for="pass1"><?php _e( 'Repeat the password', 'personalize-login'); ?></label>29 30 27 <p class="form-row" style="position: relative;"> 28 ); ?></label> 29 <input type="password" name="pass2" placeholder="Repeat password" id="password-field-2"><span toggle="#password-field-2" class="fa fa-fw fa-eye field-icon toggle-password-2"></span> 30 </p> 31 31 32 33 <span class="alert alert-danger"><?php _e( 'The two passwords you entered don\'t match.', 'personalize-login'); ?></span>34 32 <div id="pass-notice" class="hide"> 33 ); ?></span> 34 </div> 35 35 36 <p class="signup-submit"> 37 <input type="submit" name="submit" class="register-button" 38 value="<?php _e( 'Register', 'personalize-login' ); ?>"/> 39 </p> 40 </form> 36 <p class="signup-submit"> 37 <input type="submit" name="submit" class="register-button" value="<?php _e('Register', 'personalize-login'); ?>" /> 38 </p> 39 </form> 41 40 </div> 42 41 <style> 43 .field-icon {44 45 46 47 }42 .field-icon { 43 position: absolute; 44 right: 20px; 45 top: 10px; 46 } 48 47 </style> 49 48 <script> 50 //Show/hide pass51 $(".toggle-password, .toggle-password-2").click(function() {52 53 54 55 56 57 58 59 });49 //Show/hide pass 50 $(".toggle-password, .toggle-password-2").click(function() { 51 $(this).toggleClass("fa-eye fa-eye-slash"); 52 var input = $($(this).attr("toggle")); 53 if (input.attr("type") == "password") { 54 input.attr("type", "text"); 55 } else { 56 input.attr("type", "password"); 57 } 58 }); 60 59 61 $('#password-field-2').focusout(function(){62 63 64 if ( pass1 != pass2) {65 66 67 68 });69 $('#password-field-2').focusin(function(){70 71 72 });60 { 61 var pass1 = $('#password-field').val(), 62 pass2 = $(this).val(); 63 ) { 64 $('#pass-notice').addClass('show'); 65 $('#pass-notice').removeClass('hide'); 66 } 67 }); 68 { 69 $('#pass-notice').addClass('hide'); 70 $('#pass-notice').removeClass('show'); 71 }); 73 72 </script>
Note: See TracChangeset
for help on using the changeset viewer.