Skip to content

Instantly share code, notes, and snippets.

@alexvas123
Created October 20, 2016 19:54
Show Gist options
  • Save alexvas123/c1917972bcd4ffc140cbc1ea61c07a34 to your computer and use it in GitHub Desktop.
Save alexvas123/c1917972bcd4ffc140cbc1ea61c07a34 to your computer and use it in GitHub Desktop.
PHP Wordpress login plugin
<?php
/*
Plugin Name: Admin
Plugin URI: http://portfolio.vassiliev.org/
Description: plugin for EveryStaff site
Author: Alexander Vassiliev
Author URI: http://portfolio.vassiliev.org/
*/
function everystaff_admin_theme_style() {
wp_enqueue_style("everystaff-admin-theme", plugins_url("css/wp-admin.css", __FILE__));
}
function everystaff_login_theme_style() {
wp_enqueue_style("everystaff-login-theme", plugins_url("css/wp-login.css", __FILE__));
}
add_action("admin_enqueue_scripts", "everystaff_admin_theme_style");
add_action("login_enqueue_scripts", "everystaff_login_theme_style");
// CSS
body, html {
background: #fff;
}
.login h1 a {
background-image: url("ESlogo.svg");
background-position: center top;
background-repeat: no-repeat;
background-size: 84px auto;
cursor: default;
margin: 0 auto 25px;
pointer-events: none;
}
.login form {
background: #102078;
border: .3rem solid #ff7e00;
border-radius: 1rem;
margin-left: 0;
margin-top: 2rem;
padding: 26px 24px 46px;
}
.login label {
color: #fff;
font-size: 1.2rem;
font-weight: 600;
}
.login form .forgetmenot label {
font-size: 1rem;
line-height: 19px;
}
.wp-core-ui .button {
background: #ff7e00;
border: .2rem solid #fff;
border-radius: 1rem
box-shadow: none;
color: #fff;
font-size: 1.5rem;
font-weight: 600;
line-height: 1.5;
margin: 0;
padding: 1rem
text-decoration: none;
text-shadow: none;
transition: all .5s;
}
.wp-core-ui .button:focus,
.wp-core-ui .button:hover {
background-color: #0c8d92;
border-color: #333;
box-shadow: none;
color: #333;
}
.wp-core-ui p .button {
vertical-align: baseline;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment