for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the WPFoundation library.
*
* Copyright (c) 2015-present LIN3S <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace LIN3S\WPFoundation\Configuration\Login;
/**
* Base class that offers some method to customize easily WordPress login page.
* @author Jon Torrado <[email protected]>
* @author Beñat Espiña <[email protected]>
abstract class Login implements LoginInterface
{
* Constructor.
public function __construct()
add_filter('login_errors', [$this, 'errors']);
add_filter()
add_action('login_enqueue_scripts', [$this, 'logo']);
add_action()
add_filter('login_message', [$this, 'message']);
add_filter('login_headertitle', [$this, 'title']);
add_filter('login_headerurl', [$this, 'url']);
}
* {@inheritdoc}
public function errors()
public function logo()
$logoPath = $this->logoPath();
echo <<<EOL
<style type="text/css">
#login h1 a, .login h1 a {
background-image: url($logoPath);
background-position: center;
margin: 0 auto;
width: 100px;
};
#loginform {
margin-top: 0;
</style>
EOL;
public function message()
public function title()
return get_bloginfo();
public function url()
return home_url();