2017 © Pedro Peláez
 

library wordpress-login-page

Custom login page for Wordpress MVC framework.

image

amostajo/wordpress-login-page

Custom login page for Wordpress MVC framework.

  • Friday, April 6, 2018
  • by amostajo
  • Repository
  • 1 Watchers
  • 0 Stars
  • 29 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 13 Versions
  • 0 % Grown

The README.md

Wordpress Login Page ADD-ON

Latest Stable Version Total Downloads License, (*1)

Add-on package for Wordpress Development Templates., (*2)

Login Page add-on provides fully customizable ajax login, sign up, and password reset pages for wordpress. Everything out-of-the-box!, (*3)

Installation

This package requires Composer., (*4)

Add it in your composer.json file located on your template's root folder:, (*5)

"amostajo/wordpress-login-page": "1.0.*"

Then run, (*6)

composer install

or, (*7)

composer update

to download package and dependencies., (*8)

Configure in Template

Add the following string line in your addons array option located at your template's config file., (*9)

    'Amostajo\Wordpress\LoginPageAddon\LoginPage',

This should be added to: * config\plugin.php on Wordpress Plugin Template * config\theme.php on Wordpress Theme Template, (*10)

Usage

Once installed and configured, this add-on will change your login, signup and reset password pages without you having to do anything., (*11)

Customization

All views (templates) located at the src/views folder can be customized in your theme., (*12)

Copy and paste them in your theme's views folder ( with same folder structure), like:, (*13)

[addon-folder]
    /src
        /views
            /addons
                /loginpage
                    /emails
                        resetpassword.php
                    login.php
                    lostpassword.php
                    resetpassword.php
                    signup.php

In your theme:, (*14)

[theme-folder]
    /views
        /addons
            /loginpage
                /emails
                    resetpassword.php
                login.php
                lostpassword.php
                resetpassword.php
                signup.php

You can modify the HTML and add as many CSS classes as you please to fit your theme. Though there are a couple of things to consider:, (*15)

  • Maintain @submit.prevent, v-model, v-show, and v-for attributes; otherwise you will lose all processing functionality.
  • Maintain <?php ?> tags, since they will echo important data in these views.

Hooks

Custom hooks to use (apart from those standard from Wordpress, like user_register and wp_login to name a few)., (*16)

FILTER: addon_loginpage_redirect_to Filters redirect to url., (*17)

add_filter( 'addon_loginpage_redirect_to', 'filter_redirect' );

function filter_redirect($redirect)
{
    // Modification
    $redirect = home_url( '/my-account.php' );

    // Array is expected in return
    return $redirect;
}

FILTER: addon_loginpage_signup_userdata Filters the userdata obtained from sign up form request. Useful if you need to add more fields to your signup form., (*18)

add_filter( 'addon_loginpage_signup_userdata', 'filter_signup_userdata' );

function filter_signup_userdata($userdata)
{
    // Add additional fields
    $userdata[ 'user_nicename' ] = Request::input( 'user_nicename' );
    $userdata[ 'address' ] = Request::input( 'address' );

    // Array is expected in return
    return $userdata;
}

FILTER: registration_errors Filters sign up (registrations) errors. Useful if you need to remove or add validations., (*19)

add_filter( 'registration_errors', 'filter_signup_errors' );

function filter_signup_errors($errors, $user_login, $user_email)
{
    // Adding custom validations
    if ( strlen( Request::input( 'user_pass' ) ) >= 8 ) {
        $errors->add(
            'password_length',
            'Field <strong>Password</strong> should contain at least 8 characters.'
        );
    }
    if ( !Request::input( 'address' ) ) {
        $errors->add(
            'empty_address',
            'Field <strong>Address</strong> can not be empty.'
        );
    }

    // WP_Error
    return $errors;
}

FILTER: addon_loginpage_signup_message Filters message shown to user once registration is completed., (*20)

add_filter( 'addon_loginpage_signup_message', 'filter_signup_message' );

function filter_signup_message($message)
{
    return 'Thanks for registering with us!';
}

FILTER: retrieve_password_title Filters email subject / title sent with reset password instructions., (*21)

