Version Description
- 2017-01-20 =
- Bug fix: site lock out bug fixed.
Download this release
Release Info
Developer | hiddenpearls |
Plugin | Custom Login Page Customizer | LoginPress |
Version | 1.0.6 |
Comparing to | |
See all releases |
Code changes from version 1.0.5 to 1.0.6
- classes/control-presets.php +345 -0
- css/style-login.php +67 -303
- css/style-presets.php +20 -0
- css/themes/default-1.php +248 -0
- css/themes/default-2.php +132 -0
- custom.php +1395 -1274
- img/back_arrow.png +0 -0
- img/bg2.jpg +0 -0
- img/thumbnail/default-1.png +0 -0
- img/thumbnail/default-2.png +0 -0
- img/thumbnail/default-3.png +0 -0
- img/thumbnail/default.png +0 -0
- js/customize-controls.js +509 -0
- loginpress.php +183 -179
- readme.txt +170 -167
classes/control-presets.php
ADDED
@@ -0,0 +1,345 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Class for Presets.
|
5 |
+
*
|
6 |
+
* @since 1.0.0
|
7 |
+
* @access public
|
8 |
+
*/
|
9 |
+
class LoginPress_Presets extends WP_Customize_Control {
|
10 |
+
|
11 |
+
/**
|
12 |
+
* The type of customize control being rendered.
|
13 |
+
*
|
14 |
+
* @since 1.0.0
|
15 |
+
* @access public
|
16 |
+
* @var string
|
17 |
+
*/
|
18 |
+
public $type = 'checkbox-multiple';
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Enqueue scripts/styles.
|
22 |
+
*
|
23 |
+
* @since 1.0.0
|
24 |
+
* @access public
|
25 |
+
* @return void
|
26 |
+
*/
|
27 |
+
public function enqueue() {
|
28 |
+
// wp_enqueue_script( 'jt-customize-controls', plugins_url( '/customize-controls.js' , __FILE__ ), array( 'jquery' ) );
|
29 |
+
wp_enqueue_script( 'jquery-ui-button' );
|
30 |
+
}
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Displays the control content.
|
34 |
+
*
|
35 |
+
* @since 1.0.0
|
36 |
+
* @access public
|
37 |
+
* @return void
|
38 |
+
*/
|
39 |
+
public function render_content() {
|
40 |
+
|
41 |
+
|
42 |
+
if ( empty( $this->choices ) )
|
43 |
+
return;
|
44 |
+
$name = 'loginpress_preset-' . $this->id; ?>
|
45 |
+
|
46 |
+
<span class="customize-control-title">
|
47 |
+
<?php echo esc_attr( $this->label ); ?>
|
48 |
+
<?php if ( ! empty( $this->description ) ) : ?>
|
49 |
+
<span class="description customize-control-description"><?php echo esc_html( $this->description ); ?></span>
|
50 |
+
<?php endif; ?>
|
51 |
+
</span>
|
52 |
+
|
53 |
+
<?php $multi_values = !is_array( $this->value() ) ? explode( ',', $this->value() ) : $this->value(); ?>
|
54 |
+
|
55 |
+
|
56 |
+
<div id="input_<?php echo $this->id; ?>" class="image">
|
57 |
+
|
58 |
+
<?php foreach ( $this->choices as $val ) : ?>
|
59 |
+
|
60 |
+
<?php $_disbaled = isset( $val['pro'] ) ? 'disabled' : ''; ?>
|
61 |
+
<div class="loginpress_thumbnail">
|
62 |
+
<input <?php echo $_disbaled ?> class="image-select" type="radio" value="<?php echo esc_attr( $val['id'] ); ?>" id="<?php echo $this->id . $val['id']; ?>" name="<?php echo esc_attr( $name ); ?>" <?php checked( $this->value(), $val['id'] ); ?> />
|
63 |
+
<label for="<?php echo $this->id . $val['id']; ?>">
|
64 |
+
<div class="loginpress_thumbnail_img">
|
65 |
+
<img src="<?php echo $val['thumbnail']; ?>" alt="<?php echo esc_attr( $val['id'] ); ?>" title="<?php echo esc_attr( $val['id'] ); ?>">
|
66 |
+
</div> <!-- .img -->
|
67 |
+
<h3><?php echo $val['name'] ?></h3>
|
68 |
+
</label>
|
69 |
+
<a href="http://www.wpbrigade.com" target="_blank" class="no-available">
|
70 |
+
<span>Available For Pro</span>
|
71 |
+
</a>
|
72 |
+
<!-- </input> -->
|
73 |
+
</div> <!-- .loginpress_thumbnail -->
|
74 |
+
|
75 |
+
<?php endforeach; ?>
|
76 |
+
</div>
|
77 |
+
|
78 |
+
<input name='presets_hidden' type="hidden" <?php $this->link(); ?> value="<?php echo esc_attr( implode( ',', $multi_values ) ); ?>" />
|
79 |
+
<?php }
|
80 |
+
|
81 |
+
|
82 |
+
}
|
83 |
+
|
84 |
+
function loginpress_presets_control_css() {
|
85 |
+
?>
|
86 |
+
<style>
|
87 |
+
.customize-control-checkbox-multiple .image.ui-buttonset input[type=radio] {
|
88 |
+
height: auto;
|
89 |
+
}
|
90 |
+
.customize-control-checkbox-multiple .image.ui-buttonset label {
|
91 |
+
display: inline-block;
|
92 |
+
margin-right: 5px;
|
93 |
+
margin-bottom: 5px;
|
94 |
+
}
|
95 |
+
.customize-control-checkbox-multiple .image.ui-buttonset label.ui-state-active {
|
96 |
+
background: none;
|
97 |
+
}
|
98 |
+
.customize-control-checkbox-multiple .customize-control-radio-buttonset label {
|
99 |
+
padding: 5px 10px;
|
100 |
+
background: #f7f7f7;
|
101 |
+
border-left: 1px solid #dedede;
|
102 |
+
line-height: 35px;
|
103 |
+
}
|
104 |
+
.customize-control-checkbox-multiple label img {
|
105 |
+
border: 1px solid #bbb;
|
106 |
+
opacity: 0.5;
|
107 |
+
}
|
108 |
+
#customize-controls .customize-control-checkbox-multiple label img {
|
109 |
+
max-width: 250px;
|
110 |
+
height: auto;
|
111 |
+
width: 100%;
|
112 |
+
margin-bottom: 0;
|
113 |
+
border: 0;
|
114 |
+
display: block;
|
115 |
+
}
|
116 |
+
.customize-control-checkbox-multiple label.ui-state-active img {
|
117 |
+
background: #dedede;
|
118 |
+
border-color: #000;
|
119 |
+
opacity: 1;
|
120 |
+
margin-bottom: 0;
|
121 |
+
}
|
122 |
+
.customize-control-checkbox-multiple label.ui-state-hover img {
|
123 |
+
opacity: 0.9;
|
124 |
+
border-color: #999;
|
125 |
+
}
|
126 |
+
.customize-control-radio-buttonset label.ui-corner-left {
|
127 |
+
border-radius: 3px 0 0 3px;
|
128 |
+
border-left: 0;
|
129 |
+
}
|
130 |
+
.customize-control-radio-buttonset label.ui-corner-right {
|
131 |
+
border-radius: 0 3px 3px 0;
|
132 |
+
}
|
133 |
+
#customize-control-customize_presets_settings input[type=radio]{
|
134 |
+
display: none;
|
135 |
+
}
|
136 |
+
#customize-control-customize_presets_settings label{
|
137 |
+
display: block;
|
138 |
+
position: relative;
|
139 |
+
width: 100%;
|
140 |
+
}
|
141 |
+
#customize-control-customize_presets_settings .loginpress_thumbnail{
|
142 |
+
width: calc(50% - 10px);
|
143 |
+
margin-bottom: 10px;
|
144 |
+
position: relative;
|
145 |
+
}
|
146 |
+
#customize-control-customize_presets_settings .loginpress_thumbnail:nth-child(odd){
|
147 |
+
float: left;
|
148 |
+
}
|
149 |
+
#customize-control-customize_presets_settings .loginpress_thumbnail:nth-child(even){
|
150 |
+
float: right;
|
151 |
+
}
|
152 |
+
#customize-control-customize_presets_settings .image:after{
|
153 |
+
content: '';
|
154 |
+
display: table;
|
155 |
+
clear: both;
|
156 |
+
}
|
157 |
+
#customize-control-customize_presets_settings h3{
|
158 |
+
margin: 0;
|
159 |
+
font: 400 14px 'Open Sans', Arial, Helvetica, sans-serif;
|
160 |
+
line-height: 1.1;
|
161 |
+
padding: 3px;
|
162 |
+
text-align: center;
|
163 |
+
background: #eee;
|
164 |
+
color: #777777;
|
165 |
+
}
|
166 |
+
#customize-control-customize_presets_settings label .loginpress_thumbnail_img:after {
|
167 |
+
content: '';
|
168 |
+
width: 20px;
|
169 |
+
height: 20px;
|
170 |
+
border-radius: 50%;
|
171 |
+
background: #2EB150;
|
172 |
+
position: absolute;
|
173 |
+
top: -5px;
|
174 |
+
left: -5px;
|
175 |
+
border-radius: 50%;
|
176 |
+
visibility: hidden;
|
177 |
+
}
|
178 |
+
#customize-control-customize_presets_settings label .loginpress_thumbnail_img:before {
|
179 |
+
height: 6px;
|
180 |
+
width: 3px;
|
181 |
+
-webkit-transform-origin: left top;
|
182 |
+
-moz-transform-origin: left top;
|
183 |
+
-ms-transform-origin: left top;
|
184 |
+
-o-transform-origin: left top;
|
185 |
+
transform-origin: left top;
|
186 |
+
border-right: 3px solid white;
|
187 |
+
border-top: 3px solid white;
|
188 |
+
border-radius: 2.5px !important;
|
189 |
+
content: '';
|
190 |
+
position: absolute;
|
191 |
+
z-index: 2;
|
192 |
+
opacity: 0;
|
193 |
+
margin-top: 0px;
|
194 |
+
margin-left: -7px;
|
195 |
+
top: 5px;
|
196 |
+
left: 4px;
|
197 |
+
}
|
198 |
+
#customize-control-customize_presets_settings .loginpress_thumbnail_img{
|
199 |
+
display: block;
|
200 |
+
position: relative;
|
201 |
+
}
|
202 |
+
#customize-control-customize_presets_settings input[type="radio"]:checked + label .loginpress_thumbnail_img:before {
|
203 |
+
-webkit-animation-delay: 100ms;
|
204 |
+
-moz-animation-delay: 100ms;
|
205 |
+
animation-delay: 100ms;
|
206 |
+
-webkit-animation-duration: 1s;
|
207 |
+
-moz-animation-duration: 1s;
|
208 |
+
animation-duration: 1s;
|
209 |
+
-webkit-animation-timing-function: ease;
|
210 |
+
-moz-animation-timing-function: ease;
|
211 |
+
animation-timing-function: ease;
|
212 |
+
-webkit-animation-name: checkmark;
|
213 |
+
-moz-animation-name: checkmark;
|
214 |
+
animation-name: checkmark;
|
215 |
+
-webkit-transform: scaleX(-1) rotate(135deg);
|
216 |
+
-moz-transform: scaleX(-1) rotate(135deg);
|
217 |
+
-ms-transform: scaleX(-1) rotate(135deg);
|
218 |
+
-o-transform: scaleX(-1) rotate(135deg);
|
219 |
+
transform: scaleX(-1) rotate(135deg);
|
220 |
+
-webkit-animation-fill-mode: forwards;
|
221 |
+
-moz-animation-fill-mode: forwards;
|
222 |
+
animation-fill-mode: forwards;
|
223 |
+
z-index: 2;
|
224 |
+
}
|
225 |
+
#customize-control-customize_presets_settings input[type="radio"]:checked + label .loginpress_thumbnail_img:after{
|
226 |
+
visibility: visible;
|
227 |
+
}
|
228 |
+
/*#customize-control-customize_presets_settings input[type="radio"]:disabled + label .loginpress_thumbnail_img:before{
|
229 |
+
visibility: hidden;
|
230 |
+
}
|
231 |
+
#customize-control-customize_presets_settings input[type="radio"]:disabled + label .loginpress_thumbnail_img:after{
|
232 |
+
visibility: hidden;
|
233 |
+
}*/
|
234 |
+
#customize-control-customize_presets_settings img{
|
235 |
+
margin-bottom: 0;
|
236 |
+
}
|
237 |
+
#customize-control-customize_presets_settings input[type="radio"]:checked + label img{
|
238 |
+
opacity: 1;
|
239 |
+
}
|
240 |
+
.no-available{
|
241 |
+
top: 0;
|
242 |
+
left: 0;
|
243 |
+
background: rgba(0, 0, 0, 0.7);
|
244 |
+
content: '';
|
245 |
+
position: absolute;
|
246 |
+
bottom: 0;
|
247 |
+
right: 0;
|
248 |
+
z-index: 100;
|
249 |
+
padding: 20px;
|
250 |
+
text-align: center;
|
251 |
+
color: #fff;
|
252 |
+
-webkit-transition:all 0.3s ease-in-out;
|
253 |
+
-moz-transition:all 0.3s ease-in-out;
|
254 |
+
-ms-transition:all 0.3s ease-in-out;
|
255 |
+
transition:all 0.3s ease-in-out;
|
256 |
+
opacity: 0;
|
257 |
+
visibility: hidden;
|
258 |
+
-webkit-transform: scale(.5);
|
259 |
+
-moz-transform: scale(.5);
|
260 |
+
-ms-transform: scale(.5);
|
261 |
+
transform: scale(.5);
|
262 |
+
text-decoration: none !important;
|
263 |
+
}
|
264 |
+
#customize-control-customize_presets_settings .loginpress_thumbnail:hover input[type="radio"]:disabled ~ .no-available{
|
265 |
+
opacity: 1;
|
266 |
+
visibility: visible;
|
267 |
+
color: #fff;
|
268 |
+
-webkit-transform: scale(1);
|
269 |
+
-moz-transform: scale(1);
|
270 |
+
-ms-transform: scale(1);
|
271 |
+
transform: scale(1);
|
272 |
+
}
|
273 |
+
|
274 |
+
@-webkit-keyframes checkmark {
|
275 |
+
0% {
|
276 |
+
height: 0;
|
277 |
+
width: 0;
|
278 |
+
opacity: 1;
|
279 |
+
}
|
280 |
+
20% {
|
281 |
+
height: 0;
|
282 |
+
width: 5px;
|
283 |
+
opacity: 1;
|
284 |
+
}
|
285 |
+
40% {
|
286 |
+
height: 10px;
|
287 |
+
width: 5px;
|
288 |
+
opacity: 1;
|
289 |
+
}
|
290 |
+
100% {
|
291 |
+
height: 10px;
|
292 |
+
width: 5px;
|
293 |
+
opacity: 1;
|
294 |
+
}
|
295 |
+
}
|
296 |
+
@-moz-keyframes checkmark {
|
297 |
+
0% {
|
298 |
+
height: 0;
|
299 |
+
width: 0;
|
300 |
+
opacity: 1;
|
301 |
+
}
|
302 |
+
20% {
|
303 |
+
height: 0;
|
304 |
+
width: 5px;
|
305 |
+
opacity: 1;
|
306 |
+
}
|
307 |
+
40% {
|
308 |
+
height: 10px;
|
309 |
+
width: 5px;
|
310 |
+
opacity: 1;
|
311 |
+
}
|
312 |
+
100% {
|
313 |
+
height: 10px;
|
314 |
+
width: 5px;
|
315 |
+
opacity: 1;
|
316 |
+
}
|
317 |
+
}
|
318 |
+
@keyframes checkmark {
|
319 |
+
0% {
|
320 |
+
height: 0;
|
321 |
+
width: 0;
|
322 |
+
opacity: 1;
|
323 |
+
}
|
324 |
+
20% {
|
325 |
+
height: 0;
|
326 |
+
width: 5px;
|
327 |
+
opacity: 1;
|
328 |
+
}
|
329 |
+
40% {
|
330 |
+
height: 10px;
|
331 |
+
width: 5px;
|
332 |
+
opacity: 1;
|
333 |
+
}
|
334 |
+
100% {
|
335 |
+
height: 10px;
|
336 |
+
width: 5px;
|
337 |
+
opacity: 1;
|
338 |
+
}
|
339 |
+
}
|
340 |
+
|
341 |
+
</style>
|
342 |
+
<?php
|
343 |
+
}
|
344 |
+
add_action( 'customize_controls_print_styles', 'loginpress_presets_control_css' );
|
345 |
+
?>
|
css/style-login.php
CHANGED
@@ -1,10 +1,13 @@
|
|
1 |
<?php
|
|
|
|
|
2 |
/**
|
3 |
* Get option and check the key exists in it.
|
4 |
*
|
5 |
* @since 1.0.0
|
6 |
* * * * * * * * * * * * * * * */
|
7 |
|
|
|
8 |
/**
|
9 |
* @var loginpress_array get_option
|
10 |
* @since 1.0.0
|
@@ -19,7 +22,6 @@ function loginpress_get_option_key( $loginpress_key, $loginpress_array ) {
|
|
19 |
}
|
20 |
}
|
21 |
|
22 |
-
|
23 |
$loginpress_logo_img = loginpress_get_option_key( 'setting_logo', $loginpress_array );
|
24 |
$loginpress_logo_width = loginpress_get_option_key( 'customize_logo_width', $loginpress_array );
|
25 |
$loginpress_logo_height = loginpress_get_option_key( 'customize_logo_height', $loginpress_array );
|
@@ -74,6 +76,7 @@ $loginpress_footer_link_bg_clr = loginpress_get_option_key( 'login_footer_backgr
|
|
74 |
$loginpress_custom_css = loginpress_get_option_key( 'loginpress_custom_css', $loginpress_array );
|
75 |
$loginpress_custom_js = loginpress_get_option_key( 'loginpress_custom_js', $loginpress_array );
|
76 |
|
|
|
77 |
// ob_start();
|
78 |
?>
|
79 |
<style type="text/css">
|
@@ -81,219 +84,134 @@ $loginpress_custom_js = loginpress_get_option_key( 'loginpress_custom_js',
|
|
81 |
box-sizing: border-box;
|
82 |
}
|
83 |
body.login {
|
84 |
-
|
85 |
-
|
86 |
-
<?php
|
87 |
-
background-image: url(<?php echo plugins_url( 'img/bg.jpg', dirname(__FILE__) ); ?>) !important;
|
88 |
<?php endif; ?>
|
89 |
<?php if ( ! empty( $loginpress_background_color ) ) : ?>
|
90 |
-
background-color: <?php echo $loginpress_background_color;
|
91 |
-
<?php else : ?>
|
92 |
-
background-color: #ddd5c3 !important;
|
93 |
<?php endif; ?>
|
94 |
<?php if ( ! empty( $loginpress_background_repeat ) ) : ?>
|
95 |
-
background-repeat: <?php echo $loginpress_background_repeat;
|
96 |
-
<?php else : ?>
|
97 |
-
background-repeat: no-repeat !important;
|
98 |
<?php endif; ?>
|
99 |
<?php if ( ! empty( $loginpress_background_postion ) ) : ?>
|
100 |
-
background-position: <?php echo $loginpress_background_postion;
|
101 |
-
<?php else : ?>
|
102 |
-
background-position: center !important;
|
103 |
<?php endif; ?>
|
104 |
<?php if ( ! empty( $loginpress_background_image_size ) ) : ?>
|
105 |
-
background-size: <?php echo $loginpress_background_image_size;
|
106 |
-
<?php
|
107 |
-
background-size: cover !important;
|
108 |
-
<?php endif; ?>
|
109 |
-
background-attachment: fixed;
|
110 |
-
display: table;
|
111 |
-
min-height: 100vh;
|
112 |
-
width: 100%;
|
113 |
-
padding: 0;
|
114 |
-
/*background-size: cover;*/
|
115 |
-
}
|
116 |
-
.header-wrapper{
|
117 |
-
display: table-row;
|
118 |
}
|
|
|
119 |
.login h1 a {
|
120 |
<?php if ( ! empty( $loginpress_logo_img ) ) : ?>
|
121 |
-
background-image: url( <?php echo $loginpress_logo_img; ?> )
|
122 |
<?php endif; ?>
|
123 |
<?php if ( ! empty( $loginpress_logo_width ) ) : ?>
|
124 |
-
width: <?php echo $loginpress_logo_width;
|
125 |
<?php endif; ?>
|
126 |
<?php if ( ! empty( $loginpress_logo_height ) ) : ?>
|
127 |
-
height: <?php echo $loginpress_logo_height;
|
128 |
<?php endif; ?>
|
129 |
<?php if ( ! empty( $loginpress_logo_width ) || ! empty( $loginpress_logo_height ) ) : ?>
|
130 |
-
background-size: <?php echo $loginpress_logo_width; ?> <?php echo $loginpress_logo_height;
|
131 |
<?php endif; ?>
|
132 |
<?php if ( ! empty( $loginpress_logo_padding ) ) : ?>
|
133 |
-
padding-bottom: <?php echo $loginpress_logo_padding;
|
134 |
<?php endif; ?>
|
135 |
|
136 |
}
|
137 |
|
138 |
-
.wp-core-ui .button-primary
|
139 |
<?php if ( ! empty( $loginpress_btn_bg ) ) : ?>
|
140 |
-
background: <?php echo $loginpress_btn_bg;
|
141 |
<?php endif; ?>
|
142 |
<?php if ( ! empty( $loginpress_btn_border ) ) : ?>
|
143 |
-
border-color: <?php echo $loginpress_btn_border;
|
144 |
<?php endif; ?>
|
145 |
<?php if ( ! empty( $loginpress_btn_shadow ) ) : ?>
|
146 |
box-shadow: 0px 1px 0px <?php echo $loginpress_btn_shadow; ?> inset, 0px 1px 0px rgba(0, 0, 0, 0.15);
|
147 |
<?php endif; ?>
|
148 |
<?php if ( ! empty( $loginpress_btn_color ) ) : ?>
|
149 |
-
color: <?php echo $loginpress_btn_color;
|
150 |
<?php endif; ?>
|
151 |
}
|
152 |
|
153 |
-
.wp-core-ui .button-primary
|
154 |
<?php if ( ! empty( $loginpress_btn_hover_bg ) ) : ?>
|
155 |
-
background: <?php echo $loginpress_btn_hover_bg;
|
156 |
<?php endif; ?>
|
157 |
<?php if ( ! empty( $loginpress_btn_hover_border ) ) : ?>
|
158 |
-
border-color: <?php echo $loginpress_btn_hover_border;
|
159 |
<?php endif; ?>
|
160 |
}
|
161 |
-
#login{
|
162 |
-
/*background: white;*/
|
163 |
-
padding: 28px 27px;
|
164 |
-
margin-top: 2%;
|
165 |
-
background: #fff;
|
166 |
-
position: relative;
|
167 |
-
-webkit-border-radius: 5px;
|
168 |
-
-moz-border-radius: 5px;
|
169 |
-
-ms-border-radius: 5px;
|
170 |
-
-o-border-radius: 5px;
|
171 |
-
border-radius: 5px;
|
172 |
-
-webkit-box-shadow: 0 0 15px rgba(0,0,0,.8);
|
173 |
-
box-shadow: 0 0 15px rgba(0,0,0,.8);
|
174 |
-
}
|
175 |
#loginform {
|
176 |
<?php if ( ! empty( $loginpress_form_background_img ) ) : ?>
|
177 |
-
background-image: url(<?php echo $loginpress_form_background_img; ?>)
|
178 |
<?php endif; ?>
|
179 |
<?php if ( ! empty( $loginpress_form_background_clr ) ) : ?>
|
180 |
-
background-color: <?php echo $loginpress_form_background_clr;
|
181 |
<?php endif; ?>
|
182 |
<?php if ( ! empty( $loginpress_form_height ) ) : ?>
|
183 |
-
min-height: <?php echo $loginpress_form_height;
|
184 |
<?php endif; ?>
|
185 |
<?php if ( ! empty( $loginpress_form_padding ) ) : ?>
|
186 |
-
padding: <?php echo $loginpress_form_padding;
|
187 |
<?php endif; ?>
|
188 |
<?php if ( ! empty( $loginpress_form_border ) ) : ?>
|
189 |
-
border: <?php echo $loginpress_form_border;
|
190 |
<?php endif; ?>
|
191 |
}
|
192 |
|
193 |
#login {
|
194 |
<?php if ( ! empty( $loginpress_form_width ) ) : ?>
|
195 |
-
max-width: <?php echo $loginpress_form_width;
|
196 |
<?php else : ?>
|
197 |
-
max-width: 350px;
|
198 |
<?php endif; ?>
|
199 |
-
padding: 26px 26px 6px 26px;
|
200 |
-
width: 100% !important;
|
201 |
-
}
|
202 |
-
.login form {
|
203 |
-
margin-top: 20px;
|
204 |
-
margin-left: 0;
|
205 |
-
padding: 0 24px 12px;
|
206 |
-
background: #fff;
|
207 |
-
-webkit-box-shadow: none;
|
208 |
-
/*0 1px 3px rgba(0,0,0,.13);*/
|
209 |
-
box-shadow: none;
|
210 |
}
|
211 |
.login label {
|
212 |
<?php if ( ! empty( $loginpress_form_field_label ) ) : ?>
|
213 |
-
color: <?php echo $loginpress_form_field_label;
|
214 |
<?php endif; ?>
|
215 |
}
|
216 |
|
217 |
.login form .input, .login input[type="text"] {
|
218 |
<?php if ( ! empty( $loginpress_form_field_width ) ) : ?>
|
219 |
-
width: <?php echo $loginpress_form_field_width;
|
220 |
<?php endif; ?>
|
221 |
<?php if ( ! empty( $loginpress_form_field_margin ) ) : ?>
|
222 |
-
margin: <?php echo $loginpress_form_field_margin;
|
223 |
<?php endif; ?>
|
224 |
<?php if ( ! empty( $loginpress_form_field_bg ) ) : ?>
|
225 |
-
background: <?php echo $loginpress_form_field_bg;
|
226 |
<?php endif; ?>
|
227 |
<?php if ( ! empty( $loginpress_form_field_color ) ) : ?>
|
228 |
-
color: <?php echo $loginpress_form_field_color;
|
229 |
-
<?php endif; ?>
|
230 |
-
height: 48px;
|
231 |
-
background: #fff;
|
232 |
-
-webkit-border-radius: 5px !important;
|
233 |
-
-moz-border-radius: 5px !important;
|
234 |
-
-ms-border-radius: 5px !important;
|
235 |
-
border-radius: 5px !important;
|
236 |
-
margin-bottom: 18px;
|
237 |
-
font: normal 15px "Roboto", sans-serif;
|
238 |
-
color: #7f7f7f !important;
|
239 |
-
border-color: #bdbdbd !important;
|
240 |
-
padding-left: 27px !important;
|
241 |
-
font-weight: normal !important;
|
242 |
-
}
|
243 |
-
.login form .input, .login input[type="submit"] {
|
244 |
-
background: #fff;
|
245 |
-
color: #fff;
|
246 |
-
margin: 7px 0 7px;
|
247 |
-
height: 46px;
|
248 |
-
-webkit-border-radius: 5px;
|
249 |
-
-moz-border-radius: 5px;
|
250 |
-
-ms-border-radius: 5px;
|
251 |
-
border-radius: 5px;
|
252 |
-
font: normal 15px "Roboto", sans-serif;
|
253 |
-
color: #fff;
|
254 |
-
width: 100%;
|
255 |
-
}
|
256 |
-
.wp-core-ui .button-group.button-large .button, .wp-core-ui .button.button-large{
|
257 |
-
height: 46px;
|
258 |
-
line-height: 0;
|
259 |
-
/*border: 0;*/
|
260 |
-
background: #008ec2;
|
261 |
-
}
|
262 |
-
.login #nav {
|
263 |
-
text-align: center;
|
264 |
-
/*float: left;*/
|
265 |
}
|
|
|
266 |
#lostpasswordform {
|
267 |
<?php if ( ! empty( $loginpress_forget_form_bg_img ) ) : ?>
|
268 |
-
background-image: url(<?php echo $loginpress_forget_form_bg_img; ?>)
|
269 |
<?php endif; ?>
|
270 |
<?php if ( ! empty( $loginpress_forget_form_bg_clr ) ) : ?>
|
271 |
-
background-color: <?php echo $loginpress_forget_form_bg_clr;
|
272 |
<?php endif; ?>
|
273 |
}
|
274 |
|
275 |
-
|
276 |
-
.message { display:none; }
|
277 |
-
.custom-message {
|
278 |
-
-moz-border-radius:3px 3px 3px 3px;
|
279 |
-
border-style:solid;
|
280 |
-
border-width:1px;
|
281 |
-
margin:0 0 16px 8px;
|
282 |
-
padding:12px;
|
283 |
-
}
|
284 |
|
285 |
.login .custom-message {
|
286 |
<?php if ( ! empty( $loginpress_welcome_bg_color ) ) : ?>
|
287 |
-
background-color: <?php echo $loginpress_welcome_bg_color;
|
288 |
<?php endif; ?>
|
289 |
<?php if ( ! empty( $loginpress_welcome_bg_border ) ) : ?>
|
290 |
-
border: <?php echo $loginpress_welcome_bg_border;
|
291 |
<?php endif; ?>
|
292 |
}
|
293 |
|
294 |
.login #nav {
|
295 |
<?php if ( ! empty( $loginpress_footer_bg_color ) ) : ?>
|
296 |
-
background-color: <?php echo $loginpress_footer_bg_color;
|
297 |
<?php endif; ?>
|
298 |
<?php if ( ! empty( $loginpress_footer_display ) ) : ?>
|
299 |
display: <?php echo $loginpress_footer_display; ?>
|
@@ -302,38 +220,38 @@ body.login {
|
|
302 |
|
303 |
.login #nav a{
|
304 |
<?php if ( ! empty( $loginpress_footer_decoration ) ) : ?>
|
305 |
-
text-decoration: <?php echo $loginpress_footer_decoration;
|
306 |
<?php endif; ?>
|
307 |
<?php if ( ! empty( $loginpress_footer_text_color ) ) : ?>
|
308 |
-
color: <?php echo $loginpress_footer_text_color;
|
309 |
<?php endif; ?>
|
310 |
<?php if ( ! empty( $loginpress_footer_font_size ) ) : ?>
|
311 |
-
font-size: <?php echo $loginpress_footer_font_size
|
312 |
<?php endif; ?>
|
313 |
|
314 |
}
|
315 |
|
316 |
.login #nav a:hover{
|
317 |
<?php if ( ! empty( $loginpress_footer_text_hover ) ) : ?>
|
318 |
-
color: <?php echo $loginpress_footer_text_hover;
|
319 |
<?php endif; ?>
|
320 |
}
|
321 |
|
322 |
.login #backtoblog{
|
323 |
<?php if ( ! empty( $loginpress_back_bg_color ) ) : ?>
|
324 |
-
background-color: <?php echo $loginpress_back_bg_color;
|
325 |
<?php endif; ?>
|
326 |
}
|
327 |
|
328 |
.login #backtoblog a{
|
329 |
<?php if ( ! empty( $loginpress_back_decoration ) ) : ?>
|
330 |
-
text-decoration: <?php echo $loginpress_back_decoration;
|
331 |
<?php endif; ?>
|
332 |
<?php if ( ! empty( $loginpress_back_text_color ) ) : ?>
|
333 |
-
color: <?php echo $loginpress_back_text_color;
|
334 |
<?php endif; ?>
|
335 |
<?php if ( ! empty( $loginpress_back_font_size ) ) : ?>
|
336 |
-
font-size: <?php echo $loginpress_back_font_size;
|
337 |
<?php endif; ?>
|
338 |
<?php if ( ! empty( $loginpress_back_display ) ) : ?>
|
339 |
display: <?php echo $loginpress_back_display; ?>
|
@@ -342,217 +260,63 @@ body.login {
|
|
342 |
|
343 |
.login #backtoblog a:hover{
|
344 |
<?php if ( ! empty( $loginpress_back_text_hover ) ) : ?>
|
345 |
-
color: <?php echo $loginpress_back_text_hover;
|
346 |
<?php endif; ?>
|
347 |
}
|
348 |
-
#backtoblog{
|
349 |
-
text-align: center;
|
350 |
-
}
|
351 |
-
.header-cell{
|
352 |
-
display: table-cell;
|
353 |
-
height: 100px;
|
354 |
-
}
|
355 |
-
.loginHeaderMenu{
|
356 |
-
text-align: center;
|
357 |
-
position: relative;
|
358 |
-
z-index: 10;
|
359 |
-
list-style: none;
|
360 |
-
background: #333;
|
361 |
-
|
362 |
-
}
|
363 |
-
.loginHeaderMenu>ul>li{
|
364 |
-
display: inline-block;
|
365 |
-
vertical-align: top;
|
366 |
-
position: relative;
|
367 |
-
list-style: none;
|
368 |
-
}
|
369 |
-
.loginHeaderMenu>ul>li>a{
|
370 |
-
color: #fff;
|
371 |
-
text-transform: uppercase;
|
372 |
-
text-decoration: none;
|
373 |
-
font-size: 16px;
|
374 |
-
padding: 17px 20px;
|
375 |
-
display: inline-block;
|
376 |
-
}
|
377 |
-
.loginHeaderMenu>ul>li:hover>a{
|
378 |
-
background: #4CAF50;
|
379 |
-
color: #fff;
|
380 |
-
}
|
381 |
-
.loginHeaderMenu>ul>li>ul{
|
382 |
-
position: absolute;
|
383 |
-
width: 200px;
|
384 |
-
padding: 0;
|
385 |
-
top: 100%;
|
386 |
-
left: 0;
|
387 |
-
background: #fff;
|
388 |
-
list-style: none;
|
389 |
-
text-align: left;
|
390 |
-
border-radius: 0 0 5px 5px;
|
391 |
-
-webkit-box-shadow: 0px 5px 10px -1px rgba(0,0,0,0.31);
|
392 |
-
-moz-box-shadow: 0px 5px 10px -1px rgba(0,0,0,0.31);
|
393 |
-
box-shadow: 0px 5px 10px -1px rgba(0,0,0,0.31);
|
394 |
-
overflow: hidden;
|
395 |
-
opacity: 0;
|
396 |
-
visibility: hidden;
|
397 |
-
}
|
398 |
-
.loginHeaderMenu>ul>li:hover>ul{
|
399 |
-
opacity: 1;
|
400 |
-
visibility: visible;
|
401 |
-
}
|
402 |
-
.loginHeaderMenu>ul>li>ul>li{
|
403 |
-
font-size: 15px;
|
404 |
-
color: #333;
|
405 |
-
}
|
406 |
-
.loginHeaderMenu>ul>li>ul>li>a{
|
407 |
-
color: #333;
|
408 |
-
padding: 10px;
|
409 |
-
display: block;
|
410 |
-
text-decoration: none;
|
411 |
-
}
|
412 |
-
.loginHeaderMenu>ul>li>ul>li>a:hover {
|
413 |
-
background: rgba(51, 51, 51, 0.35);
|
414 |
-
color: #fff;
|
415 |
-
}
|
416 |
-
.login-wrapper{
|
417 |
-
display: table-row;
|
418 |
-
}
|
419 |
-
.login-cell{
|
420 |
-
display: table-cell;
|
421 |
-
vertical-align: middle;
|
422 |
-
}
|
423 |
-
.clear{
|
424 |
-
display: none;
|
425 |
-
}
|
426 |
-
.footer-wrapper{
|
427 |
-
display: table-row;
|
428 |
-
}
|
429 |
-
.footer-cont{
|
430 |
-
|
431 |
-
right: 0;
|
432 |
-
bottom: 0;
|
433 |
-
left: 0;
|
434 |
-
/*background-color: #efefef;*/
|
435 |
-
text-align: center;
|
436 |
-
display: table-cell;
|
437 |
-
vertical-align: bottom;
|
438 |
-
height: 100px;
|
439 |
-
}
|
440 |
-
.loginFooterMenu{
|
441 |
-
text-align: center;
|
442 |
-
/*background-color: #333;*/
|
443 |
-
background-color: rgba(0,0,0,.7);
|
444 |
-
}
|
445 |
-
.loginFooterMenu>ul{
|
446 |
-
display: inline-flex;
|
447 |
-
/*padding: 10px 10px;*/
|
448 |
-
}
|
449 |
|
450 |
-
/*.loginFooterMenu>ul>li {
|
451 |
-
padding: 10px 10px;
|
452 |
-
|
453 |
-
}*/
|
454 |
-
|
455 |
-
.loginFooterMenu>ul>li{
|
456 |
-
display: inline-block;
|
457 |
-
padding: 18px;
|
458 |
-
}
|
459 |
-
.loginFooterMenu>ul>li:focus{
|
460 |
-
outline: none;
|
461 |
-
border: 0;
|
462 |
-
}
|
463 |
-
.loginFooterMenu>ul>li>a:focus{
|
464 |
-
outline: none;
|
465 |
-
border: 0;
|
466 |
-
}
|
467 |
-
.loginFooterMenu>ul>li>a{
|
468 |
-
color: #fff;
|
469 |
-
text-transform: uppercase;
|
470 |
-
text-decoration: none;
|
471 |
-
font-size: 14px;
|
472 |
-
/*padding: 17px 20px;*/
|
473 |
-
}
|
474 |
-
.loginFooterMenu>ul>li>a:hover{
|
475 |
-
/*background-color: #4CAF50;*/
|
476 |
-
/*font-size: 18px;*/
|
477 |
-
}
|
478 |
.loginHead {
|
479 |
-
width:100%;
|
480 |
<?php if ( ! empty( $loginpress_header_bg_color ) ) : ?>
|
481 |
-
background: <?php echo $loginpress_header_bg_color;
|
482 |
-
<?php endif; ?>
|
483 |
-
text-align: center;
|
484 |
-
margin-top: 0;
|
485 |
-
margin-bottom: 20px;
|
486 |
-
padding: 13px 0 0;
|
487 |
-
position: relative;
|
488 |
-
margin: 0;
|
489 |
}
|
490 |
|
491 |
.loginHead p a {
|
492 |
<?php if ( ! empty( $loginpress_header_text_color ) ) : ?>
|
493 |
-
color: <?php echo $loginpress_header_text_color;
|
494 |
<?php endif; ?>
|
495 |
<?php if ( ! empty( $loginpress_header_font_size ) ) : ?>
|
496 |
-
font-size: <?php echo $loginpress_header_font_size;
|
497 |
<?php endif; ?>
|
498 |
-
text-decoration: none;
|
499 |
}
|
500 |
|
501 |
.loginHead p a:hover {
|
502 |
<?php if ( ! empty( $loginpress_header_text_hover ) ) : ?>
|
503 |
-
color: <?php echo $loginpress_header_text_hover;
|
504 |
<?php endif; ?>
|
505 |
}
|
506 |
|
507 |
-
.loginFooter {
|
508 |
-
display: table-footer-group;
|
509 |
-
/*width:100%;
|
510 |
-
position:absolute;
|
511 |
-
bottom:0;
|
512 |
-
left:0;*/
|
513 |
-
}
|
514 |
-
|
515 |
.loginFooter p a {
|
516 |
-
display: inline-block;
|
517 |
margin: 0 5px;
|
518 |
<?php if ( ! empty( $loginpress_footer_link_color ) ) : ?>
|
519 |
-
color: <?php echo $loginpress_footer_link_color;
|
520 |
<?php endif; ?>
|
521 |
<?php if ( ! empty( $loginpress_footer_links_font_size ) ) : ?>
|
522 |
-
font-size: <?php echo $loginpress_footer_links_font_size;
|
523 |
<?php endif; ?>
|
524 |
}
|
525 |
|
526 |
.loginFooter p a:hover {
|
527 |
<?php if ( ! empty( $loginpress_footer_link_hover ) ) : ?>
|
528 |
-
color: <?php echo $loginpress_footer_link_hover;
|
529 |
<?php endif; ?>
|
530 |
<?php if ( ! empty( $loginpress_footer_links_hover_size ) ) : ?>
|
531 |
-
font-size: <?php echo $loginpress_footer_links_hover_size;
|
532 |
<?php endif; ?>
|
533 |
}
|
534 |
|
535 |
.loginInner {
|
536 |
-
/* max-width: 570px;*/
|
537 |
-
margin: 0 auto;
|
538 |
<?php if ( ! empty( $loginpress_footer_link_bg_clr ) ) : ?>
|
539 |
-
background: <?php echo $loginpress_footer_link_bg_clr;
|
540 |
<?php endif; ?>
|
541 |
-
text-align: center;
|
542 |
-
margin-top: 20px;
|
543 |
-
margin-bottom: 0;
|
544 |
-
padding: 13px 0;
|
545 |
-
position: relative;
|
546 |
-
}
|
547 |
-
.copyRight{
|
548 |
-
text-align: center;
|
549 |
-
padding: 12px;
|
550 |
-
background-color: #efefef;
|
551 |
}
|
552 |
|
553 |
<?php if ( ! empty( $loginpress_custom_css ) ) : ?>
|
554 |
<?php echo $loginpress_custom_css; ?>
|
555 |
<?php endif; ?>
|
|
|
|
|
|
|
|
|
556 |
</style>
|
557 |
|
558 |
<?php // $content = ob_get_clean(); ?>
|
1 |
<?php
|
2 |
+
// testing error notices OFF
|
3 |
+
// ini_set("display_errors", 0);
|
4 |
/**
|
5 |
* Get option and check the key exists in it.
|
6 |
*
|
7 |
* @since 1.0.0
|
8 |
* * * * * * * * * * * * * * * */
|
9 |
|
10 |
+
|
11 |
/**
|
12 |
* @var loginpress_array get_option
|
13 |
* @since 1.0.0
|
22 |
}
|
23 |
}
|
24 |
|
|
|
25 |
$loginpress_logo_img = loginpress_get_option_key( 'setting_logo', $loginpress_array );
|
26 |
$loginpress_logo_width = loginpress_get_option_key( 'customize_logo_width', $loginpress_array );
|
27 |
$loginpress_logo_height = loginpress_get_option_key( 'customize_logo_height', $loginpress_array );
|
76 |
$loginpress_custom_css = loginpress_get_option_key( 'loginpress_custom_css', $loginpress_array );
|
77 |
$loginpress_custom_js = loginpress_get_option_key( 'loginpress_custom_js', $loginpress_array );
|
78 |
|
79 |
+
|
80 |
// ob_start();
|
81 |
?>
|
82 |
<style type="text/css">
|
84 |
box-sizing: border-box;
|
85 |
}
|
86 |
body.login {
|
87 |
+
|
88 |
+
<?php if ( ! empty( $loginpress_background_img ) ) : ?>
|
89 |
+
background-image: url(<?php echo $loginpress_background_img; ?>);
|
|
|
90 |
<?php endif; ?>
|
91 |
<?php if ( ! empty( $loginpress_background_color ) ) : ?>
|
92 |
+
background-color: <?php echo $loginpress_background_color; ?>;
|
|
|
|
|
93 |
<?php endif; ?>
|
94 |
<?php if ( ! empty( $loginpress_background_repeat ) ) : ?>
|
95 |
+
background-repeat: <?php echo $loginpress_background_repeat; ?>;
|
|
|
|
|
96 |
<?php endif; ?>
|
97 |
<?php if ( ! empty( $loginpress_background_postion ) ) : ?>
|
98 |
+
background-position: <?php echo $loginpress_background_postion; ?>;
|
|
|
|
|
99 |
<?php endif; ?>
|
100 |
<?php if ( ! empty( $loginpress_background_image_size ) ) : ?>
|
101 |
+
background-size: <?php echo $loginpress_background_image_size; ?>;
|
102 |
+
<?php endif; ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
103 |
}
|
104 |
+
|
105 |
.login h1 a {
|
106 |
<?php if ( ! empty( $loginpress_logo_img ) ) : ?>
|
107 |
+
background-image: url( <?php echo $loginpress_logo_img; ?> );
|
108 |
<?php endif; ?>
|
109 |
<?php if ( ! empty( $loginpress_logo_width ) ) : ?>
|
110 |
+
width: <?php echo $loginpress_logo_width; ?>;
|
111 |
<?php endif; ?>
|
112 |
<?php if ( ! empty( $loginpress_logo_height ) ) : ?>
|
113 |
+
height: <?php echo $loginpress_logo_height; ?>;
|
114 |
<?php endif; ?>
|
115 |
<?php if ( ! empty( $loginpress_logo_width ) || ! empty( $loginpress_logo_height ) ) : ?>
|
116 |
+
background-size: cover; <?php //echo $loginpress_logo_width; ?> <?php //echo $loginpress_logo_height; ?>;
|
117 |
<?php endif; ?>
|
118 |
<?php if ( ! empty( $loginpress_logo_padding ) ) : ?>
|
119 |
+
padding-bottom: <?php echo $loginpress_logo_padding; ?>;
|
120 |
<?php endif; ?>
|
121 |
|
122 |
}
|
123 |
|
124 |
+
.wp-core-ui #login .button-primary{
|
125 |
<?php if ( ! empty( $loginpress_btn_bg ) ) : ?>
|
126 |
+
background: <?php echo $loginpress_btn_bg; ?>;
|
127 |
<?php endif; ?>
|
128 |
<?php if ( ! empty( $loginpress_btn_border ) ) : ?>
|
129 |
+
border-color: <?php echo $loginpress_btn_border; ?>;
|
130 |
<?php endif; ?>
|
131 |
<?php if ( ! empty( $loginpress_btn_shadow ) ) : ?>
|
132 |
box-shadow: 0px 1px 0px <?php echo $loginpress_btn_shadow; ?> inset, 0px 1px 0px rgba(0, 0, 0, 0.15);
|
133 |
<?php endif; ?>
|
134 |
<?php if ( ! empty( $loginpress_btn_color ) ) : ?>
|
135 |
+
color: <?php echo $loginpress_btn_color; ?>;
|
136 |
<?php endif; ?>
|
137 |
}
|
138 |
|
139 |
+
.wp-core-ui #login .button-primary:hover{
|
140 |
<?php if ( ! empty( $loginpress_btn_hover_bg ) ) : ?>
|
141 |
+
background: <?php echo $loginpress_btn_hover_bg; ?>;
|
142 |
<?php endif; ?>
|
143 |
<?php if ( ! empty( $loginpress_btn_hover_border ) ) : ?>
|
144 |
+
border-color: <?php echo $loginpress_btn_hover_border; ?>;
|
145 |
<?php endif; ?>
|
146 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
147 |
#loginform {
|
148 |
<?php if ( ! empty( $loginpress_form_background_img ) ) : ?>
|
149 |
+
background-image: url(<?php echo $loginpress_form_background_img; ?>);
|
150 |
<?php endif; ?>
|
151 |
<?php if ( ! empty( $loginpress_form_background_clr ) ) : ?>
|
152 |
+
background-color: <?php echo $loginpress_form_background_clr; ?>;
|
153 |
<?php endif; ?>
|
154 |
<?php if ( ! empty( $loginpress_form_height ) ) : ?>
|
155 |
+
min-height: <?php echo $loginpress_form_height; ?>;
|
156 |
<?php endif; ?>
|
157 |
<?php if ( ! empty( $loginpress_form_padding ) ) : ?>
|
158 |
+
padding: <?php echo $loginpress_form_padding; ?>;
|
159 |
<?php endif; ?>
|
160 |
<?php if ( ! empty( $loginpress_form_border ) ) : ?>
|
161 |
+
border: <?php echo $loginpress_form_border; ?>;
|
162 |
<?php endif; ?>
|
163 |
}
|
164 |
|
165 |
#login {
|
166 |
<?php if ( ! empty( $loginpress_form_width ) ) : ?>
|
167 |
+
max-width: <?php echo $loginpress_form_width; ?>;
|
168 |
<?php else : ?>
|
|
|
169 |
<?php endif; ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
170 |
}
|
171 |
.login label {
|
172 |
<?php if ( ! empty( $loginpress_form_field_label ) ) : ?>
|
173 |
+
color: <?php echo $loginpress_form_field_label; ?>;
|
174 |
<?php endif; ?>
|
175 |
}
|
176 |
|
177 |
.login form .input, .login input[type="text"] {
|
178 |
<?php if ( ! empty( $loginpress_form_field_width ) ) : ?>
|
179 |
+
width: <?php echo $loginpress_form_field_width; ?>;
|
180 |
<?php endif; ?>
|
181 |
<?php if ( ! empty( $loginpress_form_field_margin ) ) : ?>
|
182 |
+
margin: <?php echo $loginpress_form_field_margin; ?>;
|
183 |
<?php endif; ?>
|
184 |
<?php if ( ! empty( $loginpress_form_field_bg ) ) : ?>
|
185 |
+
background: <?php echo $loginpress_form_field_bg; ?>;
|
186 |
<?php endif; ?>
|
187 |
<?php if ( ! empty( $loginpress_form_field_color ) ) : ?>
|
188 |
+
color: <?php echo $loginpress_form_field_color; ?>;
|
189 |
+
<?php endif; ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
190 |
}
|
191 |
+
|
192 |
#lostpasswordform {
|
193 |
<?php if ( ! empty( $loginpress_forget_form_bg_img ) ) : ?>
|
194 |
+
background-image: url(<?php echo $loginpress_forget_form_bg_img; ?>);
|
195 |
<?php endif; ?>
|
196 |
<?php if ( ! empty( $loginpress_forget_form_bg_clr ) ) : ?>
|
197 |
+
background-color: <?php echo $loginpress_forget_form_bg_clr; ?>;
|
198 |
<?php endif; ?>
|
199 |
}
|
200 |
|
201 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
202 |
|
203 |
.login .custom-message {
|
204 |
<?php if ( ! empty( $loginpress_welcome_bg_color ) ) : ?>
|
205 |
+
background-color: <?php echo $loginpress_welcome_bg_color; ?>;
|
206 |
<?php endif; ?>
|
207 |
<?php if ( ! empty( $loginpress_welcome_bg_border ) ) : ?>
|
208 |
+
border: <?php echo $loginpress_welcome_bg_border; ?>;
|
209 |
<?php endif; ?>
|
210 |
}
|
211 |
|
212 |
.login #nav {
|
213 |
<?php if ( ! empty( $loginpress_footer_bg_color ) ) : ?>
|
214 |
+
background-color: <?php echo $loginpress_footer_bg_color; ?>;
|
215 |
<?php endif; ?>
|
216 |
<?php if ( ! empty( $loginpress_footer_display ) ) : ?>
|
217 |
display: <?php echo $loginpress_footer_display; ?>
|
220 |
|
221 |
.login #nav a{
|
222 |
<?php if ( ! empty( $loginpress_footer_decoration ) ) : ?>
|
223 |
+
text-decoration: <?php echo $loginpress_footer_decoration; ?>;
|
224 |
<?php endif; ?>
|
225 |
<?php if ( ! empty( $loginpress_footer_text_color ) ) : ?>
|
226 |
+
color: <?php echo $loginpress_footer_text_color; ?>;
|
227 |
<?php endif; ?>
|
228 |
<?php if ( ! empty( $loginpress_footer_font_size ) ) : ?>
|
229 |
+
font-size: <?php echo $loginpress_footer_font_size . ';'; ?>;
|
230 |
<?php endif; ?>
|
231 |
|
232 |
}
|
233 |
|
234 |
.login #nav a:hover{
|
235 |
<?php if ( ! empty( $loginpress_footer_text_hover ) ) : ?>
|
236 |
+
color: <?php echo $loginpress_footer_text_hover; ?>;
|
237 |
<?php endif; ?>
|
238 |
}
|
239 |
|
240 |
.login #backtoblog{
|
241 |
<?php if ( ! empty( $loginpress_back_bg_color ) ) : ?>
|
242 |
+
background-color: <?php echo $loginpress_back_bg_color; ?>;
|
243 |
<?php endif; ?>
|
244 |
}
|
245 |
|
246 |
.login #backtoblog a{
|
247 |
<?php if ( ! empty( $loginpress_back_decoration ) ) : ?>
|
248 |
+
text-decoration: <?php echo $loginpress_back_decoration; ?>;
|
249 |
<?php endif; ?>
|
250 |
<?php if ( ! empty( $loginpress_back_text_color ) ) : ?>
|
251 |
+
color: <?php echo $loginpress_back_text_color; ?>;
|
252 |
<?php endif; ?>
|
253 |
<?php if ( ! empty( $loginpress_back_font_size ) ) : ?>
|
254 |
+
font-size: <?php echo $loginpress_back_font_size; ?>;
|
255 |
<?php endif; ?>
|
256 |
<?php if ( ! empty( $loginpress_back_display ) ) : ?>
|
257 |
display: <?php echo $loginpress_back_display; ?>
|
260 |
|
261 |
.login #backtoblog a:hover{
|
262 |
<?php if ( ! empty( $loginpress_back_text_hover ) ) : ?>
|
263 |
+
color: <?php echo $loginpress_back_text_hover; ?>;
|
264 |
<?php endif; ?>
|
265 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
266 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
267 |
.loginHead {
|
|
|
268 |
<?php if ( ! empty( $loginpress_header_bg_color ) ) : ?>
|
269 |
+
background: <?php echo $loginpress_header_bg_color; ?>;
|
270 |
+
<?php endif; ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
271 |
}
|
272 |
|
273 |
.loginHead p a {
|
274 |
<?php if ( ! empty( $loginpress_header_text_color ) ) : ?>
|
275 |
+
color: <?php echo $loginpress_header_text_color; ?>;
|
276 |
<?php endif; ?>
|
277 |
<?php if ( ! empty( $loginpress_header_font_size ) ) : ?>
|
278 |
+
font-size: <?php echo $loginpress_header_font_size; ?>;
|
279 |
<?php endif; ?>
|
|
|
280 |
}
|
281 |
|
282 |
.loginHead p a:hover {
|
283 |
<?php if ( ! empty( $loginpress_header_text_hover ) ) : ?>
|
284 |
+
color: <?php echo $loginpress_header_text_hover; ?>;
|
285 |
<?php endif; ?>
|
286 |
}
|
287 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
288 |
.loginFooter p a {
|
|
|
289 |
margin: 0 5px;
|
290 |
<?php if ( ! empty( $loginpress_footer_link_color ) ) : ?>
|
291 |
+
color: <?php echo $loginpress_footer_link_color; ?>;
|
292 |
<?php endif; ?>
|
293 |
<?php if ( ! empty( $loginpress_footer_links_font_size ) ) : ?>
|
294 |
+
font-size: <?php echo $loginpress_footer_links_font_size; ?>;
|
295 |
<?php endif; ?>
|
296 |
}
|
297 |
|
298 |
.loginFooter p a:hover {
|
299 |
<?php if ( ! empty( $loginpress_footer_link_hover ) ) : ?>
|
300 |
+
color: <?php echo $loginpress_footer_link_hover; ?>;
|
301 |
<?php endif; ?>
|
302 |
<?php if ( ! empty( $loginpress_footer_links_hover_size ) ) : ?>
|
303 |
+
font-size: <?php echo $loginpress_footer_links_hover_size; ?>;
|
304 |
<?php endif; ?>
|
305 |
}
|
306 |
|
307 |
.loginInner {
|
|
|
|
|
308 |
<?php if ( ! empty( $loginpress_footer_link_bg_clr ) ) : ?>
|
309 |
+
background: <?php echo $loginpress_footer_link_bg_clr; ?>;
|
310 |
<?php endif; ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
311 |
}
|
312 |
|
313 |
<?php if ( ! empty( $loginpress_custom_css ) ) : ?>
|
314 |
<?php echo $loginpress_custom_css; ?>
|
315 |
<?php endif; ?>
|
316 |
+
|
317 |
+
.wp-core-ui .button-primary{
|
318 |
+
text-shadow: none;
|
319 |
+
}
|
320 |
</style>
|
321 |
|
322 |
<?php // $content = ob_get_clean(); ?>
|
css/style-presets.php
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// $multi_values = ! is_array( get_option( 'customize_presets_settings' ) ) ? explode( ',', get_option( 'customize_presets_settings' ) ) : get_option( 'customize_presets_settings' );
|
4 |
+
//
|
5 |
+
// $selected_preset = get_option( 'customize_presets_settings', true );
|
6 |
+
|
7 |
+
$selected_preset = 'default1';
|
8 |
+
?>
|
9 |
+
|
10 |
+
<?php
|
11 |
+
if ( $selected_preset == 'default1' ) {
|
12 |
+
include_once LOGINPRESS_ROOT_PATH . '/css/themes/default-1.php';
|
13 |
+
echo first_presets();
|
14 |
+
} else if ( $selected_preset == 'default2' ) {
|
15 |
+
include_once LOGINPRESS_ROOT_PATH . '/css/themes/default-2.php';
|
16 |
+
echo second_presets();
|
17 |
+
} else {
|
18 |
+
do_action( 'loginpress_add_pro_theme', $selected_preset );
|
19 |
+
}
|
20 |
+
?>
|
css/themes/default-1.php
ADDED
@@ -0,0 +1,248 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
function first_presets() {
|
4 |
+
ob_start();
|
5 |
+
?>
|
6 |
+
<style media="screen">
|
7 |
+
body.login {
|
8 |
+
background-image: url(<?php echo plugins_url( 'img/bg.jpg', LOGINPRESS_PLUGIN_BASENAME ) ?>);
|
9 |
+
background-color: #ddd5c3;
|
10 |
+
background-repeat: no-repeat;
|
11 |
+
background-position: center;
|
12 |
+
background-size: cover;
|
13 |
+
background-attachment: fixed;
|
14 |
+
display: table;
|
15 |
+
min-height: 100vh;
|
16 |
+
width: 100%;
|
17 |
+
padding: 0;
|
18 |
+
}
|
19 |
+
.header-wrapper{
|
20 |
+
display: table-row;
|
21 |
+
}
|
22 |
+
.wp-core-ui .button-primary {
|
23 |
+
color : red;
|
24 |
+
background-color : red;
|
25 |
+
}
|
26 |
+
#login{
|
27 |
+
margin-top: 2%;
|
28 |
+
background: #fff;
|
29 |
+
position: relative;
|
30 |
+
-webkit-border-radius: 5px;
|
31 |
+
-moz-border-radius: 5px;
|
32 |
+
-ms-border-radius: 5px;
|
33 |
+
-o-border-radius: 5px;
|
34 |
+
border-radius: 5px;
|
35 |
+
-webkit-box-shadow: 0 0 15px rgba(0,0,0,.8);
|
36 |
+
box-shadow: 0 0 15px rgba(0,0,0,.8);
|
37 |
+
max-width: 350px;
|
38 |
+
padding: 26px 26px 6px 26px;
|
39 |
+
width: 100%;
|
40 |
+
}
|
41 |
+
.login form {
|
42 |
+
margin-top: 20px;
|
43 |
+
margin-left: 0;
|
44 |
+
padding: 0 24px 12px;
|
45 |
+
background: #fff;
|
46 |
+
-webkit-box-shadow: none;
|
47 |
+
box-shadow: none;
|
48 |
+
}
|
49 |
+
.login form .input, .login input[type="text"]{
|
50 |
+
height: 48px;
|
51 |
+
background: #fff;
|
52 |
+
-webkit-border-radius: 5px;
|
53 |
+
-moz-border-radius: 5px;
|
54 |
+
-ms-border-radius: 5px;
|
55 |
+
border-radius: 5px;
|
56 |
+
margin-bottom: 18px;
|
57 |
+
font: normal 15px "Roboto", sans-serif;
|
58 |
+
color: #7f7f7f;
|
59 |
+
border-color: #bdbdbd;
|
60 |
+
padding-left: 27px;
|
61 |
+
font-weight: normal;
|
62 |
+
}
|
63 |
+
.login form .input, .login input[type="submit"] {
|
64 |
+
background: #fff;
|
65 |
+
color: #fff;
|
66 |
+
margin: 7px 0 7px;
|
67 |
+
height: 46px;
|
68 |
+
-webkit-border-radius: 5px;
|
69 |
+
-moz-border-radius: 5px;
|
70 |
+
-ms-border-radius: 5px;
|
71 |
+
border-radius: 5px;
|
72 |
+
font: normal 15px "Roboto", sans-serif;
|
73 |
+
color: #fff;
|
74 |
+
width: 100%;
|
75 |
+
}
|
76 |
+
.wp-core-ui .button-group.button-large .button, .wp-core-ui .button.button-large{
|
77 |
+
height: 46px;
|
78 |
+
line-height: 0;
|
79 |
+
background: #008ec2;
|
80 |
+
}
|
81 |
+
.login #nav {
|
82 |
+
text-align: center;
|
83 |
+
}
|
84 |
+
#login_error { display:block; }
|
85 |
+
.message { display:none; }
|
86 |
+
.custom-message {
|
87 |
+
-moz-border-radius:3px 3px 3px 3px;
|
88 |
+
border-style:solid;
|
89 |
+
border-width:1px;
|
90 |
+
margin:0 0 16px 8px;
|
91 |
+
padding:12px;
|
92 |
+
}
|
93 |
+
|
94 |
+
#backtoblog{
|
95 |
+
text-align: center;
|
96 |
+
}
|
97 |
+
.header-cell{
|
98 |
+
display: table-cell;
|
99 |
+
height: 100px;
|
100 |
+
}
|
101 |
+
.loginHeaderMenu{
|
102 |
+
text-align: center;
|
103 |
+
position: relative;
|
104 |
+
z-index: 10;
|
105 |
+
list-style: none;
|
106 |
+
background: #333;
|
107 |
+
|
108 |
+
}
|
109 |
+
.loginHeaderMenu>ul>li{
|
110 |
+
display: inline-block;
|
111 |
+
vertical-align: top;
|
112 |
+
position: relative;
|
113 |
+
list-style: none;
|
114 |
+
}
|
115 |
+
.loginHeaderMenu>ul>li>a{
|
116 |
+
color: #fff;
|
117 |
+
text-transform: uppercase;
|
118 |
+
text-decoration: none;
|
119 |
+
font-size: 16px;
|
120 |
+
padding: 17px 20px;
|
121 |
+
display: inline-block;
|
122 |
+
}
|
123 |
+
.loginHeaderMenu>ul>li:hover>a{
|
124 |
+
background: #4CAF50;
|
125 |
+
color: #fff;
|
126 |
+
}
|
127 |
+
.loginHeaderMenu>ul>li>ul{
|
128 |
+
position: absolute;
|
129 |
+
width: 200px;
|
130 |
+
padding: 0;
|
131 |
+
top: 100%;
|
132 |
+
left: 0;
|
133 |
+
background: #fff;
|
134 |
+
list-style: none;
|
135 |
+
text-align: left;
|
136 |
+
border-radius: 0 0 5px 5px;
|
137 |
+
-webkit-box-shadow: 0px 5px 10px -1px rgba(0,0,0,0.31);
|
138 |
+
-moz-box-shadow: 0px 5px 10px -1px rgba(0,0,0,0.31);
|
139 |
+
box-shadow: 0px 5px 10px -1px rgba(0,0,0,0.31);
|
140 |
+
overflow: hidden;
|
141 |
+
opacity: 0;
|
142 |
+
visibility: hidden;
|
143 |
+
}
|
144 |
+
.loginHeaderMenu>ul>li:hover>ul{
|
145 |
+
opacity: 1;
|
146 |
+
visibility: visible;
|
147 |
+
}
|
148 |
+
.loginHeaderMenu>ul>li>ul>li{
|
149 |
+
font-size: 15px;
|
150 |
+
color: #333;
|
151 |
+
}
|
152 |
+
.loginHeaderMenu>ul>li>ul>li>a{
|
153 |
+
color: #333;
|
154 |
+
padding: 10px;
|
155 |
+
display: block;
|
156 |
+
text-decoration: none;
|
157 |
+
}
|
158 |
+
.loginHeaderMenu>ul>li>ul>li>a:hover {
|
159 |
+
background: rgba(51, 51, 51, 0.35);
|
160 |
+
color: #fff;
|
161 |
+
}
|
162 |
+
.login-wrapper{
|
163 |
+
display: table-row;
|
164 |
+
}
|
165 |
+
.login-cell{
|
166 |
+
display: table-cell;
|
167 |
+
vertical-align: middle;
|
168 |
+
}
|
169 |
+
.clear{
|
170 |
+
display: none;
|
171 |
+
}
|
172 |
+
.footer-wrapper{
|
173 |
+
display: table-footer-group;
|
174 |
+
}
|
175 |
+
.footer-cont{
|
176 |
+
|
177 |
+
right: 0;
|
178 |
+
bottom: 0;
|
179 |
+
left: 0;
|
180 |
+
text-align: center;
|
181 |
+
display: table-cell;
|
182 |
+
vertical-align: bottom;
|
183 |
+
height: 100px;
|
184 |
+
}
|
185 |
+
.loginFooterMenu{
|
186 |
+
text-align: center;
|
187 |
+
background-color: rgba(0,0,0,.7);
|
188 |
+
}
|
189 |
+
.loginFooterMenu>ul{
|
190 |
+
display: inline-flex;
|
191 |
+
}
|
192 |
+
|
193 |
+
.loginFooterMenu>ul>li{
|
194 |
+
display: inline-block;
|
195 |
+
padding: 18px;
|
196 |
+
}
|
197 |
+
.loginFooterMenu>ul>li:focus{
|
198 |
+
outline: none;
|
199 |
+
border: 0;
|
200 |
+
}
|
201 |
+
.loginFooterMenu>ul>li>a:focus{
|
202 |
+
outline: none;
|
203 |
+
border: 0;
|
204 |
+
}
|
205 |
+
.loginFooterMenu>ul>li>a{
|
206 |
+
color: #fff;
|
207 |
+
text-transform: uppercase;
|
208 |
+
text-decoration: none;
|
209 |
+
font-size: 14px;
|
210 |
+
}
|
211 |
+
.loginHead {
|
212 |
+
width:100%;
|
213 |
+
text-align: center;
|
214 |
+
margin-top: 0;
|
215 |
+
margin-bottom: 20px;
|
216 |
+
padding: 13px 0 0;
|
217 |
+
position: relative;
|
218 |
+
margin: 0;
|
219 |
+
}
|
220 |
+
.loginHead p a {
|
221 |
+
text-decoration: none;
|
222 |
+
}
|
223 |
+
.loginFooter {
|
224 |
+
display: table-footer-group;
|
225 |
+
}
|
226 |
+
.loginFooter p a {
|
227 |
+
display: inline-block;
|
228 |
+
margin: 0 5px;
|
229 |
+
}
|
230 |
+
.loginInner {
|
231 |
+
margin: 0 auto;
|
232 |
+
text-align: center;
|
233 |
+
margin-top: 20px;
|
234 |
+
margin-bottom: 0;
|
235 |
+
padding: 13px 0;
|
236 |
+
position: relative;
|
237 |
+
}
|
238 |
+
.copyRight{
|
239 |
+
text-align: center;
|
240 |
+
padding: 12px;
|
241 |
+
background-color: #efefef;
|
242 |
+
}
|
243 |
+
</style>
|
244 |
+
|
245 |
+
<?php
|
246 |
+
$content = ob_get_clean();
|
247 |
+
return $content;
|
248 |
+
}
|
css/themes/default-2.php
ADDED
@@ -0,0 +1,132 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
<?php
|
3 |
+
function second_presets() {
|
4 |
+
ob_start();
|
5 |
+
?>
|
6 |
+
<style media="screen">
|
7 |
+
html, body.login {
|
8 |
+
height: auto !important;
|
9 |
+
}
|
10 |
+
body.login {
|
11 |
+
background-image: url(<?php echo plugins_url( 'img/bg2.jpg', LOGINPRESS_PLUGIN_BASENAME ) ?>);
|
12 |
+
background-size: cover;
|
13 |
+
display: table;
|
14 |
+
min-height: 100vh;
|
15 |
+
width: 100%;
|
16 |
+
padding: 0;
|
17 |
+
}
|
18 |
+
.login label{
|
19 |
+
font-size:0;
|
20 |
+
line-height:0;
|
21 |
+
margin-top: 0;
|
22 |
+
display: block;
|
23 |
+
margin-bottom:
|
24 |
+
}
|
25 |
+
#login form p + p:not(.forgetmenot){
|
26 |
+
margin-top: 35px;
|
27 |
+
}
|
28 |
+
.login form .input, .login input[type=text]{
|
29 |
+
background: rgba(255,255,255,.2);
|
30 |
+
display: block;
|
31 |
+
color: #fff;
|
32 |
+
font-size: 16px;
|
33 |
+
font-family: 'Open Sans';
|
34 |
+
width:100%;
|
35 |
+
border:0;
|
36 |
+
height: 50px;
|
37 |
+
padding: 0 15px;
|
38 |
+
}
|
39 |
+
.login form{
|
40 |
+
background: none;
|
41 |
+
padding: 0;
|
42 |
+
box-shadow: none;
|
43 |
+
}
|
44 |
+
.login form br{
|
45 |
+
display: none;
|
46 |
+
}
|
47 |
+
#login form p.submit{
|
48 |
+
clear: both;
|
49 |
+
padding-top: 35px;
|
50 |
+
}
|
51 |
+
.wp-core-ui #login .button-primary{
|
52 |
+
width:100% !important;
|
53 |
+
display: block;
|
54 |
+
float: none;
|
55 |
+
background-color : #f78f1e;
|
56 |
+
font-weight: 700;
|
57 |
+
font-size: 18px;
|
58 |
+
font-family: 'Open Sans';
|
59 |
+
color : #ffffff;
|
60 |
+
height: 56px;
|
61 |
+
border-radius: 0;
|
62 |
+
border:0;
|
63 |
+
box-shadow: none;
|
64 |
+
}
|
65 |
+
.wp-core-ui #login .button-primary:hover{
|
66 |
+
background-color: #fff;
|
67 |
+
color : #f78f1e;
|
68 |
+
}
|
69 |
+
.login form .forgetmenot label{
|
70 |
+
font-size: 13px;
|
71 |
+
font-family: 'Open Sans';
|
72 |
+
color: #d5d5d5;
|
73 |
+
}
|
74 |
+
.login form input[type=checkbox]{
|
75 |
+
background: none;
|
76 |
+
border: 1px solid #d5d5d5;
|
77 |
+
height: 13px;
|
78 |
+
width: 13px;
|
79 |
+
min-width: 13px;
|
80 |
+
}
|
81 |
+
.login #nav, .login #backtoblog {
|
82 |
+
margin: 17px 0 0;
|
83 |
+
padding: 0;
|
84 |
+
font-size: 14px;
|
85 |
+
font-family: "Open Sans";
|
86 |
+
color: #d5d5d5;
|
87 |
+
}
|
88 |
+
.login #nav a, .login #backtoblog a{
|
89 |
+
font-size: 14px;
|
90 |
+
font-family: "Open Sans";
|
91 |
+
color: #d5d5d5;
|
92 |
+
}
|
93 |
+
.login #backtoblog{
|
94 |
+
float: left;
|
95 |
+
}
|
96 |
+
.login #nav{
|
97 |
+
float: right;
|
98 |
+
}
|
99 |
+
.login #backtoblog a:hover, .login #nav a:hover, .login h1 a:hover{
|
100 |
+
color: #fff;
|
101 |
+
}
|
102 |
+
.footer-wrapper{
|
103 |
+
display: table-footer-group;
|
104 |
+
}
|
105 |
+
.footer-cont{
|
106 |
+
|
107 |
+
right: 0;
|
108 |
+
bottom: 0;
|
109 |
+
left: 0;
|
110 |
+
text-align: center;
|
111 |
+
display: table-cell;
|
112 |
+
vertical-align: bottom;
|
113 |
+
height: 100px;
|
114 |
+
}
|
115 |
+
.copyRight{
|
116 |
+
text-align: center;
|
117 |
+
padding: 12px;
|
118 |
+
/*background-color: #303030;*/
|
119 |
+
color: #fff;
|
120 |
+
}
|
121 |
+
#login form p + p:not(.forgetmenot){
|
122 |
+
color: #d5d5d5;
|
123 |
+
}
|
124 |
+
input[type=checkbox]:checked:before{
|
125 |
+
font-size: 18px;
|
126 |
+
}
|
127 |
+
</style>
|
128 |
+
|
129 |
+
<?php
|
130 |
+
$content = ob_get_clean();
|
131 |
+
return $content;
|
132 |
+
}
|
custom.php
CHANGED
@@ -1,1274 +1,1395 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class LoginPress_Entities {
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Variable that Check for LoginPress Key.
|
7 |
-
*
|
8 |
-
* @var string
|
9 |
-
* @since 1.0.0
|
10 |
-
*/
|
11 |
-
public $loginpress_key;
|
12 |
-
|
13 |
-
/**
|
14 |
-
* Class constructor
|
15 |
-
*/
|
16 |
-
public function __construct() {
|
17 |
-
|
18 |
-
$this->loginpress_key = get_option( 'loginpress_customization' );
|
19 |
-
$this->_hooks();
|
20 |
-
}
|
21 |
-
|
22 |
-
|
23 |
-
/**
|
24 |
-
* Hook into actions and filters
|
25 |
-
*
|
26 |
-
* @since 1.0.0
|
27 |
-
*/
|
28 |
-
private function _hooks() {
|
29 |
-
|
30 |
-
add_filter( 'login_headerurl', array( $this, 'login_page_logo_url' ) );
|
31 |
-
add_filter( 'login_headertitle', array( $this, 'login_page_logo_title' ) );
|
32 |
-
add_filter( 'login_errors', array( $this, 'login_error_messages' ) );
|
33 |
-
add_filter( 'gettext', array( $this, 'change_lostpassword_message' ) );
|
34 |
-
add_filter( 'login_message', array( $this, 'change_welcome_message' ) );
|
35 |
-
add_action( 'customize_register', array( $this, 'customize_login_panel' ) );
|
36 |
-
add_action( 'login_footer', array( $this, 'login_page_custom_footer' ) );
|
37 |
-
add_action( 'login_head', array( $this, 'login_page_custom_head' ) );
|
38 |
-
add_action( 'init', array( $this, 'redirect_to_custom_page' ) );
|
39 |
-
add_action( 'admin_menu', array( $this, 'menu_url' ), 99 );
|
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 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
'
|
152 |
-
'
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
$
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
'
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
'
|
192 |
-
'
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
'
|
201 |
-
'
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
),
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
'
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
'
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
'type'
|
249 |
-
'
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
'
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
__( '
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
'
|
279 |
-
'
|
280 |
-
'
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
'
|
332 |
-
'
|
333 |
-
'
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
$
|
338 |
-
|
339 |
-
'
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
)
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
'
|
424 |
-
'
|
425 |
-
'
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
$
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
'
|
467 |
-
'
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
'
|
486 |
-
'
|
487 |
-
'
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
'
|
502 |
-
'
|
503 |
-
'
|
504 |
-
));
|
505 |
-
|
506 |
-
$
|
507 |
-
|
508 |
-
$
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
'
|
513 |
-
'
|
514 |
-
'
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
//
|
539 |
-
//
|
540 |
-
//
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
//
|
599 |
-
//
|
600 |
-
//
|
601 |
-
//
|
602 |
-
//
|
603 |
-
//
|
604 |
-
//
|
605 |
-
//
|
606 |
-
//
|
607 |
-
//
|
608 |
-
//
|
609 |
-
//
|
610 |
-
//
|
611 |
-
//
|
612 |
-
//
|
613 |
-
//
|
614 |
-
//
|
615 |
-
//
|
616 |
-
//
|
617 |
-
// )
|
618 |
-
|
619 |
-
//
|
620 |
-
//
|
621 |
-
//
|
622 |
-
//
|
623 |
-
// $
|
624 |
-
//
|
625 |
-
//
|
626 |
-
//
|
627 |
-
//
|
628 |
-
//
|
629 |
-
// '
|
630 |
-
//
|
631 |
-
//
|
632 |
-
//
|
633 |
-
//
|
634 |
-
//
|
635 |
-
//
|
636 |
-
//
|
637 |
-
//
|
638 |
-
//
|
639 |
-
//
|
640 |
-
// ));
|
641 |
-
//
|
642 |
-
// $wp_customize->add_control(
|
643 |
-
//
|
644 |
-
//
|
645 |
-
//
|
646 |
-
//
|
647 |
-
//
|
648 |
-
//
|
649 |
-
//
|
650 |
-
//
|
651 |
-
//
|
652 |
-
//
|
653 |
-
//
|
654 |
-
//
|
655 |
-
//
|
656 |
-
//
|
657 |
-
//
|
658 |
-
//
|
659 |
-
//
|
660 |
-
//
|
661 |
-
//
|
662 |
-
//
|
663 |
-
//
|
664 |
-
//
|
665 |
-
//
|
666 |
-
//
|
667 |
-
//
|
668 |
-
//
|
669 |
-
//
|
670 |
-
//
|
671 |
-
//
|
672 |
-
//
|
673 |
-
//
|
674 |
-
//
|
675 |
-
//
|
676 |
-
//
|
677 |
-
//
|
678 |
-
//
|
679 |
-
//
|
680 |
-
//
|
681 |
-
// ));
|
682 |
-
//
|
683 |
-
//
|
684 |
-
//
|
685 |
-
//
|
686 |
-
//
|
687 |
-
//
|
688 |
-
//
|
689 |
-
//
|
690 |
-
|
691 |
-
//
|
692 |
-
//
|
693 |
-
//
|
694 |
-
|
695 |
-
'
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
$
|
704 |
-
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
$wp_customize->
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
-
|
751 |
-
|
752 |
-
)
|
753 |
-
|
754 |
-
|
755 |
-
|
756 |
-
|
757 |
-
|
758 |
-
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
|
763 |
-
'
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
|
775 |
-
|
776 |
-
|
777 |
-
|
778 |
-
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
-
|
785 |
-
'
|
786 |
-
|
787 |
-
|
788 |
-
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
|
793 |
-
|
794 |
-
|
795 |
-
'
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
|
802 |
-
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
-
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
|
813 |
-
|
814 |
-
|
815 |
-
|
816 |
-
|
817 |
-
|
818 |
-
|
819 |
-
|
820 |
-
|
821 |
-
|
822 |
-
|
823 |
-
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
|
830 |
-
|
831 |
-
|
832 |
-
|
833 |
-
|
834 |
-
|
835 |
-
|
836 |
-
|
837 |
-
|
838 |
-
|
839 |
-
'
|
840 |
-
'
|
841 |
-
'
|
842 |
-
'
|
843 |
-
|
844 |
-
|
845 |
-
|
846 |
-
|
847 |
-
|
848 |
-
|
849 |
-
|
850 |
-
'
|
851 |
-
'
|
852 |
-
'
|
853 |
-
|
854 |
-
));
|
855 |
-
|
856 |
-
|
857 |
-
'
|
858 |
-
'
|
859 |
-
'
|
860 |
-
'
|
861 |
-
|
862 |
-
|
863 |
-
|
864 |
-
|
865 |
-
|
866 |
-
|
867 |
-
|
868 |
-
|
869 |
-
|
870 |
-
'
|
871 |
-
'
|
872 |
-
|
873 |
-
|
874 |
-
|
875 |
-
|
876 |
-
|
877 |
-
|
878 |
-
|
879 |
-
|
880 |
-
|
881 |
-
|
882 |
-
'
|
883 |
-
'
|
884 |
-
|
885 |
-
|
886 |
-
|
887 |
-
|
888 |
-
|
889 |
-
'
|
890 |
-
|
891 |
-
|
892 |
-
|
893 |
-
|
894 |
-
|
895 |
-
|
896 |
-
|
897 |
-
|
898 |
-
|
899 |
-
|
900 |
-
'
|
901 |
-
|
902 |
-
|
903 |
-
|
904 |
-
|
905 |
-
|
906 |
-
|
907 |
-
|
908 |
-
|
909 |
-
|
910 |
-
|
911 |
-
|
912 |
-
|
913 |
-
|
914 |
-
|
915 |
-
|
916 |
-
|
917 |
-
|
918 |
-
|
919 |
-
|
920 |
-
|
921 |
-
|
922 |
-
|
923 |
-
|
924 |
-
|
925 |
-
|
926 |
-
array(
|
927 |
-
'label'
|
928 |
-
'section'
|
929 |
-
'priority'
|
930 |
-
'settings'
|
931 |
-
|
932 |
-
|
933 |
-
|
934 |
-
|
935 |
-
|
936 |
-
|
937 |
-
|
938 |
-
|
939 |
-
|
940 |
-
'
|
941 |
-
'
|
942 |
-
'
|
943 |
-
|
944 |
-
|
945 |
-
|
946 |
-
|
947 |
-
|
948 |
-
|
949 |
-
|
950 |
-
|
951 |
-
|
952 |
-
|
953 |
-
|
954 |
-
|
955 |
-
|
956 |
-
|
957 |
-
));
|
958 |
-
|
959 |
-
$wp_customize->add_setting( 'loginpress_customization[
|
960 |
-
'
|
961 |
-
'
|
962 |
-
|
963 |
-
|
964 |
-
|
965 |
-
|
966 |
-
|
967 |
-
|
968 |
-
|
969 |
-
|
970 |
-
|
971 |
-
|
972 |
-
|
973 |
-
|
974 |
-
|
975 |
-
|
976 |
-
|
977 |
-
array(
|
978 |
-
'
|
979 |
-
'
|
980 |
-
'
|
981 |
-
'
|
982 |
-
));
|
983 |
-
|
984 |
-
$wp_customize->
|
985 |
-
|
986 |
-
|
987 |
-
|
988 |
-
|
989 |
-
|
990 |
-
'
|
991 |
-
'
|
992 |
-
'
|
993 |
-
|
994 |
-
|
995 |
-
|
996 |
-
|
997 |
-
|
998 |
-
|
999 |
-
|
1000 |
-
|
1001 |
-
|
1002 |
-
|
1003 |
-
|
1004 |
-
|
1005 |
-
|
1006 |
-
|
1007 |
-
|
1008 |
-
|
1009 |
-
|
1010 |
-
|
1011 |
-
|
1012 |
-
|
1013 |
-
|
1014 |
-
|
1015 |
-
|
1016 |
-
|
1017 |
-
|
1018 |
-
|
1019 |
-
|
1020 |
-
|
1021 |
-
|
1022 |
-
|
1023 |
-
|
1024 |
-
|
1025 |
-
|
1026 |
-
|
1027 |
-
|
1028 |
-
|
1029 |
-
|
1030 |
-
|
1031 |
-
|
1032 |
-
|
1033 |
-
|
1034 |
-
|
1035 |
-
|
1036 |
-
|
1037 |
-
|
1038 |
-
|
1039 |
-
|
1040 |
-
|
1041 |
-
|
1042 |
-
|
1043 |
-
|
1044 |
-
|
1045 |
-
|
1046 |
-
|
1047 |
-
|
1048 |
-
|
1049 |
-
|
1050 |
-
|
1051 |
-
|
1052 |
-
|
1053 |
-
|
1054 |
-
|
1055 |
-
|
1056 |
-
|
1057 |
-
|
1058 |
-
|
1059 |
-
|
1060 |
-
|
1061 |
-
|
1062 |
-
|
1063 |
-
|
1064 |
-
|
1065 |
-
|
1066 |
-
|
1067 |
-
|
1068 |
-
|
1069 |
-
|
1070 |
-
|
1071 |
-
|
1072 |
-
|
1073 |
-
|
1074 |
-
|
1075 |
-
|
1076 |
-
|
1077 |
-
|
1078 |
-
|
1079 |
-
|
1080 |
-
|
1081 |
-
|
1082 |
-
|
1083 |
-
|
1084 |
-
|
1085 |
-
|
1086 |
-
|
1087 |
-
|
1088 |
-
|
1089 |
-
|
1090 |
-
|
1091 |
-
|
1092 |
-
|
1093 |
-
|
1094 |
-
|
1095 |
-
|
1096 |
-
|
1097 |
-
|
1098 |
-
|
1099 |
-
|
1100 |
-
|
1101 |
-
|
1102 |
-
|
1103 |
-
|
1104 |
-
|
1105 |
-
|
1106 |
-
|
1107 |
-
|
1108 |
-
|
1109 |
-
|
1110 |
-
|
1111 |
-
|
1112 |
-
|
1113 |
-
|
1114 |
-
|
1115 |
-
|
1116 |
-
|
1117 |
-
|
1118 |
-
|
1119 |
-
|
1120 |
-
|
1121 |
-
|
1122 |
-
|
1123 |
-
|
1124 |
-
|
1125 |
-
|
1126 |
-
|
1127 |
-
|
1128 |
-
|
1129 |
-
|
1130 |
-
|
1131 |
-
//
|
1132 |
-
|
1133 |
-
|
1134 |
-
|
1135 |
-
|
1136 |
-
|
1137 |
-
|
1138 |
-
|
1139 |
-
|
1140 |
-
//
|
1141 |
-
|
1142 |
-
|
1143 |
-
|
1144 |
-
|
1145 |
-
|
1146 |
-
|
1147 |
-
|
1148 |
-
|
1149 |
-
|
1150 |
-
|
1151 |
-
|
1152 |
-
*
|
1153 |
-
*
|
1154 |
-
* @
|
1155 |
-
* * * * * * * * * * *
|
1156 |
-
public function
|
1157 |
-
|
1158 |
-
|
1159 |
-
|
1160 |
-
|
1161 |
-
|
1162 |
-
|
1163 |
-
if ( $
|
1164 |
-
|
1165 |
-
|
1166 |
-
|
1167 |
-
|
1168 |
-
|
1169 |
-
|
1170 |
-
|
1171 |
-
|
1172 |
-
|
1173 |
-
|
1174 |
-
|
1175 |
-
|
1176 |
-
|
1177 |
-
|
1178 |
-
|
1179 |
-
|
1180 |
-
|
1181 |
-
*
|
1182 |
-
*
|
1183 |
-
|
1184 |
-
|
1185 |
-
|
1186 |
-
|
1187 |
-
|
1188 |
-
|
1189 |
-
|
1190 |
-
|
1191 |
-
|
1192 |
-
|
1193 |
-
|
1194 |
-
|
1195 |
-
|
1196 |
-
|
1197 |
-
|
1198 |
-
|
1199 |
-
|
1200 |
-
|
1201 |
-
|
1202 |
-
|
1203 |
-
|
1204 |
-
|
1205 |
-
|
1206 |
-
|
1207 |
-
|
1208 |
-
|
1209 |
-
|
1210 |
-
|
1211 |
-
|
1212 |
-
|
1213 |
-
|
1214 |
-
|
1215 |
-
|
1216 |
-
|
1217 |
-
|
1218 |
-
|
1219 |
-
|
1220 |
-
|
1221 |
-
|
1222 |
-
|
1223 |
-
|
1224 |
-
|
1225 |
-
|
1226 |
-
|
1227 |
-
|
1228 |
-
|
1229 |
-
|
1230 |
-
|
1231 |
-
|
1232 |
-
|
1233 |
-
|
1234 |
-
|
1235 |
-
|
1236 |
-
|
1237 |
-
|
1238 |
-
|
1239 |
-
|
1240 |
-
|
1241 |
-
|
1242 |
-
|
1243 |
-
|
1244 |
-
|
1245 |
-
|
1246 |
-
|
1247 |
-
|
1248 |
-
|
1249 |
-
|
1250 |
-
|
1251 |
-
|
1252 |
-
|
1253 |
-
'
|
1254 |
-
|
1255 |
-
|
1256 |
-
|
1257 |
-
|
1258 |
-
|
1259 |
-
|
1260 |
-
|
1261 |
-
|
1262 |
-
|
1263 |
-
|
1264 |
-
|
1265 |
-
|
1266 |
-
|
1267 |
-
|
1268 |
-
|
1269 |
-
|
1270 |
-
|
1271 |
-
|
1272 |
-
|
1273 |
-
|
1274 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class LoginPress_Entities {
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Variable that Check for LoginPress Key.
|
7 |
+
*
|
8 |
+
* @var string
|
9 |
+
* @since 1.0.0
|
10 |
+
*/
|
11 |
+
public $loginpress_key;
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Class constructor
|
15 |
+
*/
|
16 |
+
public function __construct() {
|
17 |
+
|
18 |
+
$this->loginpress_key = get_option( 'loginpress_customization' );
|
19 |
+
$this->_hooks();
|
20 |
+
}
|
21 |
+
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Hook into actions and filters
|
25 |
+
*
|
26 |
+
* @since 1.0.0
|
27 |
+
*/
|
28 |
+
private function _hooks() {
|
29 |
+
|
30 |
+
add_filter( 'login_headerurl', array( $this, 'login_page_logo_url' ) );
|
31 |
+
add_filter( 'login_headertitle', array( $this, 'login_page_logo_title' ) );
|
32 |
+
add_filter( 'login_errors', array( $this, 'login_error_messages' ) );
|
33 |
+
add_filter( 'gettext', array( $this, 'change_lostpassword_message' ) );
|
34 |
+
add_filter( 'login_message', array( $this, 'change_welcome_message' ) );
|
35 |
+
add_action( 'customize_register', array( $this, 'customize_login_panel' ) );
|
36 |
+
add_action( 'login_footer', array( $this, 'login_page_custom_footer' ) );
|
37 |
+
add_action( 'login_head', array( $this, 'login_page_custom_head' ) );
|
38 |
+
add_action( 'init', array( $this, 'redirect_to_custom_page' ) );
|
39 |
+
add_action( 'admin_menu', array( $this, 'menu_url' ), 99 );
|
40 |
+
|
41 |
+
add_action( 'customize_controls_enqueue_scripts', array( $this, 'loginpress_customizer_js' ) );
|
42 |
+
add_action( 'customize_preview_init', array( $this, 'loginpress_customizer_js' ) );
|
43 |
+
|
44 |
+
|
45 |
+
}
|
46 |
+
|
47 |
+
function loginpress_customizer_js() {
|
48 |
+
wp_enqueue_script('jquery');
|
49 |
+
wp_enqueue_script( 'wpt_theme_customizer', plugins_url( 'js/customize-controls.js' , __FILE__ ), array( 'jquery', 'customize-preview' ), '', true );
|
50 |
+
|
51 |
+
$admin_url = array( 'template_url' => admin_url() );
|
52 |
+
wp_localize_script( 'wpt_theme_customizer', 'admin_url', $admin_url );
|
53 |
+
}
|
54 |
+
|
55 |
+
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Register plugin settings Panel in WP Customizer
|
59 |
+
*
|
60 |
+
* @param $wp_customize
|
61 |
+
* @since 1.0.0
|
62 |
+
*/
|
63 |
+
public function customize_login_panel( $wp_customize ){
|
64 |
+
|
65 |
+
include dirname( __FILE__ ) .'/classes/control-presets.php';
|
66 |
+
|
67 |
+
// =============================
|
68 |
+
// = Panel for the LoginPress =
|
69 |
+
// =============================
|
70 |
+
$wp_customize->add_panel( 'loginpress_panel', array(
|
71 |
+
'title' => __( 'LoginPress', 'loginpress' ),
|
72 |
+
'description' => __( 'Customize Your WordPress Login Page with LoginPress :)', 'loginpress' ),
|
73 |
+
'priority' => 30,
|
74 |
+
) );
|
75 |
+
|
76 |
+
|
77 |
+
// Start of Presets.
|
78 |
+
// $wp_customize->add_section( 'customize_presets', array(
|
79 |
+
// 'title' => __( 'Themes', 'loginpress' ),
|
80 |
+
// 'description' => __( 'Choose Theme', 'loginpress' ),
|
81 |
+
// 'priority' => 1,
|
82 |
+
// 'panel' => 'loginpress_panel',
|
83 |
+
// ) );
|
84 |
+
//
|
85 |
+
// $wp_customize->add_setting( 'customize_presets_settings', array(
|
86 |
+
// 'default' => 'default1',
|
87 |
+
// 'type' => 'option',
|
88 |
+
// 'capability' => 'manage_options',
|
89 |
+
// ) );
|
90 |
+
//
|
91 |
+
// $loginpress_free_templates = array(
|
92 |
+
// 'default1' => array(
|
93 |
+
// 'img' => plugins_url( 'img/bg.jpg', __FILE__ ),
|
94 |
+
// 'thumbnail' => plugins_url( 'img/thumbnail/default-1.png', __FILE__ ),
|
95 |
+
// 'id' => 'default1',
|
96 |
+
// 'name' => 'Default 1'
|
97 |
+
// ),
|
98 |
+
// 'default2' => array(
|
99 |
+
// 'img' => plugins_url( 'img/bg2.jpg', __FILE__ ),
|
100 |
+
// 'thumbnail' => plugins_url( 'img/thumbnail/default-2.png', __FILE__ ),
|
101 |
+
// 'id' => 'default2',
|
102 |
+
// 'name' => 'Default 2'
|
103 |
+
// ),
|
104 |
+
// // 'default3' => array(
|
105 |
+
// // 'thumbnail' => plugins_url( 'img/thumbnail/default-3.png', __FILE__ ),
|
106 |
+
// // 'id' => 'default3',
|
107 |
+
// // 'name' => 'Default 3',
|
108 |
+
// // 'pro' => 'yes'
|
109 |
+
// // )
|
110 |
+
// );
|
111 |
+
// $loginpress_templates = apply_filters( 'loginpress_pro_add_template', $loginpress_free_templates );
|
112 |
+
//
|
113 |
+
// $wp_customize->add_control( new LoginPress_Presets( $wp_customize, 'customize_presets_settings',
|
114 |
+
// array(
|
115 |
+
// 'section' => 'customize_presets',
|
116 |
+
// // 'label' => __( 'Themes', 'loginpress' ),
|
117 |
+
// 'choices' => $loginpress_templates
|
118 |
+
// )
|
119 |
+
// )
|
120 |
+
// );
|
121 |
+
//End of Presets.
|
122 |
+
|
123 |
+
|
124 |
+
// =============================
|
125 |
+
// = Section for Login Logo =
|
126 |
+
// =============================
|
127 |
+
$wp_customize->add_section(
|
128 |
+
'customize_logo_section',
|
129 |
+
array(
|
130 |
+
'title' => __( 'Logo', 'loginpress' ),
|
131 |
+
'description' => __( 'Customize Your Logo Section', 'loginpress' ),
|
132 |
+
'priority' => 5,
|
133 |
+
'panel' => 'loginpress_panel',
|
134 |
+
));
|
135 |
+
|
136 |
+
$wp_customize->add_setting(
|
137 |
+
'loginpress_customization[setting_logo]',
|
138 |
+
array(
|
139 |
+
'type' => 'option',
|
140 |
+
'capability' => 'manage_options',
|
141 |
+
'transport' => 'postMessage'
|
142 |
+
));
|
143 |
+
|
144 |
+
$wp_customize->add_control(
|
145 |
+
new WP_Customize_Image_Control(
|
146 |
+
$wp_customize,
|
147 |
+
'setting_logo',
|
148 |
+
array(
|
149 |
+
'label' => __( 'Logo Image:', 'loginpress' ),
|
150 |
+
'section' => 'customize_logo_section',
|
151 |
+
'priority' => 5,
|
152 |
+
'settings' => 'loginpress_customization[setting_logo]'
|
153 |
+
)));
|
154 |
+
|
155 |
+
$logo_control = array( 'customize_logo_width', 'customize_logo_height', 'customize_logo_padding', 'customize_logo_hover', 'customize_logo_hover_title' );
|
156 |
+
$logo_default = array( '84px', '84px', '5px', '', '' );
|
157 |
+
$logo_label = array(
|
158 |
+
__( 'Logo Width:', 'loginpress' ),
|
159 |
+
__( 'Logo Height:', 'loginpress' ),
|
160 |
+
__( 'Padding Bottom:', 'loginpress' ),
|
161 |
+
__( 'Logo URL:', 'loginpress' ),
|
162 |
+
__( 'Logo Hover Title:', 'loginpress' )
|
163 |
+
);
|
164 |
+
|
165 |
+
$logo = 0;
|
166 |
+
while ( $logo < 5 ) :
|
167 |
+
|
168 |
+
$wp_customize->add_setting( "loginpress_customization[{$logo_control[$logo]}]", array(
|
169 |
+
'default' => $logo_default[$logo],
|
170 |
+
'type' => 'option',
|
171 |
+
'capability' => 'manage_options',
|
172 |
+
'transport' => 'postMessage'
|
173 |
+
));
|
174 |
+
|
175 |
+
$wp_customize->add_control( $logo_control[$logo], array(
|
176 |
+
'label' => $logo_label[$logo],
|
177 |
+
'section' => 'customize_logo_section',
|
178 |
+
'priority' => 10,
|
179 |
+
'settings' => "loginpress_customization[{$logo_control[$logo]}]"
|
180 |
+
));
|
181 |
+
|
182 |
+
$logo++;
|
183 |
+
endwhile;
|
184 |
+
|
185 |
+
// =============================
|
186 |
+
// = Section for Background =
|
187 |
+
// =============================
|
188 |
+
$wp_customize->add_section(
|
189 |
+
'section_background',
|
190 |
+
array(
|
191 |
+
'title' => __( 'Background', 'loginpress' ),
|
192 |
+
'description' => '',
|
193 |
+
'priority' => 10,
|
194 |
+
'panel' => 'loginpress_panel',
|
195 |
+
));
|
196 |
+
|
197 |
+
$wp_customize->add_setting(
|
198 |
+
'loginpress_customization[setting_background]',
|
199 |
+
array(
|
200 |
+
// 'default' => plugins_url( 'img/bg.jpg', __FILE__ ) ,
|
201 |
+
'type' => 'option',
|
202 |
+
'capability' => 'manage_options',
|
203 |
+
'transport' => 'postMessage'
|
204 |
+
));
|
205 |
+
|
206 |
+
$wp_customize->add_control(
|
207 |
+
new WP_Customize_Image_Control(
|
208 |
+
$wp_customize,
|
209 |
+
'setting_background',
|
210 |
+
array(
|
211 |
+
'label' => __( 'Background Image:', 'loginpress' ),
|
212 |
+
'section' => 'section_background',
|
213 |
+
'priority' => 5,
|
214 |
+
'settings' => 'loginpress_customization[setting_background]',
|
215 |
+
)));
|
216 |
+
|
217 |
+
$wp_customize->add_setting( 'loginpress_customization[setting_background_color]', array(
|
218 |
+
'default' => '#ddd5c3',
|
219 |
+
'type' => 'option',
|
220 |
+
'capability' => 'manage_options',
|
221 |
+
'transport' => 'postMessage'
|
222 |
+
|
223 |
+
));
|
224 |
+
|
225 |
+
$wp_customize->add_control(
|
226 |
+
new WP_Customize_Color_Control(
|
227 |
+
$wp_customize,
|
228 |
+
'setting_background_color',
|
229 |
+
array(
|
230 |
+
'label' => __( 'Background Color:', 'loginpress' ),
|
231 |
+
'section' => 'section_background',
|
232 |
+
'priority' => 15,
|
233 |
+
'settings' => 'loginpress_customization[setting_background_color]'
|
234 |
+
)));
|
235 |
+
|
236 |
+
$wp_customize->add_setting( 'loginpress_customization[background_repeat_radio]', array(
|
237 |
+
'default' => 'no-repeat',
|
238 |
+
'type' => 'option',
|
239 |
+
'capability' => 'manage_options',
|
240 |
+
'transport' => 'postMessage'
|
241 |
+
));
|
242 |
+
|
243 |
+
$wp_customize->add_control( 'background_repeat_radio', array(
|
244 |
+
'label' => __( 'Background Repeat:', 'loginpress' ),
|
245 |
+
'section' => 'section_background',
|
246 |
+
'priority' => 20,
|
247 |
+
'settings' => 'loginpress_customization[background_repeat_radio]',
|
248 |
+
'type' => 'radio',
|
249 |
+
'choices' => array(
|
250 |
+
'repeat' => 'repeat',
|
251 |
+
'repeat-x' => 'repeat-x',
|
252 |
+
'repeat-y' => 'repeat-y',
|
253 |
+
'no-repeat' => 'no-repeat',
|
254 |
+
'initial' => 'initial',
|
255 |
+
'inherit' => 'inherit',
|
256 |
+
),
|
257 |
+
));
|
258 |
+
|
259 |
+
$wp_customize->add_setting( 'loginpress_customization[background_position]', array(
|
260 |
+
'default' => 'center',
|
261 |
+
'type' => 'option',
|
262 |
+
'capability' => 'manage_options',
|
263 |
+
'transport' => 'postMessage'
|
264 |
+
|
265 |
+
));
|
266 |
+
$wp_customize->add_control( 'background_position', array(
|
267 |
+
'settings' => 'loginpress_customization[background_position]',
|
268 |
+
'label' => __( 'Select Position:', 'loginpress' ),
|
269 |
+
'section' => 'section_background',
|
270 |
+
'priority' => 25,
|
271 |
+
'type' => 'select',
|
272 |
+
'choices' => array(
|
273 |
+
'left top' => 'left top',
|
274 |
+
'left center' => 'left center',
|
275 |
+
'left bottom' => 'left bottom',
|
276 |
+
'right top' => 'right top',
|
277 |
+
'right center' => 'right center',
|
278 |
+
'right bottom' => 'right bottom',
|
279 |
+
'center top' => 'center top',
|
280 |
+
'center' => 'center',
|
281 |
+
'center bottom' => 'center bottom',
|
282 |
+
),
|
283 |
+
));
|
284 |
+
|
285 |
+
$wp_customize->add_setting( 'loginpress_customization[background_image_size]', array(
|
286 |
+
'default' => 'cover',
|
287 |
+
'type' => 'option',
|
288 |
+
'capability' => 'manage_options',
|
289 |
+
'transport' => 'postMessage'
|
290 |
+
));
|
291 |
+
|
292 |
+
$wp_customize->add_control( 'background_image_size', array(
|
293 |
+
'label' => __( 'Background Image Size: ', 'loginpress' ),
|
294 |
+
'section' => 'section_background',
|
295 |
+
'priority' => 30,
|
296 |
+
'settings' => 'loginpress_customization[background_image_size]',
|
297 |
+
'type' => 'select',
|
298 |
+
'choices' => array(
|
299 |
+
'auto' => 'auto',
|
300 |
+
'cover' => 'cover',
|
301 |
+
'contain' => 'contain',
|
302 |
+
'initial' => 'initial',
|
303 |
+
'inherit' => 'inherit',
|
304 |
+
),
|
305 |
+
));
|
306 |
+
|
307 |
+
// =============================
|
308 |
+
// = Section for Form Beauty =
|
309 |
+
// =============================
|
310 |
+
$wp_customize->add_section(
|
311 |
+
'section_form',
|
312 |
+
array(
|
313 |
+
'title' => __( 'Customize Login Form', 'loginpress' ),
|
314 |
+
'description' => '',
|
315 |
+
'priority' => 15,
|
316 |
+
'panel' => 'loginpress_panel',
|
317 |
+
));
|
318 |
+
|
319 |
+
$wp_customize->add_setting( 'loginpress_customization[setting_form_background]', array(
|
320 |
+
'type' => 'option',
|
321 |
+
'capability' => 'manage_options',
|
322 |
+
'transport' => 'postMessage'
|
323 |
+
));
|
324 |
+
|
325 |
+
$wp_customize->add_control(
|
326 |
+
new WP_Customize_Image_Control(
|
327 |
+
$wp_customize,
|
328 |
+
'setting_form_background',
|
329 |
+
array(
|
330 |
+
'label' => __( 'Form Background Image', 'loginpress' ),
|
331 |
+
'section' => 'section_form',
|
332 |
+
'priority' => 5,
|
333 |
+
'settings' => 'loginpress_customization[setting_form_background]'
|
334 |
+
)));
|
335 |
+
|
336 |
+
$form_control = array( 'customize_form_width', 'customize_form_height', 'customize_form_padding', 'customize_form_border', 'textfield_width', 'textfield_margin' );
|
337 |
+
$form_default = array( '350px', '200px', '26px 24px 46px', '', '100%', '2px 6px 16px 0px' );
|
338 |
+
$form_label = array(
|
339 |
+
__( 'Form Width:', 'loginpress' ),
|
340 |
+
__( 'Form Minimum Height:', 'loginpress' ),
|
341 |
+
__( 'Form Padding:', 'loginpress' ),
|
342 |
+
__( 'Border (Example: 2px dotted black):', 'loginpress' ),
|
343 |
+
__( 'Input Text Field Width:', 'loginpress' ),
|
344 |
+
__( 'Input Text Field Margin:', 'loginpress' )
|
345 |
+
);
|
346 |
+
|
347 |
+
$form = 0;
|
348 |
+
while ( $form < 6 ) :
|
349 |
+
|
350 |
+
$wp_customize->add_setting( "loginpress_customization[{$form_control[$form]}]", array(
|
351 |
+
'default' => $form_default[$form],
|
352 |
+
'type' => 'option',
|
353 |
+
'capability' => 'manage_options',
|
354 |
+
'transport' => 'postMessage'
|
355 |
+
));
|
356 |
+
|
357 |
+
$wp_customize->add_control( $form_control[$form], array(
|
358 |
+
'label' => $form_label[$form],
|
359 |
+
'section' => 'section_form',
|
360 |
+
// 'priority' => 15,
|
361 |
+
'settings' => "loginpress_customization[{$form_control[$form]}]"
|
362 |
+
));
|
363 |
+
|
364 |
+
$form++;
|
365 |
+
endwhile;
|
366 |
+
|
367 |
+
$form_color_control = array( 'form_background_color', 'textfield_background_color', 'textfield_color', 'textfield_label_color' );
|
368 |
+
$form_color_default = array( '#FFF', '#FFF', '#333', '#777' );
|
369 |
+
$form_color_label = array(
|
370 |
+
__( 'Form Background Color:', 'loginpress' ),
|
371 |
+
__( 'Input Field Background Color:', 'loginpress' ),
|
372 |
+
__( 'Input Field Text Color:', 'loginpress' ),
|
373 |
+
__( 'Label Color:', 'loginpress' ),
|
374 |
+
);
|
375 |
+
|
376 |
+
$form_color = 0;
|
377 |
+
while ( $form_color < 4 ) :
|
378 |
+
|
379 |
+
$wp_customize->add_setting( "loginpress_customization[{$form_color_control[$form_color]}]", array(
|
380 |
+
// 'default' => $form_color_default[$form_color],
|
381 |
+
'type' => 'option',
|
382 |
+
'capability' => 'manage_options',
|
383 |
+
'transport' => 'postMessage'
|
384 |
+
));
|
385 |
+
|
386 |
+
$wp_customize->add_control(
|
387 |
+
new WP_Customize_Color_Control(
|
388 |
+
$wp_customize,
|
389 |
+
$form_color_control[$form_color],
|
390 |
+
array(
|
391 |
+
'label' => $form_color_label[$form_color],
|
392 |
+
'section' => 'section_form',
|
393 |
+
// 'priority' => 50,
|
394 |
+
'settings' => "loginpress_customization[{$form_color_control[$form_color]}]"
|
395 |
+
) ) );
|
396 |
+
|
397 |
+
$form_color++;
|
398 |
+
endwhile;
|
399 |
+
|
400 |
+
// =============================
|
401 |
+
// = Section for Forget Form =
|
402 |
+
// =============================
|
403 |
+
$wp_customize->add_section(
|
404 |
+
'section_forget_form',
|
405 |
+
array(
|
406 |
+
'title' => __( 'Customize Forget Form', 'loginpress' ),
|
407 |
+
'description' => '',
|
408 |
+
'priority' => 20,
|
409 |
+
'panel' => 'loginpress_panel',
|
410 |
+
));
|
411 |
+
|
412 |
+
$wp_customize->add_setting( 'loginpress_customization[forget_form_background]', array(
|
413 |
+
'type' => 'option',
|
414 |
+
'capability' => 'manage_options',
|
415 |
+
'transport' => 'postMessage'
|
416 |
+
));
|
417 |
+
|
418 |
+
$wp_customize->add_control(
|
419 |
+
new WP_Customize_Image_Control(
|
420 |
+
$wp_customize,
|
421 |
+
'forget_form_background',
|
422 |
+
array(
|
423 |
+
'label' => __( 'Forget Form Background Image', 'loginpress' ),
|
424 |
+
'section' => 'section_forget_form',
|
425 |
+
'priority' => 5,
|
426 |
+
'settings' => 'loginpress_customization[forget_form_background]'
|
427 |
+
)));
|
428 |
+
|
429 |
+
$wp_customize->add_setting( 'loginpress_customization[forget_form_background_color]', array(
|
430 |
+
// 'default' => '#FFF',
|
431 |
+
'type' => 'option',
|
432 |
+
'capability' => 'manage_options',
|
433 |
+
'transport' => 'postMessage'
|
434 |
+
));
|
435 |
+
|
436 |
+
$wp_customize->add_control(
|
437 |
+
new WP_Customize_Color_Control(
|
438 |
+
$wp_customize,
|
439 |
+
'forget_form_background_color',
|
440 |
+
array(
|
441 |
+
'label' => __( 'Forget Form Background Color', 'loginpress' ),
|
442 |
+
'section' => 'section_forget_form',
|
443 |
+
'priority' => 10,
|
444 |
+
'settings' => 'loginpress_customization[forget_form_background_color]'
|
445 |
+
)));
|
446 |
+
|
447 |
+
// =============================
|
448 |
+
// = Section for Button Style =
|
449 |
+
// =============================
|
450 |
+
$wp_customize->add_section(
|
451 |
+
'section_button',
|
452 |
+
array(
|
453 |
+
'title' => __( 'Button Beauty', 'loginpress' ),
|
454 |
+
'description' => '',
|
455 |
+
'priority' => 25,
|
456 |
+
'panel' => 'loginpress_panel',
|
457 |
+
));
|
458 |
+
|
459 |
+
$button_control = array( 'custom_button_color', 'button_border_color', 'button_hover_color', 'button_hover_border', 'custom_button_shadow', 'button_text_color' );
|
460 |
+
$button_default = array( '#2EA2CC', '#0074A2', '#1E8CBE', '#0074A2', '#78C8E6', '#FFF' );
|
461 |
+
$button_label = array(
|
462 |
+
__( 'Button Color:', 'loginpress' ),
|
463 |
+
__( 'Button Border Color:', 'loginpress' ),
|
464 |
+
__( 'Button Color (Hover):', 'loginpress' ),
|
465 |
+
__( 'Button Border (Hover):', 'loginpress' ),
|
466 |
+
__( 'Button Box Shadow:', 'loginpress' ),
|
467 |
+
__( 'Button Text Color:', 'loginpress' )
|
468 |
+
);
|
469 |
+
|
470 |
+
$button = 0;
|
471 |
+
while ( $button < 6 ) :
|
472 |
+
|
473 |
+
$wp_customize->add_setting( "loginpress_customization[{$button_control[$button]}]", array(
|
474 |
+
// 'default' => $button_default[$button],
|
475 |
+
'type' => 'option',
|
476 |
+
'capability' => 'manage_options',
|
477 |
+
'transport' => 'postMessage'
|
478 |
+
));
|
479 |
+
|
480 |
+
$wp_customize->add_control(
|
481 |
+
new WP_Customize_Color_Control(
|
482 |
+
$wp_customize,
|
483 |
+
$button_control[$button],
|
484 |
+
array(
|
485 |
+
'label' => $button_label[$button],
|
486 |
+
'section' => 'section_button',
|
487 |
+
'priority' => 5,
|
488 |
+
'settings' => "loginpress_customization[{$button_control[$button]}]"
|
489 |
+
) ) );
|
490 |
+
|
491 |
+
$button++;
|
492 |
+
endwhile;
|
493 |
+
|
494 |
+
// =============================
|
495 |
+
// = Section for Error message =
|
496 |
+
// =============================
|
497 |
+
$wp_customize->add_section(
|
498 |
+
'section_error',
|
499 |
+
array(
|
500 |
+
'title' => __( 'Error Messages', 'loginpress' ),
|
501 |
+
'description' => '',
|
502 |
+
'priority' => 30,
|
503 |
+
'panel' => 'loginpress_panel',
|
504 |
+
));
|
505 |
+
|
506 |
+
$error_control = array( 'incorrect_username', 'incorrect_password', 'empty_username', 'empty_password', 'invalid_email', 'empty_email', 'invalidcombo_message' );
|
507 |
+
$error_default = array( 'Incorrect Username', 'Incorrect Password', 'Empty Username', 'Empty Password', 'The email address is incorrect.', 'The email address is empty.', 'Invalid Username or Email.' );
|
508 |
+
$error_label = array(
|
509 |
+
__( 'Incorrect Username Message:', 'loginpress' ),
|
510 |
+
__( 'Incorrect Password Message:', 'loginpress' ),
|
511 |
+
__( 'Empty Username Message:', 'loginpress' ),
|
512 |
+
__( 'Empty Password Message:', 'loginpress' ),
|
513 |
+
__( 'Invalid Email Message:', 'loginpress' ),
|
514 |
+
__( 'Empty Email Message:', 'loginpress' ),
|
515 |
+
__( 'Forget Password Message:', 'loginpress' ),
|
516 |
+
);
|
517 |
+
|
518 |
+
$error = 0;
|
519 |
+
while ( $error < 7 ) :
|
520 |
+
|
521 |
+
$wp_customize->add_setting( "loginpress_customization[{$error_control[$error]}]", array(
|
522 |
+
'default' => $error_default[$error],
|
523 |
+
'type' => 'option',
|
524 |
+
'capability' => 'manage_options',
|
525 |
+
'transport' => 'postMessage'
|
526 |
+
));
|
527 |
+
|
528 |
+
$wp_customize->add_control( $error_control[$error], array(
|
529 |
+
'label' => $error_label[$error],
|
530 |
+
'section' => 'section_error',
|
531 |
+
'priority' => 5,
|
532 |
+
'settings' => "loginpress_customization[{$error_control[$error]}]",
|
533 |
+
));
|
534 |
+
|
535 |
+
$error++;
|
536 |
+
endwhile;
|
537 |
+
|
538 |
+
// =============================
|
539 |
+
// = Section for Welcome message
|
540 |
+
// =============================
|
541 |
+
$wp_customize->add_section(
|
542 |
+
'section_welcome',
|
543 |
+
array(
|
544 |
+
'title' => __( 'Welcome Messages', 'loginpress' ),
|
545 |
+
'description' => '',
|
546 |
+
'priority' => 35,
|
547 |
+
'panel' => 'loginpress_panel',
|
548 |
+
));
|
549 |
+
|
550 |
+
$welcome_control = array( 'lostpwd_welcome_message', 'welcome_message', 'register_welcome_message', 'logout_message', 'message_background_border' );
|
551 |
+
$welcome_default = array( 'Forget ?', 'Welcome', 'Register yourself', 'Logout', '' );
|
552 |
+
$welcome_label = array(
|
553 |
+
__( 'Welcome Message on Lost Password:', 'loginpress' ),
|
554 |
+
__( 'Welcome Message on Front Page:', 'loginpress' ),
|
555 |
+
__( 'Welcome Message on Registration:', 'loginpress' ),
|
556 |
+
__( 'Logout Message:', 'loginpress' ),
|
557 |
+
__( 'Message Field Border: ( Example: 1px solid #00a0d2; )', 'loginpress' ),
|
558 |
+
);
|
559 |
+
|
560 |
+
$welcome = 0;
|
561 |
+
while ( $welcome < 5 ) :
|
562 |
+
|
563 |
+
$wp_customize->add_setting( "loginpress_customization[{$welcome_control[ $welcome ]}]", array(
|
564 |
+
'default' => $welcome_default[ $welcome ],
|
565 |
+
'type' => 'option',
|
566 |
+
'capability' => 'manage_options',
|
567 |
+
'transport' => 'postMessage'
|
568 |
+
));
|
569 |
+
|
570 |
+
$wp_customize->add_control( $welcome_control[ $welcome ], array(
|
571 |
+
'label' => $welcome_label[ $welcome ],
|
572 |
+
'section' => 'section_welcome',
|
573 |
+
'priority' => 5,
|
574 |
+
'settings' => "loginpress_customization[{$welcome_control[ $welcome ]}]",
|
575 |
+
));
|
576 |
+
|
577 |
+
$welcome++;
|
578 |
+
endwhile;
|
579 |
+
|
580 |
+
$wp_customize->add_setting( 'loginpress_customization[message_background_color]', array(
|
581 |
+
// 'default' => '#fff',
|
582 |
+
'type' => 'option',
|
583 |
+
'capability' => 'manage_options',
|
584 |
+
'transport' => 'postMessage'
|
585 |
+
));
|
586 |
+
|
587 |
+
$wp_customize->add_control(
|
588 |
+
new WP_Customize_Color_Control(
|
589 |
+
$wp_customize,
|
590 |
+
'message_background_color',
|
591 |
+
array(
|
592 |
+
'label' => __( 'Message Field Background Color:', 'loginpress' ),
|
593 |
+
'section' => 'section_welcome',
|
594 |
+
'priority' => 30,
|
595 |
+
'settings' => 'loginpress_customization[message_background_color]'
|
596 |
+
)));
|
597 |
+
|
598 |
+
// =============================
|
599 |
+
// = Section for Header message
|
600 |
+
// =============================
|
601 |
+
// $wp_customize->add_section(
|
602 |
+
// 'section_head',
|
603 |
+
// array(
|
604 |
+
// 'title' => __( 'Header Message', 'loginpress' ),
|
605 |
+
// 'description' => '',
|
606 |
+
// 'priority' => 35,
|
607 |
+
// 'panel' => 'loginpress_panel',
|
608 |
+
// ));
|
609 |
+
//
|
610 |
+
// $wp_customize->add_setting( 'loginpress_customization[login_hearder_message]', array(
|
611 |
+
// 'default' => 'Latest NEWS',
|
612 |
+
// 'type' => 'option',
|
613 |
+
// 'capability' => 'edit_theme_options',
|
614 |
+
// ));
|
615 |
+
//
|
616 |
+
// $wp_customize->add_control( 'login_hearder_message', array(
|
617 |
+
// 'label' => __( 'Header Message:', 'loginpress' ),
|
618 |
+
// 'section' => 'section_head',
|
619 |
+
// 'priority' => 5,
|
620 |
+
// 'settings' => 'loginpress_customization[login_hearder_message]',
|
621 |
+
// ));
|
622 |
+
//
|
623 |
+
// $wp_customize->add_setting( 'loginpress_customization[login_hearder_message_link]', array(
|
624 |
+
// 'default' => '#',
|
625 |
+
// 'type' => 'option',
|
626 |
+
// 'capability' => 'edit_theme_options',
|
627 |
+
// ));
|
628 |
+
//
|
629 |
+
// $wp_customize->add_control( 'login_hearder_message_link', array(
|
630 |
+
// 'label' => __( 'Header Message Link:', 'loginpress' ),
|
631 |
+
// 'section' => 'section_head',
|
632 |
+
// 'priority' => 5,
|
633 |
+
// 'settings' => 'loginpress_customization[login_hearder_message_link]',
|
634 |
+
// ));
|
635 |
+
//
|
636 |
+
// $wp_customize->add_setting( 'loginpress_customization[login_head_color]', array(
|
637 |
+
// 'default' => '#17a8e3',
|
638 |
+
// 'type' => 'option',
|
639 |
+
// 'capability' => 'edit_theme_options',
|
640 |
+
// ));
|
641 |
+
//
|
642 |
+
// $wp_customize->add_control(
|
643 |
+
// new WP_Customize_Color_Control(
|
644 |
+
// $wp_customize,
|
645 |
+
// 'login_head_color',
|
646 |
+
// array(
|
647 |
+
// 'label' => __( 'Header Text Color:', 'loginpress' ),
|
648 |
+
// 'section' => 'section_head',
|
649 |
+
// 'priority' => 10,
|
650 |
+
// 'settings' => 'loginpress_customization[login_head_color]'
|
651 |
+
// )));
|
652 |
+
//
|
653 |
+
// $wp_customize->add_setting( 'loginpress_customization[login_head_color_hover]', array(
|
654 |
+
// // 'default' => '#17a8e3',
|
655 |
+
// 'type' => 'option',
|
656 |
+
// 'capability' => 'edit_theme_options',
|
657 |
+
// ));
|
658 |
+
//
|
659 |
+
// $wp_customize->add_control(
|
660 |
+
// new WP_Customize_Color_Control(
|
661 |
+
// $wp_customize,
|
662 |
+
// 'login_head_color_hover',
|
663 |
+
// array(
|
664 |
+
// 'label' => __( 'Header Text Hover Color:', 'loginpress' ),
|
665 |
+
// 'section' => 'section_head',
|
666 |
+
// 'priority' => 15,
|
667 |
+
// 'settings' => 'loginpress_customization[login_head_color_hover]'
|
668 |
+
// )));
|
669 |
+
//
|
670 |
+
// $wp_customize->add_setting( 'loginpress_customization[login_head_font_size]', array(
|
671 |
+
// 'default' => '13px;',
|
672 |
+
// 'type' => 'option',
|
673 |
+
// 'capability' => 'edit_theme_options',
|
674 |
+
// ));
|
675 |
+
//
|
676 |
+
// $wp_customize->add_control( 'login_head_font_size', array(
|
677 |
+
// 'label' => __( 'Text Font Size:', 'loginpress' ),
|
678 |
+
// 'section' => 'section_head',
|
679 |
+
// 'priority' => 20,
|
680 |
+
// 'settings' => 'loginpress_customization[login_head_font_size]',
|
681 |
+
// ));
|
682 |
+
//
|
683 |
+
// $wp_customize->add_setting( 'loginpress_customization[login_head_bg_color]', array(
|
684 |
+
// // 'default' => '#17a8e3',
|
685 |
+
// 'type' => 'option',
|
686 |
+
// 'capability' => 'edit_theme_options',
|
687 |
+
// ));
|
688 |
+
//
|
689 |
+
// $wp_customize->add_control(
|
690 |
+
// new WP_Customize_Color_Control(
|
691 |
+
// $wp_customize,
|
692 |
+
// 'login_head_bg_color',
|
693 |
+
// array(
|
694 |
+
// 'label' => __( 'Header Background Color:', 'loginpress' ),
|
695 |
+
// 'section' => 'section_head',
|
696 |
+
// 'priority' => 25,
|
697 |
+
// 'settings' => 'loginpress_customization[login_head_bg_color]'
|
698 |
+
// )));
|
699 |
+
|
700 |
+
// =============================
|
701 |
+
// = Custom Header Login menu =
|
702 |
+
// =============================
|
703 |
+
// $menuVals = array();
|
704 |
+
// $menus = get_registered_nav_menus();
|
705 |
+
//
|
706 |
+
// foreach ( $menus as $location => $name ) {
|
707 |
+
// $menuVals[$location] = $name ;
|
708 |
+
// }
|
709 |
+
// $wp_customize->add_section(
|
710 |
+
// 'customize_menu_section',
|
711 |
+
// array(
|
712 |
+
// 'title' => __( 'Login Page Menus', 'loginpress' ),
|
713 |
+
// 'description' => '',
|
714 |
+
// 'priority' => 32,
|
715 |
+
// 'panel' => 'loginpress_panel',
|
716 |
+
// ));
|
717 |
+
//
|
718 |
+
// $wp_customize->add_setting('loginpress_customization[header_login_menu]', array(
|
719 |
+
// 'capability' => 'edit_theme_options',
|
720 |
+
// 'type' => 'option',
|
721 |
+
// ));
|
722 |
+
//
|
723 |
+
// $wp_customize->add_control('header_login_menu', array(
|
724 |
+
// 'settings' => 'loginpress_customization[header_login_menu]',
|
725 |
+
// 'label' => __( 'Display Header Menu?', 'loginpress'),
|
726 |
+
// 'section' => 'customize_menu_section',
|
727 |
+
// 'priority' => 5,
|
728 |
+
// 'type' => 'checkbox',
|
729 |
+
// ));
|
730 |
+
//
|
731 |
+
// $wp_customize->add_setting('loginpress_customization[customize_login_menu]', array(
|
732 |
+
// 'capability' => 'edit_theme_options',
|
733 |
+
// 'type' => 'option',
|
734 |
+
//
|
735 |
+
// ));
|
736 |
+
// $wp_customize->add_control( 'customize_login_menu', array(
|
737 |
+
// 'settings' => 'loginpress_customization[customize_login_menu]',
|
738 |
+
// 'label' => __( 'Select Menu for Header:', 'loginpress' ),
|
739 |
+
// 'section' => 'customize_menu_section',
|
740 |
+
// 'type' => 'select',
|
741 |
+
// 'priority' => 10,
|
742 |
+
// 'choices' => $menuVals,
|
743 |
+
// ));
|
744 |
+
//
|
745 |
+
// $wp_customize->add_setting('loginpress_customization[footer_login_menu]', array(
|
746 |
+
// 'capability' => 'edit_theme_options',
|
747 |
+
// 'type' => 'option',
|
748 |
+
// ));
|
749 |
+
//
|
750 |
+
// $wp_customize->add_control('footer_login_menu', array(
|
751 |
+
// 'settings' => 'loginpress_customization[footer_login_menu]',
|
752 |
+
// 'label' => __( 'Display Footer Menu?', 'loginpress' ),
|
753 |
+
// 'section' => 'customize_menu_section',
|
754 |
+
// 'priority' => 15,
|
755 |
+
// 'type' => 'checkbox',
|
756 |
+
// ));
|
757 |
+
//
|
758 |
+
// $wp_customize->add_setting('loginpress_customization[customize_login_footer_menu]', array(
|
759 |
+
// 'capability' => 'edit_theme_options',
|
760 |
+
// 'type' => 'option',
|
761 |
+
//
|
762 |
+
// ));
|
763 |
+
// $wp_customize->add_control( 'customize_login_footer_menu', array(
|
764 |
+
// 'settings' => 'loginpress_customization[customize_login_footer_menu]',
|
765 |
+
// 'label' => __( 'Select Menu:', 'loginpress' ),
|
766 |
+
// 'section' => 'customize_menu_section',
|
767 |
+
// 'priority' => 20,
|
768 |
+
// 'type' => 'select',
|
769 |
+
// 'choices' => $menuVals,
|
770 |
+
// ));
|
771 |
+
|
772 |
+
// =============================
|
773 |
+
// = Section for Form Footer =
|
774 |
+
// =============================
|
775 |
+
$wp_customize->add_section(
|
776 |
+
'section_fotter',
|
777 |
+
array(
|
778 |
+
'title' => __( 'Form Footer', 'loginpress' ),
|
779 |
+
'description' => '',
|
780 |
+
'priority' => 40,
|
781 |
+
'panel' => 'loginpress_panel',
|
782 |
+
));
|
783 |
+
|
784 |
+
$wp_customize->add_setting( 'loginpress_customization[login_footer_text]', array(
|
785 |
+
'default' => 'Lost your password?',
|
786 |
+
'type' => 'option',
|
787 |
+
'capability' => 'manage_options',
|
788 |
+
'transport' => 'postMessage'
|
789 |
+
));
|
790 |
+
|
791 |
+
$wp_customize->add_control( 'login_footer_text', array(
|
792 |
+
'label' => __( 'Lost Password Text', 'loginpress' ),
|
793 |
+
'section' => 'section_fotter',
|
794 |
+
'priority' => 5,
|
795 |
+
'settings' => 'loginpress_customization[login_footer_text]',
|
796 |
+
));
|
797 |
+
|
798 |
+
$wp_customize->add_setting( 'loginpress_customization[footer_display_text]', array(
|
799 |
+
'default' => 'block',
|
800 |
+
'type' => 'option',
|
801 |
+
'capability' => 'manage_options',
|
802 |
+
'transport' => 'postMessage'
|
803 |
+
));
|
804 |
+
|
805 |
+
$wp_customize->add_control( 'footer_display_text', array(
|
806 |
+
'label' => __( 'Footer Text Display:', 'loginpress' ),
|
807 |
+
'section' => 'section_fotter',
|
808 |
+
'priority' => 10,
|
809 |
+
'settings' => 'loginpress_customization[footer_display_text]',
|
810 |
+
'type' => 'radio',
|
811 |
+
'choices' => array(
|
812 |
+
'block' => 'show',
|
813 |
+
'none' => 'hide',
|
814 |
+
),
|
815 |
+
));
|
816 |
+
|
817 |
+
$wp_customize->add_setting( 'loginpress_customization[login_footer_text_decoration]', array(
|
818 |
+
'default' => 'none',
|
819 |
+
'type' => 'option',
|
820 |
+
'capability' => 'manage_options',
|
821 |
+
'transport' => 'postMessage'
|
822 |
+
|
823 |
+
));
|
824 |
+
$wp_customize->add_control( 'login_footer_text_decoration', array(
|
825 |
+
'settings' => 'loginpress_customization[login_footer_text_decoration]',
|
826 |
+
'label' => 'Select Text Decoration:',
|
827 |
+
'section' => 'section_fotter',
|
828 |
+
'priority' => 15,
|
829 |
+
'type' => 'select',
|
830 |
+
'choices' => array(
|
831 |
+
'none' => 'none',
|
832 |
+
'overline' => 'overline',
|
833 |
+
'line-through' => 'line-through',
|
834 |
+
'underline' => 'underline',
|
835 |
+
),
|
836 |
+
));
|
837 |
+
|
838 |
+
$wp_customize->add_setting( 'loginpress_customization[login_footer_color]', array(
|
839 |
+
// 'default' => '#17a8e3',
|
840 |
+
'type' => 'option',
|
841 |
+
'capability' => 'manage_options',
|
842 |
+
'transport' => 'postMessage'
|
843 |
+
));
|
844 |
+
|
845 |
+
$wp_customize->add_control(
|
846 |
+
new WP_Customize_Color_Control(
|
847 |
+
$wp_customize,
|
848 |
+
'login_footer_color',
|
849 |
+
array(
|
850 |
+
'label' => __( 'Footer Text Color:', 'loginpress' ),
|
851 |
+
'section' => 'section_fotter',
|
852 |
+
'priority' => 20,
|
853 |
+
'settings' => 'loginpress_customization[login_footer_color]'
|
854 |
+
)));
|
855 |
+
|
856 |
+
$wp_customize->add_setting( 'loginpress_customization[login_footer_color_hover]', array(
|
857 |
+
// 'default' => '#17a8e3',
|
858 |
+
'type' => 'option',
|
859 |
+
'capability' => 'manage_options',
|
860 |
+
'transport' => 'postMessage'
|
861 |
+
));
|
862 |
+
|
863 |
+
$wp_customize->add_control(
|
864 |
+
new WP_Customize_Color_Control(
|
865 |
+
$wp_customize,
|
866 |
+
'login_footer_color_hover',
|
867 |
+
array(
|
868 |
+
'label' => __( 'Footer Text Hover Color:', 'loginpress' ),
|
869 |
+
'section' => 'section_fotter',
|
870 |
+
'priority' => 25,
|
871 |
+
'settings' => 'loginpress_customization[login_footer_color_hover]'
|
872 |
+
)));
|
873 |
+
|
874 |
+
$wp_customize->add_setting( 'loginpress_customization[login_footer_font_size]', array(
|
875 |
+
'default' => '13px',
|
876 |
+
'type' => 'option',
|
877 |
+
'capability' => 'manage_options',
|
878 |
+
'transport' => 'postMessage'
|
879 |
+
));
|
880 |
+
|
881 |
+
$wp_customize->add_control( 'login_footer_font_size', array(
|
882 |
+
'label' => __( 'Text Font Size:', 'loginpress' ),
|
883 |
+
'section' => 'section_fotter',
|
884 |
+
'priority' => 30,
|
885 |
+
'settings' => 'loginpress_customization[login_footer_font_size]',
|
886 |
+
));
|
887 |
+
|
888 |
+
$wp_customize->add_setting( 'loginpress_customization[login_footer_bg_color]', array(
|
889 |
+
// 'default' => '#17a8e3',
|
890 |
+
'type' => 'option',
|
891 |
+
'capability' => 'manage_options',
|
892 |
+
'transport' => 'postMessage'
|
893 |
+
));
|
894 |
+
|
895 |
+
$wp_customize->add_control(
|
896 |
+
new WP_Customize_Color_Control(
|
897 |
+
$wp_customize,
|
898 |
+
'login_footer_bg_color',
|
899 |
+
array(
|
900 |
+
'label' => __( 'Footer Background Color:', 'loginpress' ),
|
901 |
+
'section' => 'section_fotter',
|
902 |
+
'priority' => 35,
|
903 |
+
'settings' => 'loginpress_customization[login_footer_bg_color]'
|
904 |
+
)));
|
905 |
+
// Fields for Back Link
|
906 |
+
// $wp_customize->add_setting( 'login_back_text', array(
|
907 |
+
// 'default' => 'Lost your password?',
|
908 |
+
// 'type' => 'option',
|
909 |
+
// 'capability' => 'edit_theme_options',
|
910 |
+
// ));
|
911 |
+
|
912 |
+
// $wp_customize->add_control( 'login_back_text', array(
|
913 |
+
// 'label' => __( 'Lost Password Text', 'loginpress' ),
|
914 |
+
// 'section' => 'section_fotter',
|
915 |
+
// 'priority' => 40,
|
916 |
+
// 'settings' => 'login_back_text',
|
917 |
+
// ));
|
918 |
+
|
919 |
+
$wp_customize->add_setting( 'loginpress_customization[back_display_text]', array(
|
920 |
+
'default' => 'block',
|
921 |
+
'type' => 'option',
|
922 |
+
'capability' => 'manage_options',
|
923 |
+
'transport' => 'postMessage'
|
924 |
+
));
|
925 |
+
|
926 |
+
$wp_customize->add_control( 'back_display_text', array(
|
927 |
+
'label' => __( '"Back to" Text Display:', 'loginpress' ),
|
928 |
+
'section' => 'section_fotter',
|
929 |
+
'priority' => 45,
|
930 |
+
'settings' => 'loginpress_customization[back_display_text]',
|
931 |
+
'type' => 'radio',
|
932 |
+
'choices' => array(
|
933 |
+
'block' => 'show',
|
934 |
+
'none' => 'hide',
|
935 |
+
),
|
936 |
+
));
|
937 |
+
|
938 |
+
$wp_customize->add_setting( 'loginpress_customization[login_back_text_decoration]', array(
|
939 |
+
'default' => 'none',
|
940 |
+
'type' => 'option',
|
941 |
+
'capability' => 'manage_options',
|
942 |
+
'transport' => 'postMessage'
|
943 |
+
|
944 |
+
));
|
945 |
+
$wp_customize->add_control( 'login_back_text_decoration', array(
|
946 |
+
'settings' => 'loginpress_customization[login_back_text_decoration]',
|
947 |
+
'label' => __( '"Back to" Text Decoration:', 'loginpress' ),
|
948 |
+
'section' => 'section_fotter',
|
949 |
+
'priority' => 50,
|
950 |
+
'type' => 'select',
|
951 |
+
'choices' => array(
|
952 |
+
'none' => 'none',
|
953 |
+
'overline' => 'overline',
|
954 |
+
'line-through' => 'line-through',
|
955 |
+
'underline' => 'underline',
|
956 |
+
),
|
957 |
+
));
|
958 |
+
|
959 |
+
$wp_customize->add_setting( 'loginpress_customization[login_back_color]', array(
|
960 |
+
// 'default' => '#17a8e3',
|
961 |
+
'type' => 'option',
|
962 |
+
'capability' => 'manage_options',
|
963 |
+
'transport' => 'postMessage'
|
964 |
+
));
|
965 |
+
|
966 |
+
$wp_customize->add_control(
|
967 |
+
new WP_Customize_Color_Control(
|
968 |
+
$wp_customize,
|
969 |
+
'login_back_color',
|
970 |
+
array(
|
971 |
+
'label' => __( '"Back to" Text Color:', 'loginpress' ),
|
972 |
+
'section' => 'section_fotter',
|
973 |
+
'priority' => 55,
|
974 |
+
'settings' => 'loginpress_customization[login_back_color]'
|
975 |
+
)));
|
976 |
+
|
977 |
+
$wp_customize->add_setting( 'loginpress_customization[login_back_color_hover]', array(
|
978 |
+
// 'default' => '#17a8e3',
|
979 |
+
'type' => 'option',
|
980 |
+
'capability' => 'manage_options',
|
981 |
+
'transport' => 'postMessage'
|
982 |
+
));
|
983 |
+
|
984 |
+
$wp_customize->add_control(
|
985 |
+
new WP_Customize_Color_Control(
|
986 |
+
$wp_customize,
|
987 |
+
'login_back_color_hover',
|
988 |
+
array(
|
989 |
+
'label' => __( '"Back to" Text Hover Color:', 'loginpress' ),
|
990 |
+
'section' => 'section_fotter',
|
991 |
+
'priority' => 60,
|
992 |
+
'settings' => 'loginpress_customization[login_back_color_hover]'
|
993 |
+
)));
|
994 |
+
|
995 |
+
$wp_customize->add_setting( 'loginpress_customization[login_back_font_size]', array(
|
996 |
+
'default' => '13px;',
|
997 |
+
'type' => 'option',
|
998 |
+
'capability' => 'manage_options',
|
999 |
+
'transport' => 'postMessage'
|
1000 |
+
));
|
1001 |
+
|
1002 |
+
$wp_customize->add_control( 'login_back_font_size', array(
|
1003 |
+
'label' => __( '"Back to" Text Font Size:', 'loginpress' ),
|
1004 |
+
'section' => 'section_fotter',
|
1005 |
+
'priority' => 65,
|
1006 |
+
'settings' => 'loginpress_customization[login_back_font_size]',
|
1007 |
+
));
|
1008 |
+
|
1009 |
+
$wp_customize->add_setting( 'loginpress_customization[login_back_bg_color]', array(
|
1010 |
+
// 'default' => '#17a8e3',
|
1011 |
+
'type' => 'option',
|
1012 |
+
'capability' => 'manage_options',
|
1013 |
+
'transport' => 'postMessage'
|
1014 |
+
));
|
1015 |
+
|
1016 |
+
$wp_customize->add_control(
|
1017 |
+
new WP_Customize_Color_Control(
|
1018 |
+
$wp_customize,
|
1019 |
+
'login_back_bg_color',
|
1020 |
+
array(
|
1021 |
+
'label' => __( 'Footer Background Color:', 'loginpress' ),
|
1022 |
+
'section' => 'section_fotter',
|
1023 |
+
'priority' => 70,
|
1024 |
+
'settings' => 'loginpress_customization[login_back_bg_color]'
|
1025 |
+
)));
|
1026 |
+
|
1027 |
+
$wp_customize->add_setting( 'loginpress_customization[login_footer_copy_right]', array(
|
1028 |
+
'default' => '© 2017 WPBrigade, All Rights Reserved.',
|
1029 |
+
'type' => 'option',
|
1030 |
+
'capability' => 'manage_options',
|
1031 |
+
'transport' => 'postMessage'
|
1032 |
+
));
|
1033 |
+
|
1034 |
+
$wp_customize->add_control( 'login_footer_copy_right', array(
|
1035 |
+
'label' => __( 'Copyright Note:', 'loginpress' ),
|
1036 |
+
'type' => 'textarea',
|
1037 |
+
'section' => 'section_fotter',
|
1038 |
+
'priority' => 75,
|
1039 |
+
'settings' => 'loginpress_customization[login_footer_copy_right]'
|
1040 |
+
));
|
1041 |
+
|
1042 |
+
// =============================
|
1043 |
+
// = Section for Custom CSS =
|
1044 |
+
// =============================
|
1045 |
+
$wp_customize->add_section(
|
1046 |
+
'section_css',
|
1047 |
+
array(
|
1048 |
+
'title' => __( 'Custom CSS', 'loginpress' ),
|
1049 |
+
'description' => '',
|
1050 |
+
'priority' => 50,
|
1051 |
+
'panel' => 'loginpress_panel',
|
1052 |
+
));
|
1053 |
+
|
1054 |
+
$wp_customize->add_setting( 'loginpress_customization[loginpress_custom_css]', array(
|
1055 |
+
'type' => 'option',
|
1056 |
+
'capability' => 'manage_options',
|
1057 |
+
'transport' => 'postMessage'
|
1058 |
+
));
|
1059 |
+
|
1060 |
+
$wp_customize->add_control( 'loginpress_custom_css', array(
|
1061 |
+
'label' => __( 'Customize CSS', 'loginpress' ),
|
1062 |
+
'type' => 'textarea',
|
1063 |
+
'section' => 'section_css',
|
1064 |
+
'priority' => 5,
|
1065 |
+
'settings' => 'loginpress_customization[loginpress_custom_css]'
|
1066 |
+
));
|
1067 |
+
|
1068 |
+
// =============================
|
1069 |
+
// = Section for Custom JS =
|
1070 |
+
// =============================
|
1071 |
+
$wp_customize->add_section(
|
1072 |
+
'section_js',
|
1073 |
+
array(
|
1074 |
+
'title' => __( 'Custom JS', 'loginpress' ),
|
1075 |
+
'description' => '',
|
1076 |
+
'priority' => 55,
|
1077 |
+
'panel' => 'loginpress_panel',
|
1078 |
+
));
|
1079 |
+
|
1080 |
+
$wp_customize->add_setting( 'loginpress_customization[loginpress_custom_js]', array(
|
1081 |
+
'type' => 'option',
|
1082 |
+
'capability' => 'manage_options',
|
1083 |
+
'transport' => 'postMessage'
|
1084 |
+
));
|
1085 |
+
|
1086 |
+
$wp_customize->add_control( 'loginpress_custom_js', array(
|
1087 |
+
'label' => __( 'Customize JS', 'loginpress' ),
|
1088 |
+
'type' => 'textarea',
|
1089 |
+
'section' => 'section_js',
|
1090 |
+
'priority' => 5,
|
1091 |
+
'settings' => 'loginpress_customization[loginpress_custom_js]'
|
1092 |
+
));
|
1093 |
+
|
1094 |
+
|
1095 |
+
// Resets Panel
|
1096 |
+
// $wp_customize->add_section( 'reset_loginpress', array(
|
1097 |
+
// 'title' => __( 'Reset All Settings', 'loginpress' ),
|
1098 |
+
// 'description' => '',
|
1099 |
+
// 'priority' => 60,
|
1100 |
+
// 'panel' => 'loginpress_panel',
|
1101 |
+
// ) );
|
1102 |
+
//
|
1103 |
+
// $wp_customize->add_setting( 'reset_loginpress', array(
|
1104 |
+
// 'type' => 'option',
|
1105 |
+
// 'capability' => 'manage_options',
|
1106 |
+
// ) );
|
1107 |
+
//
|
1108 |
+
// $wp_customize->add_control( 'reset_loginpress', array(
|
1109 |
+
// 'label' => __( 'Reset All Settings', 'loginpress' ),
|
1110 |
+
// 'type' => 'checkbox',
|
1111 |
+
// 'section' => 'reset_loginpress',
|
1112 |
+
// 'priority' => 5,
|
1113 |
+
// 'settings' => 'reset_loginpress'
|
1114 |
+
// ) );
|
1115 |
+
}
|
1116 |
+
|
1117 |
+
/**
|
1118 |
+
* Manage the Login Footer Links
|
1119 |
+
*
|
1120 |
+
* @since 1.0.0
|
1121 |
+
* * * * * * * * * * * * * * * */
|
1122 |
+
public function login_page_custom_footer() {
|
1123 |
+
|
1124 |
+
if ( $this->loginpress_key ) {
|
1125 |
+
|
1126 |
+
// echo '</div></div>';
|
1127 |
+
echo '<div class="footer-wrapper">';
|
1128 |
+
echo '<div class="footer-cont">';
|
1129 |
+
|
1130 |
+
// if ( array_key_exists( 'footer_login_menu', $this->loginpress_key ) && checked( $this->loginpress_key['footer_login_menu'], true, false ) ) {
|
1131 |
+
//
|
1132 |
+
// wp_nav_menu( array(
|
1133 |
+
// 'theme_location' => $this->loginpress_key['customize_login_footer_menu'],
|
1134 |
+
// 'container' => false,
|
1135 |
+
// 'menu_class' => 'loginFooterMenu',
|
1136 |
+
// 'echo' => true,
|
1137 |
+
// )
|
1138 |
+
// );
|
1139 |
+
//
|
1140 |
+
// }
|
1141 |
+
|
1142 |
+
if ( array_key_exists( 'login_footer_copy_right', $this->loginpress_key ) && !empty( $this->loginpress_key['login_footer_copy_right'] ) ) {
|
1143 |
+
|
1144 |
+
echo '<div class="copyRight">'.$this->loginpress_key['login_footer_copy_right'].'</div>';
|
1145 |
+
}
|
1146 |
+
|
1147 |
+
echo '</div></div>';
|
1148 |
+
}
|
1149 |
+
}
|
1150 |
+
|
1151 |
+
/**
|
1152 |
+
* Manage the Login Head
|
1153 |
+
*
|
1154 |
+
* @since 1.0.0
|
1155 |
+
* * * * * * * * * * * */
|
1156 |
+
public function login_page_custom_head() {
|
1157 |
+
|
1158 |
+
// Include CSS File in heared.
|
1159 |
+
include( plugin_dir_path( __FILE__ ) . 'css/style-presets.php' );
|
1160 |
+
include( plugin_dir_path( __FILE__ ) . 'css/style-login.php' );
|
1161 |
+
|
1162 |
+
|
1163 |
+
if ( $this->loginpress_key && array_key_exists( 'header_login_menu', $this->loginpress_key ) ) {
|
1164 |
+
|
1165 |
+
// echo '<div class="header-wrapper">';
|
1166 |
+
// echo '<div class="header-cell">';
|
1167 |
+
// if ( array_key_exists( 'header_login_menu', $this->loginpress_key ) && checked( $this->loginpress_key['header_login_menu'], true, false ) ) {
|
1168 |
+
//
|
1169 |
+
// wp_nav_menu( array(
|
1170 |
+
// 'theme_location' => $this->loginpress_key['customize_login_menu'],
|
1171 |
+
// 'container' => false,
|
1172 |
+
// 'menu_class' => 'loginHeaderMenu',
|
1173 |
+
// 'echo' => true,
|
1174 |
+
// )
|
1175 |
+
// );
|
1176 |
+
// }
|
1177 |
+
// echo '</div></div><div class="login-wrapper"><div class="login-cell">';
|
1178 |
+
}
|
1179 |
+
}
|
1180 |
+
/**
|
1181 |
+
* Set Redirect Path of Logo
|
1182 |
+
*
|
1183 |
+
* @since 1.0.0
|
1184 |
+
* @return mixed
|
1185 |
+
* * * * * * * * * * * * * */
|
1186 |
+
public function login_page_logo_url() {
|
1187 |
+
|
1188 |
+
if ( $this->loginpress_key && array_key_exists( 'customize_logo_hover', $this->loginpress_key ) ) {
|
1189 |
+
return $this->loginpress_key["customize_logo_hover"];
|
1190 |
+
} else {
|
1191 |
+
return home_url();
|
1192 |
+
}
|
1193 |
+
}
|
1194 |
+
|
1195 |
+
/**
|
1196 |
+
* Set hover Title of Logo
|
1197 |
+
*
|
1198 |
+
* @since 1.0.0
|
1199 |
+
* @return mixed
|
1200 |
+
* * * * * * * * * * * * */
|
1201 |
+
public function login_page_logo_title() {
|
1202 |
+
if ( $this->loginpress_key && array_key_exists( 'customize_logo_hover_title', $this->loginpress_key ) ) {
|
1203 |
+
return $this->loginpress_key["customize_logo_hover_title"];
|
1204 |
+
} else {
|
1205 |
+
return home_url();
|
1206 |
+
}
|
1207 |
+
}
|
1208 |
+
|
1209 |
+
/**
|
1210 |
+
* Set Errors Messages to Show off
|
1211 |
+
*
|
1212 |
+
* @param $error
|
1213 |
+
* @since 1.0.0
|
1214 |
+
* @return string
|
1215 |
+
* * * * * * * * * * * * * * * * */
|
1216 |
+
public function login_error_messages($error) {
|
1217 |
+
|
1218 |
+
global $errors;
|
1219 |
+
$error_codes = $errors->get_error_codes();
|
1220 |
+
if ( $this->loginpress_key ) {
|
1221 |
+
|
1222 |
+
$invalid_usrname = array_key_exists( 'incorrect_username', $this->loginpress_key ) ? $this->loginpress_key['incorrect_username']: esc_html__( 'Invalid Username', 'loginpress' );
|
1223 |
+
|
1224 |
+
$invalid_pasword = array_key_exists( 'incorrect_password', $this->loginpress_key ) ? $this->loginpress_key['incorrect_password']: esc_html__( 'Invalid Password', 'loginpress' );
|
1225 |
+
|
1226 |
+
$empty_username = array_key_exists( 'empty_username', $this->loginpress_key ) ? $this->loginpress_key['empty_username']: esc_html__( 'Empty Username', 'loginpress' );
|
1227 |
+
|
1228 |
+
$empty_password = array_key_exists( 'empty_password', $this->loginpress_key ) ? $this->loginpress_key['empty_password']: esc_html__( 'Empty Password', 'loginpress' );
|
1229 |
+
|
1230 |
+
$invalid_email = array_key_exists( 'invalid_email', $this->loginpress_key ) ? $this->loginpress_key['invalid_email']: esc_html__( 'The email address is incorrect.', 'loginpress' );
|
1231 |
+
|
1232 |
+
$empty_email = array_key_exists( 'empty_email', $this->loginpress_key ) ? $this->loginpress_key['empty_email']: esc_html__( 'The email address is empty.', 'loginpress' );
|
1233 |
+
|
1234 |
+
$invalidcombo = array_key_exists( 'invalidcombo_message', $this->loginpress_key ) ? $this->loginpress_key['invalidcombo_message']: esc_html__( 'Invalid Username or Email.', 'loginpress' );
|
1235 |
+
|
1236 |
+
if ( in_array( 'invalid_username', $error_codes ) ) {
|
1237 |
+
return $invalid_usrname;
|
1238 |
+
}
|
1239 |
+
|
1240 |
+
if ( in_array( 'incorrect_password', $error_codes ) ) {
|
1241 |
+
return $invalid_pasword;
|
1242 |
+
}
|
1243 |
+
|
1244 |
+
if ( in_array( 'empty_username', $error_codes ) ) {
|
1245 |
+
return $empty_username;
|
1246 |
+
}
|
1247 |
+
|
1248 |
+
if ( in_array( 'empty_password', $error_codes ) ) {
|
1249 |
+
return $empty_password;
|
1250 |
+
}
|
1251 |
+
|
1252 |
+
// registeration Form enteries
|
1253 |
+
if ( in_array( 'invalid_email', $error_codes ) ) {
|
1254 |
+
return $invalid_email;
|
1255 |
+
}
|
1256 |
+
|
1257 |
+
if ( in_array( 'empty_email', $error_codes ) ) {
|
1258 |
+
return "</br>" . $empty_email;
|
1259 |
+
}
|
1260 |
+
|
1261 |
+
//forget password entery
|
1262 |
+
if ( in_array( 'invalidcombo', $error_codes ) ) {
|
1263 |
+
return $invalidcombo;
|
1264 |
+
}
|
1265 |
+
}
|
1266 |
+
|
1267 |
+
return $error;
|
1268 |
+
}
|
1269 |
+
|
1270 |
+
/**
|
1271 |
+
* Change Lost Password Text from Form
|
1272 |
+
*
|
1273 |
+
* @param $text
|
1274 |
+
* @since 1.0.0
|
1275 |
+
* @return mixed
|
1276 |
+
* * * * * * * * * * * * * * * * * * */
|
1277 |
+
public function change_lostpassword_message ( $text ) {
|
1278 |
+
$savedText = '';
|
1279 |
+
if ( $this->loginpress_key && array_key_exists( 'login_footer_text', $this->loginpress_key ) ) {
|
1280 |
+
|
1281 |
+
$savedText = $this->loginpress_key['login_footer_text'];
|
1282 |
+
}
|
1283 |
+
|
1284 |
+
if ( $text == 'Lost your password?' || $text == $savedText ) {
|
1285 |
+
|
1286 |
+
if ( $this->loginpress_key && array_key_exists( 'login_footer_text', $this->loginpress_key ) ) {
|
1287 |
+
|
1288 |
+
$text = $savedText; //$this->loginpress_key['login_footer_text'];
|
1289 |
+
}
|
1290 |
+
|
1291 |
+
}
|
1292 |
+
|
1293 |
+
return $text;
|
1294 |
+
|
1295 |
+
}
|
1296 |
+
|
1297 |
+
/**
|
1298 |
+
* Manage Welcome Messages
|
1299 |
+
*
|
1300 |
+
* @param $message
|
1301 |
+
* @since 1.0.0
|
1302 |
+
* @return string
|
1303 |
+
* * * * * * * * * * * * */
|
1304 |
+
public function change_welcome_message ($message) {
|
1305 |
+
if ( $this->loginpress_key ) {
|
1306 |
+
|
1307 |
+
//Check, User Logedout.
|
1308 |
+
if ( isset($_GET['loggedout']) && TRUE == $_GET['loggedout'] ) {
|
1309 |
+
|
1310 |
+
if ( array_key_exists( 'logout_message', $this->loginpress_key ) ) {
|
1311 |
+
|
1312 |
+
$message = $this->loginpress_key['logout_message'];
|
1313 |
+
}
|
1314 |
+
}
|
1315 |
+
|
1316 |
+
//Logged In messages.
|
1317 |
+
else if ( strpos( $message,"Please enter your username or email address. You will receive a link to create a new password via email." ) == true ) {
|
1318 |
+
|
1319 |
+
if ( array_key_exists( 'lostpwd_welcome_message', $this->loginpress_key ) ) {
|
1320 |
+
|
1321 |
+
$message = $this->loginpress_key['lostpwd_welcome_message'];
|
1322 |
+
}
|
1323 |
+
}
|
1324 |
+
|
1325 |
+
else if( strpos( $message,"Register For This Site" ) == true ) {
|
1326 |
+
|
1327 |
+
if ( array_key_exists( 'register_welcome_message', $this->loginpress_key ) ) {
|
1328 |
+
|
1329 |
+
$message = $this->loginpress_key['register_welcome_message'];
|
1330 |
+
}
|
1331 |
+
}
|
1332 |
+
|
1333 |
+
else {
|
1334 |
+
if ( array_key_exists( 'welcome_message', $this->loginpress_key ) ) {
|
1335 |
+
|
1336 |
+
$message = $this->loginpress_key['welcome_message'];
|
1337 |
+
}
|
1338 |
+
}
|
1339 |
+
|
1340 |
+
return !empty($message) ? "<p class='custom-message'>" . $message. "</p>" : '';
|
1341 |
+
}
|
1342 |
+
}
|
1343 |
+
|
1344 |
+
/**
|
1345 |
+
* Hook to Redirect Page for Customize
|
1346 |
+
*
|
1347 |
+
* @since 1.0.0
|
1348 |
+
* * * * * * * * * * * * * * * * * * */
|
1349 |
+
public function redirect_to_custom_page() {
|
1350 |
+
if (!empty($_GET['page'])) {
|
1351 |
+
if(($_GET['page']== "abw")){
|
1352 |
+
wp_redirect(get_admin_url()."customize.php?url=".wp_login_url());
|
1353 |
+
}
|
1354 |
+
}
|
1355 |
+
}
|
1356 |
+
|
1357 |
+
/**
|
1358 |
+
* Redirect to the Admin Panel After Closing LoginPress Customizer
|
1359 |
+
*
|
1360 |
+
* @since 1.0.0
|
1361 |
+
* @return null
|
1362 |
+
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
1363 |
+
public function menu_url() {
|
1364 |
+
|
1365 |
+
global $submenu;
|
1366 |
+
|
1367 |
+
$parent = 'index.php';
|
1368 |
+
$page = 'abw';
|
1369 |
+
|
1370 |
+
// Create specific url for login view
|
1371 |
+
$login_url = wp_login_url();
|
1372 |
+
$url = add_query_arg(
|
1373 |
+
array(
|
1374 |
+
'url' => urlencode( $login_url ),
|
1375 |
+
'return' => admin_url( 'themes.php' ),
|
1376 |
+
),
|
1377 |
+
admin_url( 'customize.php' )
|
1378 |
+
);
|
1379 |
+
|
1380 |
+
// If is Not Design Menu, return
|
1381 |
+
if ( ! isset( $submenu[ $parent ] ) ) {
|
1382 |
+
return NULL;
|
1383 |
+
}
|
1384 |
+
|
1385 |
+
foreach ( $submenu[ $parent ] as $key => $value ) {
|
1386 |
+
// Set new URL for menu item
|
1387 |
+
if ( $page === $value[ 2 ] ) {
|
1388 |
+
$submenu[ $parent ][ $key ][ 2 ] = $url;
|
1389 |
+
break;
|
1390 |
+
}
|
1391 |
+
}
|
1392 |
+
}
|
1393 |
+
}
|
1394 |
+
|
1395 |
+
?>
|
img/back_arrow.png
ADDED
Binary file
|
img/bg2.jpg
ADDED
Binary file
|
img/thumbnail/default-1.png
ADDED
Binary file
|
img/thumbnail/default-2.png
ADDED
Binary file
|
img/thumbnail/default-3.png
ADDED
Binary file
|
img/thumbnail/default.png
ADDED
Binary file
|
js/customize-controls.js
ADDED
@@ -0,0 +1,509 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery( document ).ready( function() {
|
2 |
+
|
3 |
+
/* === Checkbox Multiple Control === */
|
4 |
+
|
5 |
+
jQuery( '.customize-control-checkbox-multiple input[type="radio"]' ).on(
|
6 |
+
'change',
|
7 |
+
function() {
|
8 |
+
|
9 |
+
checkbox_values = jQuery( this ).parents( '.customize-control' ).find( 'input[type="radio"]:checked' ).val();
|
10 |
+
|
11 |
+
style_values = jQuery( this ).parents( '.customize-control' ).find( 'input[type="radio"]:checked' ).data('style');
|
12 |
+
|
13 |
+
// console.log(style_values);
|
14 |
+
// console.log(checkbox_values);
|
15 |
+
var val = [];
|
16 |
+
val.push(checkbox_values);
|
17 |
+
val.push(style_values);
|
18 |
+
console.log(val);
|
19 |
+
jQuery( this ).parents( '.customize-control' ).find( 'input[type="hidden"]' ).val( checkbox_values ).delay(500).trigger( 'change' );
|
20 |
+
// jQuery( this ).parents( '.customize-control' ).find( 'input[type="hidden"]' ).trigger( 'change' );
|
21 |
+
|
22 |
+
}
|
23 |
+
);
|
24 |
+
|
25 |
+
} ); // jQuery( document ).ready
|
26 |
+
|
27 |
+
|
28 |
+
( function( $ ) {
|
29 |
+
|
30 |
+
// function for change LoginPress background-image in real time...
|
31 |
+
function loginpress_background_img( setting, target ) {
|
32 |
+
wp.customize( setting, function( value ) {
|
33 |
+
value.bind( function( loginPressVal ) {
|
34 |
+
if( loginPressVal == '' ) {
|
35 |
+
$('#customize-preview iframe').contents().find( target ).css( 'background-image', '' );
|
36 |
+
} else {
|
37 |
+
$('#customize-preview iframe').contents().find( target ).css( 'background-image', 'url(' + loginPressVal + ')' );
|
38 |
+
}
|
39 |
+
} );
|
40 |
+
} );
|
41 |
+
}
|
42 |
+
|
43 |
+
// function for change LoginPress CSS in real time...
|
44 |
+
function loginpress_css_property( setting, target, property ){
|
45 |
+
// Update the login logo width in real time...
|
46 |
+
wp.customize( setting, function( value ) {
|
47 |
+
value.bind( function( loginPressVal ) {
|
48 |
+
|
49 |
+
if( loginPressVal == '' ) {
|
50 |
+
$('#customize-preview iframe').contents().find( target ).css( property, '' );
|
51 |
+
} else {
|
52 |
+
$('#customize-preview iframe').contents().find( target ).css( property, loginPressVal );
|
53 |
+
}
|
54 |
+
} );
|
55 |
+
} );
|
56 |
+
}
|
57 |
+
// function for change LoginPress attribute in real time...
|
58 |
+
function loginpress_attr_property( setting, target, property ) {
|
59 |
+
wp.customize( setting, function( value ) {
|
60 |
+
value.bind( function( loginPressVal ) {
|
61 |
+
|
62 |
+
if( loginPressVal == '' ) {
|
63 |
+
$('#customize-preview iframe').contents().find( target ).attr( property, '' );
|
64 |
+
} else {
|
65 |
+
$('#customize-preview iframe').contents().find( target ).attr( property, loginPressVal );
|
66 |
+
}
|
67 |
+
} );
|
68 |
+
} );
|
69 |
+
}
|
70 |
+
// function for change LoginPress inout fiels in real time...
|
71 |
+
function loginpress_input_property( setting, property ) {
|
72 |
+
wp.customize( setting, function( value ) {
|
73 |
+
value.bind( function( loginPressVal ) {
|
74 |
+
if( loginPressVal == '' ) {
|
75 |
+
$('#customize-preview iframe').contents().find('.login input[type="text"]').css( property, '' );
|
76 |
+
$('#customize-preview iframe').contents().find('.login input[type="password"]').css( property, '' );
|
77 |
+
} else {
|
78 |
+
$('#customize-preview iframe').contents().find('.login input[type="text"]').css( property, loginPressVal );
|
79 |
+
$('#customize-preview iframe').contents().find('.login input[type="password"]').css( property, loginPressVal );
|
80 |
+
}
|
81 |
+
} );
|
82 |
+
} );
|
83 |
+
}
|
84 |
+
|
85 |
+
// function for change LoginPress error and welcome messages in real time...
|
86 |
+
function loginpress_text_message( errorlog, target ) {
|
87 |
+
wp.customize( errorlog, function( value ) {
|
88 |
+
value.bind( function( loginPressVal ) {
|
89 |
+
|
90 |
+
if( loginPressVal == '' ) {
|
91 |
+
$('#customize-preview iframe').contents().find( target ).text( '' );
|
92 |
+
} else {
|
93 |
+
$('#customize-preview iframe').contents().find( target ).text( loginPressVal );
|
94 |
+
}
|
95 |
+
} );
|
96 |
+
} );
|
97 |
+
}
|
98 |
+
|
99 |
+
|
100 |
+
// function for change LoginPress CSS in real time...
|
101 |
+
function loginpress_display_control( setting ){
|
102 |
+
// Update the login logo width in real time...
|
103 |
+
wp.customize( setting, function( value ) {
|
104 |
+
value.bind( function( loginPressVal ) {
|
105 |
+
|
106 |
+
// Control on footer text.
|
107 |
+
if ( 'loginpress_customization[footer_display_text]' == setting && 'none' == loginPressVal ) {
|
108 |
+
|
109 |
+
$('#customize-control-login_footer_text_decoration').css('display', 'none');
|
110 |
+
$('#customize-control-login_footer_color').css('display', 'none');
|
111 |
+
$('#customize-control-login_footer_color_hover').css('display', 'none');
|
112 |
+
$('#customize-control-login_footer_font_size').css('display', 'none');
|
113 |
+
$('#customize-control-login_footer_bg_color').css('display', 'none');
|
114 |
+
|
115 |
+
} else if ( 'loginpress_customization[footer_display_text]' == setting && 'block' == loginPressVal ) {
|
116 |
+
|
117 |
+
$('#customize-control-login_footer_text_decoration').css('display', 'list-item');
|
118 |
+
$('#customize-control-login_footer_color').css('display', 'list-item');
|
119 |
+
$('#customize-control-login_footer_color_hover').css('display', 'list-item');
|
120 |
+
$('#customize-control-login_footer_font_size').css('display', 'list-item');
|
121 |
+
$('#customize-control-login_footer_bg_color').css('display', 'list-item');
|
122 |
+
|
123 |
+
}
|
124 |
+
|
125 |
+
// Control on footer back link text.
|
126 |
+
if ( 'loginpress_customization[back_display_text]' == setting && 'none' == loginPressVal ) {
|
127 |
+
|
128 |
+
$('#customize-control-login_back_text_decoration').css('display', 'none');
|
129 |
+
$('#customize-control-login_back_color').css('display', 'none');
|
130 |
+
$('#customize-control-login_back_color_hover').css('display', 'none');
|
131 |
+
$('#customize-control-login_back_font_size').css('display', 'none');
|
132 |
+
$('#customize-control-login_back_bg_color').css('display', 'none');
|
133 |
+
|
134 |
+
} else if ( 'loginpress_customization[back_display_text]' == setting && 'block' == loginPressVal ) {
|
135 |
+
|
136 |
+
$('#customize-control-login_back_text_decoration').css('display', 'list-item');
|
137 |
+
$('#customize-control-login_back_color').css('display', 'list-item');
|
138 |
+
$('#customize-control-login_back_color_hover').css('display', 'list-item');
|
139 |
+
$('#customize-control-login_back_font_size').css('display', 'list-item');
|
140 |
+
$('#customize-control-login_back_bg_color').css('display', 'list-item');
|
141 |
+
|
142 |
+
}
|
143 |
+
} );
|
144 |
+
} );
|
145 |
+
}
|
146 |
+
|
147 |
+
// function for change LoginPress error and welcome messages in real time...
|
148 |
+
function loginpress_footer_text_message( errorlog, target ) {
|
149 |
+
wp.customize( errorlog, function( value ) {
|
150 |
+
value.bind( function( loginPressVal ) {
|
151 |
+
|
152 |
+
if( loginPressVal == '' ) {
|
153 |
+
$('#customize-preview iframe').contents().find( target ).text( '' );
|
154 |
+
if ( errorlog == 'loginpress_customization[login_footer_copy_right]') {
|
155 |
+
$('#customize-preview iframe').contents().find( target ).css( 'display', 'none' );
|
156 |
+
}
|
157 |
+
} else {
|
158 |
+
$('#customize-preview iframe').contents().find( target ).text( loginPressVal );
|
159 |
+
if ( errorlog == 'loginpress_customization[login_footer_copy_right]') {
|
160 |
+
$('#customize-preview iframe').contents().find( target ).css( 'display', 'block' );
|
161 |
+
}
|
162 |
+
}
|
163 |
+
} );
|
164 |
+
} );
|
165 |
+
}
|
166 |
+
|
167 |
+
// loginpress_display_control( 'loginpress_customization[footer_display_text]' );
|
168 |
+
// loginpress_display_control( 'loginpress_customization[back_display_text]' );
|
169 |
+
|
170 |
+
// Update the login logo in real time...
|
171 |
+
wp.customize( 'loginpress_customization[setting_logo]', function( value ) {
|
172 |
+
value.bind( function( loginPressVal ) {
|
173 |
+
|
174 |
+
if( loginPressVal == '' ) {
|
175 |
+
$('#customize-preview iframe').contents().find('#login h1 a').css( 'background-image', 'url(' + admin_url.template_url + '/images/wordpress-logo.svg)' );
|
176 |
+
} else {
|
177 |
+
$('#customize-preview iframe').contents().find('#login h1 a').css( 'background-image', 'url(' + loginPressVal + ')' );
|
178 |
+
}
|
179 |
+
} );
|
180 |
+
} );
|
181 |
+
|
182 |
+
loginpress_css_property( 'loginpress_customization[customize_logo_width]', '#login h1 a', 'width' );
|
183 |
+
loginpress_css_property( 'loginpress_customization[customize_logo_height]', '#login h1 a', 'height' );
|
184 |
+
loginpress_css_property( 'loginpress_customization[customize_logo_padding]', '#login h1 a', 'padding-bottom' );
|
185 |
+
|
186 |
+
loginpress_attr_property( 'loginpress_customization[customize_logo_hover]', '#login h1 a', 'href' );
|
187 |
+
loginpress_attr_property( 'loginpress_customization[customize_logo_hover_title]', '#login h1 a', 'title' );
|
188 |
+
|
189 |
+
loginpress_background_img( 'loginpress_customization[setting_background]', 'body.login' );
|
190 |
+
|
191 |
+
loginpress_css_property( 'loginpress_customization[setting_background_color]', 'body.login', 'background-color' );
|
192 |
+
loginpress_css_property( 'loginpress_customization[background_repeat_radio]', 'body.login', 'background-repeat' );
|
193 |
+
loginpress_css_property( 'loginpress_customization[background_image_size]', 'body.login', 'background-size' );
|
194 |
+
|
195 |
+
loginpress_background_img( 'loginpress_customization[setting_form_background]', '#loginform' );
|
196 |
+
|
197 |
+
loginpress_css_property( 'loginpress_customization[customize_form_width]', '#login', 'max-width' );
|
198 |
+
loginpress_css_property( 'loginpress_customization[customize_form_height]', '#loginform', 'min-height' );
|
199 |
+
loginpress_css_property( 'loginpress_customization[customize_form_padding]', '#loginform', 'padding' );
|
200 |
+
loginpress_css_property( 'loginpress_customization[customize_form_border]', '#loginform', 'border' );
|
201 |
+
|
202 |
+
loginpress_input_property( 'loginpress_customization[textfield_width]', 'width' );
|
203 |
+
loginpress_input_property( 'loginpress_customization[textfield_margin]', 'margin' );
|
204 |
+
loginpress_input_property( 'loginpress_customization[textfield_background_color]', 'background' );
|
205 |
+
loginpress_input_property( 'loginpress_customization[textfield_color]', 'color' );
|
206 |
+
|
207 |
+
|
208 |
+
loginpress_css_property( 'loginpress_customization[form_background_color]', '#loginform', 'background-color' );
|
209 |
+
|
210 |
+
loginpress_css_property( 'loginpress_customization[textfield_label_color]', '.login label', 'color' );
|
211 |
+
|
212 |
+
loginpress_background_img( 'loginpress_customization[forget_form_background]', '#lostpasswordform' );
|
213 |
+
loginpress_css_property( 'loginpress_customization[forget_form_background_color]','#lostpasswordform', 'background-color' );
|
214 |
+
|
215 |
+
//Buttons starts.
|
216 |
+
// Update the login form button background in real time...
|
217 |
+
var loginPressBtnClr;
|
218 |
+
var loginPressBtnHvr;
|
219 |
+
wp.customize( 'loginpress_customization[custom_button_color]', function( value ) {
|
220 |
+
value.bind( function( loginPressVal ) {
|
221 |
+
if( loginPressVal == '' ) {
|
222 |
+
$('#customize-preview iframe').contents().find('.wp-core-ui #login .button-primary').css('background', '');
|
223 |
+
$('#customize-preview iframe').contents().find('.wp-core-ui #login .button-primary').on('mouseover', function(){
|
224 |
+
|
225 |
+
if( typeof loginPressBtnHvr !== "undefined" || loginPressBtnHvr === null ){
|
226 |
+
$(this).css('background', loginPressBtnHvr);
|
227 |
+
}else{
|
228 |
+
$(this).css('background', '');
|
229 |
+
}
|
230 |
+
}).on('mouseleave',function () {
|
231 |
+
$(this).css('background', '');
|
232 |
+
});
|
233 |
+
} else {
|
234 |
+
$('#customize-preview iframe').contents().find('.wp-core-ui #login .button-primary').css( 'background', loginPressVal );
|
235 |
+
loginPressBtnClr = loginPressVal;
|
236 |
+
|
237 |
+
$('#customize-preview iframe').contents().find('.wp-core-ui #login .button-primary').on('mouseover', function(){
|
238 |
+
|
239 |
+
if( typeof loginPressBtnHvr !== "undefined" || loginPressBtnHvr === null ){
|
240 |
+
$(this).css('background', loginPressBtnHvr);
|
241 |
+
}else{
|
242 |
+
$(this).css('background', '');
|
243 |
+
}
|
244 |
+
}).on('mouseleave',function () {
|
245 |
+
$(this).css('background', loginPressVal);
|
246 |
+
});
|
247 |
+
}
|
248 |
+
} );
|
249 |
+
} );
|
250 |
+
|
251 |
+
var loginPressBtnBrdrClr;
|
252 |
+
// Update the login form button border-color in real time...
|
253 |
+
wp.customize( 'loginpress_customization[button_border_color]', function( value ) {
|
254 |
+
value.bind( function( loginPressVal ) {
|
255 |
+
if( loginPressVal == '' ) {
|
256 |
+
$('#customize-preview iframe').contents().find('.wp-core-ui #login .button-primary').css( 'border-color', '' );
|
257 |
+
} else {
|
258 |
+
$('#customize-preview iframe').contents().find('.wp-core-ui #login .button-primary').css( 'border-color', loginPressVal );
|
259 |
+
loginPressBtnBrdrClr = loginPressVal;
|
260 |
+
}
|
261 |
+
} );
|
262 |
+
} );
|
263 |
+
|
264 |
+
// Update the login form button border-color in real time...
|
265 |
+
wp.customize( 'loginpress_customization[button_hover_color]', function( value ) {
|
266 |
+
value.bind( function( loginPressVal ) {
|
267 |
+
if( loginPressVal == '' ) {
|
268 |
+
$('#customize-preview iframe').contents().find('.wp-core-ui #login .button-primary').css('background', '');
|
269 |
+
$('#customize-preview iframe').contents().find('.wp-core-ui #login .button-primary').on('mouseover', function(){
|
270 |
+
$(this).css('background', '');
|
271 |
+
}).on('mouseleave',function () {
|
272 |
+
|
273 |
+
if( typeof loginPressBtnClr !== "undefined" || loginPressBtnClr === null ){
|
274 |
+
$(this).css('background', loginPressBtnClr);
|
275 |
+
}else{
|
276 |
+
$(this).css('background', '');
|
277 |
+
}
|
278 |
+
});
|
279 |
+
} else {
|
280 |
+
|
281 |
+
loginPressBtnHvr = loginPressVal;
|
282 |
+
|
283 |
+
$('#customize-preview iframe').contents().find('.wp-core-ui #login .button-primary').on('mouseover', function(){
|
284 |
+
|
285 |
+
$(this).css('background', loginPressVal);
|
286 |
+
}).on('mouseleave',function () {
|
287 |
+
|
288 |
+
if( typeof loginPressBtnClr !== "undefined" || loginPressBtnClr === null ){
|
289 |
+
$(this).css('background', loginPressBtnClr);
|
290 |
+
}else{
|
291 |
+
$(this).css('background', '');
|
292 |
+
}
|
293 |
+
});
|
294 |
+
}
|
295 |
+
} );
|
296 |
+
} );
|
297 |
+
|
298 |
+
// Update the login form button border-color in real time...
|
299 |
+
wp.customize( 'loginpress_customization[button_hover_border]', function( value ) {
|
300 |
+
value.bind( function( loginPressVal ) {
|
301 |
+
if( loginPressVal == '' ) {
|
302 |
+
$('#customize-preview iframe').contents().find('.wp-core-ui #login .button-primary').css( 'border-color', '' );
|
303 |
+
} else {
|
304 |
+
$('#customize-preview iframe').contents().find('.wp-core-ui #login .button-primary').on('mouseover', function(){
|
305 |
+
$(this).css('border-color', loginPressVal);
|
306 |
+
}).on('mouseleave',function () {
|
307 |
+
|
308 |
+
if( typeof loginPressBtnBrdrClr !== "undefined" || loginPressBtnBrdrClr === null ){
|
309 |
+
$(this).css('border-color', loginPressBtnBrdrClr);
|
310 |
+
}else{
|
311 |
+
$(this).css('border-color', '');
|
312 |
+
}
|
313 |
+
});
|
314 |
+
}
|
315 |
+
} );
|
316 |
+
} );
|
317 |
+
|
318 |
+
// Update the login form button border-color in real time...
|
319 |
+
wp.customize( 'loginpress_customization[custom_button_shadow]', function( value ) {
|
320 |
+
value.bind( function( loginPressVal ) {
|
321 |
+
if( loginPressVal == '' ) {
|
322 |
+
$('#customize-preview iframe').contents().find('.wp-core-ui #login .button-primary').css( 'box-shadow', '' );
|
323 |
+
} else {
|
324 |
+
$('#customize-preview iframe').contents().find('.wp-core-ui #login .button-primary').css( 'box-shadow', loginPressVal );
|
325 |
+
}
|
326 |
+
} );
|
327 |
+
} );
|
328 |
+
|
329 |
+
// Update the login form button border-color in real time...
|
330 |
+
wp.customize( 'loginpress_customization[button_text_color]', function( value ) {
|
331 |
+
value.bind( function( loginPressVal ) {
|
332 |
+
if( loginPressVal == '' ) {
|
333 |
+
$('#customize-preview iframe').contents().find('.wp-core-ui #login .button-primary').css( 'color', '' );
|
334 |
+
} else {
|
335 |
+
$('#customize-preview iframe').contents().find('.wp-core-ui #login .button-primary').css( 'color', loginPressVal );
|
336 |
+
}
|
337 |
+
} );
|
338 |
+
} );
|
339 |
+
|
340 |
+
loginpress_text_message( 'loginpress_customization[login_footer_text]', '.login #nav a:nth-child(2)' );
|
341 |
+
|
342 |
+
loginpress_css_property( 'loginpress_customization[footer_display_text]', '.login #nav', 'display' );
|
343 |
+
loginpress_css_property( 'loginpress_customization[login_footer_text_decoration]', '.login #nav a', 'text-decoration' );
|
344 |
+
|
345 |
+
var loginPressFtrClr;
|
346 |
+
var loginPressFtrHvr;
|
347 |
+
// Update the login form button border-color in real time...
|
348 |
+
wp.customize( 'loginpress_customization[login_footer_color]', function( value ) {
|
349 |
+
value.bind( function( loginPressVal ) {
|
350 |
+
|
351 |
+
if( loginPressVal == '' ) {
|
352 |
+
$('#customize-preview iframe').contents().find('.login #nav a').css( 'color', '' );
|
353 |
+
$('#customize-preview iframe').contents().find('.login #nav a').on( 'mouseover', function(){
|
354 |
+
|
355 |
+
if( typeof loginPressFtrHvr !== "undefined" || loginPressFtrHvr === null ){
|
356 |
+
$(this).css('color', loginPressFtrHvr);
|
357 |
+
}else{
|
358 |
+
$(this).css('color', '');
|
359 |
+
}
|
360 |
+
}).on('mouseleave',function () {
|
361 |
+
$(this).css('color', '');
|
362 |
+
});
|
363 |
+
} else {
|
364 |
+
loginPressFtrClr = loginPressVal;
|
365 |
+
$('#customize-preview iframe').contents().find('.login #nav a').css( 'color', loginPressVal );
|
366 |
+
$('#customize-preview iframe').contents().find('.login #nav a').on('mouseover', function(){
|
367 |
+
|
368 |
+
if( typeof loginPressFtrHvr !== "undefined" || loginPressFtrHvr === null ){
|
369 |
+
$(this).css('color', loginPressFtrHvr);
|
370 |
+
}else{
|
371 |
+
$(this).css('color', '');
|
372 |
+
}
|
373 |
+
}).on('mouseleave',function () {
|
374 |
+
$(this).css('color', loginPressVal);
|
375 |
+
});
|
376 |
+
}
|
377 |
+
} );
|
378 |
+
} );
|
379 |
+
|
380 |
+
// Update the login form button border-color in real time...
|
381 |
+
wp.customize( 'loginpress_customization[login_footer_color_hover]', function( value ) {
|
382 |
+
value.bind( function( loginPressVal ) {
|
383 |
+
|
384 |
+
if( loginPressVal == '' ) {
|
385 |
+
|
386 |
+
$('#customize-preview iframe').contents().find('.login #nav a').css( 'color', '' );
|
387 |
+
|
388 |
+
$('#customize-preview iframe').contents().find('.login #nav a').on('mouseover', function(){
|
389 |
+
$(this).css('color', '');
|
390 |
+
}).on('mouseleave',function () {
|
391 |
+
|
392 |
+
if( typeof loginPressFtrClr !== "undefined" || loginPressFtrClr === null ){
|
393 |
+
$(this).css('color', loginPressFtrClr);
|
394 |
+
}else{
|
395 |
+
$(this).css('color', '');
|
396 |
+
}
|
397 |
+
});
|
398 |
+
} else {
|
399 |
+
loginPressFtrHvr = loginPressVal;
|
400 |
+
$('#customize-preview iframe').contents().find('.login #nav a').on('mouseover', function(){
|
401 |
+
$(this).css('color', loginPressVal);
|
402 |
+
}).on('mouseleave',function () {
|
403 |
+
|
404 |
+
if( typeof loginPressFtrClr !== "undefined" || loginPressFtrClr === null ){
|
405 |
+
$(this).css('color', loginPressFtrClr);
|
406 |
+
}else{
|
407 |
+
$(this).css('color', '');
|
408 |
+
}
|
409 |
+
});
|
410 |
+
}
|
411 |
+
} );
|
412 |
+
} );
|
413 |
+
|
414 |
+
loginpress_css_property( 'loginpress_customization[login_footer_font_size]', '.login #nav a', 'font-size' );
|
415 |
+
loginpress_css_property( 'loginpress_customization[login_footer_bg_color]', '.login #nav', 'background-color' );
|
416 |
+
|
417 |
+
loginpress_css_property( 'loginpress_customization[back_display_text]', '.login #backtoblog', 'display' );
|
418 |
+
loginpress_css_property( 'loginpress_customization[login_back_text_decoration]', '.login #backtoblog a', 'text-decoration' );
|
419 |
+
|
420 |
+
var loginPressFtrBackClr;
|
421 |
+
var loginPressFtrBackHvr;
|
422 |
+
// Update the login form button border-color in real time...
|
423 |
+
wp.customize( 'loginpress_customization[login_back_color]', function( value ) {
|
424 |
+
value.bind( function( loginPressVal ) {
|
425 |
+
|
426 |
+
if( loginPressVal == '' ) {
|
427 |
+
$('#customize-preview iframe').contents().find('.login #backtoblog a').css( 'color', '' );
|
428 |
+
$('#customize-preview iframe').contents().find('.login #backtoblog a').on( 'mouseover', function(){
|
429 |
+
|
430 |
+
if( typeof loginPressFtrBackHvr !== "undefined" || loginPressFtrBackHvr === null ){
|
431 |
+
$(this).css('color', loginPressFtrBackHvr);
|
432 |
+
}else{
|
433 |
+
$(this).css('color', '');
|
434 |
+
}
|
435 |
+
}).on('mouseleave',function () {
|
436 |
+
$(this).css('color', '');
|
437 |
+
});
|
438 |
+
} else {
|
439 |
+
loginPressFtrBackClr = loginPressVal;
|
440 |
+
$('#customize-preview iframe').contents().find('.login #backtoblog a').css( 'color', loginPressVal );
|
441 |
+
$('#customize-preview iframe').contents().find('.login #backtoblog a').on('mouseover', function(){
|
442 |
+
|
443 |
+
if( typeof loginPressFtrBackHvr !== "undefined" || loginPressFtrBackHvr === null ){
|
444 |
+
$(this).css('color', loginPressFtrBackHvr);
|
445 |
+
}else{
|
446 |
+
$(this).css('color', '');
|
447 |
+
}
|
448 |
+
}).on('mouseleave',function () {
|
449 |
+
$(this).css('color', loginPressVal);
|
450 |
+
});
|
451 |
+
}
|
452 |
+
} );
|
453 |
+
} );
|
454 |
+
|
455 |
+
// Update the login form button border-color in real time...
|
456 |
+
wp.customize( 'loginpress_customization[login_back_color_hover]', function( value ) {
|
457 |
+
value.bind( function( loginPressVal ) {
|
458 |
+
|
459 |
+
if( loginPressVal == '' ) {
|
460 |
+
|
461 |
+
$('#customize-preview iframe').contents().find('.login #backtoblog a').css( 'color', '' );
|
462 |
+
|
463 |
+
$('#customize-preview iframe').contents().find('.login #backtoblog a').on('mouseover', function(){
|
464 |
+
$(this).css('color', '');
|
465 |
+
}).on('mouseleave',function () {
|
466 |
+
|
467 |
+
if( typeof loginPressFtrBackClr !== "undefined" || loginPressFtrBackClr === null ){
|
468 |
+
$(this).css('color', loginPressFtrBackClr);
|
469 |
+
}else{
|
470 |
+
$(this).css('color', '');
|
471 |
+
}
|
472 |
+
});
|
473 |
+
} else {
|
474 |
+
loginPressFtrBackHvr = loginPressVal;
|
475 |
+
$('#customize-preview iframe').contents().find('.login #backtoblog a').on('mouseover', function(){
|
476 |
+
$(this).css('color', loginPressVal);
|
477 |
+
}).on('mouseleave',function () {
|
478 |
+
|
479 |
+
if( typeof loginPressFtrBackClr !== "undefined" || loginPressFtrBackClr === null ){
|
480 |
+
$(this).css('color', loginPressFtrBackClr);
|
481 |
+
}else{
|
482 |
+
$(this).css('color', '');
|
483 |
+
}
|
484 |
+
});
|
485 |
+
}
|
486 |
+
} );
|
487 |
+
} );
|
488 |
+
|
489 |
+
loginpress_css_property( 'loginpress_customization[login_back_font_size]', '.login #backtoblog a', 'font-size' );
|
490 |
+
loginpress_css_property( 'loginpress_customization[login_back_bg_color]', '.login #backtoblog', 'background-color' );
|
491 |
+
loginpress_footer_text_message( 'loginpress_customization[login_footer_copy_right]', '.copyRight' );
|
492 |
+
|
493 |
+
loginpress_text_message( 'loginpress_customization[incorrect_username]', '#login_error' );
|
494 |
+
loginpress_text_message( 'loginpress_customization[incorrect_password]', '#login_error' );
|
495 |
+
loginpress_text_message( 'loginpress_customization[empty_username]', '#login_error' );
|
496 |
+
loginpress_text_message( 'loginpress_customization[empty_password]', '#login_error' );
|
497 |
+
loginpress_text_message( 'loginpress_customization[invalid_email]', '#login_error' );
|
498 |
+
loginpress_text_message( 'loginpress_customization[empty_email]', '#login_error' );
|
499 |
+
loginpress_text_message( 'loginpress_customization[invalidcombo_message]', '#login_error' );
|
500 |
+
|
501 |
+
loginpress_text_message( 'loginpress_customization[lostpwd_welcome_message]', '.login .custom-message' );
|
502 |
+
loginpress_text_message( 'loginpress_customization[welcome_message]', '.login .custom-message' );
|
503 |
+
loginpress_text_message( 'loginpress_customization[register_welcome_message]', '.login .custom-message' );
|
504 |
+
loginpress_text_message( 'loginpress_customization[logout_message]', '.login .custom-message' );
|
505 |
+
|
506 |
+
loginpress_css_property( 'loginpress_customization[message_background_border]', '.login .custom-message', 'border' );
|
507 |
+
loginpress_css_property( 'loginpress_customization[message_background_color]', '.login .custom-message', 'background-color' );
|
508 |
+
|
509 |
+
} )( jQuery );
|
loginpress.php
CHANGED
@@ -1,179 +1,183 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Plugin Name: LoginPress - Customizing the WordPress Login
|
4 |
-
* Plugin URI: http://www.WPBrigade.com/wordpress/plugins/loginpress/
|
5 |
-
* Description: LoginPress is the best Login Page Customizer in WordPress which allows you to completely change the layout of login, register and forgot password forms.
|
6 |
-
* Version: 1.0.
|
7 |
-
* Author: WPBrigade
|
8 |
-
* Author URI: http://www.WPBrigade.com/
|
9 |
-
* Requires at least: 4.0
|
10 |
-
* Tested up to: 4.7.1
|
11 |
-
* Text Domain: loginpress
|
12 |
-
* Domain Path: /languages
|
13 |
-
*
|
14 |
-
* @package loginpress
|
15 |
-
* @category Core
|
16 |
-
* @author WPBrigade
|
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 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
'
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
}
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Plugin Name: LoginPress - Customizing the WordPress Login
|
4 |
+
* Plugin URI: http://www.WPBrigade.com/wordpress/plugins/loginpress/
|
5 |
+
* Description: LoginPress is the best Login Page Customizer in WordPress which allows you to completely change the layout of login, register and forgot password forms.
|
6 |
+
* Version: 1.0.6
|
7 |
+
* Author: WPBrigade
|
8 |
+
* Author URI: http://www.WPBrigade.com/
|
9 |
+
* Requires at least: 4.0
|
10 |
+
* Tested up to: 4.7.1
|
11 |
+
* Text Domain: loginpress
|
12 |
+
* Domain Path: /languages
|
13 |
+
*
|
14 |
+
* @package loginpress
|
15 |
+
* @category Core
|
16 |
+
* @author WPBrigade
|
17 |
+
*/
|
18 |
+
|
19 |
+
|
20 |
+
|
21 |
+
if ( ! class_exists( 'LoginPress' ) ) :
|
22 |
+
|
23 |
+
final class LoginPress {
|
24 |
+
|
25 |
+
/**
|
26 |
+
* @var string
|
27 |
+
*/
|
28 |
+
public $version = '1.0.2';
|
29 |
+
|
30 |
+
/**
|
31 |
+
* @var The single instance of the class
|
32 |
+
* @since 1.0.0
|
33 |
+
*/
|
34 |
+
protected static $_instance = null;
|
35 |
+
|
36 |
+
/**
|
37 |
+
* @var WP_Session session
|
38 |
+
*/
|
39 |
+
public $session = null;
|
40 |
+
|
41 |
+
/**
|
42 |
+
* @var WP_Query $query
|
43 |
+
*/
|
44 |
+
public $query = null;
|
45 |
+
|
46 |
+
/**s
|
47 |
+
* @var WP_Countries $countries
|
48 |
+
*/
|
49 |
+
public $countries = null;
|
50 |
+
|
51 |
+
/* * * * * * * * * *
|
52 |
+
* Class constructor
|
53 |
+
* * * * * * * * * */
|
54 |
+
public function __construct() {
|
55 |
+
|
56 |
+
$this->define_constants();
|
57 |
+
$this->includes();
|
58 |
+
$this->_hooks();
|
59 |
+
}
|
60 |
+
|
61 |
+
/**
|
62 |
+
* Define LoginPress Constants
|
63 |
+
*/
|
64 |
+
private function define_constants() {
|
65 |
+
|
66 |
+
$this->define( 'LOGINPRESS_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
|
67 |
+
$this->define( 'LOGINPRESS_ROOT_PATH', dirname( __FILE__ ) );
|
68 |
+
$this->define( 'LOGINPRESS_VERSION', $this->version );
|
69 |
+
}
|
70 |
+
|
71 |
+
/**
|
72 |
+
* Include required core files used in admin and on the frontend.
|
73 |
+
*/
|
74 |
+
public function includes() {
|
75 |
+
include_once( plugin_dir_path( __FILE__ ) . '/custom.php' );
|
76 |
+
}
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Hook into actions and filters
|
80 |
+
* @since 1.0.0
|
81 |
+
*/
|
82 |
+
private function _hooks() {
|
83 |
+
|
84 |
+
add_action( 'admin_menu', array( $this, 'register_options_page' ) );
|
85 |
+
add_action( 'plugins_loaded', array( $this, 'textdomain' ) );
|
86 |
+
add_filter( 'plugin_row_meta', array( $this, '_row_meta'), 10, 2 );
|
87 |
+
}
|
88 |
+
|
89 |
+
/**
|
90 |
+
* Main Instance
|
91 |
+
*
|
92 |
+
* @since 1.0.0
|
93 |
+
* @static
|
94 |
+
* @see loginPress_loader()
|
95 |
+
* @return Main instance
|
96 |
+
*/
|
97 |
+
public static function instance() {
|
98 |
+
if ( is_null( self::$_instance ) ) {
|
99 |
+
self::$_instance = new self();
|
100 |
+
}
|
101 |
+
return self::$_instance;
|
102 |
+
}
|
103 |
+
|
104 |
+
|
105 |
+
/**
|
106 |
+
* Load Languages
|
107 |
+
* @since 1.0.0
|
108 |
+
*/
|
109 |
+
public function textdomain() {
|
110 |
+
|
111 |
+
$plugin_dir = dirname( plugin_basename( __FILE__ ) ) ;
|
112 |
+
load_plugin_textdomain( 'loginpress', false, $plugin_dir . '/languages/');
|
113 |
+
}
|
114 |
+
|
115 |
+
/**
|
116 |
+
* Define constant if not already set
|
117 |
+
* @param string $name
|
118 |
+
* @param string|bool $value
|
119 |
+
*/
|
120 |
+
private function define( $name, $value ) {
|
121 |
+
if ( ! defined( $name ) ) {
|
122 |
+
define( $name, $value );
|
123 |
+
}
|
124 |
+
}
|
125 |
+
|
126 |
+
/**
|
127 |
+
* Include required ajax files.
|
128 |
+
*/
|
129 |
+
public function ajax_includes() {
|
130 |
+
// Ajax functions for admin and the front-end
|
131 |
+
}
|
132 |
+
/**
|
133 |
+
* Init WPBrigade when WordPress Initialises.
|
134 |
+
*/
|
135 |
+
public function init() {
|
136 |
+
// Before init action
|
137 |
+
}
|
138 |
+
/**
|
139 |
+
* Add new page in Apperance to customize Login Page
|
140 |
+
*/
|
141 |
+
public function register_options_page() {
|
142 |
+
add_theme_page( __( 'LoginPress', 'loginpress' ),
|
143 |
+
__( 'LoginPress', 'loginpress' ),
|
144 |
+
'manage_options',
|
145 |
+
"abw",
|
146 |
+
'__return_null' );
|
147 |
+
}
|
148 |
+
public function _row_meta( $links, $file ) {
|
149 |
+
|
150 |
+
if ( strpos( $file, 'loginpress.php' ) !== false ) {
|
151 |
+
|
152 |
+
// Set link for Reviews.
|
153 |
+
$new_links = array('<a href="https://wordpress.org/support/view/plugin-reviews/loginpress" target="_blank"><span class="dashicons dashicons-thumbs-up"></span> ' . __( 'Vote!', 'loginpress' ) . '</a>',
|
154 |
+
);
|
155 |
+
|
156 |
+
$links = array_merge( $links, $new_links );
|
157 |
+
}
|
158 |
+
|
159 |
+
return $links;
|
160 |
+
}
|
161 |
+
}
|
162 |
+
endif;
|
163 |
+
|
164 |
+
/**
|
165 |
+
* Returns the main instance of WP to prevent the need to use globals.
|
166 |
+
*
|
167 |
+
* @since 1.0.0
|
168 |
+
* @return LoginPress
|
169 |
+
*/
|
170 |
+
function loginPress_loader() {
|
171 |
+
return LoginPress::instance();
|
172 |
+
}
|
173 |
+
|
174 |
+
// Call the function
|
175 |
+
loginPress_loader();
|
176 |
+
|
177 |
+
/**
|
178 |
+
* Create the Object of Custom Login Entites.
|
179 |
+
*
|
180 |
+
* @since 1.0.0
|
181 |
+
*/
|
182 |
+
new LoginPress_Entities();
|
183 |
+
?>
|
readme.txt
CHANGED
@@ -1,169 +1,172 @@
|
|
1 |
-
=== Login ===
|
2 |
-
Version: 1.0.
|
3 |
-
Requires at least: 4.0
|
4 |
-
Tested up to: 4.7.1
|
5 |
-
Contributors: WPBrigade, hiddenpearls, abdulwahab610
|
6 |
-
Author URI: https://wpbrigade.com
|
7 |
-
Tags: customizer, custom login, login logo, login customizer, custom login page, admin,
|
8 |
-
Stable tag: 1.0.
|
9 |
-
License: GPLv2 or later
|
10 |
-
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
-
|
12 |
-
LOGIN allows you to easily customize the layout of login, admin login, client login, register and forgot password forms/pages.
|
13 |
-
|
14 |
-
== Description ==
|
15 |
-
|
16 |
-
[Login Plugin](http://www.WPBrigade.com/wordpress/plugins/loginpress/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion) holds a lot of customization fields to change the layout of the login page of WordPress. You can modify the look and feel of login page completely even the login error messages, forgot error messages, registration error messages and many more.
|
17 |
-
Login Plugin would give you and your users a feeling that it is a custom login page and a part of the site layout. You must checkout the Demo video of how you can customize WordPress login page.
|
18 |
-
|
19 |
-
**Getting Started video for customizing login page using LoginPress**
|
20 |
-
|
21 |
-
`[youtube https://www.youtube.com/watch?v=GMAwsHomJlE]`
|
22 |
-
|
23 |
-
Login plugin is built using The Customizer API which is getting popular for live-previewing any changes to the layouts of WordPress. So, with LoginPress you can preview your login page changes instantly. This login customizer plugin is easy enough & required no coding skills. Just have options for each element on the login form and make a new customized login page within seconds.
|
24 |
-
|
25 |
-
|
26 |
-
**Features:**
|
27 |
-
|
28 |
-
* Logo: Can change the login logo {image, width, height, padding, URL and Title}.
|
29 |
-
|
30 |
-
* Background: You can customize background Image or Color. Set its position, Size and repeatable property.
|
31 |
-
|
32 |
-
* Login Form: Even you can customize the login form {image or color, width, height, padding and border}. More over customize Input Text Field {width, margin, text color, label color and background color}.
|
33 |
-
|
34 |
-
* Forget Form: Beauty of the plugin here you can change the background or color of the forget form.
|
35 |
-
|
36 |
-
* Button: You can set the color of your button WYSIWYG.
|
37 |
-
|
38 |
-
Error Messages: Main Feature of the plugin. You can change the error log messages as you want to show users form LoginPress → Error Messages.
|
39 |
-
|
40 |
-
* Welcome Messages: Same as error log messages you can customize the welcome messages from LoginPress → Welcome Messages.
|
41 |
-
|
42 |
-
* Form Footer: After the login Button, here is form footer. You can customize the footer {text, display, text decoration, text color, text hover color and text size}. In this section you can also customize the page footer text.
|
43 |
-
|
44 |
-
|
45 |
-
> <strong>Making WordPress Login page mobile friendly after customization</strong><br>
|
46 |
-
> This plugin is also responsive. It means that when you customize login page, It will look good on mobile i.e It is Responsive.
|
47 |
-
|
48 |
-
|
49 |
-
**LoginPress Features in Detail:**
|
50 |
-
|
51 |
-
* Customize login error messages. You can change every error message wether it is on login form, forgot password form or register form.
|
52 |
-
* Customize login logo image.
|
53 |
-
* Customize login logo image width.
|
54 |
-
* Customize login logo image height.
|
55 |
-
* Customize login logo image hover title.
|
56 |
-
* Customize login logo image hover link.
|
57 |
-
* Customize login logo padding bottom.
|
58 |
-
* Customize login page background image.
|
59 |
-
* Customize login page background color.
|
60 |
-
* Customize login page background image size.
|
61 |
-
* Customize login page without background image. You can keep it simple with different login form style.
|
62 |
-
* Customize login form width.
|
63 |
-
* Customize login form height.
|
64 |
-
* Customize login form border style.
|
65 |
-
* Customize login form input styling.
|
66 |
-
* Customize login form label styling.
|
67 |
-
* Customize login form field text color.
|
68 |
-
* Customize login form background color.
|
69 |
-
* Customize login page "lost your password?" text.
|
70 |
-
* Customize login forgot password form background color and image.
|
71 |
-
* Customize login form button styling.
|
72 |
-
* Customize login form notice messages.
|
73 |
-
* Add copyright notice message at the bottom of login page.
|
74 |
-
* Customize "Back to" text at login page. You can hide or show or change the color or even the text size as well.
|
75 |
-
* Customize login page footer. We call login page footer area under the login form fields.
|
76 |
-
* LoginPress has a Custom CSS area which can Customize login page in more advanced way. Recommended for advanced users.
|
77 |
-
* Customize your login page in more advanced way using our Custom JS area. Add your JS there and make your login page more advanced.
|
78 |
-
* Customize login page with unlimited features available in loginpress.
|
79 |
-
|
80 |
-
After going through this extensive list of feaures you can imagine Why LoginPress is the best login page customizer in the WordPress market.
|
81 |
-
|
82 |
-
> <strong>Beautify and Innovate your WordPress login page without any coding knowledge!</strong>
|
83 |
-
|
84 |
-
= What's Next =
|
85 |
-
|
86 |
-
|
87 |
-
If you like this plugin, then consider checking out our other projects:
|
88 |
-
|
89 |
-
* <a href="https://analytify.io/" rel="friend" title="Google Analytics by Analytify">Google Analytics by Analytify</a> - Google Analytics by Analytify
|
90 |
-
* <a href="http://wpbrigade.com/" rel="friend" title="Related Posts">Related Posts</a> - Best Related Posts Plugin
|
91 |
-
|
92 |
-
== Notes ==
|
93 |
-
|
94 |
-
LoginPress is absolutely, positively the most <a href="http://www.WPBrigade.com/wordpress/plugins/loginpress/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion" rel="friend" title="Best Custom login form plugin">beginner friendly WordPress custom login form plugin</a> on the market. It is both easy and powerful.
|
95 |
-
|
96 |
-
Also, I'm the founder of <a href="http://www.wpbrigade.com/" rel="friend">WPBrigade</a>, We do custom WordPress themes for clients and can transform any website in WordPress. It was a huge priority for me to make a WordPress custom login form plugin that beginners can use without any training.
|
97 |
-
|
98 |
-
I feel that we have done that here. I hope you enjoy using LoginPress.
|
99 |
-
|
100 |
-
Thank you
|
101 |
-
|
102 |
-
Muhammad Adnan
|
103 |
-
|
104 |
-
== Installation ==
|
105 |
-
|
106 |
-
1. Upload the plugin to your 'wp-content/plugins' directory, or download and install automatically through your admin panel.
|
107 |
-
2. Activate the plugin through the 'Plugins' menu in WordPress.
|
108 |
-
|
109 |
-
== Frequently Asked Questions ==
|
110 |
-
|
111 |
-
= How to get started with LoginPress? =
|
112 |
-
|
113 |
-
In your WordPress Dashboard, navigate to Appearance > LoginPress to get started.
|
114 |
-
|
115 |
-
= Who should use LoginPress? =
|
116 |
-
|
117 |
-
Every WordPress user should use LoginPress. It is easy to use and can tranform your boring wp-login.php login page into a beautiful customized login form page.
|
118 |
-
|
119 |
-
= Do I need to have coding skills to use LoginPress? =
|
120 |
-
|
121 |
-
Absolutely not. You can create and manage custom login page without any coding knowledge. LoginPress is the most beginner friendly custom login form solution in the market.
|
122 |
-
|
123 |
-
= Is LoginPress translation ready? =
|
124 |
-
|
125 |
-
Yes, LoginPress has full translation and localization support via the loginpress textdomain. All .mo and .po translation files should go into the languages folder in the base of the plugin.
|
126 |
-
|
127 |
-
= How to donate or contribute? =
|
128 |
-
|
129 |
-
Please visit <a target="_blank" rel="friend" href="http://www.WPBrigade.com/wordpress/plugins/loginpress/">this link</a> for more info.
|
130 |
-
|
131 |
-
== Screenshots ==
|
132 |
-
|
133 |
-
1. Custom Login page Example #1 with Background Image
|
134 |
-
2. Custom Login page Example #2 with background color only
|
135 |
-
3. Custom Login page Example #3
|
136 |
-
4. Custom Login page Example #4
|
137 |
-
5. Custom Login page Example #5
|
138 |
-
6. Custom Login page Example #6
|
139 |
-
7. Custom Login page Example #7
|
140 |
-
8. Custom Login page Example #8
|
141 |
-
9. Custom Login page Example #9
|
142 |
-
10. Custom Login page Example #10
|
143 |
-
|
144 |
-
== Changelog ==
|
145 |
-
|
146 |
-
= 1.0.
|
|
|
|
|
|
|
147 |
* Bug fix: Redirect 404 page error.
|
148 |
|
149 |
-
= 1.0.4 - 2017-01-12 =
|
150 |
-
* Bug fix: Default background path fixed.
|
151 |
-
* Bug fix: bugfix for PHP 5.3
|
152 |
-
|
153 |
-
= 1.0.3 - 2017-01-06 =
|
154 |
-
* Bug fix: Default background.
|
155 |
-
* Bug fix: Responsive layout.
|
156 |
-
|
157 |
-
= 1.0.2 - 2016-12-24 =
|
158 |
-
* code cleanup and readme update.
|
159 |
-
|
160 |
-
= 1.0.1 - 2016-11-08 =
|
161 |
-
* Changing menu name to LoginPress in WordPress Customizer
|
162 |
-
|
163 |
-
= 1.0.0 - 2016-09-08 =
|
164 |
-
* Initial Release.
|
165 |
-
|
166 |
-
== Upgrade Notice ==
|
167 |
-
|
168 |
-
= 1.0.
|
169 |
-
* Bug fix release, please update Immediately.
|
1 |
+
=== Login ===
|
2 |
+
Version: 1.0.6
|
3 |
+
Requires at least: 4.0
|
4 |
+
Tested up to: 4.7.1
|
5 |
+
Contributors: WPBrigade, hiddenpearls, abdulwahab610
|
6 |
+
Author URI: https://wpbrigade.com
|
7 |
+
Tags: customizer, custom login, login logo, login customizer, custom login page, admin, wp-login, customization, forgot password, login error, login page style, loginpress
|
8 |
+
Stable tag: 1.0.6
|
9 |
+
License: GPLv2 or later
|
10 |
+
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
+
|
12 |
+
LOGIN allows you to easily customize the layout of login, admin login, client login, register and forgot password forms/pages.
|
13 |
+
|
14 |
+
== Description ==
|
15 |
+
|
16 |
+
[Login Plugin](http://www.WPBrigade.com/wordpress/plugins/loginpress/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion) holds a lot of customization fields to change the layout of the login page of WordPress. You can modify the look and feel of login page completely even the login error messages, forgot error messages, registration error messages and many more.
|
17 |
+
Login Plugin would give you and your users a feeling that it is a custom login page and a part of the site layout. You must checkout the Demo video of how you can customize WordPress login page.
|
18 |
+
|
19 |
+
**Getting Started video for customizing login page using LoginPress**
|
20 |
+
|
21 |
+
`[youtube https://www.youtube.com/watch?v=GMAwsHomJlE]`
|
22 |
+
|
23 |
+
Login plugin is built using The Customizer API which is getting popular for live-previewing any changes to the layouts of WordPress. So, with LoginPress you can preview your login page changes instantly. This login customizer plugin is easy enough & required no coding skills. Just have options for each element on the login form and make a new customized login page within seconds.
|
24 |
+
|
25 |
+
|
26 |
+
**Features:**
|
27 |
+
|
28 |
+
* Logo: Can change the login logo {image, width, height, padding, URL and Title}.
|
29 |
+
|
30 |
+
* Background: You can customize background Image or Color. Set its position, Size and repeatable property.
|
31 |
+
|
32 |
+
* Login Form: Even you can customize the login form {image or color, width, height, padding and border}. More over customize Input Text Field {width, margin, text color, label color and background color}.
|
33 |
+
|
34 |
+
* Forget Form: Beauty of the plugin here you can change the background or color of the forget form.
|
35 |
+
|
36 |
+
* Button: You can set the color of your button WYSIWYG.
|
37 |
+
|
38 |
+
Error Messages: Main Feature of the plugin. You can change the error log messages as you want to show users form LoginPress → Error Messages.
|
39 |
+
|
40 |
+
* Welcome Messages: Same as error log messages you can customize the welcome messages from LoginPress → Welcome Messages.
|
41 |
+
|
42 |
+
* Form Footer: After the login Button, here is form footer. You can customize the footer {text, display, text decoration, text color, text hover color and text size}. In this section you can also customize the page footer text.
|
43 |
+
|
44 |
+
|
45 |
+
> <strong>Making WordPress Login page mobile friendly after customization</strong><br>
|
46 |
+
> This plugin is also responsive. It means that when you customize login page, It will look good on mobile i.e It is Responsive.
|
47 |
+
|
48 |
+
|
49 |
+
**LoginPress Features in Detail:**
|
50 |
+
|
51 |
+
* Customize login error messages. You can change every error message wether it is on login form, forgot password form or register form.
|
52 |
+
* Customize login logo image.
|
53 |
+
* Customize login logo image width.
|
54 |
+
* Customize login logo image height.
|
55 |
+
* Customize login logo image hover title.
|
56 |
+
* Customize login logo image hover link.
|
57 |
+
* Customize login logo padding bottom.
|
58 |
+
* Customize login page background image.
|
59 |
+
* Customize login page background color.
|
60 |
+
* Customize login page background image size.
|
61 |
+
* Customize login page without background image. You can keep it simple with different login form style.
|
62 |
+
* Customize login form width.
|
63 |
+
* Customize login form height.
|
64 |
+
* Customize login form border style.
|
65 |
+
* Customize login form input styling.
|
66 |
+
* Customize login form label styling.
|
67 |
+
* Customize login form field text color.
|
68 |
+
* Customize login form background color.
|
69 |
+
* Customize login page "lost your password?" text.
|
70 |
+
* Customize login forgot password form background color and image.
|
71 |
+
* Customize login form button styling.
|
72 |
+
* Customize login form notice messages.
|
73 |
+
* Add copyright notice message at the bottom of login page.
|
74 |
+
* Customize "Back to" text at login page. You can hide or show or change the color or even the text size as well.
|
75 |
+
* Customize login page footer. We call login page footer area under the login form fields.
|
76 |
+
* LoginPress has a Custom CSS area which can Customize login page in more advanced way. Recommended for advanced users.
|
77 |
+
* Customize your login page in more advanced way using our Custom JS area. Add your JS there and make your login page more advanced.
|
78 |
+
* Customize login page with unlimited features available in loginpress.
|
79 |
+
|
80 |
+
After going through this extensive list of feaures you can imagine Why LoginPress is the best login page customizer in the WordPress market.
|
81 |
+
|
82 |
+
> <strong>Beautify and Innovate your WordPress login page without any coding knowledge!</strong>
|
83 |
+
|
84 |
+
= What's Next =
|
85 |
+
|
86 |
+
|
87 |
+
If you like this plugin, then consider checking out our other projects:
|
88 |
+
|
89 |
+
* <a href="https://analytify.io/" rel="friend" title="Google Analytics by Analytify">Google Analytics by Analytify</a> - Google Analytics by Analytify
|
90 |
+
* <a href="http://wpbrigade.com/" rel="friend" title="Related Posts">Related Posts</a> - Best Related Posts Plugin
|
91 |
+
|
92 |
+
== Notes ==
|
93 |
+
|
94 |
+
LoginPress is absolutely, positively the most <a href="http://www.WPBrigade.com/wordpress/plugins/loginpress/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion" rel="friend" title="Best Custom login form plugin">beginner friendly WordPress custom login form plugin</a> on the market. It is both easy and powerful.
|
95 |
+
|
96 |
+
Also, I'm the founder of <a href="http://www.wpbrigade.com/" rel="friend">WPBrigade</a>, We do custom WordPress themes for clients and can transform any website in WordPress. It was a huge priority for me to make a WordPress custom login form plugin that beginners can use without any training.
|
97 |
+
|
98 |
+
I feel that we have done that here. I hope you enjoy using LoginPress.
|
99 |
+
|
100 |
+
Thank you
|
101 |
+
|
102 |
+
Muhammad Adnan
|
103 |
+
|
104 |
+
== Installation ==
|
105 |
+
|
106 |
+
1. Upload the plugin to your 'wp-content/plugins' directory, or download and install automatically through your admin panel.
|
107 |
+
2. Activate the plugin through the 'Plugins' menu in WordPress.
|
108 |
+
|
109 |
+
== Frequently Asked Questions ==
|
110 |
+
|
111 |
+
= How to get started with LoginPress? =
|
112 |
+
|
113 |
+
In your WordPress Dashboard, navigate to Appearance > LoginPress to get started.
|
114 |
+
|
115 |
+
= Who should use LoginPress? =
|
116 |
+
|
117 |
+
Every WordPress user should use LoginPress. It is easy to use and can tranform your boring wp-login.php login page into a beautiful customized login form page.
|
118 |
+
|
119 |
+
= Do I need to have coding skills to use LoginPress? =
|
120 |
+
|
121 |
+
Absolutely not. You can create and manage custom login page without any coding knowledge. LoginPress is the most beginner friendly custom login form solution in the market.
|
122 |
+
|
123 |
+
= Is LoginPress translation ready? =
|
124 |
+
|
125 |
+
Yes, LoginPress has full translation and localization support via the loginpress textdomain. All .mo and .po translation files should go into the languages folder in the base of the plugin.
|
126 |
+
|
127 |
+
= How to donate or contribute? =
|
128 |
+
|
129 |
+
Please visit <a target="_blank" rel="friend" href="http://www.WPBrigade.com/wordpress/plugins/loginpress/">this link</a> for more info.
|
130 |
+
|
131 |
+
== Screenshots ==
|
132 |
+
|
133 |
+
1. Custom Login page Example #1 with Background Image
|
134 |
+
2. Custom Login page Example #2 with background color only
|
135 |
+
3. Custom Login page Example #3
|
136 |
+
4. Custom Login page Example #4
|
137 |
+
5. Custom Login page Example #5
|
138 |
+
6. Custom Login page Example #6
|
139 |
+
7. Custom Login page Example #7
|
140 |
+
8. Custom Login page Example #8
|
141 |
+
9. Custom Login page Example #9
|
142 |
+
10. Custom Login page Example #10
|
143 |
+
|
144 |
+
== Changelog ==
|
145 |
+
|
146 |
+
= 1.0.6 - 2017-01-20 =
|
147 |
+
* Bug fix: site lock out bug fixed.
|
148 |
+
|
149 |
+
= 1.0.5 - 2017-01-13 =
|
150 |
* Bug fix: Redirect 404 page error.
|
151 |
|
152 |
+
= 1.0.4 - 2017-01-12 =
|
153 |
+
* Bug fix: Default background path fixed.
|
154 |
+
* Bug fix: bugfix for PHP 5.3
|
155 |
+
|
156 |
+
= 1.0.3 - 2017-01-06 =
|
157 |
+
* Bug fix: Default background.
|
158 |
+
* Bug fix: Responsive layout.
|
159 |
+
|
160 |
+
= 1.0.2 - 2016-12-24 =
|
161 |
+
* code cleanup and readme update.
|
162 |
+
|
163 |
+
= 1.0.1 - 2016-11-08 =
|
164 |
+
* Changing menu name to LoginPress in WordPress Customizer
|
165 |
+
|
166 |
+
= 1.0.0 - 2016-09-08 =
|
167 |
+
* Initial Release.
|
168 |
+
|
169 |
+
== Upgrade Notice ==
|
170 |
+
|
171 |
+
= 1.0.6 =
|
172 |
+
* Bug fix release, please update Immediately.
|