patric-boehner
9/13/2017 - 2:41 AM

Customizing Wordpress Login

Customizing Wordpress Login

<?php
/**
* Login Page customizations
*
* This file adds the necessary functions and stylesheets to customize the login page.
*
* @package Theme Name
* @author  Patrick Boehner <patrick@patrickboehner.com>
* @link    https://
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
*
*/

//* Block Acess
//**********************
if( !defined( 'ABSPATH' ) ) exit;


//* Login Customizations
//**********************

add_action( 'login_enqueue_scripts', 'pb_custom_login_stylesheet' );
function pb_custom_login_stylesheet() {
	wp_enqueue_style( 'custom-login.min', get_stylesheet_directory_uri() . '/css/style-login.min.css', false, '1.0.1' );
	// wp_enqueue_script( 'custom-login.min', get_stylesheet_directory_uri() . '/js/style-login.min.js', array( 'jquery' ), '1.0.1', true );
}

add_filter( 'login_headerurl', 'pb_login_logo_url_change' );
function pb_login_logo_url_change() {
	return get_bloginfo( 'url' );
}

add_filter( 'login_headertitle', 'pb_login_logo_site_title' );
function pb_login_logo_site_title() {
	return get_bloginfo( 'name' );
}

add_filter( 'login_errors', 'pb_login_errors_message' );
function pb_login_errors_message() {
	$error_message = '<b>Error:</b> Invalid Username/Email or Password';
	return $error_message;
}