add_filter( 'retrieve_password_title', 'filter_reset_email_title' );

function filter_reset_email_title($title)
{
    return 'Forgot your password?';
}

FILTER: retrieve_password_message Filters email message sent with reset password instructions. NOTE: You should better modify the view that comes with the add-on instead of using this filter., (*22)

add_filter( 'retrieve_password_message', 'filter_reset_email_message' );

function filter_reset_email_message($message)
{
    return 'Reset password message';
}

FILTER: reset_password_errors Filters reset password errors. Useful if you need to remove or add validations., (*23)

add_filter( 'registration_errors', 'filter_resetpassword_errors' );

function filter_resetpassword_errors($errors, $input, $user)
{
    // Adding custom validation
    if ( strlen( $input[ 'user_pass' ] ) >= 8 ) {
        $errors->add(
            'password_length',
            'Field <strong>Password</strong> should contain at least 8 characters.'
        );
    }

    // WP_Error
    return $errors;
}

FILTER: addon_loginpage_forgotpassword_message Filters message shown to user once reset instructions have been send., (*24)

add_filter( 'addon_loginpage_forgotpassword_message', 'filter_forgotpassword_message' );

function filter_forgotpassword_message($message)
{
    return 'Reset instructions sent to your inbox.';
}

FILTER: addon_loginpage_resetpassword_message Filters message shown to user once password has been reset., (*25)

add_filter( 'addon_loginpage_resetpassword_message', 'filter_resetpassword_message' );

function filter_resetpassword_message($message)
{
    return 'Password changed!';
}

Coding Guidelines

The coding is a mix between PSR-2 and Wordpress PHP guidelines., (*26)

License

Page Login ADD-ON is free software distributed under the terms of the MIT license., (*27)

The Versions

06/04 2018

v2.0.x-dev

2.0.9999999.9999999-dev

Custom login page for Wordpress MVC framework.

  Sources   Download

MIT

The Requires

 

The Development Requires

wordpress login custom

02/04 2018

v2.1.1

2.1.1.0

Custom login page for Wordpress MVC framework.

  Sources   Download

MIT

The Requires

 

The Development Requires

wordpress login custom

02/04 2018

v2.1.0

2.1.0.0

Custom login page for Wordpress MVC framework.

  Sources   Download

MIT

The Requires

 

The Development Requires

wordpress login custom

06/03 2017

v2.0.5

2.0.5.0

Custom login page for Wordpress MVC framework.

  Sources   Download

MIT

The Requires

 

wordpress login custom

06/03 2017

v2.0.4

2.0.4.0

Custom login page for Wordpress MVC framework.

  Sources   Download

MIT

The Requires

 

wordpress login custom

10/02 2017

v2.0.3

2.0.3.0

Custom login page for Wordpress MVC framework.

  Sources   Download

MIT

The Requires

 

wordpress login custom

09/02 2017

v2.0.2

2.0.2.0

Custom login page for Wordpress MVC framework.

  Sources   Download

MIT

The Requires

 

wordpress login custom

09/02 2017

v2.0.1

2.0.1.0

Custom login page for Wordpress MVC framework.

  Sources   Download

MIT

The Requires

 

wordpress login custom

09/02 2017

v2.0.0

2.0.0.0

Custom login page for Wordpress MVC framework.

  Sources   Download

MIT

The Requires

 

wordpress login custom

26/11 2015

1.0.x-dev

1.0.9999999.9999999-dev

Custom login page for Wordpress Development Templates.

  Sources   Download

MIT

The Requires

 

wordpress login custom

26/11 2015

v1.0.1

1.0.1.0

Custom login page for Wordpress Development Templates.

  Sources   Download

MIT

The Requires

 

wordpress login custom

26/11 2015

dev-master

9999999-dev

Custom login page for Wordpress Development Templates.

  Sources   Download

MIT

The Requires

 

wordpress login custom

26/11 2015

v1.0.0

1.0.0.0

Custom login page for Wordpress Development Templates.

  Sources   Download

MIT

The Requires

 

wordpress login custom