Version Description
- 2017-04-29 =
- Bugfix: Backgrounds and Colors for pre-defined tempalates.
- Enhancement: Code cleanup
Download this release
Release Info
Developer | hiddenpearls |
Plugin | Custom Login Page Customizer | LoginPress |
Version | 1.0.14 |
Comparing to | |
See all releases |
Code changes from version 1.0.13 to 1.0.14
- css/style-login.php +54 -21
- css/themes/default-1.php +1 -1
- js/customize-controls.js +302 -98
- loginpress.php +2 -2
- readme.txt +6 -2
css/style-login.php
CHANGED
@@ -94,11 +94,26 @@ $loginpress_theme_tem = get_option( 'customize_presets_settings', 'def
|
|
94 |
box-sizing: border-box;
|
95 |
}
|
96 |
#login::after{
|
97 |
-
<?php if ( ( $loginpress_theme_tem == 'default6' || $loginpress_theme_tem == '
|
98 |
background-image: url(<?php echo $loginpress_background_img; ?>);
|
99 |
-
|
|
|
100 |
background-image: url();
|
101 |
<?php endif; ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
}
|
103 |
|
104 |
#login{
|
@@ -107,37 +122,55 @@ $loginpress_theme_tem = get_option( 'customize_presets_settings', 'def
|
|
107 |
<?php elseif ( $loginpress_theme_tem == 'default17' && isset( $loginpress_display_bg ) && ! $loginpress_display_bg ) : ?>
|
108 |
background-image: url();
|
109 |
<?php endif; ?>
|
110 |
-
}
|
111 |
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
118 |
<?php endif; ?>
|
119 |
-
|
120 |
-
|
121 |
-
background-image: url();
|
122 |
-
<?php elseif ( $loginpress_theme_tem == 'default10' && isset( $loginpress_display_bg ) && ! $loginpress_display_bg ) : ?>
|
123 |
-
background-image: url();
|
124 |
-
<?php endif; ?>
|
125 |
-
|
126 |
<?php if ( $loginpress_theme_tem == 'default8' && ! empty( $loginpress_background_img ) && $loginpress_display_bg ) : ?>
|
127 |
-
background-image: url();
|
128 |
<?php elseif ( $loginpress_theme_tem == 'default8' && isset( $loginpress_display_bg ) && ! $loginpress_display_bg ) : ?>
|
129 |
background-image: url();
|
130 |
<?php endif; ?>
|
131 |
|
132 |
-
<?php if
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
133 |
background-image: url();
|
134 |
-
<?php elseif ( $loginpress_theme_tem
|
135 |
background-image: url();
|
136 |
<?php endif; ?>
|
137 |
|
138 |
-
<?php if ( $loginpress_theme_tem
|
139 |
background-image: url(<?php echo $loginpress_background_img; ?>);
|
140 |
-
<?php elseif ( $loginpress_theme_tem
|
141 |
background-image: url();
|
142 |
<?php endif; ?>
|
143 |
|
94 |
box-sizing: border-box;
|
95 |
}
|
96 |
#login::after{
|
97 |
+
<?php if ( ( $loginpress_theme_tem == 'default6' || $loginpress_theme_tem == 'default10' ) && ! empty( $loginpress_background_img ) && $loginpress_display_bg ) : ?>
|
98 |
background-image: url(<?php echo $loginpress_background_img; ?>);
|
99 |
+
|
100 |
+
<?php elseif ( ( $loginpress_theme_tem == 'default6' || $loginpress_theme_tem == 'default10' ) && isset( $loginpress_display_bg ) && ! $loginpress_display_bg ) : ?>
|
101 |
background-image: url();
|
102 |
<?php endif; ?>
|
103 |
+
<?php if( in_array( $loginpress_theme_tem, array( 'default6', 'default10' ) ) ) : ?>
|
104 |
+
<?php if ( ! empty( $loginpress_background_color ) ) : ?>
|
105 |
+
background-color: <?php echo $loginpress_background_color; ?>;
|
106 |
+
<?php endif; ?>
|
107 |
+
<?php if ( ! empty( $loginpress_background_repeat ) ) : ?>
|
108 |
+
background-repeat: <?php echo $loginpress_background_repeat; ?>;
|
109 |
+
<?php endif; ?>
|
110 |
+
<?php if ( ! empty( $loginpress_background_postion ) ) : ?>
|
111 |
+
background-position: <?php echo $loginpress_background_postion; ?>;
|
112 |
+
<?php endif; ?>
|
113 |
+
<?php if ( ! empty( $loginpress_background_image_size ) ) : ?>
|
114 |
+
background-size: <?php echo $loginpress_background_image_size; ?>;
|
115 |
+
<?php endif; ?>
|
116 |
+
<?php endif; ?>
|
117 |
}
|
118 |
|
119 |
#login{
|
122 |
<?php elseif ( $loginpress_theme_tem == 'default17' && isset( $loginpress_display_bg ) && ! $loginpress_display_bg ) : ?>
|
123 |
background-image: url();
|
124 |
<?php endif; ?>
|
|
|
125 |
|
126 |
+
<?php if( $loginpress_theme_tem == 'default17' ) : ?>
|
127 |
+
<?php if ( ! empty( $loginpress_background_color ) ) : ?>
|
128 |
+
background-color: <?php echo $loginpress_background_color; ?>;
|
129 |
+
<?php endif; ?>
|
130 |
+
<?php if ( ! empty( $loginpress_background_repeat ) ) : ?>
|
131 |
+
background-repeat: <?php echo $loginpress_background_repeat; ?>;
|
132 |
+
<?php endif; ?>
|
133 |
+
<?php if ( ! empty( $loginpress_background_postion ) ) : ?>
|
134 |
+
background-position: <?php echo $loginpress_background_postion; ?>;
|
135 |
+
<?php endif; ?>
|
136 |
+
<?php if ( ! empty( $loginpress_background_image_size ) ) : ?>
|
137 |
+
background-size: <?php echo $loginpress_background_image_size; ?>;
|
138 |
+
<?php endif; ?>
|
139 |
<?php endif; ?>
|
140 |
+
}
|
141 |
+
body.login:after{
|
|
|
|
|
|
|
|
|
|
|
142 |
<?php if ( $loginpress_theme_tem == 'default8' && ! empty( $loginpress_background_img ) && $loginpress_display_bg ) : ?>
|
143 |
+
background-image: url(<?php echo $loginpress_background_img; ?>);
|
144 |
<?php elseif ( $loginpress_theme_tem == 'default8' && isset( $loginpress_display_bg ) && ! $loginpress_display_bg ) : ?>
|
145 |
background-image: url();
|
146 |
<?php endif; ?>
|
147 |
|
148 |
+
<?php if( $loginpress_theme_tem == 'default8' ) : ?>
|
149 |
+
<?php if ( ! empty( $loginpress_background_color ) ) : ?>
|
150 |
+
background-color: <?php echo $loginpress_background_color; ?>;
|
151 |
+
<?php endif; ?>
|
152 |
+
<?php if ( ! empty( $loginpress_background_repeat ) ) : ?>
|
153 |
+
background-repeat: <?php echo $loginpress_background_repeat; ?>;
|
154 |
+
<?php endif; ?>
|
155 |
+
<?php if ( ! empty( $loginpress_background_postion ) ) : ?>
|
156 |
+
background-position: <?php echo $loginpress_background_postion; ?>;
|
157 |
+
<?php endif; ?>
|
158 |
+
<?php if ( ! empty( $loginpress_background_image_size ) ) : ?>
|
159 |
+
background-size: <?php echo $loginpress_background_image_size; ?>;
|
160 |
+
<?php endif; ?>
|
161 |
+
<?php endif; ?>
|
162 |
+
}
|
163 |
+
body.login {
|
164 |
+
|
165 |
+
<?php if ( in_array( $loginpress_theme_tem, array( 'default6', 'default8', 'default10', 'default17' ) ) && ! empty( $loginpress_background_img ) && $loginpress_display_bg ) : ?>
|
166 |
background-image: url();
|
167 |
+
<?php elseif ( in_array( $loginpress_theme_tem, array( 'default6', 'default8', 'default10', 'default17' ) ) && isset( $loginpress_display_bg ) && ! $loginpress_display_bg ) : ?>
|
168 |
background-image: url();
|
169 |
<?php endif; ?>
|
170 |
|
171 |
+
<?php if ( ! in_array( $loginpress_theme_tem, array( 'default6', 'default8', 'default10', 'default17' ) ) && ! empty( $loginpress_background_img ) && $loginpress_display_bg ) : ?>
|
172 |
background-image: url(<?php echo $loginpress_background_img; ?>);
|
173 |
+
<?php elseif ( ! in_array( $loginpress_theme_tem, array( 'default6', 'default8', 'default10', 'default17' ) ) && isset( $loginpress_display_bg ) && ! $loginpress_display_bg ) : ?>
|
174 |
background-image: url();
|
175 |
<?php endif; ?>
|
176 |
|
css/themes/default-1.php
CHANGED
@@ -15,7 +15,7 @@ function first_presets() {
|
|
15 |
*************************************************************/
|
16 |
body.login {
|
17 |
background-image: url(<?php echo plugins_url( 'img/bg.jpg', LOGINPRESS_PLUGIN_BASENAME ) ?>);
|
18 |
-
background-color: #ddd5c3
|
19 |
background-repeat: no-repeat;
|
20 |
background-position: center;
|
21 |
background-size: cover;
|
15 |
*************************************************************/
|
16 |
body.login {
|
17 |
background-image: url(<?php echo plugins_url( 'img/bg.jpg', LOGINPRESS_PLUGIN_BASENAME ) ?>);
|
18 |
+
/*background-color: #ddd5c3;*/
|
19 |
background-repeat: no-repeat;
|
20 |
background-position: center;
|
21 |
background-size: cover;
|
js/customize-controls.js
CHANGED
@@ -1,122 +1,149 @@
|
|
|
|
|
|
|
|
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 |
-
|
10 |
-
|
|
|
|
|
11 |
|
12 |
-
|
13 |
-
|
|
|
|
|
14 |
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
}); // jQuery( document ).ready
|
30 |
|
31 |
|
32 |
(function($) {
|
33 |
|
34 |
// function for change LoginPress background-image in real time...
|
35 |
-
function loginpress_background_img(setting, target) {
|
36 |
-
wp.customize(setting, function(value) {
|
37 |
-
value.bind(function(loginPressVal) {
|
38 |
-
if (loginPressVal == '') {
|
39 |
-
$('#customize-preview iframe')
|
40 |
-
|
|
|
|
|
41 |
} else {
|
42 |
-
$('#customize-preview iframe')
|
43 |
-
|
|
|
|
|
44 |
}
|
45 |
-
});
|
46 |
-
});
|
47 |
-
}
|
48 |
|
49 |
// function for change LoginPress CSS in real time...
|
50 |
-
function loginpress_css_property(setting, target, property) {
|
51 |
// Update the login logo width in real time...
|
52 |
-
wp.customize(setting, function(value) {
|
53 |
-
value.bind(function(loginPressVal) {
|
54 |
-
|
55 |
-
if (loginPressVal == '') {
|
56 |
-
$('#customize-preview iframe')
|
57 |
-
|
|
|
|
|
58 |
} else {
|
59 |
-
$('#customize-preview iframe')
|
60 |
-
|
|
|
|
|
61 |
}
|
62 |
-
});
|
63 |
-
});
|
64 |
-
}
|
65 |
-
// function for change LoginPress attribute in real time...
|
66 |
-
function loginpress_attr_property(setting, target, property) {
|
67 |
-
wp.customize(setting, function(value) {
|
68 |
-
value.bind(function(loginPressVal) {
|
69 |
|
70 |
-
|
71 |
-
|
72 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
} else {
|
74 |
-
$('#customize-preview iframe')
|
75 |
-
|
|
|
|
|
76 |
}
|
77 |
-
});
|
78 |
-
});
|
79 |
-
}
|
|
|
80 |
// function for change LoginPress input fields in real time...
|
81 |
-
function loginpress_input_property(setting, property) {
|
82 |
-
wp.customize(setting, function(value) {
|
83 |
-
value.bind(function(loginPressVal) {
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
|
|
|
|
|
|
|
|
|
|
89 |
} else {
|
90 |
-
$('#customize-preview iframe')
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
|
|
|
|
96 |
}
|
97 |
-
});
|
98 |
-
});
|
99 |
-
}
|
100 |
|
101 |
// function for change LoginPress error and welcome messages in real time...
|
102 |
-
function loginpress_text_message(errorlog, target) {
|
103 |
-
wp.customize(errorlog, function(value) {
|
104 |
-
value.bind(function(loginPressVal) {
|
105 |
-
|
106 |
-
if (loginPressVal == '') {
|
107 |
-
$('#customize-preview iframe')
|
108 |
-
|
|
|
|
|
109 |
} else {
|
110 |
-
$('#customize-preview iframe')
|
111 |
-
|
|
|
|
|
112 |
}
|
113 |
-
});
|
114 |
-
});
|
115 |
}
|
116 |
|
117 |
var change_theme;
|
118 |
// function for change LoginPress error and welcome messages in real time...
|
119 |
-
|
120 |
wp.customize('customize_presets_settings', function(value) {
|
121 |
value.bind(function(loginPressVal) {
|
122 |
|
@@ -564,9 +591,9 @@ jQuery(document).ready(function() {
|
|
564 |
}
|
565 |
} else {
|
566 |
|
567 |
-
if (!localStorage.loginpress_bg) {
|
568 |
localStorage.setItem("loginpress_bg", loginPressVal);
|
569 |
-
}
|
570 |
|
571 |
if ('default6' == customizer_bg) {
|
572 |
|
@@ -606,11 +633,11 @@ jQuery(document).ready(function() {
|
|
606 |
});
|
607 |
// loginpress_background_img( 'loginpress_customization[]', 'body.login' );
|
608 |
$('.customize-controls-close').on('click', function() {
|
609 |
-
localStorage.removeItem("loginpress_bg_check");
|
610 |
-
localStorage.removeItem("loginpress_bg");
|
611 |
});
|
612 |
-
localStorage.removeItem("loginpress_bg");
|
613 |
-
localStorage.removeItem("loginpress_bg_check");
|
614 |
// loginpress_display_control( 'loginpress_customization[footer_display_text]' );
|
615 |
// loginpress_display_control( 'loginpress_customization[back_display_text]' );
|
616 |
|
@@ -643,14 +670,181 @@ jQuery(document).ready(function() {
|
|
643 |
'title');
|
644 |
|
645 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
646 |
|
647 |
-
loginpress_css_property(
|
648 |
-
'loginpress_customization[setting_background_color]', 'body.login',
|
649 |
-
'background-color');
|
650 |
-
loginpress_css_property('loginpress_customization[background_repeat_radio]',
|
651 |
-
'body.login', 'background-repeat');
|
652 |
-
loginpress_css_property('loginpress_customization[background_image_size]',
|
653 |
-
'body.login', 'background-size');
|
654 |
|
655 |
loginpress_background_img(
|
656 |
'loginpress_customization[setting_form_background]', '#loginform');
|
@@ -1120,6 +1314,16 @@ jQuery(document).ready(function() {
|
|
1120 |
|
1121 |
$("<style type='text/css' id='loginpress-customize'></style>").appendTo(
|
1122 |
$('#customize-preview iframe').contents().find('head'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1123 |
});
|
1124 |
|
1125 |
})(jQuery);
|
1 |
+
/**
|
2 |
+
* This file handling some LIVE to the LoginPress Customizer live preview.
|
3 |
+
*/
|
4 |
jQuery(document).ready(function() {
|
5 |
|
6 |
/* === Checkbox Multiple Control === */
|
7 |
|
8 |
+
jQuery( '.customize-control-checkbox-multiple input[type="radio"]' ).on( 'change', function() {
|
|
|
|
|
9 |
|
10 |
+
checkbox_values = jQuery(this)
|
11 |
+
.parents( '.customize-control' )
|
12 |
+
.find( 'input[type="radio"]:checked' )
|
13 |
+
.val();
|
14 |
|
15 |
+
style_values = jQuery(this)
|
16 |
+
.parents( '.customize-control' )
|
17 |
+
.find( 'input[type="radio"]:checked' )
|
18 |
+
.data('style');
|
19 |
|
20 |
+
var val = [];
|
21 |
+
val.push(checkbox_values);
|
22 |
+
val.push(style_values);
|
23 |
+
// console.log(val);
|
24 |
+
jQuery(this)
|
25 |
+
.parents( '.customize-control' )
|
26 |
+
.find( 'input[type="hidden"]' )
|
27 |
+
.val(checkbox_values)
|
28 |
+
.delay(500)
|
29 |
+
.trigger( 'change' );
|
30 |
|
31 |
+
} );
|
32 |
+
} ); // jQuery( document ).ready
|
|
|
|
|
33 |
|
34 |
|
35 |
(function($) {
|
36 |
|
37 |
// function for change LoginPress background-image in real time...
|
38 |
+
function loginpress_background_img( setting, target ) {
|
39 |
+
wp.customize( setting, function( value ) {
|
40 |
+
value.bind( function( loginPressVal ) {
|
41 |
+
if ( loginPressVal == '' ) {
|
42 |
+
$( '#customize-preview iframe' )
|
43 |
+
.contents()
|
44 |
+
.find( target )
|
45 |
+
.css( 'background-image', '' );
|
46 |
} else {
|
47 |
+
$( '#customize-preview iframe' )
|
48 |
+
.contents()
|
49 |
+
.find( target )
|
50 |
+
.css( 'background-image', 'url(' + loginPressVal + ')' );
|
51 |
}
|
52 |
+
} );
|
53 |
+
} );
|
54 |
+
} // ! loginpress_background_img();
|
55 |
|
56 |
// function for change LoginPress CSS in real time...
|
57 |
+
function loginpress_css_property( setting, target, property ) {
|
58 |
// Update the login logo width in real time...
|
59 |
+
wp.customize( setting, function( value ) {
|
60 |
+
value.bind( function( loginPressVal ) {
|
61 |
+
|
62 |
+
if ( loginPressVal == '' ) {
|
63 |
+
$( '#customize-preview iframe' )
|
64 |
+
.contents()
|
65 |
+
.find( target )
|
66 |
+
.css( property, '' );
|
67 |
} else {
|
68 |
+
$( '#customize-preview iframe' )
|
69 |
+
.contents()
|
70 |
+
.find( target )
|
71 |
+
.css( property, loginPressVal );
|
72 |
}
|
73 |
+
} );
|
74 |
+
} );
|
75 |
+
} // finish loginpress_css_property();
|
|
|
|
|
|
|
|
|
76 |
|
77 |
+
// function for change LoginPress attribute in real time...
|
78 |
+
function loginpress_attr_property( setting, target, property ) {
|
79 |
+
wp.customize( setting, function( value ) {
|
80 |
+
value.bind( function( loginPressVal ) {
|
81 |
+
|
82 |
+
if ( loginPressVal == '' ) {
|
83 |
+
$( '#customize-preview iframe' )
|
84 |
+
.contents()
|
85 |
+
.find( target )
|
86 |
+
.attr( property, '' );
|
87 |
} else {
|
88 |
+
$( '#customize-preview iframe' )
|
89 |
+
.contents()
|
90 |
+
.find( target )
|
91 |
+
.attr( property, loginPressVal );
|
92 |
}
|
93 |
+
} );
|
94 |
+
} );
|
95 |
+
} // finish loginpress_attr_property();
|
96 |
+
|
97 |
// function for change LoginPress input fields in real time...
|
98 |
+
function loginpress_input_property( setting, property ) {
|
99 |
+
wp.customize( setting, function( value ) {
|
100 |
+
value.bind( function( loginPressVal ) {
|
101 |
+
|
102 |
+
if ( loginPressVal == '' ) {
|
103 |
+
$( '#customize-preview iframe' )
|
104 |
+
.contents()
|
105 |
+
.find( '.login input[type="text"]' )
|
106 |
+
.css( property, '' );
|
107 |
+
$( '#customize-preview iframe' )
|
108 |
+
.contents()
|
109 |
+
.find( '.login input[type="password"]' )
|
110 |
+
.css( property, '' );
|
111 |
} else {
|
112 |
+
$( '#customize-preview iframe' )
|
113 |
+
.contents()
|
114 |
+
.find( '.login input[type="text"]' )
|
115 |
+
.css( property, loginPressVal );
|
116 |
+
$( '#customize-preview iframe' )
|
117 |
+
.contents()
|
118 |
+
.find( '.login input[type="password"]' )
|
119 |
+
.css( property, loginPressVal );
|
120 |
}
|
121 |
+
} );
|
122 |
+
} );
|
123 |
+
} // finish loginpress_input_property();
|
124 |
|
125 |
// function for change LoginPress error and welcome messages in real time...
|
126 |
+
function loginpress_text_message( errorlog, target ) {
|
127 |
+
wp.customize( errorlog, function( value ) {
|
128 |
+
value.bind( function( loginPressVal ) {
|
129 |
+
|
130 |
+
if ( loginPressVal == '' ) {
|
131 |
+
$( '#customize-preview iframe' )
|
132 |
+
.contents()
|
133 |
+
.find( target )
|
134 |
+
.text('');
|
135 |
} else {
|
136 |
+
$( '#customize-preview iframe' )
|
137 |
+
.contents()
|
138 |
+
.find( target )
|
139 |
+
.text( loginPressVal );
|
140 |
}
|
141 |
+
} );
|
142 |
+
} );
|
143 |
}
|
144 |
|
145 |
var change_theme;
|
146 |
// function for change LoginPress error and welcome messages in real time...
|
|
|
147 |
wp.customize('customize_presets_settings', function(value) {
|
148 |
value.bind(function(loginPressVal) {
|
149 |
|
591 |
}
|
592 |
} else {
|
593 |
|
594 |
+
// if (!localStorage.loginpress_bg) {
|
595 |
localStorage.setItem("loginpress_bg", loginPressVal);
|
596 |
+
// }
|
597 |
|
598 |
if ('default6' == customizer_bg) {
|
599 |
|
633 |
});
|
634 |
// loginpress_background_img( 'loginpress_customization[]', 'body.login' );
|
635 |
$('.customize-controls-close').on('click', function() {
|
636 |
+
// localStorage.removeItem("loginpress_bg_check");
|
637 |
+
// localStorage.removeItem("loginpress_bg");
|
638 |
});
|
639 |
+
// localStorage.removeItem("loginpress_bg");
|
640 |
+
// localStorage.removeItem("loginpress_bg_check");
|
641 |
// loginpress_display_control( 'loginpress_customization[footer_display_text]' );
|
642 |
// loginpress_display_control( 'loginpress_customization[back_display_text]' );
|
643 |
|
670 |
'title');
|
671 |
|
672 |
|
673 |
+
// loginpress_css_property(
|
674 |
+
// // 'loginpress_customization[setting_background_color]', 'body.login',
|
675 |
+
// 'background-color');
|
676 |
+
|
677 |
+
wp.customize('loginpress_customization[setting_background_color]', function(value) {
|
678 |
+
value.bind(function(loginPressVal) {
|
679 |
+
|
680 |
+
customizer_bg = change_theme ? change_theme : loginpress_script
|
681 |
+
.login_theme;
|
682 |
+
|
683 |
+
if ($('#customize-preview iframe').contents().find(
|
684 |
+
'#loginpress-iframe-bgColor').length == 0) {
|
685 |
+
$("<style type='text/css' id='loginpress-iframe-bgColor'></style>")
|
686 |
+
.appendTo($('#customize-preview iframe').contents().find(
|
687 |
+
'head'));
|
688 |
+
}
|
689 |
+
|
690 |
+
if (loginPressVal == '') {
|
691 |
+
|
692 |
+
if ( 'default6' == customizer_bg || 'default10' == customizer_bg ) {
|
693 |
+
$('#customize-preview iframe').contents().find(
|
694 |
+
'#loginpress-iframe-bgColor').html(
|
695 |
+
"#login::after{background-color: #f1f1f1}");
|
696 |
+
} else if ( 'default17' == customizer_bg ) {
|
697 |
+
$('#customize-preview iframe').contents().find('#login').css(
|
698 |
+
"background-color" , "'#f1f1f1'");
|
699 |
+
} else if ( 'default8' == customizer_bg ) {
|
700 |
+
$('#customize-preview iframe').contents().find(
|
701 |
+
'#loginpress-iframe-bgColor').html(
|
702 |
+
"body.login::after{background-color: #f1f1f1}");
|
703 |
+
} else {
|
704 |
+
$('#customize-preview iframe').contents().find('body.login').css(
|
705 |
+
"background-color", "#f1f1f1");
|
706 |
+
}
|
707 |
+
} else {
|
708 |
+
|
709 |
+
if ( 'default6' == customizer_bg || 'default10' == customizer_bg ) {
|
710 |
+
$('#customize-preview iframe').contents().find(
|
711 |
+
'#loginpress-iframe-bgColor').html(
|
712 |
+
"#login::after{background-color: " + loginPressVal +
|
713 |
+
"}");
|
714 |
+
} else if ( 'default17' == customizer_bg ) {
|
715 |
+
$('#customize-preview iframe').contents().find('#login').css(
|
716 |
+
"background-color" , loginPressVal);
|
717 |
+
} else if ( 'default8' == customizer_bg ) {
|
718 |
+
$('#customize-preview iframe').contents().find(
|
719 |
+
'#loginpress-iframe-bgColor').html(
|
720 |
+
"body.login::after{background-color: " + loginPressVal +
|
721 |
+
"}");
|
722 |
+
} else {
|
723 |
+
$('#customize-preview iframe').contents().find('body.login').css(
|
724 |
+
"background-color", loginPressVal);
|
725 |
+
}
|
726 |
+
}
|
727 |
+
});
|
728 |
+
});
|
729 |
+
|
730 |
+
|
731 |
+
// loginpress_specialcase_bg_property( 'loginpress_customization[background_repeat_radio]', 'background-repeat' );
|
732 |
+
|
733 |
+
wp.customize( 'loginpress_customization[background_repeat_radio]', function(value) {
|
734 |
+
value.bind(function(loginPressVal) {
|
735 |
+
|
736 |
+
customizer_bg = change_theme ? change_theme : loginpress_script
|
737 |
+
.login_theme;
|
738 |
+
|
739 |
+
if ($('#customize-preview iframe').contents().find(
|
740 |
+
'#loginpress-scbg-repeat').length == 0) {
|
741 |
+
$("<style type='text/css' id='loginpress-scbg-repeat'></style>")
|
742 |
+
.appendTo($('#customize-preview iframe').contents().find(
|
743 |
+
'head'));
|
744 |
+
}
|
745 |
+
|
746 |
+
if ( loginPressVal != '' ) {
|
747 |
+
|
748 |
+
if ( 'default6' == customizer_bg || 'default10' == customizer_bg ) {
|
749 |
+
$('#customize-preview iframe').contents().find(
|
750 |
+
'#loginpress-scbg-repeat').html(
|
751 |
+
"#login::after{background-repeat: " + loginPressVal +
|
752 |
+
"}");
|
753 |
+
} else if ( 'default17' == customizer_bg ) {
|
754 |
+
$('#customize-preview iframe').contents().find('#login').css(
|
755 |
+
"background-repeat" , loginPressVal);
|
756 |
+
} else if ( 'default8' == customizer_bg ) {
|
757 |
+
$('#customize-preview iframe').contents().find(
|
758 |
+
'#loginpress-scbg-repeat').html(
|
759 |
+
"body.login::after{background-repeat: " + loginPressVal +
|
760 |
+
"}");
|
761 |
+
} else {
|
762 |
+
$('#customize-preview iframe').contents().find('body.login').css(
|
763 |
+
"background-repeat", loginPressVal);
|
764 |
+
}
|
765 |
+
|
766 |
+
}
|
767 |
+
});
|
768 |
+
});
|
769 |
+
|
770 |
+
// loginpress_specialcase_bg_property( 'loginpress_customization[background_image_size]', 'background-size' );
|
771 |
+
|
772 |
+
wp.customize( 'loginpress_customization[background_image_size]', function(value) {
|
773 |
+
value.bind(function(loginPressVal) {
|
774 |
+
|
775 |
+
customizer_bg = change_theme ? change_theme : loginpress_script
|
776 |
+
.login_theme;
|
777 |
+
|
778 |
+
if ($('#customize-preview iframe').contents().find(
|
779 |
+
'#loginpress-scbg-size').length == 0) {
|
780 |
+
$("<style type='text/css' id='loginpress-scbg-size'></style>")
|
781 |
+
.appendTo($('#customize-preview iframe').contents().find(
|
782 |
+
'head'));
|
783 |
+
}
|
784 |
+
|
785 |
+
if ( loginPressVal != '' ) {
|
786 |
+
|
787 |
+
if ( 'default6' == customizer_bg || 'default10' == customizer_bg ) {
|
788 |
+
$('#customize-preview iframe').contents().find(
|
789 |
+
'#loginpress-scbg-size').html(
|
790 |
+
"#login::after{background-size: " + loginPressVal +
|
791 |
+
"}");
|
792 |
+
} else if ( 'default17' == customizer_bg ) {
|
793 |
+
$('#customize-preview iframe').contents().find('#login').css(
|
794 |
+
"background-size" , loginPressVal);
|
795 |
+
} else if ( 'default8' == customizer_bg ) {
|
796 |
+
$('#customize-preview iframe').contents().find(
|
797 |
+
'#loginpress-scbg-size').html(
|
798 |
+
"body.login::after{background-size: " + loginPressVal +
|
799 |
+
"}");
|
800 |
+
} else {
|
801 |
+
$('#customize-preview iframe').contents().find('body.login').css(
|
802 |
+
"background-size", loginPressVal);
|
803 |
+
}
|
804 |
+
|
805 |
+
}
|
806 |
+
});
|
807 |
+
});
|
808 |
+
|
809 |
+
// loginpress_specialcase_bg_property( 'loginpress_customization[background_position]', 'background-position' );
|
810 |
+
|
811 |
+
wp.customize( 'loginpress_customization[background_position]', function(value) {
|
812 |
+
value.bind(function(loginPressVal) {
|
813 |
+
|
814 |
+
customizer_bg = change_theme ? change_theme : loginpress_script
|
815 |
+
.login_theme;
|
816 |
+
|
817 |
+
if ($('#customize-preview iframe').contents().find(
|
818 |
+
'#loginpress-scbg-position').length == 0) {
|
819 |
+
$("<style type='text/css' id='loginpress-scbg-position'></style>")
|
820 |
+
.appendTo($('#customize-preview iframe').contents().find(
|
821 |
+
'head'));
|
822 |
+
}
|
823 |
+
|
824 |
+
if ( loginPressVal != '' ) {
|
825 |
+
|
826 |
+
if ( 'default6' == customizer_bg || 'default10' == customizer_bg ) {
|
827 |
+
$('#customize-preview iframe').contents().find(
|
828 |
+
'#loginpress-scbg-position').html(
|
829 |
+
"#login::after{background-position: " + loginPressVal +
|
830 |
+
"}");
|
831 |
+
} else if ( 'default17' == customizer_bg ) {
|
832 |
+
$('#customize-preview iframe').contents().find('#login').css(
|
833 |
+
"background-position" , loginPressVal);
|
834 |
+
} else if ( 'default8' == customizer_bg ) {
|
835 |
+
$('#customize-preview iframe').contents().find(
|
836 |
+
'#loginpress-scbg-position').html(
|
837 |
+
"body.login::after{background-position: " + loginPressVal +
|
838 |
+
"}");
|
839 |
+
} else {
|
840 |
+
$('#customize-preview iframe').contents().find('body.login').css(
|
841 |
+
"background-position", loginPressVal);
|
842 |
+
}
|
843 |
+
|
844 |
+
}
|
845 |
+
});
|
846 |
+
});
|
847 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
848 |
|
849 |
loginpress_background_img(
|
850 |
'loginpress_customization[setting_form_background]', '#loginform');
|
1314 |
|
1315 |
$("<style type='text/css' id='loginpress-customize'></style>").appendTo(
|
1316 |
$('#customize-preview iframe').contents().find('head'));
|
1317 |
+
$("<style type='text/css' id='loginpress-iframe-bgColor'></style>").appendTo(
|
1318 |
+
$('#customize-preview iframe').contents().find('head'));
|
1319 |
+
$("<style type='text/css' id='loginpress-scbg-position'></style>").appendTo(
|
1320 |
+
$('#customize-preview iframe').contents().find('head'));
|
1321 |
+
$("<style type='text/css' id='loginpress-scbg-size'></style>").appendTo(
|
1322 |
+
$('#customize-preview iframe').contents().find('head'));
|
1323 |
+
$("<style type='text/css' id='loginpress-scbg-repeat'></style>").appendTo(
|
1324 |
+
$('#customize-preview iframe').contents().find('head'));
|
1325 |
+
|
1326 |
+
|
1327 |
});
|
1328 |
|
1329 |
})(jQuery);
|
loginpress.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: LoginPress - Customizing the WordPress Login
|
4 |
* Plugin URI: http://www.WPBrigade.com/wordpress/plugins/loginpress/
|
5 |
* Description: LoginPress is the best <code>wp-login</code> Login Page Customizer plugin by <a href="https://wpbrigade.com/">WPBrigade</a> 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 |
* Text Domain: loginpress
|
@@ -22,7 +22,7 @@ if ( ! class_exists( 'LoginPress' ) ) :
|
|
22 |
/**
|
23 |
* @var string
|
24 |
*/
|
25 |
-
public $version = '1.0.
|
26 |
|
27 |
/**
|
28 |
* @var The single instance of the class
|
3 |
* Plugin Name: LoginPress - Customizing the WordPress Login
|
4 |
* Plugin URI: http://www.WPBrigade.com/wordpress/plugins/loginpress/
|
5 |
* Description: LoginPress is the best <code>wp-login</code> Login Page Customizer plugin by <a href="https://wpbrigade.com/">WPBrigade</a> which allows you to completely change the layout of login, register and forgot password forms.
|
6 |
+
* Version: 1.0.14
|
7 |
* Author: WPBrigade
|
8 |
* Author URI: http://www.WPBrigade.com/
|
9 |
* Text Domain: loginpress
|
22 |
/**
|
23 |
* @var string
|
24 |
*/
|
25 |
+
public $version = '1.0.14';
|
26 |
|
27 |
/**
|
28 |
* @var The single instance of the class
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tested up to: 4.7
|
|
4 |
Contributors: WPBrigade, hiddenpearls, AbdulWahab610
|
5 |
Author URI: https://wpbrigade.com
|
6 |
Tags: wp-login, custom wp-login, login customizer, custom login, custom login logo, login customizer, custom login page, login error, login page style, loginpress
|
7 |
-
Stable tag: 1.0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -163,6 +163,10 @@ Please visit <a target="_blank" rel="friend" href="http://www.WPBrigade.com/word
|
|
163 |
|
164 |
== Changelog ==
|
165 |
|
|
|
|
|
|
|
|
|
166 |
= 1.0.13 - 2017-04-14 =
|
167 |
* Bugfix: Code improvement
|
168 |
* Enhancement: Introducing Pro features e.g Google fonts, Google reCaptcha. Adding compatibility for those features in Free version.
|
@@ -219,5 +223,5 @@ Please visit <a target="_blank" rel="friend" href="http://www.WPBrigade.com/word
|
|
219 |
|
220 |
== Upgrade Notice ==
|
221 |
|
222 |
-
= 1.0.
|
223 |
* Important release, Please upgrade immediately.
|
4 |
Contributors: WPBrigade, hiddenpearls, AbdulWahab610
|
5 |
Author URI: https://wpbrigade.com
|
6 |
Tags: wp-login, custom wp-login, login customizer, custom login, custom login logo, login customizer, custom login page, login error, login page style, loginpress
|
7 |
+
Stable tag: 1.0.14
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
163 |
|
164 |
== Changelog ==
|
165 |
|
166 |
+
= 1.0.14 - 2017-04-29 =
|
167 |
+
* Bugfix: Backgrounds and Colors for pre-defined tempalates.
|
168 |
+
* Enhancement: Code cleanup
|
169 |
+
|
170 |
= 1.0.13 - 2017-04-14 =
|
171 |
* Bugfix: Code improvement
|
172 |
* Enhancement: Introducing Pro features e.g Google fonts, Google reCaptcha. Adding compatibility for those features in Free version.
|
223 |
|
224 |
== Upgrade Notice ==
|
225 |
|
226 |
+
= 1.0.14 =
|
227 |
* Important release, Please upgrade immediately.
|