-
Notifications
You must be signed in to change notification settings - Fork 0
/
album-custom-dashboard.php
123 lines (101 loc) · 8.55 KB
/
album-custom-dashboard.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
<?php
/*
Plugin Name: Album Custom Dashboard
Plugin URI: https://www.agenncealbum.com
Description: Agence Album
Author: Florian Moreno
Author URI: https://www.agencealbum.com/notre-equipe
GitHub Plugin URI: https://github.com/agencealbum/album-custom-dashboard
Version: 1.1.1
*/
/**
* Creates a link to the settings page under the WordPress Settings in the dashboard
*/
function remove_core_updates(){
global $wp_version;
return(object) array('last_checked'=> time(), 'version_checked'=> $wp_version);
}
add_filter('pre_site_transient_update_core','remove_core_updates');
//add_filter('pre_site_transient_update_plugins','remove_core_updates');
add_filter('pre_site_transient_update_themes','remove_core_updates');
function my_custom_dashboard_widgets() {
global $wp_meta_boxes;
wp_add_dashboard_widget('custom_help_widget', 'Assistance', 'custom_dashboard_help');
}
function custom_dashboard_help() {
echo '
<h2 style="border-bottom: 2px solid #8b6dc3;display: inline-block;">Agence Album</h2>
<p>
<ul>
<li><b>Mail: </b> [email protected]</li>
<li><b>Téléphone:</b> 03 85 38 37 83</li>
</ul>
</p>
';
}
add_action('wp_dashboard_setup', 'my_custom_dashboard_widgets');
add_action('login_form', 'album_login_form');
function album_login_form()
{
?>
<div class="album-bar">Authentification</div>
<?php
}
add_action('lostpassword_form', 'album_lostpassword_form');
function album_lostpassword_form()
{
?>
<div class="album-bar">Mot de passe oublié?</div>
<?php
}
function custom_login_logo() { ?>
<style type="text/css">
body{ background: #343a40!important; }
.login #backtoblog a, .login #nav a{ color: #fff!important; }
.login .album-bar{
position: absolute;
width: 100%;
left: 0;
top: 0px;
background: rgba(110,61,117,.9);
color: #fff;
padding: 10px 25px;
}
.login .message, .login .success{
border-left: 4px solid #834c86!important;
}
.wp-core-ui .button-primary {
background: #834c86!important;
border: none!important;
text-shadow: none!important;
box-shadow: none!important;
}
.login form{
position: relative;
padding-top: 50px!important;
}
.login #nav{
text-align: center;
}
.forgetmenot, #backtoblog { display: none!important; }
.login #login_error, .message{
margin-top: 2rem!important;
}
.login .button-primary{
width: 100%!important;
}
#login h1 a, .login h1 a {
background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9IiNmZmYiIHdpZHRoPSIyMDQiIGhlaWdodD0iNDciPjxwYXRoIGQ9Ik01Ny4yNDIgMjguMDQ5SDU3LjJjLS41NzcgMS4yNTMtMi4wMzkgMS45MzQtMy4zMzYgMS45MzQtMi45ODcgMC0zLjQ1OS0yLjAxNy0zLjQ1OS0yLjk2NCAwLTMuNTIyIDMuNzQ4LTMuNjg4IDYuNDY2LTMuNjg4aC4yNDh2LS41MzZjMC0xLjc5LjM5LTIuNjk3LTEuMzU5LTIuNjk3LTEuMDkgMC0yLjEyLjI0Ni0zLjA4OS44NjR2LTEuMjU4Yy44MDUtLjM4OSAyLjE2MS0uNzE4IDMuMDg5LS43MTggMi41OTQgMCAyLjY1NyAxLjE3NSAyLjY1NyAzLjkxNXY0LjYzMmMwIC44NDUgMCAxLjQ4My4xMDIgMi4yMDRoLTEuMjc1di0xLjY4OHptLS4xMjQtMy42MDZoLS4zN2MtMi4yNDUgMC00LjkyNC4yMjYtNC45MjQgMi41MzQgMCAxLjM4Ljk5IDEuODk1IDIuMTg1IDEuODk1IDMuMDQ2IDAgMy4xMDktMi42NTggMy4xMDktMy43OXYtLjYzOXptMTIuNzA2IDQuNDI5YzAgMi45MjUtMS4zMTkgNS4zMTItNC45MjMgNS4z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TEuNzM2IDUuMDUxLS40NjcgNy4yODggMS43MDggMy4wMDQgNS42NTcgNC43ODQgMTAuMzA1IDQuNjQyIDcuODY2LS4xNTQgMTcuNjA3LTYuOTkzIDE4Ljg1OC0xNS45Mi4wMDctLjA2NC4wMDQtLjEyLjAxMi0uMTg2IDMuMTQ0IDEuMzg4IDUuNDkxIDMuNTc4IDYuNDE0IDYuMTMxLjI5Mi44MTIuNDM2IDEuNjQxLjQzNiAyLjQ3OSAwIDEuOTIyLS43NjQgMy44OS0yLjI2OCA1LjgwMS0zLjQ5NSA0LjQzNS05LjQyOCA2LjQ0LTE0LjAzNyA3LjM1MS0uMzIyLTIuMDk3LTIuMTE2LTMuNzA5LTQuMzA0LTMuNzA5YTQuMzc1IDQuMzc1IDAgMCAwIDAgOC43NSA0LjM3IDQuMzcgMCAwIDAgNC4yOTItMy41N2M0Ljg4NC0uOTM1IDExLjM1NS0zLjA2MyAxNS4xODQtNy45MjggMS45NTktMi40ODMgMi41ODQtNC43NyAyLjU4NC02LjY3MmE4Ljg4IDguODggMCAwIDAtLjUzLTIuOTkyem0tOS4yMTYtNS42NTJDMjkuOTQxIDI1Ljc4IDIwLjc1OCAzMi4yMjEgMTMuNjE0IDMyLjM2Yy00LjA1Ny4xMjQtNy41OTEtMS40MTEtOS4wMTItMy45MTItLjk5NS0xLjc0OC0uODQxLTMuODA3LjQyOS01Ljc5OCA0LjA1NS02LjM2MiAxNi43NDItNy42NDYgMjMuOTYxLTYuMDk4Ljc1Mi4xNjEgMS40MjIuNDM1IDIuMTE2LjY3My0uMDE3LjE2LS4wMTEuMy0uMDMyLjQ2MXoiLz48L3N2Zz4=);
width: 100%;
background-size: 90%;
margin-bottom: -1rem;
}
</style>
<script type="text/javascript">
function checkit() {
document.getElementById('rememberme').checked = true;
}
window.onload = checkit;
</script>
<?php }
add_action( 'login_enqueue_scripts', 'custom_login_logo' );