Last active
January 25, 2020 12:46
-
-
Save ckaklamanos/16572ce3d5c4efc6d3d8d22493b87c33 to your computer and use it in GitHub Desktop.
Customize wp-login.php page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Customize_WP_Login_Page | |
{ | |
public function run() | |
{ | |
add_action('login_enqueue_scripts', array( $this, 'login_enqueue_scripts' )); | |
add_action('login_title', array( $this, 'replace_login_title' )); | |
add_action('login_headerurl', array( $this, 'replace_login_headerurl' )); | |
add_action('login_headertitle', array( $this, 'replace_login_headertitle' )); | |
} | |
public function login_enqueue_scripts() | |
{ | |
?> | |
<style type="text/css" id="customize-wp-login-page"> | |
body { | |
background: #ffffff!important; | |
} | |
#login h1 a { | |
background-image: none; | |
height:auto; | |
width: 100%; | |
text-indent: 0; | |
} | |
.login form { | |
border-radius: 10px; | |
border: 4px solid #000000; | |
background: rgba(237,237,237,1)!important; | |
} | |
</style> | |
<?php | |
} | |
public function replace_login_title() | |
{ | |
return get_bloginfo('name').' - '.__('Log In'); | |
} | |
public function replace_login_headerurl() | |
{ | |
return home_url(); | |
} | |
public function replace_login_headertitle() | |
{ | |
return get_bloginfo('name'); | |
} | |
} | |
$Customize_WP_Login_Page = new Customize_WP_Login_Page(); | |
$Customize_WP_Login_Page->run(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment