Plugin Directory

Changeset 2814082

Timestamp:
11/08/2022 09:07:07 AM (21 months ago)
Author:
Jose Lazo
Message:

[update] tested in 6.1 Update version 1.1.1

Location:
personalize-login/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • personalize-login/trunk/personalize-login.php

    r2429376 r2814082  
    44 * Plugin Name:       Personalize Login
    55 * Description:       A plugin that replaces the WordPress login flow with a custom page.
    6  * Version:           1.0.0
     6 * Version:           1.
    77 * Author:            Jose Lazo
    88 * License:           GPL-2.0+
  • personalize-login/trunk/readme.txt

    r2429376 r2814082  
    33Tags: login, log in, signin, sig in, register, password, reset password, custom login, personalize login
    44Requires at least: 4.2
    5 Tested up to: 5.3.3
     5Tested up to:
    66Stable tag: 5.3
    77Requires PHP: 5.6
     
    3535== Changelog ==
    3636
    37 = 1.1 =
     37= 1.1.1 =
     38* Tested 6.1
     39
     40= 1.1.0 =
    3841* Tested 5.5.3
    3942* Fixed minor bugs
    4043
    41 = 1.0 =
     44= 1.0 =
    4245* Initial release
  • personalize-login/trunk/templates/account_info.php

    r2195304 r2814082  
    11<div class="account-container">
    2     <?php if ($attributes['show_title']) : ?>
    3         <h2><?php _e('Sign In', 'personalize-login'); ?></h2>
    4     <?php endif; ?>
     2<?php if ($attributes['show_title']) : ?>
     3<h2><?php _e('Sign In', 'personalize-login'); ?></h2>
     4<?php endif; ?>
    55
    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; ?>
     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; ?>
    1414
    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>
     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>
    3535
    3636</div>
  • personalize-login/trunk/templates/login_form.php

    r2195304 r2814082  
    11<div class="login-form-container">
    2     <?php if ($attributes['show_title']) : ?>
    3         <h2><?php _e('Sign In', 'personalize-login'); ?></h2>
    4     <?php endif; ?>
     2<?php if ($attributes['show_title']) : ?>
     3<h2><?php _e('Sign In', 'personalize-login'); ?></h2>
     4<?php endif; ?>
    55
    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; ?>
     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; ?>
    1414
    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; ?>
     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; ?>
    2121
    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; ?>
     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; ?>
    2828
    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     ?>
     29<?php
     30wp_login_form(
     31array(
     32'label_username' => __('Email', 'personalize-login'),
     33'label_log_in'   => __('Sign In', 'personalize-login'),
     34'redirect'       => $attributes['redirect'],
     35)
     36);
     37?>
    3838
    39     <a class="forgot-password" href="<?php echo wp_lostpassword_url(); ?>">
    40         <?php _e('Forgot your password?', 'personalize-login'); ?>
    41     </a>
     39<a class="forgot-password" href="<?php echo wp_lostpassword_url(); ?>">
     40<?php _e('Forgot your password?', 'personalize-login'); ?>
     41</a>
    4242</div>
    4343
    4444<!-- <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?>">
    4747        <p class="login-username">
    48             <label for="user_login"><?php // _e( 'Email', 'personalize-login' ); 
    49                                     ?></label>
     48            <label for="user_login"><?php // _e( 'Email', 'personalize-login' );
     49?></label>
    5050            <input type="text" name="log" id="user_login">
    5151        </p>
    5252        <p class="login-password">
    53             <label for="user_pass"><?php // _e( 'Password', 'personalize-login' ); 
    54                                     ?></label>
     53            <label for="user_pass"><?php // _e( 'Password', 'personalize-login' );
     54?></label>
    5555            <input type="password" name="pwd" id="user_pass">
    5656        </p>
    5757        <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?>">
    6060        </p>
    6161    </form>
  • personalize-login/trunk/templates/password_lost_form.php

    r2195304 r2814082  
    11<div id="password-lost-form" class="widecolumn">
    2     <?php if ($attributes['show_title']) : ?>
    3         <h3><?php _e('Forgot Your Password?', 'personalize-login'); ?></h3>
    4     <?php endif; ?>
     2<?php if ($attributes['show_title']) : ?>
     3<h3><?php _e('Forgot Your Password?', 'personalize-login'); ?></h3>
     4<?php endif; ?>
    55
    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; ?>
     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; ?>
    1111
    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; ?>
     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; ?>
    1919
    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>
     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>
    2828
    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>
     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>
    3434
    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>
     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>
    3939</div>
  • personalize-login/trunk/templates/password_reset_form.php

    r2195304 r2814082  
    11<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     <?php endif; ?>
     2) : ?>
     3); ?></h3>
     4<?php endif; ?>
    55
    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); ?>" />
    99
    10         <?php if ( count( $attributes['errors'] ) > 0 ) : ?>
    11             <?php foreach ( $attributes['errors'] as $error ) : ?>
    12                 <p>
    13                     <?php echo $error; ?>
    14                 </p>
    15             <?php endforeach; ?>
    16         <?php endif; ?>
     10) : ?>
     11) : ?>
     12<p>
     13<?php echo $error; ?>
     14</p>
     15<?php endforeach; ?>
     16<?php endif; ?>
    1717
    18         <p>
    19             <label for="pass1"><?php _e( 'New password', 'personalize-login' ) ?></label>
    20             <input type="password" name="pass1" id="pass1" class="input" size="20" value="" autocomplete="off" />
    21         </p>
    22         <p>
    23             <label for="pass2"><?php _e( 'Repeat new password', 'personalize-login' ) ?></label>
    24             <input type="password" name="pass2" id="pass2" class="input" size="20" value="" autocomplete="off" />
    25         </p>
     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>
    2626
    27         <p class="description"><?php echo wp_get_password_hint(); ?></p>
     27<p class="description"><?php echo wp_get_password_hint(); ?></p>
    2828
    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>
    3433</div>
  • personalize-login/trunk/templates/register_form.php

    r2195304 r2814082  
    11<div id="register-form" class="widecolumn">
    2     <?php if ( $attributes['show_title'] ) : ?>
    3         <h3><?php _e( 'Register', 'personalize-login' ); ?></h3>
    4     <?php endif; ?>
     2) : ?>
     3); ?></h3>
     4<?php endif; ?>
    55
    6     <form id="signupform" action="<?php echo wp_registration_url(); ?>" method="post">
    7         <p class="form-row">
    8             <label for="email"><?php _e( 'Email', 'personalize-login' ); ?> <strong>*</strong></label>
    9             <input type="text" name="email" id="email">
    10         </p>
     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>
    1111
    12         <p class="form-row">
    13             <label for="first_name"><?php _e( 'First name', 'personalize-login' ); ?></label>
    14             <input type="text" name="first_name" id="first-name">
    15         </p>
     12<p class="form-row">
     13); ?></label>
     14<input type="text" name="first_name" id="first-name">
     15</p>
    1616
    17         <p class="form-row">
    18             <label for="last_name"><?php _e( 'Last name', 'personalize-login' ); ?></label>
    19             <input type="text" name="last_name" id="last-name">
    20         </p>
     17<p class="form-row">
     18); ?></label>
     19<input type="text" name="last_name" id="last-name">
     20</p>
    2121
    22         <p class="form-row" style="position: relative;">
    23             <label for="pass1"><?php _e( 'New password', 'personalize-login' ); ?></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>
     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>
    2626
    27         <p class="form-row" style="position: relative;">
    28             <label for="pass1"><?php _e( 'Repeat the password', 'personalize-login' ); ?></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>
     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>
    3131
    32         <div id="pass-notice" class="hide">
    33             <span class="alert alert-danger"><?php _e( 'The two passwords you entered don\'t match.', 'personalize-login' ); ?></span>
    34         </div>
     32<div id="pass-notice" class="hide">
     33); ?></span>
     34</div>
    3535
    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>
    4140</div>
    4241<style>
    43 .field-icon {
    44     position: absolute;
    45     right: 20px;
    46     top: 10px;
    47 }
     42.field-icon {
     43position: absolute;
     44right: 20px;
     45top: 10px;
     46}
    4847</style>
    4948<script>
    50 //Show/hide pass
    51 $(".toggle-password, .toggle-password-2").click(function() {
    52   $(this).toggleClass("fa-eye fa-eye-slash");
    53   var input = $($(this).attr("toggle"));
    54   if (input.attr("type") == "password") {
    55     input.attr("type", "text");
    56   } else {
    57     input.attr("type", "password");
    58   }
    59 });
     49//Show/hide pass
     50$(".toggle-password, .toggle-password-2").click(function() {
     51$(this).toggleClass("fa-eye fa-eye-slash");
     52var input = $($(this).attr("toggle"));
     53if (input.attr("type") == "password") {
     54input.attr("type", "text");
     55} else {
     56input.attr("type", "password");
     57}
     58});
    6059
    61 $('#password-field-2').focusout(function(){
    62   var pass1 = $('#password-field').val(),
    63       pass2 = $(this).val();
    64   if ( pass1 != pass2 ) {
    65     $('#pass-notice').addClass('show');
    66     $('#pass-notice').removeClass('hide');
    67   }
    68 });
    69 $('#password-field-2').focusin(function(){
    70     $('#pass-notice').addClass('hide');
    71     $('#pass-notice').removeClass('show');
    72 });
     60{
     61var pass1 = $('#password-field').val(),
     62pass2 = $(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});
    7372</script>
Note: See TracChangeset for help on using the changeset viewer.