<?php

/**
 * Branding
 * @category Functions
 * @author Krik
 */

// Custom login style
add_action('login_head', 'krik_login_style');

// Custom admin style
add_action('admin_head', 'krik_admin_style');

// Custom admin logo link
add_filter('login_headerurl', 'krik_login_url');

// Custom admin logo title
add_filter('login_headertext', 'krik_login_title');

// Custom footer text
add_filter('admin_footer_text', 'krik_admin_footer');

function krik_login_style()
{
	echo '<style type="text/css">
		h1 a {
			background-image: url(' . get_template_directory_uri() . '/resources/images/krik.svg) !important;
			background-size: contain !important;
			width: 135px !important;
			height: 30px !important;
			margin: 20px auto !important;
		}
		body {
			background-color: #264653;
		}
		#loginform {
			background-color: #264653;
			border: 0;
			box-shadow: none;
		}
		#loginform label {
			color: #f1f1e6;
			font-size: 16px;
		}
		#loginform input {
			border-radius: 25px;
		}
		#loginform input[type="text"] {
			padding-left: 15px;
		}
		#loginform input[type="password"] {
			padding-left: 15px;
		}
		#wp-submit {
			background-color: transparent;
			color: #e9c46a;
			border-color: #e9c46a;
			padding: 0 16px;
    		line-height: 1.4;
			font-size: 16px;
		}
		.wp-login-lost-password,
		#backtoblog a {
			color: #e9c46a !important;
		}
		.privacy-policy-page-link {
			display: none;
		}
		#backtoblog{
			text-align: center;
			margin-top: 10px;
		}
		#nav {
			text-align: center;
		}
	</style>';
}

function krik_admin_style()
{
	echo '<style>
		.plugin-update-tr { display: none !important; }
		#wpml_als_help_link { display: none; }
		.icl_als_iclflag { display: none; }
		.edit-post-visual-editor .editor-post-title__block { margin-bottom: 0; }
	</style>';
}

function krik_login_url()
{
	return 'https://krikstudio.hr';
}

function krik_login_title()
{
	return 'Krikstudio';
}

function krik_admin_footer()
{
	return '<a href="http://krikstudio.com" target="_blank" style="text-decoration: none; color: #555d66;">Krikstudio</a> <span class="dashicons dashicons-heart"></span> <a href="http://wordpress.org" target="_blank" style="text-decoration: none; color: #555d66;">WordPress</a>';
}
