9/28/2017 - 10:53 PM

base functions.php add-ons

// White label
// Custom login logo
add_action( 'login_enqueue_scripts', 'xmit_replace_login_logo' );
function xmit_replace_login_logo() {
	?><style type="text/css">
		body.login div#login h1 a {
			background-image: url(<?php echo get_stylesheet_directory_uri() ?>/images/logo-login.png) !important;
			background-size: 80px 80px; /* Adjust to the dimensions of your logo. WP Default: 80px 80px */
			padding-bottom: 15px; /* Useful for spacing your logo from the form below. Default: 15px*/
			height: 80px;
			width: 80px;
	    html, body {background: #9FA1A4 !important;}
	    .login #nav, .login #backtoblog {padding:0 !important;}
	    p#nav a, p#backtoblog a {color:white !important;}
	    .wp-core-ui .button-primary {background:#303236 !important;border-color:#000;}
	    .wp-core-ui .button-primary:hover {border-color:#fefefe !important;}    

// Login Screen: Link login screen logo to site's homepage
function xmit_url_login(){
	return get_bloginfo( 'wpurl' );
add_filter('login_headerurl', 'xmit_url_login');

// Login Screen: Change login logo hover text
function xmit_login_logo_url_title() {
    return 'Click to return to the site homepage';
add_filter( 'login_headertitle', 'xmit_login_logo_url_title' );

// Login Screen: Set 'remember me' to be checked by default
function xmit_login_checked_remember_me() {
	add_filter( 'login_footer', 'xmit_rememberme_checked' );
add_action( 'init', 'xmit_login_checked_remember_me' );
function xmit_rememberme_checked() {
	echo "<script>document.getElementById('rememberme').checked = true;</script>";

// Login Screen: Don't inform user which piece of credential was incorrect
function xmit_failed_login () {
    return 'The login information you have entered is incorrect. Please try again.';
add_filter ( 'login_errors', 'xmit_failed_login' );

// replace WordPress Howdy
function replace_howdy( $wp_admin_bar ) {
$newtitle = str_replace( 'Howdy,', 'You are logged in as', $my_account->title );
$wp_admin_bar->add_node( array(
'id' => 'my-account',
'title' => $newtitle,
) );
add_filter( 'admin_bar_menu', 'replace_howdy',25 );

// Modify the admin footer
function xmit_modify_footer_admin () {
    echo '<span id="footer-thankyou">Theme Development by <a href="" target="_blank" rel="nofollow">Transmit Studio</a> &middot; Cleveland | San Jose | Vancouver</span>';
add_filter('admin_footer_text', 'xmit_modify_footer_admin');

// Fix annoying admin menu bug for WooSlider v1.0.5 where menu image ghosts
add_action( 'admin_head', 'fix_menu_posts_slide_img' );
function fix_menu_posts_slide_img(){ ?>
     #adminmenu #menu-posts-slide .wp-menu-image img {display: none;}