Created
September 12, 2018 17:18
-
-
Save Brandonsmith23/2afc0ce8886507c532169755db329a2f to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<?php | |
/* | |
Plugin Name: Login Style | |
Version: 0.1-alpha | |
Description: Styling for the login screen | |
Author: Your Name | |
Author URI: Your URL | |
Plugin URI: Your URL | |
Text Domain: Your Text Domain | |
Domain Path: /languages | |
*/ | |
function ws_login_logo() { ?> | |
<style type="text/css"> | |
body.login { | |
background-image: url(<?php echo get_stylesheet_directory_uri(); ?>/assets/img/background-image.jpg); | |
background-size: cover; | |
} | |
body.login div#login a { | |
color: #ffffff; | |
} | |
body.login div#login h1 a { | |
background-image: url(<?php echo get_stylesheet_directory_uri(); ?>/assets/img/logo.jpg); | |
background-size: cover; | |
width: 35%; | |
} | |
.login form { | |
background: rgba(0,0,0,0.7); | |
} | |
#loginform label{ | |
color: #ffffff; | |
} | |
</style> | |
<?php } | |
add_action( 'login_enqueue_scripts', 'ws_login_logo' ); | |
function ws_login_logo_url() { | |
return home_url(); | |
} | |
add_filter( 'login_headerurl', 'ws_login_logo_url' ); | |
function ws_login_logo_url_title() { | |
return 'Custom Login'; | |
} | |
add_filter( 'login_headertitle', 'ws_login_logo_url_title' ); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment