-
Notifications
You must be signed in to change notification settings - Fork 2
/
f5sites-login-screen.php
executable file
·130 lines (120 loc) · 3.76 KB
/
f5sites-login-screen.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<?php
/*
Plugin Name: F5 Sites | Login Screen
Plugin URI: https://www.f5sites.com/software/wordpress/f5sites-login-screen/
Description: Simple update your logo /mu-plugins folder and change file f5sites-login-screen.php for customize css.
Author: Francisco Matelli Matulovic
Author URI: www.franciscomat.com
Version: 1.0
License: GPLv3
Tags: logo, wp-login, wpmu
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
add_action( 'login_enqueue_scripts', 'f5_login_logo' );
add_filter( 'login_headerurl', 'f5_login_logo_url' );
add_filter( 'login_headertext', 'f5_login_logo_url_title' );
function f5_login_logo() {
#wp_dequeue_script("jquery");
#wp_enqueue_script("jquery");
echo '<style type="text/css">
#login h1 a, .login h1 a {
/*height:inherit !important;*/
background: url('.site_url().'/wp-content/plugins/f5sites-login-screen/wp-login-logo.png) no-repeat center center ;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
margin-top:-25px !important;
width:320px;
height:160px;
/*
margin-top:25px !important;
padding-bottom: 30px;
position: relative;
display:block;*/
}
body, html, .wp-core-ui .button-primary {
/*background: #006599 !important;*/
background: #E6E6E6 !important; /*#222*/
}
a {
color:#666 !important;
}
#login {
background: #E6E6E6; /*#222;*/
min-height:90%;
padding-top: 4% !important;
}
.login form {
/*border-radius: 15px;*/
border-radius: 0px;
border: 0 !important;
background: #E6E6E6 !important;
}
#f5alert {
text-align:center;color:#FFF;
font-weight:600;
color: #666666;
}
.message {
display: none !important;
}
.login .admin-email__actions .button-primary,
#wp-submit {
background: #03659C !important;
border-radius: 0;
color:#FFF;
text-shadow:none;
border:0;
text-transform:uppercase;
}
.login #backtoblog, .login #nav {
text-align:center;
}
.login label {
color: #222;
font-weight: bold;
}
</style>
<script type="text/javascript">
(function() {
// Load the script
var script = document.createElement("SCRIPT");
script.src = "https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js";
script.type = "text/javascript";
document.getElementsByTagName("head")[0].appendChild(script);
// Poll for jQuery to come into existance
var checkReady = function(callback) {
if (window.jQuery) {
callback(jQuery);
}
else {
window.setTimeout(function() { checkReady(callback); }, 100);
}
};
// Start polling...
checkReady(function($) {
// Use $ here...
//alert("foi jQuery");
$("#login h1 a").prop(\'href\', \'https://www.f5sites.com/'.$_SERVER["HTTP_HOST"].'\');
$("<p id=f5alert>Você está acessando: <a href=https://'.$_SERVER["HTTP_HOST"].' alt=F5 Sites | '.get_bloginfo("description").'\>'.get_bloginfo("name").'</strong></a></br>'.get_bloginfo("description").'</br>Use sua conta F5 Sites</p>").insertBefore("#loginform");
});
})();
</script>';
}
/*
site_url()
$("<p id=f5alert>Você está acessando: <a href="http://www.f5sites.com/'.site_url().'" alt="F5 Sites | '.get_bloginfo("description").'"">'.get_bloginfo("name").'</strong></a></br>'.get_bloginfo("description").'</br>Use sua conta F5 Sites</p>").insertBefore("#loginform");
});
$("<p id=f5alert>Você está acessando: <a href='.home_url().' alt='.get_bloginfo("description").'>'.get_bloginfo("name").'</strong></a></br>'.get_bloginfo("description").'</br>Use sua conta F5 Sites</p>").insertBefore("#loginform");
});
*/
function f5_login_logo_url() {
return home_url();
}
function f5_login_logo_url_title() {
#get_bloginfo("description")
return get_bloginfo("name").get_bloginfo("description");
}