Version Description
- 2018-01-19 =
- Compatibility: Compatible with WordPress 4.9.
- New Feature: Introducing Background Gallery with a selected set of HD Backgrounds for Login Screen.
- New Feature: Launched LoginPress addons (Auto Login, Hide Login, Login Redirects, Social Login, Login Widget, Limit Login Attempts)
- New Feature: Login Addons can be installed from addons page within the plugin.
- New Feature: Launched login logout menu addon on wordpress.org can be installed from loginpress addons screen.
- Bugfix: Custom Previewer Icon issue on Preview screen
- Bugfix: Date_function() is deprecated
- Enhancement: Code refactoring
Download this release
Release Info
Developer | hiddenpearls |
Plugin | Custom Login Page Customizer | LoginPress |
Version | 1.1.0 |
Comparing to | |
See all releases |
Code changes from version 1.0.23 to 1.1.0
- classes/class-loginpress-addons.php +407 -195
- classes/class-loginpress-login-order.php +1 -1
- classes/class-loginpress-settings-api.php +34 -2
- classes/controls/background-gallery.php +115 -0
- css/style-login.php +27 -1
- css/themes/default-1.php +19 -0
- custom.php +48 -1
- img/back_arrow.png +0 -0
- img/bg.jpg +0 -0
- img/bg2.jpg +0 -0
- img/clock.png +0 -0
- img/dummy.jpg +0 -0
- img/gallery/img-2.jpg +0 -0
- img/gallery/img-3.jpg +0 -0
- img/gallery/img-4.jpg +0 -0
- img/gallery/img-5.jpg +0 -0
- img/gallery/img-6.jpg +0 -0
- img/gallery/img-7.jpg +0 -0
- img/gallery/img-8.jpg +0 -0
- img/gallery/img-9.jpg +0 -0
- img/loginpress.png +0 -0
- img/promo/font_promo.png +0 -0
- img/promo/hint_promo.png +0 -0
- img/promo/recaptcha_option_promo.png +0 -0
- img/promo/recaptcha_promo.png +0 -0
- img/thumbnail/custom-design.png +0 -0
- img/thumbnail/default-1.png +0 -0
- img/thumbnail/default-10.png +0 -0
- img/thumbnail/default-11.png +0 -0
- img/thumbnail/default-12.png +0 -0
- img/thumbnail/default-13.png +0 -0
- img/thumbnail/default-14.png +0 -0
- img/thumbnail/default-15.png +0 -0
- img/thumbnail/default-16.png +0 -0
- img/thumbnail/default-17.png +0 -0
- img/thumbnail/default-2.png +0 -0
- img/thumbnail/default-3.png +0 -0
- img/thumbnail/default-4.jpg +0 -0
- img/thumbnail/default-4.png +0 -0
- img/thumbnail/default-5.png +0 -0
- img/thumbnail/default-6.png +0 -0
- img/thumbnail/default-7.png +0 -0
- img/thumbnail/default-8.png +0 -0
- img/thumbnail/default-9.png +0 -0
- img/thumbnail/default.png +0 -0
- img/thumbnail/gallery-img-1.jpg +0 -0
- img/thumbnail/gallery-img-1.png +0 -0
- img/thumbnail/gallery-img-2.jpg +0 -0
- img/thumbnail/gallery-img-3.jpg +0 -0
- img/thumbnail/gallery-img-4.jpg +0 -0
- img/thumbnail/gallery-img-5.jpg +0 -0
- img/thumbnail/gallery-img-6.jpg +0 -0
- img/thumbnail/gallery-img-7.jpg +0 -0
- img/thumbnail/gallery-img-8.jpg +0 -0
- img/thumbnail/gallery-img-9.jpg +0 -0
- img/thumbnail/gray-loginpress.png +0 -0
- img/thumbnail/v18.jpg +0 -0
- img/thumbnail/v9.jpg +0 -0
- js/controls/loginpress-gallery-control.js +0 -0
- js/customize-controls.js +410 -742
- js/customizer-previewer.js +7 -4
- js/customizer.js +6 -0
- loginpress.php +22 -24
- readme.txt +27 -3
classes/class-loginpress-addons.php
CHANGED
@@ -25,36 +25,120 @@ if ( ! class_exists( 'LoginPress_Addons' ) ) :
|
|
25 |
* * * * * * * * * */
|
26 |
function __construct() {
|
27 |
|
28 |
-
|
29 |
-
// add_filter( 'plugins_api', array( $this, 'get_addon_info' ), 100, 3 );
|
30 |
-
$this->get_addons_link();
|
31 |
}
|
32 |
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
|
39 |
-
|
40 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
|
42 |
-
|
43 |
-
return false;
|
44 |
-
}
|
45 |
|
46 |
-
|
47 |
|
48 |
-
|
49 |
-
// $nonces = array();
|
50 |
-
// foreach ( $addons as $addon ) {
|
51 |
-
// $nonces[ $addon['key'] ] = wp_create_nonce( "install-plugin_{$addon['key']}" );
|
52 |
-
// }
|
53 |
-
// echo '<pre>'; print_r( $nonces ); echo '</pre>';
|
54 |
|
55 |
-
|
|
|
|
|
|
|
56 |
}
|
57 |
|
|
|
58 |
function get_addons_link() {
|
59 |
|
60 |
$addons = $this->get_addons_name();
|
@@ -68,177 +152,328 @@ if ( ! class_exists( 'LoginPress_Addons' ) ) :
|
|
68 |
}
|
69 |
|
70 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
/**
|
72 |
* Check plugin status
|
73 |
*
|
74 |
* @return array
|
75 |
* @since 1.0.19
|
76 |
*/
|
77 |
-
public function check_plugin_status( $slug, $
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
|
79 |
-
|
|
|
|
|
80 |
|
81 |
-
|
82 |
|
83 |
-
|
84 |
|
85 |
-
|
86 |
-
|
|
|
87 |
|
88 |
-
|
|
|
|
|
|
|
89 |
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
}
|
|
|
95 |
} // Enf of Class.
|
|
|
96 |
endif;
|
97 |
|
98 |
|
99 |
$obj_loginpress_addons = new LoginPress_Addons();
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
123 |
display: inline-block;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
124 |
height: auto;
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
position: relative;
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
right
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
color: #444;
|
155 |
-
position: absolute;
|
156 |
-
right: 0px;
|
157 |
-
bottom: 0px;
|
158 |
-
border: 0;
|
159 |
-
border-left: 1px solid #e2e5e8;
|
160 |
-
border-top: 1px solid #e2e5e8;
|
161 |
-
cursor: default;
|
162 |
-
}
|
163 |
-
.loginpress-extension button.button-primary:visited,.loginpress-extension button.button-primary:active,.loginpress-extension button.button-primary:hover,.loginpress-extension button.button-primary:focus{
|
164 |
-
background: #f9fafa;
|
165 |
-
color: #444;
|
166 |
-
border: 0;
|
167 |
-
border-left: 1px solid #e2e5e8;
|
168 |
-
border-top: 1px solid #e2e5e8;
|
169 |
-
outline: none;
|
170 |
-
box-shadow: none;
|
171 |
-
}
|
172 |
-
.logoinpress_addons_thumbnails{
|
173 |
-
|
174 |
-
max-width: 100px;
|
175 |
-
position: absolute;
|
176 |
-
top: 5px;
|
177 |
-
left: 10px;
|
178 |
-
max-height: 95px;
|
179 |
-
height: auto;
|
180 |
-
width: auto;
|
181 |
-
}
|
182 |
-
.loginpress-extension .logoinpress_addons_links{
|
183 |
-
position: relative;
|
184 |
-
}
|
185 |
-
.loginpress-extension p {
|
186 |
-
margin: 0;
|
187 |
-
padding: 10px;
|
188 |
-
}
|
189 |
-
.loginpress-addons-loading-errors {
|
190 |
-
padding-top: 15px;
|
191 |
-
}
|
192 |
-
.loginpress-addons-loading-errors img {
|
193 |
-
float: left;
|
194 |
-
padding-right: 10px;
|
195 |
-
}
|
196 |
-
.loginpress-addons-wrap{
|
197 |
-
max-width: 1050px;
|
198 |
-
}
|
199 |
-
.loginpress-extension h3 {
|
200 |
-
box-sizing: border-box;
|
201 |
-
/* height: 110px; */
|
202 |
-
margin: 0;
|
203 |
-
padding: 0 10px 0 10px;
|
204 |
-
border-bottom: 2px solid #e2e5e8;
|
205 |
-
background-size: 115px 100px;
|
206 |
-
height: 100px;
|
207 |
-
color: #000000;
|
208 |
-
}
|
209 |
-
a.logoinpress_addons_links {
|
210 |
-
display: inline-block;
|
211 |
-
width: 100%;
|
212 |
-
line-height: 90px;
|
213 |
-
padding-bottom: 5px;
|
214 |
-
height: auto;
|
215 |
-
text-decoration: none;
|
216 |
-
}
|
217 |
-
.logoinpress_addons_thumbnails {
|
218 |
-
max-width: 100px;
|
219 |
-
position: absolute;
|
220 |
-
top: 5px;
|
221 |
-
left: 10px;
|
222 |
-
max-height: 75px;
|
223 |
-
height: auto;
|
224 |
-
width: auto;
|
225 |
-
position: static;
|
226 |
-
vertical-align: middle;
|
227 |
-
margin-right: 20px;
|
228 |
-
}
|
229 |
-
.loginpress-extension{
|
230 |
-
border-width: 2px;
|
231 |
-
}
|
232 |
-
.loginpress-extension:nth-child(even){
|
233 |
-
margin-right: 0;
|
234 |
-
}
|
235 |
-
@media only screen and (max-width: 600px) {
|
236 |
-
.loginpress-extension{
|
237 |
-
width:100%;
|
238 |
}
|
239 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
240 |
|
241 |
-
|
242 |
|
243 |
<div class="wrap loginpress-addons-wrap">
|
244 |
|
@@ -247,31 +482,8 @@ a.logoinpress_addons_links {
|
|
247 |
</h2>
|
248 |
|
249 |
<div class="tabwrapper">
|
250 |
-
<?php if ( is_array( $loginpress_addons ) ) :
|
251 |
-
foreach ( $loginpress_addons as $name => $extension ) : ?>
|
252 |
-
<div class="loginpress-extension">
|
253 |
-
<a target="_blank" href="https://wpbrigade.com/wordpress/plugins/loginpress-pro/?utm_source=loginpress-lite&utm_medium=addons-coming-soon&utm_campaign=pro-upgrade" class="logoinpress_addons_links">
|
254 |
-
|
255 |
-
<h3><img src=<?php echo plugins_url( '../img/thumbnail/gray-loginpress.png', __FILE__ );?> class="logoinpress_addons_thumbnails"/><span><?php echo $extension['title']; ?></span></h3>
|
256 |
-
</a>
|
257 |
-
|
258 |
-
<p><?php echo $extension['details']; ?></p>
|
259 |
-
<p>
|
260 |
-
<?php //$obj_loginpress_addons->check_plugin_status( $extension['key'], $extension ); ?>
|
261 |
-
<a target="_blank" href="https://wpbrigade.com/wordpress/plugins/loginpress-pro/?utm_source=loginpress-lite&utm_medium=addons-coming-soon&utm_campaign=pro-upgrade" class="button-primary">Coming Soon</a>
|
262 |
-
</p>
|
263 |
-
</div>
|
264 |
<?php
|
265 |
-
|
266 |
-
|
267 |
-
<div class="loginpress-addons-loading-errors">
|
268 |
-
<img src="<?php echo plugins_url( '../img/clock.png', __FILE__ );?>" alt="clock">
|
269 |
-
<h3>
|
270 |
-
<?php esc_html_e( 'Trouble in loading Add-ons. Please reload the page.', 'loginpress' ) ?>
|
271 |
-
</h3>
|
272 |
-
<p><?php echo sprintf( __( 'Findout the LoginPress %1$s', 'loginpress' ), '<a href="https://wpbrigade.com/wordpress/plugins/loginpress/" target="_blank">Add-ons</a>') ?></p>
|
273 |
-
</div>
|
274 |
-
<?php endif; ?>
|
275 |
</div>
|
276 |
-
|
277 |
-
</div>
|
25 |
* * * * * * * * * */
|
26 |
function __construct() {
|
27 |
|
28 |
+
$this->plugins_list = get_plugins();
|
|
|
|
|
29 |
}
|
30 |
|
31 |
+
function _get_addons() {
|
32 |
+
|
33 |
+
// For Testing
|
34 |
+
//delete_transient( 'loginpress_api_addons' );
|
35 |
+
|
36 |
+
// Get the transient where the addons are stored on-site.
|
37 |
+
$data = get_transient( 'loginpress_api_addons' );
|
38 |
+
|
39 |
+
// If we already have data, return it.
|
40 |
+
if ( ! empty( $data ) )
|
41 |
+
return $data;
|
42 |
+
|
43 |
+
// Make sure this matches the exact URL from your site.
|
44 |
+
//$url = 'http://localhost/wpbrigade.local/wp-json/wpbrigade/v1/plugins?addons=loginpress-pro-add-ons';
|
45 |
+
$url = 'https://wpbrigade.com/wp-json/wpbrigade/v1/plugins?addons=loginpress-pro-add-ons';
|
46 |
+
|
47 |
+
// Get data from the remote URL.
|
48 |
+
$response = wp_remote_get( $url, array( 'timeout' => 20) );
|
49 |
+
//var_dump($response);
|
50 |
+
if ( ! is_wp_error( $response ) ) {
|
51 |
+
|
52 |
+
// Decode the data that we got.
|
53 |
+
$data = json_decode( wp_remote_retrieve_body( $response ) );
|
54 |
+
|
55 |
+
if ( ! empty( $data ) && is_array( $data ) ) {
|
56 |
+
|
57 |
+
// Store the data for a week.
|
58 |
+
set_transient( 'loginpress_api_addons', $data, 7 * DAY_IN_SECONDS );
|
59 |
+
|
60 |
+
return $data;
|
61 |
+
}
|
62 |
+
}
|
63 |
+
|
64 |
+
return false;
|
65 |
+
}
|
66 |
+
|
67 |
+
function _addon_card( $addon ) { ?>
|
68 |
+
|
69 |
+
<div class="loginpress-extension<?php if( in_array('loginpress-free-add-ons', $this->convert_to_array($addon->categories) ) ){ echo ' loginpress-free-add-ons'; } ?>">
|
70 |
+
<a target="_blank" href="https://wpbrigade.com/wordpress/plugins/loginpress-pro/?utm_source=loginpress-lite&utm_medium=addons-coming-soon&utm_campaign=pro-upgrade" class="logoinpress_addons_links">
|
71 |
+
|
72 |
+
<h3><img src=<?php if ( $addon->media->icon->url ) echo $addon->media->icon->url; else echo plugins_url( '../img/thumbnail/gray-loginpress.png', __FILE__ );?> class="logoinpress_addons_thumbnails"/><span><?php echo esc_html( $addon->title ); ?></span></h3>
|
73 |
+
</a>
|
74 |
+
|
75 |
+
<?php echo wpautop( wp_strip_all_tags( $addon->excerpt ) ); ?>
|
76 |
+
<p>
|
77 |
+
<?php
|
78 |
+
$this->check_plugin_status( $addon->id, $addon->slug, $this->convert_to_array( $addon->categories ) );
|
79 |
+
?>
|
80 |
+
</p>
|
81 |
+
</div>
|
82 |
+
|
83 |
+
<?php }
|
84 |
+
|
85 |
+
function _addon_card_free( $addon ) { ?>
|
86 |
+
|
87 |
+
<div class="loginpress-extension<?php if( in_array('loginpress-free-add-ons', $this->convert_to_array($addon->categories) ) ){ echo ' loginpress-free-add-ons'; } ?>">
|
88 |
+
<a target="_blank" href="https://wpbrigade.com/wordpress/plugins/loginpress-pro/?utm_source=loginpress-lite&utm_medium=addons-coming-soon&utm_campaign=pro-upgrade" class="logoinpress_addons_links">
|
89 |
|
90 |
+
<h3><img src=<?php if ( $addon->media->icon->url ) echo $addon->media->icon->url; else echo plugins_url( '../img/thumbnail/gray-loginpress.png', __FILE__ );?> class="logoinpress_addons_thumbnails"/><span><?php echo esc_html( $addon->title ); ?></span></h3>
|
91 |
+
</a>
|
92 |
+
|
93 |
+
<?php echo wpautop( wp_strip_all_tags( $addon->excerpt ) );
|
94 |
+
|
95 |
+
if( in_array('loginpress-free-add-ons', $this->convert_to_array($addon->categories) ) ){
|
96 |
+
$slug = $addon->slug.'/'.$addon->slug.'.php';
|
97 |
+
|
98 |
+
if ( is_plugin_active( $slug ) ) {
|
99 |
+
|
100 |
+
echo sprintf( esc_html__( '%1$s Already Installed %2$s', 'loginpress' ), '<button class="button-primary">', '</button>' );
|
101 |
+
}else if ( array_key_exists( $slug , $this->plugins_list ) ) {
|
102 |
+
|
103 |
+
$link = wp_nonce_url( add_query_arg( array( 'action' => 'activate', 'plugin' => $slug ), admin_url( 'plugins.php' ) ), 'activate-plugin_' . $slug ) ;
|
104 |
+
echo sprintf( esc_html__( '%1$s Activate Plugin %2$s', 'loginpress' ), '<a href="' . $link . '" class="button-primary">', '</a>' );
|
105 |
+
}else{
|
106 |
+
|
107 |
+
$action = 'install-plugin';
|
108 |
+
$slug = 'login-logout-menu';
|
109 |
+
$link = wp_nonce_url( add_query_arg( array( 'action' => $action, 'plugin' => $slug ), admin_url( 'update.php' ) ), $action . '_' . $slug );
|
110 |
+
?>
|
111 |
+
<p>
|
112 |
+
<a target="_self" href="<?php echo $link; ?>" class="button-primary">INSTALL</a>
|
113 |
+
</p>
|
114 |
+
<?php
|
115 |
+
}
|
116 |
+
}else{
|
117 |
+
|
118 |
+
?>
|
119 |
+
<p>
|
120 |
+
<a target="_blank" href="https://wpbrigade.com/wordpress/plugins/loginpress-pro/?utm_source=loginpress-lite&utm_medium=addons-coming-soon&utm_campaign=pro-upgrade" class="button-primary">UPGRADE NOW</a>
|
121 |
+
</p>
|
122 |
+
<?php
|
123 |
+
}
|
124 |
+
?>
|
125 |
+
</div>
|
126 |
+
|
127 |
+
<?php }
|
128 |
|
129 |
+
function convert_to_array( $categories ) {
|
|
|
|
|
130 |
|
131 |
+
$arr = array();
|
132 |
|
133 |
+
foreach ($categories as $category) {
|
|
|
|
|
|
|
|
|
|
|
134 |
|
135 |
+
$arr[] = $category->slug;
|
136 |
+
}
|
137 |
+
|
138 |
+
return $arr;
|
139 |
}
|
140 |
|
141 |
+
|
142 |
function get_addons_link() {
|
143 |
|
144 |
$addons = $this->get_addons_name();
|
152 |
}
|
153 |
|
154 |
|
155 |
+
function is_addon_licensed( $categories ) {
|
156 |
+
|
157 |
+
if( LoginPress_Pro::get_license_id() == 2 and in_array('loginpress-pro-small-business', $categories) ){
|
158 |
+
|
159 |
+
return true;
|
160 |
+
}
|
161 |
+
else if( LoginPress_Pro::get_license_id() == 3 and in_array('loginpress-pro-agency', $categories) ){
|
162 |
+
return true;
|
163 |
+
}else if( LoginPress_Pro::get_license_id() == 1 and in_array('loginpress-free-add-ons', $categories) ){
|
164 |
+
return true;
|
165 |
+
}else{
|
166 |
+
return false;
|
167 |
+
}
|
168 |
+
}
|
169 |
+
|
170 |
/**
|
171 |
* Check plugin status
|
172 |
*
|
173 |
* @return array
|
174 |
* @since 1.0.19
|
175 |
*/
|
176 |
+
public function check_plugin_status( $id, $slug, $categories = array() ) {
|
177 |
+
|
178 |
+
$slug = $slug.'/'.$slug.'.php';
|
179 |
+
|
180 |
+
if ( $this->is_addon_licensed ( $categories ) ) {
|
181 |
+
|
182 |
+
if ( is_plugin_active( $slug ) ) {
|
183 |
+
|
184 |
+
echo sprintf( esc_html__( '%1$s Already Installed %2$s', 'loginpress' ), '<button class="button-primary">', '</button>' );
|
185 |
+
}
|
186 |
+
else if ( array_key_exists( $slug , $this->plugins_list ) ) {
|
187 |
+
|
188 |
+
$link = wp_nonce_url( add_query_arg( array( 'action' => 'activate', 'plugin' => $slug ), admin_url( 'plugins.php' ) ), 'activate-plugin_' . $slug ) ;
|
189 |
+
echo sprintf( esc_html__( '%1$s Activate Plugin %2$s', 'loginpress' ), '<a href="' . $link . '" class="button-primary">', '</a>' );
|
190 |
+
}
|
191 |
+
else{
|
192 |
+
|
193 |
+
$link = wp_nonce_url( add_query_arg( array( 'action' => 'install-plugin', 'plugin' => $slug, 'lgp' => 1, 'id' => $id), admin_url( 'update.php' ) ), 'install-plugin_' . $slug );
|
194 |
+
echo sprintf( esc_html__( '%1$s Install %2$s', 'loginpress' ), '<a href="' . $link . '" class="button-primary">', '</a>' );
|
195 |
+
|
196 |
+
?>
|
197 |
+
<!-- <a target="_blank" href="https://wpbrigade.com/wordpress/plugins/loginpress-pro/?utm_source=loginpress-lite&utm_medium=addons-coming-soon&utm_campaign=pro-upgrade" class="button-primary">INSTALL NOW</a> -->
|
198 |
+
<?php
|
199 |
+
}
|
200 |
+
}
|
201 |
+
else {
|
202 |
+
|
203 |
+
?>
|
204 |
+
<a target="_blank" href="https://wpbrigade.com/wordpress/plugins/loginpress-pro/?utm_source=loginpress-lite&utm_medium=addons-coming-soon&utm_campaign=pro-upgrade" class="button-primary">UPGRADE NOW</a>
|
205 |
+
<?php
|
206 |
+
}
|
207 |
+
}
|
208 |
+
|
209 |
+
public function validate_addons() {
|
210 |
+
|
211 |
+
$data = get_transient( 'loginpress_api_addons' );
|
212 |
+
|
213 |
+
|
214 |
+
}
|
215 |
+
|
216 |
+
public function show_addon_page() {
|
217 |
+
|
218 |
+
if ( class_exists('LoginPress_Pro') ) {
|
219 |
+
|
220 |
+
if ( LoginPress_Pro::is_activated() ) {
|
221 |
+
|
222 |
+
$expiration_date = LoginPress_Pro::get_expiration_date();
|
223 |
+
|
224 |
+
if ( 'lifetime' == $expiration_date ) {
|
225 |
+
echo esc_html__( 'You have a lifetime license, it will never expire.', 'loginpress-pro' );
|
226 |
+
}
|
227 |
+
else {
|
228 |
+
echo '<div class="main_notice_msg">' . sprintf(
|
229 |
+
esc_html__( 'Your (%2$s) license key is valid until %s.', 'loginpress-pro' ),
|
230 |
+
'<strong>' . date_i18n( get_option( 'date_format' ), strtotime( $expiration_date, current_time( 'timestamp' ) ) ) . '</strong>', LoginPress_Pro::get_license_type()
|
231 |
+
) . '</div>';
|
232 |
+
}
|
233 |
+
|
234 |
+
?> <div class="addon_cards_wraper"> <?php
|
235 |
+
foreach( $this->_get_addons() as $addon ) {
|
236 |
|
237 |
+
$this->_addon_card( $addon );
|
238 |
+
}
|
239 |
+
?> </div> <?php
|
240 |
|
241 |
+
}else{
|
242 |
|
243 |
+
echo '<div class="main_notice_msg">' . sprintf( esc_html__( 'You need to activate your license to download the following add-ons.', 'loginpress-pro' ) ) . '</div>';
|
244 |
|
245 |
+
// Show full list of add-ons
|
246 |
+
?> <div class="addon_cards_wraper"> <?php
|
247 |
+
foreach( $this->_get_addons() as $addon ) {
|
248 |
|
249 |
+
$this->_addon_card_free( $addon );
|
250 |
+
}
|
251 |
+
?> </div> <?php
|
252 |
+
}
|
253 |
|
254 |
+
}else{
|
255 |
+
|
256 |
+
echo '<div class="main_notice_msg">' . sprintf( esc_html__( 'You need to upgrade to LoginPress Pro to access these add-ons.', 'loginpress-pro' ) ) . '</div>';
|
257 |
+
|
258 |
+
// Show full list of add-ons
|
259 |
+
?> <div class="addon_cards_wraper"> <?php
|
260 |
+
foreach( $this->_get_addons() as $addon ) {
|
261 |
+
|
262 |
+
$this->_addon_card_free( $addon );
|
263 |
+
}
|
264 |
+
?> </div> <?php
|
265 |
+
}
|
266 |
}
|
267 |
+
|
268 |
} // Enf of Class.
|
269 |
+
|
270 |
endif;
|
271 |
|
272 |
|
273 |
$obj_loginpress_addons = new LoginPress_Addons();
|
274 |
+
$loginpress_addons = $obj_loginpress_addons->_get_addons();
|
275 |
+
?>
|
276 |
+
|
277 |
+
<!-- Style for Add-ons Page -->
|
278 |
+
<style media="screen">
|
279 |
+
.loginpress-extension h3 {
|
280 |
+
box-sizing: border-box;
|
281 |
+
height: 110px;
|
282 |
+
margin: -2px -2px 0 0;
|
283 |
+
padding: 20px 10px 0 135px;
|
284 |
+
border-bottom: 1px solid #a5dff6;
|
285 |
+
|
286 |
+
background-size: 115px 100px;
|
287 |
+
position: relative;
|
288 |
+
overflow: hidden;
|
289 |
+
}
|
290 |
+
.loginpress-free-add-ons h3:after{
|
291 |
+
content: "Free";
|
292 |
+
position: absolute;
|
293 |
+
top: 10px;
|
294 |
+
right: -30px;
|
295 |
+
width: 100px;
|
296 |
+
height: 30px;
|
297 |
+
background-color: #00a0d2;
|
298 |
+
color: #fff;
|
299 |
+
transform: rotate(45deg);
|
300 |
+
line-height: 30px;
|
301 |
+
text-align: center;
|
302 |
+
font-size: 13px;
|
303 |
+
}
|
304 |
+
.loginpress-extension {
|
305 |
+
float: none;
|
306 |
+
box-sizing: border-box;
|
307 |
+
width: calc(33% - 20px);
|
308 |
+
margin: 0px 0px 30px 30px;
|
309 |
+
border: 1px solid #a5dff6;
|
310 |
+
display: inline-block;
|
311 |
+
height: auto;
|
312 |
+
vertical-align: top;
|
313 |
+
background: #fff;
|
314 |
+
min-height: 300px;
|
315 |
+
position: relative;
|
316 |
+
padding-bottom: 50px;
|
317 |
+
max-width: 465px;
|
318 |
+
}
|
319 |
+
.loginpress-extension:nth-child(3n+1){
|
320 |
+
margin-left: 0;
|
321 |
+
}
|
322 |
+
.loginpress-extension .button-primary{
|
323 |
+
border:0;
|
324 |
+
text-shadow:none;
|
325 |
+
background:#1a61a7;
|
326 |
+
padding:8px 18px;
|
327 |
+
height:auto;
|
328 |
+
font-size:15px;
|
329 |
+
cursor: pointer;
|
330 |
+
position: absolute;
|
331 |
+
bottom: 15px;
|
332 |
+
left: 50%;
|
333 |
+
transform: translateX(-50%);
|
334 |
+
box-shadow:none;
|
335 |
+
border-radius:0;
|
336 |
+
transition: background-color .3s;
|
337 |
+
}
|
338 |
+
.loginpress-extension .button-primary:active,.loginpress-extension .button-primary:hover,.loginpress-extension .button-primary:focus{
|
339 |
+
background: #36bcf2;
|
340 |
+
box-shadow: none;
|
341 |
+
outline: none;
|
342 |
+
}
|
343 |
+
.notice_msg{
|
344 |
+
box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 1px 0px;
|
345 |
+
background: rgb(255, 255, 255);
|
346 |
+
border-left: 4px solid #46b450;
|
347 |
+
margin: 5px 0 20px;
|
348 |
+
padding: 15px;
|
349 |
+
}
|
350 |
+
.main_notice_msg{
|
351 |
+
background: #1a61a7;
|
352 |
+
margin: 5px 0 20px;
|
353 |
+
padding: 15px;
|
354 |
+
color: #fff;
|
355 |
display: inline-block;
|
356 |
+
}
|
357 |
+
.loginpress-extension button.button-primary{
|
358 |
+
background: #f9fafa;
|
359 |
+
border-radius: 0;
|
360 |
+
box-shadow: none;
|
361 |
+
color: #444;
|
362 |
+
position: absolute;
|
363 |
+
bottom: 15px;
|
364 |
+
left: 50%;
|
365 |
+
transform: translateX(-50%);
|
366 |
+
|
367 |
+
border: 2px solid #a5dff6 !important;
|
368 |
+
background: #d3f3ff54 !important;
|
369 |
+
cursor: default;
|
370 |
+
transition: background-color .3s;
|
371 |
+
}
|
372 |
+
.loginpress-extension button.button-primary:visited,.loginpress-extension button.button-primary:active,.loginpress-extension button.button-primary:hover,.loginpress-extension button.button-primary:focus{
|
373 |
+
background: #36bcf2;
|
374 |
+
color: #444;
|
375 |
+
border: 0;
|
376 |
+
|
377 |
+
outline: none;
|
378 |
+
box-shadow: none;
|
379 |
+
}
|
380 |
+
.logoinpress_addons_thumbnails{
|
381 |
+
|
382 |
+
max-width: 100px;
|
383 |
+
position: absolute;
|
384 |
+
top: 5px;
|
385 |
+
left: 10px;
|
386 |
+
max-height: 95px;
|
387 |
height: auto;
|
388 |
+
width: auto;
|
389 |
+
}
|
390 |
+
.loginpress-extension .logoinpress_addons_links{
|
391 |
position: relative;
|
392 |
+
background-color: #d3f3ff;
|
393 |
+
}
|
394 |
+
.loginpress-extension p {
|
395 |
+
margin: 0;
|
396 |
+
padding: 10px 20px;
|
397 |
+
}
|
398 |
+
.loginpress-addons-loading-errors {
|
399 |
+
padding-top: 15px;
|
400 |
+
}
|
401 |
+
.loginpress-addons-loading-errors img {
|
402 |
+
float: left;
|
403 |
+
padding-right: 10px;
|
404 |
+
}
|
405 |
+
.loginpress-addons-wrap{
|
406 |
+
|
407 |
+
}
|
408 |
+
.loginpress-extension h3 {
|
409 |
+
box-sizing: border-box;
|
410 |
+
/* height: 110px; */
|
411 |
+
|
412 |
+
padding: 0 10px 0 20px;
|
413 |
+
border-bottom: 2px solid #a5dff6;
|
414 |
+
background-size: 115px 100px;
|
415 |
+
height: 100px;
|
416 |
+
color: #000000;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
417 |
}
|
418 |
+
a.logoinpress_addons_links {
|
419 |
+
display: inline-block;
|
420 |
+
width: 100%;
|
421 |
+
line-height: 90px;
|
422 |
+
padding-bottom: 0px;
|
423 |
+
height: auto;
|
424 |
+
text-decoration: none;
|
425 |
+
}
|
426 |
+
.logoinpress_addons_thumbnails {
|
427 |
+
max-width: 100px;
|
428 |
+
position: absolute;
|
429 |
+
top: 5px;
|
430 |
+
left: 10px;
|
431 |
+
max-height: 75px;
|
432 |
+
height: auto;
|
433 |
+
width: auto;
|
434 |
+
position: static;
|
435 |
+
vertical-align: middle;
|
436 |
+
margin-right: 20px;
|
437 |
+
}
|
438 |
+
.loginpress-extension{
|
439 |
+
border-width: 2px;
|
440 |
+
}
|
441 |
+
@media only screen and (min-width: 1680px) {
|
442 |
+
.loginpress-extension{
|
443 |
+
min-height: 315px;
|
444 |
+
width: calc(25% - 27px);
|
445 |
+
}
|
446 |
+
.loginpress-extension:nth-child(3n+1){
|
447 |
+
margin-left: 30px;
|
448 |
+
}
|
449 |
+
.loginpress-extension:nth-child(4n+1){
|
450 |
+
margin-left: 0;
|
451 |
+
}
|
452 |
+
}
|
453 |
+
@media only screen and (max-width: 1500px) {
|
454 |
+
.loginpress-extension{
|
455 |
+
min-height: 330px
|
456 |
+
}
|
457 |
+
}
|
458 |
+
@media only screen and (max-width: 1400px) {
|
459 |
+
.loginpress-extension{
|
460 |
+
min-height: 300px;
|
461 |
+
width: calc(50% - 20px);
|
462 |
+
}
|
463 |
+
.loginpress-extension:nth-child(3n+1){
|
464 |
+
margin-left: 30px;
|
465 |
+
}
|
466 |
+
.loginpress-extension:nth-child(2n+1){
|
467 |
+
margin-left: 0;
|
468 |
+
}
|
469 |
+
}
|
470 |
+
@media only screen and (max-width: 600px) {
|
471 |
+
.loginpress-extension{
|
472 |
+
width:100%;
|
473 |
+
}
|
474 |
+
}
|
475 |
|
476 |
+
</style>
|
477 |
|
478 |
<div class="wrap loginpress-addons-wrap">
|
479 |
|
482 |
</h2>
|
483 |
|
484 |
<div class="tabwrapper">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
485 |
<?php
|
486 |
+
$obj_loginpress_addons->show_addon_page();
|
487 |
+
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
488 |
</div>
|
489 |
+
</div>
|
|
classes/class-loginpress-login-order.php
CHANGED
@@ -84,7 +84,7 @@ if ( ! class_exists( 'LoginPress_Login_Order' ) ) :
|
|
84 |
|
85 |
// Is login order is set to be 'email'.
|
86 |
if ( 'email' == $login_order ) {
|
87 |
-
|
88 |
if ( ! empty( $username ) && ! is_email( $username ) ) {
|
89 |
|
90 |
$error = new WP_Error();
|
84 |
|
85 |
// Is login order is set to be 'email'.
|
86 |
if ( 'email' == $login_order ) {
|
87 |
+
|
88 |
if ( ! empty( $username ) && ! is_email( $username ) ) {
|
89 |
|
90 |
$error = new WP_Error();
|
classes/class-loginpress-settings-api.php
CHANGED
@@ -106,7 +106,7 @@ if ( !class_exists( 'LoginPress_Settings_API' ) ):
|
|
106 |
|
107 |
if ( isset( $section['desc'] ) && !empty( $section['desc'] ) ) {
|
108 |
$section['desc'] = '<div class="inside">' . $section['desc'] . '</div>';
|
109 |
-
$callback =
|
110 |
} else if ( isset( $section['callback'] ) ) {
|
111 |
$callback = $section['callback'];
|
112 |
} else {
|
@@ -560,7 +560,7 @@ if ( !class_exists( 'LoginPress_Settings_API' ) ):
|
|
560 |
$remove_submit = array( 'loginpress_autologin', 'loginpress_login_redirects' );
|
561 |
do_action( 'wsa_form_top_' . $form['id'], $form );
|
562 |
settings_fields( $form['id'] );
|
563 |
-
do_settings_sections( $form['id'] );
|
564 |
do_action( 'wsa_form_bottom_' . $form['id'], $form );
|
565 |
if ( isset( $this->settings_fields[ $form['id'] ] ) ) :
|
566 |
if( ! in_array( $form['id'], $remove_submit ) ) : // Remove submit button from Autologin & Redirects tab. ?>
|
@@ -741,6 +741,38 @@ if ( !class_exists( 'LoginPress_Settings_API' ) ):
|
|
741 |
endif;
|
742 |
}
|
743 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
744 |
}
|
745 |
|
746 |
endif;
|
106 |
|
107 |
if ( isset( $section['desc'] ) && !empty( $section['desc'] ) ) {
|
108 |
$section['desc'] = '<div class="inside">' . $section['desc'] . '</div>';
|
109 |
+
$callback = call_user_func( array( $this, 'get_description' ), $section['desc'] );
|
110 |
} else if ( isset( $section['callback'] ) ) {
|
111 |
$callback = $section['callback'];
|
112 |
} else {
|
560 |
$remove_submit = array( 'loginpress_autologin', 'loginpress_login_redirects' );
|
561 |
do_action( 'wsa_form_top_' . $form['id'], $form );
|
562 |
settings_fields( $form['id'] );
|
563 |
+
$this->do_settings_sections( $form['id'] );
|
564 |
do_action( 'wsa_form_bottom_' . $form['id'], $form );
|
565 |
if ( isset( $this->settings_fields[ $form['id'] ] ) ) :
|
566 |
if( ! in_array( $form['id'], $remove_submit ) ) : // Remove submit button from Autologin & Redirects tab. ?>
|
741 |
endif;
|
742 |
}
|
743 |
|
744 |
+
/**
|
745 |
+
* Get Section Description
|
746 |
+
* @param string $desc [description]
|
747 |
+
*
|
748 |
+
* @since 1.1.0
|
749 |
+
*/
|
750 |
+
function get_description( $desc ) {
|
751 |
+
return $desc;
|
752 |
+
}
|
753 |
+
|
754 |
+
/**
|
755 |
+
* Prints out all settings sections added to a particular settings page
|
756 |
+
*
|
757 |
+
* @since 1.1.0
|
758 |
+
*/
|
759 |
+
function do_settings_sections( $page ) {
|
760 |
+
global $wp_settings_sections, $wp_settings_fields;
|
761 |
+
|
762 |
+
if ( !isset($wp_settings_sections) || !isset($wp_settings_sections[$page]) )
|
763 |
+
return;
|
764 |
+
|
765 |
+
foreach ( (array) $wp_settings_sections[$page] as $section ) {
|
766 |
+
echo "<h3>{$section['title']}</h3>\n";
|
767 |
+
echo $section['callback'] ;
|
768 |
+
if ( !isset($wp_settings_fields) || !isset($wp_settings_fields[$page]) || !isset($wp_settings_fields[$page][$section['id']]) )
|
769 |
+
continue;
|
770 |
+
echo '<table class="form-table">';
|
771 |
+
do_settings_fields($page, $section['id']);
|
772 |
+
echo '</table>';
|
773 |
+
}
|
774 |
+
}
|
775 |
+
|
776 |
}
|
777 |
|
778 |
endif;
|
classes/controls/background-gallery.php
ADDED
@@ -0,0 +1,115 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Class for Background Gallery Control.
|
4 |
+
*
|
5 |
+
* @since 1.1.0
|
6 |
+
* @access public
|
7 |
+
*/
|
8 |
+
|
9 |
+
// Exit if accessed directly.
|
10 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
11 |
+
exit;
|
12 |
+
}
|
13 |
+
|
14 |
+
// Exit if WP_Customize_Control does not exsist.
|
15 |
+
if ( ! class_exists( 'WP_Customize_Control' ) ) {
|
16 |
+
return null;
|
17 |
+
}
|
18 |
+
|
19 |
+
/**
|
20 |
+
* This class is for the gallery selector in the Customizer.
|
21 |
+
*
|
22 |
+
* @access public
|
23 |
+
*/
|
24 |
+
class LoginPress_Background_Gallery_Control extends WP_Customize_Control {
|
25 |
+
|
26 |
+
/**
|
27 |
+
* The control type.
|
28 |
+
*
|
29 |
+
* @access public
|
30 |
+
* @var string
|
31 |
+
*/
|
32 |
+
public $type = 'loginpress-gallery';
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Enqueue neccessary custom control scripts.
|
36 |
+
*/
|
37 |
+
public function enqueue() {
|
38 |
+
|
39 |
+
// Custom control scripts.
|
40 |
+
// wp_enqueue_script( 'loginpress-gallery-control', LOGINPRESS_DIR_URL . 'js/controls/loginpress-gallery-control.js', array( 'jquery' ), LOGINPRESS_VERSION, true );
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Displays the control content.
|
45 |
+
*
|
46 |
+
* @since 1.1.0
|
47 |
+
* @access public
|
48 |
+
* @return void
|
49 |
+
*/
|
50 |
+
public function render_content() {
|
51 |
+
|
52 |
+
if ( empty( $this->choices ) )
|
53 |
+
return;
|
54 |
+
|
55 |
+
$name = 'loginpress_gallery-' . $this->id; ?>
|
56 |
+
|
57 |
+
<span class="customize-control-title">
|
58 |
+
<?php echo esc_attr( $this->label ); ?>
|
59 |
+
<?php if ( ! empty( $this->description ) ) : ?>
|
60 |
+
<span class="description customize-control-description"><?php echo esc_html( $this->description ); ?></span>
|
61 |
+
<?php endif; ?>
|
62 |
+
</span>
|
63 |
+
|
64 |
+
<div id="loginpress-gallery" class="gallery">
|
65 |
+
<?php foreach ( $this->choices as $value ) : ?>
|
66 |
+
<div class="loginpress_gallery_thumbnails">
|
67 |
+
<input id="<?php echo $this->id . esc_attr( $value['id'] ); ?>" class="image-select" type="radio" value="<?php echo esc_attr( $value['id'] ); ?>" name="<?php echo esc_attr( $name ); ?>" <?php $this->link(); checked( $this->value(), $value['id'] ); ?> />
|
68 |
+
<label for="<?php echo $this->id . esc_attr( $value['id'] ); ?>">
|
69 |
+
<div class="gallery_thumbnail_img">
|
70 |
+
<img src="<?php echo $value['thumbnail']; ?>" alt="<?php echo esc_attr( $value['id'] ); ?>" title="<?php echo esc_attr( $value['id'] ); ?>">
|
71 |
+
</div>
|
72 |
+
</label>
|
73 |
+
</div>
|
74 |
+
<?php endforeach; ?>
|
75 |
+
</div>
|
76 |
+
|
77 |
+
<input name='presets_hidden' type="hidden" <?php $this->link(); ?> value="<?php echo $this->value(); ?>" />
|
78 |
+
|
79 |
+
<?php
|
80 |
+
}
|
81 |
+
}
|
82 |
+
|
83 |
+
function loginpress_gallery_control_css() {
|
84 |
+
?>
|
85 |
+
<style>
|
86 |
+
.loginpress_gallery_thumbnails {
|
87 |
+
width: 33%;
|
88 |
+
float: left;
|
89 |
+
box-sizing: border-box;
|
90 |
+
padding: 4px;
|
91 |
+
}
|
92 |
+
.loginpress_gallery_thumbnails .gallery_thumbnail_img{
|
93 |
+
border-radius: 2px;
|
94 |
+
transition: all .4s;
|
95 |
+
border: 1px solid transparent;
|
96 |
+
}
|
97 |
+
.loginpress_gallery_thumbnails .gallery_thumbnail_img img{
|
98 |
+
border:2px solid #fff;
|
99 |
+
display: block;
|
100 |
+
border-radius: 2px;
|
101 |
+
width: calc(100% - 4px)
|
102 |
+
}
|
103 |
+
.customize-control .loginpress_gallery_thumbnails input[type=radio] {
|
104 |
+
display: none;
|
105 |
+
}
|
106 |
+
.customize-control .loginpress_gallery_thumbnails input[type=radio]:checked + label .gallery_thumbnail_img{
|
107 |
+
border-radius: 2px;
|
108 |
+
border: 1px solid #36bcf2;
|
109 |
+
box-shadow: 0 0 1px #36bcf2;
|
110 |
+
}
|
111 |
+
</style>
|
112 |
+
<?php
|
113 |
+
}
|
114 |
+
add_action( 'customize_controls_print_styles', 'loginpress_gallery_control_css' );
|
115 |
+
?>
|
css/style-login.php
CHANGED
@@ -52,6 +52,22 @@ function loginpress_check_percentage( $value ) {
|
|
52 |
}
|
53 |
}
|
54 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
|
56 |
$loginpress_logo_img = loginpress_get_option_key( 'setting_logo', $loginpress_array );
|
57 |
$loginpress_get_logo_width = loginpress_get_option_key( 'customize_logo_width', $loginpress_array );
|
@@ -66,7 +82,7 @@ $loginpress_btn_shadow = loginpress_get_option_key( 'custom_button_shadow',
|
|
66 |
$loginpress_btn_color = loginpress_get_option_key( 'button_text_color', $loginpress_array );
|
67 |
$loginpress_btn_hover_bg = loginpress_get_option_key( 'button_hover_color', $loginpress_array );
|
68 |
$loginpress_btn_hover_border = loginpress_get_option_key( 'button_hover_border', $loginpress_array );
|
69 |
-
$loginpress_background_img = loginpress_get_option_key( 'setting_background', $loginpress_array );
|
70 |
$loginpress_background_color = loginpress_get_option_key( 'setting_background_color', $loginpress_array );
|
71 |
$loginpress_background_repeat = loginpress_get_option_key( 'background_repeat_radio', $loginpress_array );
|
72 |
$loginpress_background_postion = loginpress_get_option_key( 'background_position', $loginpress_array );
|
@@ -468,6 +484,9 @@ input:-webkit-autofill{
|
|
468 |
transition: all 100000s ease-in-out 0s !important;
|
469 |
transition-property: background-color, color !important;
|
470 |
}
|
|
|
|
|
|
|
471 |
.loginpress-show-love{
|
472 |
float: right;
|
473 |
font-style: italic;
|
@@ -481,6 +500,12 @@ input:-webkit-autofill{
|
|
481 |
.loginpress-show-love a{
|
482 |
text-decoration: none;
|
483 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
484 |
</style>
|
485 |
|
486 |
<?php // $content = ob_get_clean(); ?>
|
@@ -489,4 +514,5 @@ input:-webkit-autofill{
|
|
489 |
<script>
|
490 |
<?php echo $loginpress_custom_js; ?>
|
491 |
</script>
|
|
|
492 |
<?php endif; ?>
|
52 |
}
|
53 |
}
|
54 |
|
55 |
+
/**
|
56 |
+
* [if for login page background]
|
57 |
+
* @since 1.1.0
|
58 |
+
* @return string
|
59 |
+
*/
|
60 |
+
if ( ! empty ( loginpress_get_option_key( 'setting_background', $loginpress_array ) ) ) { // Use Custom Background
|
61 |
+
$loginpress_background_img = loginpress_get_option_key( 'setting_background', $loginpress_array );
|
62 |
+
} else if ( ! empty ( loginpress_get_option_key( 'gallery_background', $loginpress_array ) ) ) { // Background from Gallery Control.
|
63 |
+
if ( LOGINPRESS_DIR_URL . 'img/gallery/img-1.jpg' == loginpress_get_option_key( 'gallery_background', $loginpress_array ) ) { // If user select 1st image from gallery control then show template's default image.
|
64 |
+
$loginpress_background_img = '';
|
65 |
+
} else { // Use selected image from gallery control.
|
66 |
+
$loginpress_background_img = loginpress_get_option_key( 'gallery_background', $loginpress_array );
|
67 |
+
}
|
68 |
+
} else { // exceptional case (use default image).
|
69 |
+
$loginpress_background_img = '';
|
70 |
+
}
|
71 |
|
72 |
$loginpress_logo_img = loginpress_get_option_key( 'setting_logo', $loginpress_array );
|
73 |
$loginpress_get_logo_width = loginpress_get_option_key( 'customize_logo_width', $loginpress_array );
|
82 |
$loginpress_btn_color = loginpress_get_option_key( 'button_text_color', $loginpress_array );
|
83 |
$loginpress_btn_hover_bg = loginpress_get_option_key( 'button_hover_color', $loginpress_array );
|
84 |
$loginpress_btn_hover_border = loginpress_get_option_key( 'button_hover_border', $loginpress_array );
|
85 |
+
// $loginpress_background_img = loginpress_get_option_key( 'setting_background', $loginpress_array );
|
86 |
$loginpress_background_color = loginpress_get_option_key( 'setting_background_color', $loginpress_array );
|
87 |
$loginpress_background_repeat = loginpress_get_option_key( 'background_repeat_radio', $loginpress_array );
|
88 |
$loginpress_background_postion = loginpress_get_option_key( 'background_position', $loginpress_array );
|
484 |
transition: all 100000s ease-in-out 0s !important;
|
485 |
transition-property: background-color, color !important;
|
486 |
}
|
487 |
+
.copyRight{
|
488 |
+
padding: 12px 170px;
|
489 |
+
}
|
490 |
.loginpress-show-love{
|
491 |
float: right;
|
492 |
font-style: italic;
|
500 |
.loginpress-show-love a{
|
501 |
text-decoration: none;
|
502 |
}
|
503 |
+
@media screen and (max-width: 767px) {
|
504 |
+
.copyRight{
|
505 |
+
padding: 12px;
|
506 |
+
}
|
507 |
+
}
|
508 |
+
|
509 |
</style>
|
510 |
|
511 |
<?php // $content = ob_get_clean(); ?>
|
514 |
<script>
|
515 |
<?php echo $loginpress_custom_js; ?>
|
516 |
</script>
|
517 |
+
|
518 |
<?php endif; ?>
|
css/themes/default-1.php
CHANGED
@@ -254,6 +254,25 @@ function first_presets() {
|
|
254 |
.loginpress-show-love a:hover{
|
255 |
color: #4d5d95;
|
256 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
257 |
</style>
|
258 |
|
259 |
<?php
|
254 |
.loginpress-show-love a:hover{
|
255 |
color: #4d5d95;
|
256 |
}
|
257 |
+
@media screen and (max-width: 767px) {
|
258 |
+
#login{
|
259 |
+
width: 300px;
|
260 |
+
}
|
261 |
+
.login form{
|
262 |
+
padding-right: 0;
|
263 |
+
padding-left: 0;
|
264 |
+
}
|
265 |
+
.login .loginpress-show-love{
|
266 |
+
position: static;
|
267 |
+
text-align: center;
|
268 |
+
float: none;
|
269 |
+
background: rgba(255,255,255, .5);
|
270 |
+
margin-top: 11px;
|
271 |
+
padding-bottom: 0;
|
272 |
+
padding: 3px;
|
273 |
+
}
|
274 |
+
}
|
275 |
+
|
276 |
</style>
|
277 |
|
278 |
<?php
|
custom.php
CHANGED
@@ -114,6 +114,8 @@ class LoginPress_Entities {
|
|
114 |
|
115 |
include LOGINPRESS_ROOT_PATH .'classes/control-presets.php';
|
116 |
|
|
|
|
|
117 |
include LOGINPRESS_ROOT_PATH .'classes/controls/range.php';
|
118 |
|
119 |
include LOGINPRESS_ROOT_PATH .'classes/controls/radio-button.php';
|
@@ -354,6 +356,51 @@ class LoginPress_Entities {
|
|
354 |
'settings' => 'loginpress_customization[setting_background]',
|
355 |
) ) );
|
356 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
357 |
|
358 |
$wp_customize->add_setting( 'loginpress_customization[background_repeat_radio]', array(
|
359 |
'default' => 'no-repeat',
|
@@ -1329,7 +1376,7 @@ class LoginPress_Entities {
|
|
1329 |
|
1330 |
add_filter( 'gettext', array( $this, 'change_lostpassword_message' ), 20, 3 );
|
1331 |
// Include CSS File in heared.
|
1332 |
-
|
1333 |
include( LOGINPRESS_DIR_PATH . 'css/style-presets.php' );
|
1334 |
include( LOGINPRESS_DIR_PATH . 'css/style-login.php' );
|
1335 |
|
114 |
|
115 |
include LOGINPRESS_ROOT_PATH .'classes/control-presets.php';
|
116 |
|
117 |
+
include LOGINPRESS_ROOT_PATH .'classes/controls/background-gallery.php';
|
118 |
+
|
119 |
include LOGINPRESS_ROOT_PATH .'classes/controls/range.php';
|
120 |
|
121 |
include LOGINPRESS_ROOT_PATH .'classes/controls/radio-button.php';
|
356 |
'settings' => 'loginpress_customization[setting_background]',
|
357 |
) ) );
|
358 |
|
359 |
+
/**
|
360 |
+
* [ Add Background Gallery ]
|
361 |
+
* @since 1.1.0
|
362 |
+
*/
|
363 |
+
$wp_customize->add_setting( 'loginpress_customization[gallery_background]', array(
|
364 |
+
'default' => plugins_url( "img/thumbnail/default-1.png", LOGINPRESS_ROOT_FILE ),
|
365 |
+
'type' => 'option',
|
366 |
+
'capability' => 'manage_options',
|
367 |
+
'transport' => 'postMessage'
|
368 |
+
) );
|
369 |
+
|
370 |
+
$loginpress_free_background = array();
|
371 |
+
$loginpress_background_name = array( "",
|
372 |
+
__( 'Company', 'loginpress' ),
|
373 |
+
__( 'Persona', 'loginpress' ),
|
374 |
+
__( 'Corporate', 'loginpress' ),
|
375 |
+
__( 'Corporate', 'loginpress' ),
|
376 |
+
__( 'Startup', 'loginpress' ),
|
377 |
+
__( 'Wedding', 'loginpress' ),
|
378 |
+
__( 'Wedding #2', 'loginpress' ),
|
379 |
+
__( 'Company', 'loginpress' ),
|
380 |
+
__( 'Bikers', 'loginpress' ) );
|
381 |
+
|
382 |
+
// Loof through the backgrounds.
|
383 |
+
$bg_count = 1;
|
384 |
+
while ( $bg_count <= 9 ) :
|
385 |
+
|
386 |
+
$thumbname = plugins_url( "img/gallery/img-{$bg_count}.jpg", LOGINPRESS_ROOT_FILE );
|
387 |
+
$loginpress_free_background[$thumbname] = array(
|
388 |
+
'thumbnail' => plugins_url( "img/thumbnail/gallery-img-{$bg_count}.jpg", LOGINPRESS_ROOT_FILE ),
|
389 |
+
'id' => $thumbname,
|
390 |
+
'name' => $loginpress_background_name[$bg_count]
|
391 |
+
);
|
392 |
+
$bg_count++;
|
393 |
+
endwhile;
|
394 |
+
|
395 |
+
$loginpress_background = apply_filters( 'loginpress_pro_add_background', $loginpress_free_background );
|
396 |
+
|
397 |
+
$wp_customize->add_control( new LoginPress_Background_Gallery_Control( $wp_customize, 'loginpress_customization[gallery_background]',
|
398 |
+
array(
|
399 |
+
'section' => 'section_background',
|
400 |
+
'label' => __( 'Background Gallery', 'loginpress' ),
|
401 |
+
'choices' => $loginpress_background
|
402 |
+
) ) );
|
403 |
+
|
404 |
|
405 |
$wp_customize->add_setting( 'loginpress_customization[background_repeat_radio]', array(
|
406 |
'default' => 'no-repeat',
|
1376 |
|
1377 |
add_filter( 'gettext', array( $this, 'change_lostpassword_message' ), 20, 3 );
|
1378 |
// Include CSS File in heared.
|
1379 |
+
wp_enqueue_script( 'jquery' );
|
1380 |
include( LOGINPRESS_DIR_PATH . 'css/style-presets.php' );
|
1381 |
include( LOGINPRESS_DIR_PATH . 'css/style-login.php' );
|
1382 |
|
img/back_arrow.png
CHANGED
Binary file
|
img/bg.jpg
CHANGED
Binary file
|
img/bg2.jpg
CHANGED
Binary file
|
img/clock.png
CHANGED
Binary file
|
img/dummy.jpg
CHANGED
Binary file
|
img/gallery/img-2.jpg
ADDED
Binary file
|
img/gallery/img-3.jpg
ADDED
Binary file
|
img/gallery/img-4.jpg
ADDED
Binary file
|
img/gallery/img-5.jpg
ADDED
Binary file
|
img/gallery/img-6.jpg
ADDED
Binary file
|
img/gallery/img-7.jpg
ADDED
Binary file
|
img/gallery/img-8.jpg
ADDED
Binary file
|
img/gallery/img-9.jpg
ADDED
Binary file
|
img/loginpress.png
CHANGED
Binary file
|
img/promo/font_promo.png
CHANGED
Binary file
|
img/promo/hint_promo.png
CHANGED
Binary file
|
img/promo/recaptcha_option_promo.png
CHANGED
Binary file
|
img/promo/recaptcha_promo.png
CHANGED
Binary file
|
img/thumbnail/custom-design.png
CHANGED
Binary file
|
img/thumbnail/default-1.png
CHANGED
Binary file
|
img/thumbnail/default-10.png
CHANGED
Binary file
|
img/thumbnail/default-11.png
CHANGED
Binary file
|
img/thumbnail/default-12.png
CHANGED
Binary file
|
img/thumbnail/default-13.png
CHANGED
Binary file
|
img/thumbnail/default-14.png
CHANGED
Binary file
|
img/thumbnail/default-15.png
CHANGED
Binary file
|
img/thumbnail/default-16.png
CHANGED
Binary file
|
img/thumbnail/default-17.png
CHANGED
Binary file
|
img/thumbnail/default-2.png
CHANGED
Binary file
|
img/thumbnail/default-3.png
CHANGED
Binary file
|
img/thumbnail/default-4.jpg
CHANGED
Binary file
|
img/thumbnail/default-4.png
CHANGED
Binary file
|
img/thumbnail/default-5.png
CHANGED
Binary file
|
img/thumbnail/default-6.png
CHANGED
Binary file
|
img/thumbnail/default-7.png
CHANGED
Binary file
|
img/thumbnail/default-8.png
CHANGED
Binary file
|
img/thumbnail/default-9.png
CHANGED
Binary file
|
img/thumbnail/default.png
CHANGED
Binary file
|
img/thumbnail/gallery-img-1.jpg
ADDED
Binary file
|
img/thumbnail/gallery-img-1.png
ADDED
Binary file
|
img/thumbnail/gallery-img-2.jpg
ADDED
Binary file
|
img/thumbnail/gallery-img-3.jpg
ADDED
Binary file
|
img/thumbnail/gallery-img-4.jpg
ADDED
Binary file
|
img/thumbnail/gallery-img-5.jpg
ADDED
Binary file
|
img/thumbnail/gallery-img-6.jpg
ADDED
Binary file
|
img/thumbnail/gallery-img-7.jpg
ADDED
Binary file
|
img/thumbnail/gallery-img-8.jpg
ADDED
Binary file
|
img/thumbnail/gallery-img-9.jpg
ADDED
Binary file
|
img/thumbnail/gray-loginpress.png
CHANGED
Binary file
|
img/thumbnail/v18.jpg
CHANGED
Binary file
|
img/thumbnail/v9.jpg
CHANGED
Binary file
|
js/controls/loginpress-gallery-control.js
ADDED
File without changes
|
js/customize-controls.js
CHANGED
@@ -34,20 +34,25 @@ jQuery(document).ready(function() {
|
|
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 |
-
|
43 |
-
.contents()
|
44 |
-
.find( target )
|
45 |
-
.css( 'background-image', 'none' );
|
46 |
} else {
|
47 |
-
|
48 |
-
.contents()
|
49 |
-
.find( target )
|
50 |
-
.css( 'background-image', 'url(' + loginPressVal + ')' );
|
51 |
}
|
52 |
} );
|
53 |
} );
|
@@ -60,15 +65,9 @@ jQuery(document).ready(function() {
|
|
60 |
value.bind( function( loginPressVal ) {
|
61 |
|
62 |
if ( loginPressVal == '' ) {
|
63 |
-
|
64 |
-
.contents()
|
65 |
-
.find( target )
|
66 |
-
.css( property, '' );
|
67 |
} else {
|
68 |
-
|
69 |
-
.contents()
|
70 |
-
.find( target )
|
71 |
-
.css( property, loginPressVal );
|
72 |
}
|
73 |
} );
|
74 |
} );
|
@@ -81,15 +80,9 @@ jQuery(document).ready(function() {
|
|
81 |
value.bind( function( loginPressVal ) {
|
82 |
|
83 |
if ( loginPressVal == '' ) {
|
84 |
-
|
85 |
-
.contents()
|
86 |
-
.find( target )
|
87 |
-
.css( property, '' );
|
88 |
} else {
|
89 |
-
|
90 |
-
.contents()
|
91 |
-
.find( target )
|
92 |
-
.css( property, loginPressVal + suffix );
|
93 |
}
|
94 |
} );
|
95 |
} );
|
@@ -100,19 +93,13 @@ jQuery(document).ready(function() {
|
|
100 |
value.bind( function( loginPressVal ) {
|
101 |
|
102 |
if ( loginPressVal == '' ) {
|
103 |
-
|
104 |
-
.contents()
|
105 |
-
.find( target )
|
106 |
-
.attr( property, '' );
|
107 |
} else {
|
108 |
-
|
109 |
-
.contents()
|
110 |
-
.find( target )
|
111 |
-
.attr( property, loginPressVal );
|
112 |
}
|
113 |
} );
|
114 |
} );
|
115 |
-
}
|
116 |
|
117 |
// function for change LoginPress input fields in real time...
|
118 |
function loginpress_input_property( setting, property ) {
|
@@ -120,23 +107,11 @@ jQuery(document).ready(function() {
|
|
120 |
value.bind( function( loginPressVal ) {
|
121 |
|
122 |
if ( loginPressVal == '' ) {
|
123 |
-
|
124 |
-
.
|
125 |
-
.find( '.login input[type="text"]' )
|
126 |
-
.css( property, '' );
|
127 |
-
$( '#customize-preview iframe' )
|
128 |
-
.contents()
|
129 |
-
.find( '.login input[type="password"]' )
|
130 |
-
.css( property, '' );
|
131 |
} else {
|
132 |
-
|
133 |
-
.
|
134 |
-
.find( '.login input[type="text"]' )
|
135 |
-
.css( property, loginPressVal );
|
136 |
-
$( '#customize-preview iframe' )
|
137 |
-
.contents()
|
138 |
-
.find( '.login input[type="password"]' )
|
139 |
-
.css( property, loginPressVal );
|
140 |
}
|
141 |
} );
|
142 |
} );
|
@@ -148,23 +123,11 @@ jQuery(document).ready(function() {
|
|
148 |
value.bind( function( loginPressVal ) {
|
149 |
|
150 |
if ( loginPressVal == '' ) {
|
151 |
-
|
152 |
-
.
|
153 |
-
.find( '.login input[type="text"]' )
|
154 |
-
.css( property, '' );
|
155 |
-
$( '#customize-preview iframe' )
|
156 |
-
.contents()
|
157 |
-
.find( '.login input[type="password"]' )
|
158 |
-
.css( property, '' );
|
159 |
} else {
|
160 |
-
|
161 |
-
.
|
162 |
-
.find( '.login input[type="text"]' )
|
163 |
-
.css( property, loginPressVal + suffix);
|
164 |
-
$( '#customize-preview iframe' )
|
165 |
-
.contents()
|
166 |
-
.find( '.login input[type="password"]' )
|
167 |
-
.css( property, loginPressVal + suffix);
|
168 |
}
|
169 |
} );
|
170 |
} );
|
@@ -172,8 +135,8 @@ jQuery(document).ready(function() {
|
|
172 |
|
173 |
// function for change LoginPress error and welcome messages in real time...
|
174 |
/**
|
175 |
-
* [loginpress_text_message LoginPress (Error + Welcome) Message live Control.
|
176 |
-
* @param id [
|
177 |
* @param target [CSS Property]
|
178 |
* @return string [CSS property]
|
179 |
*/
|
@@ -182,25 +145,11 @@ jQuery(document).ready(function() {
|
|
182 |
value.bind( function( loginPressVal ) {
|
183 |
|
184 |
if ( loginPressVal == '' ) {
|
185 |
-
|
186 |
-
.
|
187 |
-
.find( target )
|
188 |
-
.text('');
|
189 |
-
|
190 |
-
$( '#customize-preview iframe' )
|
191 |
-
.contents()
|
192 |
-
.find( target )
|
193 |
-
.css( 'display', 'none' );
|
194 |
} else {
|
195 |
-
|
196 |
-
.
|
197 |
-
.find( target )
|
198 |
-
.text( loginPressVal );
|
199 |
-
|
200 |
-
$( '#customize-preview iframe' )
|
201 |
-
.contents()
|
202 |
-
.find( target )
|
203 |
-
.css( 'display', 'block' );
|
204 |
}
|
205 |
} );
|
206 |
} );
|
@@ -213,8 +162,8 @@ jQuery(document).ready(function() {
|
|
213 |
* @param {[type]} value [Customized value from user.]
|
214 |
* @return {[type]} [Theme ID]
|
215 |
*/
|
216 |
-
wp.customize('customize_presets_settings', function(value) {
|
217 |
-
value.bind(function(loginPressVal) {
|
218 |
|
219 |
change_theme = loginPressVal;
|
220 |
|
@@ -275,410 +224,293 @@ jQuery(document).ready(function() {
|
|
275 |
}
|
276 |
|
277 |
// function for change LoginPress error and welcome messages in real time...
|
278 |
-
function loginpress_footer_text_message(errorlog, target) {
|
279 |
-
wp.customize(errorlog, function(value) {
|
280 |
value.bind(function(loginPressVal) {
|
281 |
|
282 |
-
if (loginPressVal == '') {
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
'loginpress_customization[login_footer_copy_right]') {
|
287 |
-
$('#customize-preview iframe').contents().find(target).css(
|
288 |
-
'display', 'none');
|
289 |
}
|
290 |
} else {
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
'loginpress_customization[login_footer_copy_right]') {
|
295 |
-
$('#customize-preview iframe').contents().find(target).css(
|
296 |
-
'display', 'block');
|
297 |
}
|
298 |
}
|
299 |
});
|
300 |
});
|
301 |
}
|
302 |
|
303 |
-
|
|
|
|
|
|
|
|
|
304 |
function loginpress_customizer_bg(customizer_bg) {
|
305 |
|
306 |
-
if ('default1' == customizer_bg) {
|
307 |
-
loginpress_bg = 'url(' + loginpress_script.plugin_url +
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
} else if ('
|
313 |
-
loginpress_bg = 'url(' + loginpress_script.plugin_url +
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
} else if ('
|
319 |
-
loginpress_bg = 'url(' + loginpress_script.plugin_url +
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
} else if ('
|
325 |
-
loginpress_bg = 'url(' + loginpress_script.plugin_url +
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
} else if ('
|
331 |
-
loginpress_bg = 'url(' + loginpress_script.plugin_url +
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
} else if ('
|
337 |
-
loginpress_bg = 'url(' + loginpress_script.plugin_url +
|
338 |
-
|
339 |
-
|
340 |
-
loginpress_bg = 'url(' + loginpress_script.plugin_url +
|
341 |
-
'/loginpress-pro/img/bg12.jpg)';
|
342 |
-
} else if ('default13' == customizer_bg) {
|
343 |
-
loginpress_bg = 'url(' + loginpress_script.plugin_url +
|
344 |
-
'/loginpress-pro/img/bg13.jpg)';
|
345 |
-
} else if ('default14' == customizer_bg) {
|
346 |
-
loginpress_bg = 'url(' + loginpress_script.plugin_url +
|
347 |
-
'/loginpress-pro/img/bg14.jpg)';
|
348 |
-
} else if ('default15' == customizer_bg) {
|
349 |
-
loginpress_bg = 'url(' + loginpress_script.plugin_url +
|
350 |
-
'/loginpress-pro/img/bg15.jpg)';
|
351 |
-
} else if ('default16' == customizer_bg) {
|
352 |
-
loginpress_bg = 'url(' + loginpress_script.plugin_url +
|
353 |
-
'/loginpress-pro/img/bg16.jpg)';
|
354 |
-
} else if ('default17' == customizer_bg) {
|
355 |
-
loginpress_bg = 'url(' + loginpress_script.plugin_url +
|
356 |
-
'/loginpress-pro/img/bg17.jpg)';
|
357 |
}
|
358 |
}
|
359 |
|
360 |
-
|
361 |
-
|
|
|
362 |
|
363 |
// Check the theme id.
|
364 |
-
customizer_bg = change_theme ? change_theme : loginpress_script
|
365 |
-
.login_theme;
|
366 |
|
367 |
// Set custom style on customizer.
|
368 |
-
if (
|
369 |
-
$("<style type='text/css' id='loginpress-customize'></style>")
|
370 |
-
.appendTo($('#customize-preview iframe')
|
371 |
-
.contents()
|
372 |
-
.find('head'));
|
373 |
}
|
374 |
|
375 |
-
// Set conditions on behalf on themes.
|
376 |
-
if ( loginPressVal == false ) {
|
377 |
-
|
378 |
-
if ('default6' == customizer_bg) {
|
379 |
-
|
380 |
-
$('#customize-preview iframe').contents().find(
|
381 |
-
'#loginpress-customize').html(
|
382 |
-
"#login::after{background-image: none}");
|
383 |
-
|
384 |
-
} else if ('default8' == customizer_bg) {
|
385 |
-
|
386 |
-
$('#customize-preview iframe').contents().find(
|
387 |
-
'#loginpress-customize').html(
|
388 |
-
"body.login::after{background: none}");
|
389 |
-
|
390 |
-
} else if ('default10' == customizer_bg) {
|
391 |
-
|
392 |
-
$('#customize-preview iframe').contents().find(
|
393 |
-
'#loginpress-customize').html(
|
394 |
-
"#login::after{background-image: none}");
|
395 |
-
|
396 |
-
} else if ('default17' == customizer_bg) {
|
397 |
-
|
398 |
-
$('#customize-preview iframe').contents().find(
|
399 |
-
'#loginpress-customize').html(
|
400 |
-
"#login{background: none}");
|
401 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
402 |
} else {
|
403 |
-
|
404 |
-
.css('background-image', 'none');
|
405 |
}
|
406 |
|
|
|
|
|
407 |
$('#customize-control-loginpress_customization-setting_background').fadeOut().css( 'display', 'none' );
|
408 |
$('#customize-control-loginpress_customization-background_repeat_radio').fadeOut().css( 'display', 'none' );
|
409 |
$('#customize-control-loginpress_customization-background_position').fadeOut().css( 'display', 'none' );
|
410 |
$('#customize-control-loginpress_customization-background_image_size').fadeOut().css( 'display', 'none' );
|
411 |
-
|
412 |
} else {
|
413 |
-
|
414 |
-
if (localStorage.loginpress_bg) {
|
415 |
|
416 |
loginpress_bg_ = 'url(' + localStorage.loginpress_bg + ')';
|
417 |
|
418 |
-
if ('default6' == customizer_bg) {
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
|
|
|
|
|
|
426 |
|
427 |
-
|
428 |
-
'#loginpress-customize').html(
|
429 |
-
"body.login::after{background: " + loginpress_bg_ +
|
430 |
-
" no-repeat 0 0; background-size: cover}");
|
431 |
|
432 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
433 |
|
434 |
-
|
435 |
-
'#loginpress-customize').html(
|
436 |
-
"#login::after{background-image: " + loginpress_bg_ +
|
437 |
-
"}");
|
438 |
|
439 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
440 |
|
441 |
-
$('#customize-preview iframe').contents().find(
|
442 |
-
'#loginpress-customize').html("#login{background: " +
|
443 |
-
loginpress_bg_ + " no-repeat 0 0;}");
|
444 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
445 |
} else {
|
446 |
-
|
447 |
-
$('#customize-preview iframe').contents().find(
|
448 |
-
'body.login').css('background-image', loginpress_bg_)
|
449 |
}
|
450 |
|
451 |
-
|
|
|
|
|
|
|
|
|
|
|
452 |
|
453 |
-
|
|
|
|
|
|
|
|
|
454 |
|
455 |
-
$('#customize-preview iframe').contents().find(
|
456 |
-
'#loginpress-customize').html(
|
457 |
-
"#login::after{background-image: " +
|
458 |
-
loginpress_script.loginpress_bg_url + "}");
|
459 |
|
460 |
-
|
|
|
|
|
461 |
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
" no-repeat 0 0; background-size: cover}");
|
466 |
|
467 |
-
|
468 |
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
loginpress_script.loginpress_bg_url + "}");
|
473 |
|
474 |
-
|
475 |
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
" no-repeat 0 0;}");
|
480 |
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
|
|
|
|
|
|
|
|
|
|
485 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
486 |
} else {
|
|
|
487 |
|
488 |
-
|
489 |
-
if ('default6' == customizer_bg) {
|
490 |
-
|
491 |
-
$('#customize-preview iframe').contents().find(
|
492 |
-
'#loginpress-customize').html(
|
493 |
-
"#login::after{background-image: " + loginpress_bg +
|
494 |
-
"}");
|
495 |
-
|
496 |
-
} else if ('default8' == customizer_bg) {
|
497 |
-
|
498 |
-
$('#customize-preview iframe').contents().find(
|
499 |
-
'#loginpress-customize').html(
|
500 |
-
"body.login::after{background: " + loginpress_bg +
|
501 |
-
" no-repeat 0 0; background-size: cover}");
|
502 |
|
503 |
-
} else if ('default10' == customizer_bg) {
|
504 |
|
505 |
-
|
506 |
-
|
507 |
-
"#login::after{background-image: " + loginpress_bg +
|
508 |
-
"}");
|
509 |
|
510 |
-
|
511 |
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
520 |
}
|
521 |
|
522 |
-
|
523 |
-
$('#customize-control-loginpress_customization-
|
524 |
-
|
525 |
-
$('#customize-control-loginpress_customization-background_image_size').fadeIn().css( 'display', 'list-item' );
|
526 |
|
527 |
-
} // endif; conditions on behalf on themes.
|
528 |
});
|
529 |
});
|
530 |
-
// LoginPress Background Image Control.
|
531 |
-
// wp.customize( 'loginpress_customization[loginpress_display_bg]', function( value ) {
|
532 |
-
// value.bind( function( loginPressVal ) {
|
533 |
-
// customizer_bg = change_theme ? change_theme : loginpress_script.login_theme;
|
534 |
-
//
|
535 |
-
// var bg = $('#customize-preview iframe').contents().find( 'body.login' ).css( 'background-image' );
|
536 |
-
// console.log(bg);
|
537 |
-
// if( loginPressVal == false ) {
|
538 |
-
//
|
539 |
-
// if ( ! localStorage.loginpress_bg_check ) {
|
540 |
-
//
|
541 |
-
// localStorage.setItem( "loginpress_bg_check", bg );
|
542 |
-
// }
|
543 |
-
//
|
544 |
-
// if ( 'default6' == customizer_bg ) {
|
545 |
-
// //Q ki hoya ?
|
546 |
-
// console.log('bg of default6 is gone off');
|
547 |
-
// // $('#customize-preview iframe').contents().find( '#login::after' ).appendTo( 'background-image', 'none' );
|
548 |
-
// $("<style type='text/css'>#login::after{background-image: none}</style>").appendTo($('#customize-preview iframe').contents().find('head'));
|
549 |
-
// } else {
|
550 |
-
// console.log('bg gone off');
|
551 |
-
// $('#customize-preview iframe').contents().find( 'body.login' ).css( 'background-image', 'none' );
|
552 |
-
// }
|
553 |
-
// $('#customize-control-setting_background').hide();
|
554 |
-
// $('#customize-control-background_repeat_radio').hide();
|
555 |
-
// $('#customize-control-background_image_size').hide();
|
556 |
-
// } else {
|
557 |
-
//
|
558 |
-
// if ( localStorage.getItem("loginpress_bg") === null && localStorage.loginpress_bg_check ) {
|
559 |
-
//
|
560 |
-
// loginpress_bg = localStorage.loginpress_bg_check;
|
561 |
-
// console.log('bg1');
|
562 |
-
//
|
563 |
-
// } else if ( localStorage.getItem("loginpress_bg") === null ) {
|
564 |
-
//
|
565 |
-
// loginpress_customizer_bg( customizer_bg );
|
566 |
-
// console.log('bg2');
|
567 |
-
// } else if ( localStorage.loginpress_bg ) {
|
568 |
-
//
|
569 |
-
// loginpress_bg = 'url(' + localStorage.loginpress_bg + ')';
|
570 |
-
// console.log('bg3');
|
571 |
-
// } else {
|
572 |
-
//
|
573 |
-
// loginpress_bg = localStorage.loginpress_bg_check;
|
574 |
-
// console.log('bg4');
|
575 |
-
// }
|
576 |
-
//
|
577 |
-
// if ( 'default6' == customizer_bg ) {
|
578 |
-
// console.log('true default6 bg');
|
579 |
-
// console.log(loginpress_bg);
|
580 |
-
// // $('#customize-preview iframe').contents().find( '#login::after' ).appendTo( 'background-image', loginpress_bg );
|
581 |
-
// $("<style type='text/css'>#login::after{background-image: "+loginpress_bg+"}</style>").appendTo($('#customize-preview iframe').contents().find('head'));
|
582 |
-
// } else {
|
583 |
-
// console.log('true bg');
|
584 |
-
// console.log(loginpress_bg);
|
585 |
-
// $('#customize-preview iframe').contents().find( 'body.login' ).css( 'background-image', loginpress_bg );
|
586 |
-
// }
|
587 |
-
// // $('#customize-preview iframe').contents().find( 'body.login' ).css( 'background-image', loginpress_bg );
|
588 |
-
// $('#customize-control-setting_background').show();
|
589 |
-
// $('#customize-control-background_repeat_radio').show();
|
590 |
-
// $('#customize-control-background_image_size').show();
|
591 |
-
// }
|
592 |
-
// } );
|
593 |
-
// } );
|
594 |
-
|
595 |
-
// LoginPress Background instant change.
|
596 |
-
wp.customize('loginpress_customization[setting_background]', function(value) {
|
597 |
-
value.bind(function(loginPressVal) {
|
598 |
|
599 |
-
|
600 |
-
|
|
|
|
|
|
|
|
|
601 |
|
602 |
-
|
603 |
-
|
604 |
-
$("<style type='text/css' id='loginpress-customize'></style>")
|
605 |
-
.appendTo($('#customize-preview iframe').contents().find(
|
606 |
-
'head'));
|
607 |
}
|
608 |
|
609 |
-
if (
|
610 |
-
if (localStorage.loginpress_bg) {
|
611 |
-
localStorage.removeItem("loginpress_bg");
|
612 |
-
}
|
613 |
|
|
|
|
|
|
|
|
|
|
|
614 |
loginpress_customizer_bg(customizer_bg);
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
'#loginpress-customize').html(
|
625 |
-
"body.login::after{background: " + loginpress_bg +
|
626 |
-
" no-repeat 0 0; background-size: cover}");
|
627 |
-
} else if ('default10' == customizer_bg) {
|
628 |
-
|
629 |
-
$('#customize-preview iframe').contents().find(
|
630 |
-
'#loginpress-customize').html(
|
631 |
-
"#login::after{background-image: " + loginpress_bg +
|
632 |
-
"}");
|
633 |
-
} else if ('default17' == customizer_bg) {
|
634 |
-
|
635 |
-
$('#customize-preview iframe').contents().find(
|
636 |
-
'#loginpress-customize').html("#login{background: " +
|
637 |
-
loginpress_bg + " no-repeat 0 0;}");
|
638 |
} else {
|
639 |
-
|
640 |
-
.css('background-image', loginpress_bg);
|
641 |
}
|
642 |
-
} else {
|
643 |
|
644 |
-
|
645 |
-
localStorage.setItem("loginpress_bg", loginPressVal);
|
646 |
-
// }
|
647 |
|
648 |
-
if ('default6' == customizer_bg) {
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
// console.log(loginPressVal);
|
658 |
-
$('#customize-preview iframe').contents().find(
|
659 |
-
'#loginpress-customize').html(
|
660 |
-
"body.login::after{background: url(" + loginPressVal +
|
661 |
-
") no-repeat 0 0; background-size: cover}");
|
662 |
-
} else if ('default10' == customizer_bg) {
|
663 |
-
|
664 |
-
// console.log(loginPressVal);
|
665 |
-
$('#customize-preview iframe').contents().find(
|
666 |
-
'#loginpress-customize').html(
|
667 |
-
"#login::after{background-image: url(" + loginPressVal +
|
668 |
-
")}");
|
669 |
-
} else if ('default17' == customizer_bg) {
|
670 |
-
|
671 |
-
// console.log(loginPressVal);
|
672 |
-
$('#customize-preview iframe').contents().find(
|
673 |
-
'#loginpress-customize').html("#login{background: url(" +
|
674 |
-
loginPressVal + ") no-repeat 0 0;}");
|
675 |
} else {
|
676 |
-
|
677 |
-
.css('background-image', 'url(' + loginPressVal + ')');
|
678 |
}
|
679 |
|
680 |
}
|
681 |
-
|
682 |
});
|
683 |
});
|
684 |
// loginpress_background_img( 'loginpress_customization[]', 'body.login' );
|
@@ -691,17 +523,14 @@ jQuery(document).ready(function() {
|
|
691 |
loginpress_display_control( 'loginpress_customization[footer_display_text]' );
|
692 |
loginpress_display_control( 'loginpress_customization[back_display_text]' );
|
693 |
|
694 |
-
// Update the login logo in real time...
|
695 |
-
wp.customize('loginpress_customization[setting_logo]', function(value) {
|
696 |
-
value.bind(function(loginPressVal) {
|
697 |
|
698 |
-
if (loginPressVal == '') {
|
699 |
-
|
700 |
-
.css('background-image', 'url(' + loginpress_script.admin_url +
|
701 |
-
'/images/wordpress-logo.svg)');
|
702 |
} else {
|
703 |
-
|
704 |
-
.css('background-image', 'url(' + loginPressVal + ')');
|
705 |
}
|
706 |
});
|
707 |
});
|
@@ -720,176 +549,116 @@ jQuery(document).ready(function() {
|
|
720 |
loginpress_attr_property( 'loginpress_customization[customize_logo_hover]', '#login h1 a', 'href' );
|
721 |
loginpress_attr_property( 'loginpress_customization[customize_logo_hover_title]', '#login h1 a', 'title' );
|
722 |
|
|
|
|
|
|
|
723 |
|
724 |
-
|
725 |
-
// // 'loginpress_customization[setting_background_color]', 'body.login',
|
726 |
-
// 'background-color');
|
727 |
-
|
728 |
-
wp.customize('loginpress_customization[setting_background_color]', function(value) {
|
729 |
-
value.bind(function(loginPressVal) {
|
730 |
|
731 |
-
|
732 |
-
.
|
733 |
-
|
734 |
-
if ($('#customize-preview iframe').contents().find(
|
735 |
-
'#loginpress-iframe-bgColor').length == 0) {
|
736 |
-
$("<style type='text/css' id='loginpress-iframe-bgColor'></style>")
|
737 |
-
.appendTo($('#customize-preview iframe').contents().find(
|
738 |
-
'head'));
|
739 |
}
|
740 |
|
741 |
-
if (loginPressVal == '') {
|
742 |
|
743 |
if ( 'default6' == customizer_bg || 'default10' == customizer_bg ) {
|
744 |
-
|
745 |
-
'#loginpress-iframe-bgColor').html(
|
746 |
-
"#login::after{background-color: #f1f1f1}");
|
747 |
} else if ( 'default17' == customizer_bg ) {
|
748 |
-
|
749 |
-
"background-color" , "'#f1f1f1'");
|
750 |
} else if ( 'default8' == customizer_bg ) {
|
751 |
-
|
752 |
-
'#loginpress-iframe-bgColor').html(
|
753 |
-
"body.login::after{background-color: #f1f1f1}");
|
754 |
} else {
|
755 |
-
|
756 |
-
"background-color", "#f1f1f1");
|
757 |
}
|
758 |
} else {
|
759 |
|
760 |
if ( 'default6' == customizer_bg || 'default10' == customizer_bg ) {
|
761 |
-
|
762 |
-
'#loginpress-iframe-bgColor').html(
|
763 |
-
"#login::after{background-color: " + loginPressVal +
|
764 |
-
"}");
|
765 |
} else if ( 'default17' == customizer_bg ) {
|
766 |
-
|
767 |
-
"background-color" , loginPressVal);
|
768 |
} else if ( 'default8' == customizer_bg ) {
|
769 |
-
|
770 |
-
'#loginpress-iframe-bgColor').html(
|
771 |
-
"body.login::after{background-color: " + loginPressVal +
|
772 |
-
"}");
|
773 |
} else {
|
774 |
-
|
775 |
-
"background-color", loginPressVal);
|
776 |
}
|
777 |
}
|
778 |
});
|
779 |
});
|
780 |
|
781 |
|
782 |
-
//
|
783 |
-
|
784 |
wp.customize( 'loginpress_customization[background_repeat_radio]', function(value) {
|
785 |
value.bind(function(loginPressVal) {
|
786 |
|
787 |
customizer_bg = change_theme ? change_theme : loginpress_script
|
788 |
.login_theme;
|
789 |
|
790 |
-
if (
|
791 |
-
|
792 |
-
$("<style type='text/css' id='loginpress-scbg-repeat'></style>")
|
793 |
-
.appendTo($('#customize-preview iframe').contents().find(
|
794 |
-
'head'));
|
795 |
}
|
796 |
|
797 |
if ( loginPressVal != '' ) {
|
798 |
|
799 |
if ( 'default6' == customizer_bg || 'default10' == customizer_bg ) {
|
800 |
-
|
801 |
-
'#loginpress-scbg-repeat').html(
|
802 |
-
"#login::after{background-repeat: " + loginPressVal +
|
803 |
-
"}");
|
804 |
} else if ( 'default17' == customizer_bg ) {
|
805 |
-
|
806 |
-
"background-repeat" , loginPressVal);
|
807 |
} else if ( 'default8' == customizer_bg ) {
|
808 |
-
|
809 |
-
'#loginpress-scbg-repeat').html(
|
810 |
-
"body.login::after{background-repeat: " + loginPressVal +
|
811 |
-
"}");
|
812 |
} else {
|
813 |
-
|
814 |
-
"background-repeat", loginPressVal);
|
815 |
}
|
816 |
|
817 |
}
|
818 |
});
|
819 |
});
|
820 |
|
821 |
-
//
|
822 |
-
|
823 |
wp.customize( 'loginpress_customization[background_image_size]', function(value) {
|
824 |
-
value.bind(function(loginPressVal) {
|
825 |
|
826 |
-
customizer_bg = change_theme ? change_theme : loginpress_script
|
827 |
-
.login_theme;
|
828 |
|
829 |
-
if (
|
830 |
-
|
831 |
-
$("<style type='text/css' id='loginpress-scbg-size'></style>")
|
832 |
-
.appendTo($('#customize-preview iframe').contents().find(
|
833 |
-
'head'));
|
834 |
}
|
835 |
|
836 |
if ( loginPressVal != '' ) {
|
837 |
|
838 |
if ( 'default6' == customizer_bg || 'default10' == customizer_bg ) {
|
839 |
-
|
840 |
-
'#loginpress-scbg-size').html(
|
841 |
-
"#login::after{background-size: " + loginPressVal +
|
842 |
-
"}");
|
843 |
} else if ( 'default17' == customizer_bg ) {
|
844 |
-
|
845 |
-
"background-size" , loginPressVal);
|
846 |
} else if ( 'default8' == customizer_bg ) {
|
847 |
-
|
848 |
-
'#loginpress-scbg-size').html(
|
849 |
-
"body.login::after{background-size: " + loginPressVal +
|
850 |
-
"}");
|
851 |
} else {
|
852 |
-
|
853 |
-
"background-size", loginPressVal);
|
854 |
}
|
855 |
|
856 |
}
|
857 |
});
|
858 |
});
|
859 |
|
860 |
-
//
|
861 |
-
|
862 |
wp.customize( 'loginpress_customization[background_position]', function(value) {
|
863 |
-
value.bind(function(loginPressVal) {
|
864 |
|
865 |
-
customizer_bg = change_theme ? change_theme : loginpress_script
|
866 |
-
.login_theme;
|
867 |
|
868 |
-
if (
|
869 |
-
|
870 |
-
$("<style type='text/css' id='loginpress-scbg-position'></style>")
|
871 |
-
.appendTo($('#customize-preview iframe').contents().find(
|
872 |
-
'head'));
|
873 |
}
|
874 |
|
875 |
if ( loginPressVal != '' ) {
|
876 |
|
877 |
if ( 'default6' == customizer_bg || 'default10' == customizer_bg ) {
|
878 |
-
|
879 |
-
'#loginpress-scbg-position').html(
|
880 |
-
"#login::after{background-position: " + loginPressVal +
|
881 |
-
"}");
|
882 |
} else if ( 'default17' == customizer_bg ) {
|
883 |
-
|
884 |
-
"background-position" , loginPressVal);
|
885 |
} else if ( 'default8' == customizer_bg ) {
|
886 |
-
|
887 |
-
'#loginpress-scbg-position').html(
|
888 |
-
"body.login::after{background-position: " + loginPressVal +
|
889 |
-
"}");
|
890 |
} else {
|
891 |
-
|
892 |
-
"background-position", loginPressVal);
|
893 |
}
|
894 |
|
895 |
}
|
@@ -899,7 +668,6 @@ jQuery(document).ready(function() {
|
|
899 |
|
900 |
loginpress_background_img( 'loginpress_customization[setting_form_background]', '#loginform');
|
901 |
|
902 |
-
|
903 |
loginpress_new_css_property( 'loginpress_customization[customize_form_width]', '#login', 'max-width', 'px' );
|
904 |
loginpress_new_css_property( 'loginpress_customization[customize_form_height]', '#loginform', 'min-height', 'px' );
|
905 |
loginpress_css_property( 'loginpress_customization[customize_form_padding]', '#loginform', 'padding' );
|
@@ -920,44 +688,31 @@ jQuery(document).ready(function() {
|
|
920 |
// Update the login form button background in real time...
|
921 |
var loginPressBtnClr;
|
922 |
var loginPressBtnHvr;
|
923 |
-
wp.customize('loginpress_customization[custom_button_color]', function(
|
924 |
-
value) {
|
925 |
-
|
926 |
-
|
927 |
-
|
928 |
-
|
929 |
-
|
930 |
-
|
931 |
-
|
932 |
-
|
933 |
-
|
934 |
-
|
935 |
-
loginPressBtnHvr === null) {
|
936 |
-
$(this).css('background', loginPressBtnHvr);
|
937 |
-
} else {
|
938 |
-
$(this).css('background', '');
|
939 |
-
}
|
940 |
-
}).on('mouseleave', function() {
|
941 |
-
$(this).css('background', '');
|
942 |
});
|
943 |
} else {
|
944 |
-
|
945 |
-
'.wp-core-ui #login .button-primary').css('background',
|
946 |
-
loginPressVal);
|
947 |
loginPressBtnClr = loginPressVal;
|
948 |
|
949 |
-
|
950 |
-
|
951 |
-
|
952 |
-
|
953 |
-
|
954 |
-
|
955 |
-
|
956 |
-
|
957 |
-
$(this).css('background', '');
|
958 |
-
}
|
959 |
-
}).on('mouseleave', function() {
|
960 |
-
$(this).css('background', loginPressVal);
|
961 |
});
|
962 |
}
|
963 |
});
|
@@ -965,58 +720,40 @@ jQuery(document).ready(function() {
|
|
965 |
|
966 |
var loginPressBtnBrdrClr;
|
967 |
// Update the login form button border-color in real time...
|
968 |
-
wp.customize('loginpress_customization[button_border_color]', function(
|
969 |
-
value) {
|
970 |
-
|
971 |
-
|
972 |
-
$('#customize-preview iframe').contents().find(
|
973 |
-
'.wp-core-ui #login .button-primary').css('border-color',
|
974 |
-
'');
|
975 |
} else {
|
976 |
-
|
977 |
-
'.wp-core-ui #login .button-primary').css('border-color',
|
978 |
-
loginPressVal);
|
979 |
loginPressBtnBrdrClr = loginPressVal;
|
980 |
}
|
981 |
});
|
982 |
});
|
983 |
|
984 |
// Update the login form button border-color in real time...
|
985 |
-
wp.customize('loginpress_customization[button_hover_color]', function(value) {
|
986 |
-
value.bind(function(loginPressVal) {
|
987 |
-
if (loginPressVal == '') {
|
988 |
-
|
989 |
-
|
990 |
-
|
991 |
-
|
992 |
-
|
993 |
-
|
994 |
-
$(this).css('background', '');
|
995 |
-
}).on('mouseleave', function() {
|
996 |
-
|
997 |
-
if (typeof loginPressBtnClr !== "undefined" ||
|
998 |
-
loginPressBtnClr === null) {
|
999 |
-
$(this).css('background', loginPressBtnClr);
|
1000 |
} else {
|
1001 |
-
$(this).css('background', '');
|
1002 |
}
|
1003 |
});
|
1004 |
} else {
|
1005 |
-
|
1006 |
loginPressBtnHvr = loginPressVal;
|
1007 |
-
|
1008 |
-
|
1009 |
-
|
1010 |
-
|
1011 |
-
|
1012 |
-
$(this).css('background', loginPressVal);
|
1013 |
-
}).on('mouseleave', function() {
|
1014 |
-
|
1015 |
-
if (typeof loginPressBtnClr !== "undefined" ||
|
1016 |
-
loginPressBtnClr === null) {
|
1017 |
-
$(this).css('background', loginPressBtnClr);
|
1018 |
} else {
|
1019 |
-
$(this).css('background', '');
|
1020 |
}
|
1021 |
});
|
1022 |
}
|
@@ -1024,25 +761,18 @@ jQuery(document).ready(function() {
|
|
1024 |
});
|
1025 |
|
1026 |
// Update the login form button border-color in real time...
|
1027 |
-
wp.customize('loginpress_customization[button_hover_border]', function(
|
1028 |
-
value) {
|
1029 |
-
|
1030 |
-
|
1031 |
-
$('#customize-preview iframe').contents().find(
|
1032 |
-
'.wp-core-ui #login .button-primary').css('border-color',
|
1033 |
-
'');
|
1034 |
} else {
|
1035 |
-
|
1036 |
-
|
1037 |
-
function() {
|
1038 |
-
|
1039 |
-
|
1040 |
-
|
1041 |
-
if (typeof loginPressBtnBrdrClr !== "undefined" ||
|
1042 |
-
loginPressBtnBrdrClr === null) {
|
1043 |
-
$(this).css('border-color', loginPressBtnBrdrClr);
|
1044 |
} else {
|
1045 |
-
$(this).css('border-color', '');
|
1046 |
}
|
1047 |
});
|
1048 |
}
|
@@ -1050,31 +780,23 @@ jQuery(document).ready(function() {
|
|
1050 |
});
|
1051 |
|
1052 |
// Update the login form button border-color in real time...
|
1053 |
-
wp.customize('loginpress_customization[custom_button_shadow]', function(
|
1054 |
-
value) {
|
1055 |
-
|
1056 |
-
|
1057 |
-
$('#customize-preview iframe').contents().find(
|
1058 |
-
'.wp-core-ui #login .button-primary').css('box-shadow',
|
1059 |
-
'');
|
1060 |
} else {
|
1061 |
-
|
1062 |
-
'.wp-core-ui #login .button-primary').css('box-shadow',
|
1063 |
-
loginPressVal);
|
1064 |
}
|
1065 |
});
|
1066 |
});
|
1067 |
|
1068 |
// Update the login form button border-color in real time...
|
1069 |
-
wp.customize('loginpress_customization[button_text_color]', function(value) {
|
1070 |
-
value.bind(function(loginPressVal) {
|
1071 |
-
if (loginPressVal == '') {
|
1072 |
-
|
1073 |
-
'.wp-core-ui #login .button-primary').css('color', '');
|
1074 |
} else {
|
1075 |
-
|
1076 |
-
'.wp-core-ui #login .button-primary').css('color',
|
1077 |
-
loginPressVal);
|
1078 |
}
|
1079 |
});
|
1080 |
});
|
@@ -1090,85 +812,66 @@ jQuery(document).ready(function() {
|
|
1090 |
var loginPressFtrClr;
|
1091 |
var loginPressFtrHvr;
|
1092 |
// Update the login form button border-color in real time...
|
1093 |
-
wp.customize('loginpress_customization[login_footer_color]', function(value) {
|
1094 |
-
value.bind(function(loginPressVal) {
|
1095 |
|
1096 |
-
if (loginPressVal == '') {
|
1097 |
-
|
1098 |
-
|
1099 |
-
|
1100 |
-
|
1101 |
-
|
1102 |
-
if (typeof loginPressFtrHvr !== "undefined" ||
|
1103 |
-
loginPressFtrHvr === null) {
|
1104 |
-
$(this).css('color', loginPressFtrHvr);
|
1105 |
} else {
|
1106 |
-
$(this).css('color', '');
|
1107 |
}
|
1108 |
-
}).on('mouseleave', function() {
|
1109 |
-
$(this).css('color', '');
|
1110 |
});
|
1111 |
} else {
|
1112 |
loginPressFtrClr = loginPressVal;
|
1113 |
-
|
1114 |
-
|
1115 |
-
|
1116 |
-
|
1117 |
-
|
1118 |
-
if (typeof loginPressFtrHvr !== "undefined" ||
|
1119 |
-
loginPressFtrHvr === null) {
|
1120 |
-
$(this).css('color', loginPressFtrHvr);
|
1121 |
} else {
|
1122 |
-
$(this).css('color', '');
|
1123 |
}
|
1124 |
-
}).on('mouseleave', function() {
|
1125 |
-
$(this).css('color', loginPressVal);
|
1126 |
});
|
1127 |
}
|
1128 |
});
|
1129 |
});
|
1130 |
|
1131 |
// Update the login form button border-color in real time...
|
1132 |
-
wp.customize('loginpress_customization[login_footer_color_hover]', function(
|
1133 |
-
value) {
|
1134 |
-
value.bind(function(loginPressVal) {
|
1135 |
-
|
1136 |
-
if (loginPressVal == '') {
|
1137 |
-
|
1138 |
-
$('#customize-preview iframe').contents().find(
|
1139 |
-
'.login #nav a').css('color', '');
|
1140 |
|
1141 |
-
|
1142 |
-
|
1143 |
-
|
1144 |
-
|
1145 |
-
|
1146 |
-
if (typeof loginPressFtrClr !== "undefined" ||
|
1147 |
-
loginPressFtrClr
|
1148 |
-
$(this).css('color', loginPressFtrClr);
|
1149 |
} else {
|
1150 |
-
$(this).css('color', '');
|
1151 |
}
|
1152 |
});
|
1153 |
} else {
|
1154 |
loginPressFtrHvr = loginPressVal;
|
1155 |
-
|
1156 |
-
'.login #nav a').on('mouseover', function() {
|
1157 |
$(this).css('color', loginPressVal);
|
1158 |
}).on('mouseleave', function() {
|
1159 |
-
|
1160 |
-
|
1161 |
-
loginPressFtrClr === null) {
|
1162 |
-
$(this).css('color', loginPressFtrClr);
|
1163 |
} else {
|
1164 |
-
$(this).css('color', '');
|
1165 |
}
|
1166 |
});
|
1167 |
}
|
1168 |
});
|
1169 |
});
|
1170 |
|
1171 |
-
// loginpress_css_property( 'loginpress_customization[login_footer_font_size]', '.login #nav a', 'font-size' );
|
1172 |
loginpress_new_css_property( 'loginpress_customization[login_footer_font_size]', '.login #nav a', 'font-size', 'px' );
|
1173 |
loginpress_css_property( 'loginpress_customization[login_footer_bg_color]', '.login #nav', 'background-color' );
|
1174 |
|
@@ -1184,14 +887,8 @@ jQuery(document).ready(function() {
|
|
1184 |
value.bind(function( loginPressVal ) {
|
1185 |
|
1186 |
if ( loginPressVal == '' ) {
|
1187 |
-
|
1188 |
-
.
|
1189 |
-
.find( '.login #backtoblog a' )
|
1190 |
-
.css( 'color', '' );
|
1191 |
-
$( '#customize-preview iframe' )
|
1192 |
-
.contents()
|
1193 |
-
.find( '.login #backtoblog a' )
|
1194 |
-
.on( 'mouseover', function() {
|
1195 |
if ( typeof loginPressFtrBackHvr !== "undefined" || loginPressFtrBackHvr === null ) {
|
1196 |
$(this).css( 'color', loginPressFtrBackHvr );
|
1197 |
} else {
|
@@ -1203,14 +900,8 @@ jQuery(document).ready(function() {
|
|
1203 |
} );
|
1204 |
} else {
|
1205 |
loginPressFtrBackClr = loginPressVal;
|
1206 |
-
|
1207 |
-
.
|
1208 |
-
.find( '.login #backtoblog a' )
|
1209 |
-
.css( 'color', loginPressVal );
|
1210 |
-
$( '#customize-preview iframe' )
|
1211 |
-
.contents()
|
1212 |
-
.find( '.login #backtoblog a')
|
1213 |
-
.on( 'mouseover', function() {
|
1214 |
if ( typeof loginPressFtrBackHvr !== "undefined" || loginPressFtrBackHvr === null ) {
|
1215 |
$(this).css( 'color', loginPressFtrBackHvr );
|
1216 |
} else {
|
@@ -1232,15 +923,9 @@ jQuery(document).ready(function() {
|
|
1232 |
|
1233 |
if ( loginPressVal == '' ) {
|
1234 |
|
1235 |
-
|
1236 |
-
.contents()
|
1237 |
-
.find( '.login #backtoblog a' )
|
1238 |
-
.css( 'color', '' );
|
1239 |
|
1240 |
-
|
1241 |
-
.contents()
|
1242 |
-
.find( '.login #backtoblog a' )
|
1243 |
-
.on( 'mouseover', function() {
|
1244 |
$(this).css( 'color', '' );
|
1245 |
} )
|
1246 |
.on( 'mouseleave', function() {
|
@@ -1252,10 +937,7 @@ jQuery(document).ready(function() {
|
|
1252 |
});
|
1253 |
} else {
|
1254 |
loginPressFtrBackHvr = loginPressVal;
|
1255 |
-
|
1256 |
-
.contents()
|
1257 |
-
.find( '.login #backtoblog a' )
|
1258 |
-
.on( 'mouseover', function() {
|
1259 |
$(this).css( 'color', loginPressVal );
|
1260 |
} )
|
1261 |
.on( 'mouseleave', function() {
|
@@ -1309,17 +991,9 @@ jQuery(document).ready(function() {
|
|
1309 |
value.bind( function( loginPressVal ) {
|
1310 |
|
1311 |
if ( loginPressVal == false ) {
|
1312 |
-
|
1313 |
-
.contents()
|
1314 |
-
.find( '.loginpress-show-love' )
|
1315 |
-
.fadeOut()
|
1316 |
-
.hide();
|
1317 |
} else {
|
1318 |
-
|
1319 |
-
.contents()
|
1320 |
-
.find( '.loginpress-show-love' )
|
1321 |
-
.fadeIn()
|
1322 |
-
.show();
|
1323 |
}
|
1324 |
} );
|
1325 |
} );
|
@@ -1331,34 +1005,33 @@ jQuery(document).ready(function() {
|
|
1331 |
value.bind( function( loginPressVal ) {
|
1332 |
|
1333 |
if ( loginPressVal == '' ) {
|
1334 |
-
|
1335 |
-
.contents()
|
1336 |
-
.find( '.loginpress_recaptcha_wrapper .g-recaptcha' )
|
1337 |
-
.css( 'transform', '' );
|
1338 |
} else {
|
1339 |
-
|
1340 |
-
.contents()
|
1341 |
-
.find( '.loginpress_recaptcha_wrapper .g-recaptcha' )
|
1342 |
-
.css( 'transform', 'scale(' + loginPressVal + ')' );
|
1343 |
}
|
1344 |
});
|
1345 |
});
|
1346 |
|
1347 |
$(window).on('load', function() {
|
1348 |
|
1349 |
-
// console.log($('#customize-control-loginpress_display_bg input[type="checkbox"]').length);
|
1350 |
if ( $('#customize-control-loginpress_customization-loginpress_display_bg input[type="checkbox"]').is(":checked") ) {
|
1351 |
-
|
1352 |
-
|
1353 |
-
|
1354 |
-
|
|
|
1355 |
} else {
|
|
|
1356 |
$('#customize-control-loginpress_customization-setting_background').css( 'display', 'none' );
|
1357 |
$('#customize-control-loginpress_customization-background_repeat_radio').css( 'display', 'none' );
|
1358 |
$('#customize-control-loginpress_customization-background_position').css( 'display', 'none' );
|
1359 |
$('#customize-control-loginpress_customization-background_image_size').css( 'display', 'none' );
|
1360 |
}
|
1361 |
|
|
|
|
|
|
|
|
|
1362 |
if ( $('#customize-control-loginpress_customization-footer_display_text input[type="checkbox"]').is(":checked") ) {
|
1363 |
|
1364 |
$('#customize-control-loginpress_customization-login_footer_text').css( 'display', 'list-item' );
|
@@ -1393,16 +1066,11 @@ jQuery(document).ready(function() {
|
|
1393 |
$('#customize-control-loginpress_customization-login_back_bg_color').css( 'display', 'none' );
|
1394 |
}
|
1395 |
|
1396 |
-
$("<style type='text/css' id='loginpress-customize'></style>").appendTo(
|
1397 |
-
|
1398 |
-
$("<style type='text/css' id='loginpress-
|
1399 |
-
|
1400 |
-
$("<style type='text/css' id='loginpress-scbg-
|
1401 |
-
$('#customize-preview iframe').contents().find('head'));
|
1402 |
-
$("<style type='text/css' id='loginpress-scbg-size'></style>").appendTo(
|
1403 |
-
$('#customize-preview iframe').contents().find('head'));
|
1404 |
-
$("<style type='text/css' id='loginpress-scbg-repeat'></style>").appendTo(
|
1405 |
-
$('#customize-preview iframe').contents().find('head'));
|
1406 |
|
1407 |
|
1408 |
});
|
34 |
|
35 |
(function($) {
|
36 |
|
37 |
+
/**
|
38 |
+
* [loginpress_find find CSS classes in WordPress customizer]
|
39 |
+
* @param {String} [finder='#loginpress-customize'] [find class in customizer]
|
40 |
+
* @return {[type]} [iframe content finder]
|
41 |
+
* @since 1.1.0
|
42 |
+
*/
|
43 |
+
function loginpress_find( finder = '#loginpress-customize' ) {
|
44 |
+
var customizer_finder = $('#customize-preview iframe').contents().find( finder );
|
45 |
+
return customizer_finder;
|
46 |
+
}
|
47 |
+
|
48 |
// function for change LoginPress background-image in real time...
|
49 |
function loginpress_background_img( setting, target ) {
|
50 |
wp.customize( setting, function( value ) {
|
51 |
value.bind( function( loginPressVal ) {
|
52 |
if ( loginPressVal == '' ) {
|
53 |
+
loginpress_find( target ).css( 'background-image', 'none' );
|
|
|
|
|
|
|
54 |
} else {
|
55 |
+
loginpress_find( target ).css( 'background-image', 'url(' + loginPressVal + ')' );
|
|
|
|
|
|
|
56 |
}
|
57 |
} );
|
58 |
} );
|
65 |
value.bind( function( loginPressVal ) {
|
66 |
|
67 |
if ( loginPressVal == '' ) {
|
68 |
+
loginpress_find( target ).css( property, '' );
|
|
|
|
|
|
|
69 |
} else {
|
70 |
+
loginpress_find( target ).css( property, loginPressVal );
|
|
|
|
|
|
|
71 |
}
|
72 |
} );
|
73 |
} );
|
80 |
value.bind( function( loginPressVal ) {
|
81 |
|
82 |
if ( loginPressVal == '' ) {
|
83 |
+
loginpress_find( target ).css( property, '' );
|
|
|
|
|
|
|
84 |
} else {
|
85 |
+
loginpress_find( target ).css( property, loginPressVal + suffix );
|
|
|
|
|
|
|
86 |
}
|
87 |
} );
|
88 |
} );
|
93 |
value.bind( function( loginPressVal ) {
|
94 |
|
95 |
if ( loginPressVal == '' ) {
|
96 |
+
loginpress_find( target ).attr( property, '' );
|
|
|
|
|
|
|
97 |
} else {
|
98 |
+
loginpress_find( target ).attr( property, loginPressVal );
|
|
|
|
|
|
|
99 |
}
|
100 |
} );
|
101 |
} );
|
102 |
+
}
|
103 |
|
104 |
// function for change LoginPress input fields in real time...
|
105 |
function loginpress_input_property( setting, property ) {
|
107 |
value.bind( function( loginPressVal ) {
|
108 |
|
109 |
if ( loginPressVal == '' ) {
|
110 |
+
loginpress_find( '.login input[type="text"]' ).css( property, '' );
|
111 |
+
loginpress_find( '.login input[type="password"]' ).css( property, '' );
|
|
|
|
|
|
|
|
|
|
|
|
|
112 |
} else {
|
113 |
+
loginpress_find( '.login input[type="text"]' ).css( property, loginPressVal );
|
114 |
+
loginpress_find( '.login input[type="password"]' ).css( property, loginPressVal );
|
|
|
|
|
|
|
|
|
|
|
|
|
115 |
}
|
116 |
} );
|
117 |
} );
|
123 |
value.bind( function( loginPressVal ) {
|
124 |
|
125 |
if ( loginPressVal == '' ) {
|
126 |
+
loginpress_find( '.login input[type="text"]' ).css( property, '' );
|
127 |
+
loginpress_find( '.login input[type="password"]' ).css( property, '' );
|
|
|
|
|
|
|
|
|
|
|
|
|
128 |
} else {
|
129 |
+
loginpress_find( '.login input[type="text"]' ).css( property, loginPressVal + suffix);
|
130 |
+
loginpress_find( '.login input[type="password"]' ).css( property, loginPressVal + suffix);
|
|
|
|
|
|
|
|
|
|
|
|
|
131 |
}
|
132 |
} );
|
133 |
} );
|
135 |
|
136 |
// function for change LoginPress error and welcome messages in real time...
|
137 |
/**
|
138 |
+
* [loginpress_text_message LoginPress (Error + Welcome) Message live Control.]
|
139 |
+
* @param id [Unique ID of the section. ]
|
140 |
* @param target [CSS Property]
|
141 |
* @return string [CSS property]
|
142 |
*/
|
145 |
value.bind( function( loginPressVal ) {
|
146 |
|
147 |
if ( loginPressVal == '' ) {
|
148 |
+
loginpress_find( target ).html('');
|
149 |
+
loginpress_find( target ).css( 'display', 'none' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
150 |
} else {
|
151 |
+
loginpress_find( target ).html( loginPressVal );
|
152 |
+
loginpress_find( target ).css( 'display', 'block' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
153 |
}
|
154 |
} );
|
155 |
} );
|
162 |
* @param {[type]} value [Customized value from user.]
|
163 |
* @return {[type]} [Theme ID]
|
164 |
*/
|
165 |
+
wp.customize( 'customize_presets_settings', function(value) {
|
166 |
+
value.bind( function(loginPressVal) {
|
167 |
|
168 |
change_theme = loginPressVal;
|
169 |
|
224 |
}
|
225 |
|
226 |
// function for change LoginPress error and welcome messages in real time...
|
227 |
+
function loginpress_footer_text_message( errorlog, target ) {
|
228 |
+
wp.customize( errorlog, function(value) {
|
229 |
value.bind(function(loginPressVal) {
|
230 |
|
231 |
+
if ( loginPressVal == '' ) {
|
232 |
+
loginpress_find(target).html('');
|
233 |
+
if ( errorlog == 'loginpress_customization[login_footer_copy_right]' ) {
|
234 |
+
loginpress_find(target).css( 'display', 'none' );
|
|
|
|
|
|
|
235 |
}
|
236 |
} else {
|
237 |
+
loginpress_find(target).html(loginPressVal);
|
238 |
+
if ( errorlog == 'loginpress_customization[login_footer_copy_right]' ) {
|
239 |
+
loginpress_find(target).css( 'display', 'block' );
|
|
|
|
|
|
|
240 |
}
|
241 |
}
|
242 |
});
|
243 |
});
|
244 |
}
|
245 |
|
246 |
+
/**
|
247 |
+
* [loginpress_customizer_bg LoginPress Customizer Background Image Control that Retrive the Image URL w.r.t theme]
|
248 |
+
* @param {[string]} customizer_bg [Preset Option]
|
249 |
+
* @return {[URL]} loginpress_bg [Image URL]
|
250 |
+
*/
|
251 |
function loginpress_customizer_bg(customizer_bg) {
|
252 |
|
253 |
+
if ( 'default1' == customizer_bg ) {
|
254 |
+
loginpress_bg = 'url(' + loginpress_script.plugin_url + '/loginpress/img/bg.jpg)';
|
255 |
+
} else if ( 'default2' == customizer_bg ) {
|
256 |
+
loginpress_bg = 'url(' + loginpress_script.plugin_url + '/loginpress/img/bg2.jpg)';
|
257 |
+
} else if ( 'default3' == customizer_bg ) {
|
258 |
+
loginpress_bg = 'url(' + loginpress_script.plugin_url + '/loginpress-pro/img/bg3.jpg)';
|
259 |
+
} else if ( 'default4' == customizer_bg ) {
|
260 |
+
loginpress_bg = 'url(' + loginpress_script.plugin_url + '/loginpress-pro/img/bg4.jpg)';
|
261 |
+
} else if ( 'default5' == customizer_bg ) {
|
262 |
+
loginpress_bg = 'url(' + loginpress_script.plugin_url + '/loginpress-pro/img/bg5.jpg)';
|
263 |
+
} else if ( 'default6' == customizer_bg ) {
|
264 |
+
loginpress_bg = 'url(' + loginpress_script.plugin_url + '/loginpress-pro/img/bg6.jpg)';
|
265 |
+
} else if ( 'default7' == customizer_bg ) {
|
266 |
+
loginpress_bg = 'url(' + loginpress_script.plugin_url + '/loginpress-pro/img/bg7.jpg)';
|
267 |
+
} else if ( 'default8' == customizer_bg ) {
|
268 |
+
loginpress_bg = 'url(' + loginpress_script.plugin_url + '/loginpress-pro/img/bg8.jpg)';
|
269 |
+
} else if ( 'default9' == customizer_bg ) {
|
270 |
+
loginpress_bg = 'url(' + loginpress_script.plugin_url + '/loginpress-pro/img/bg9.jpg)';
|
271 |
+
} else if ( 'default10' == customizer_bg ) {
|
272 |
+
loginpress_bg = 'url(' + loginpress_script.plugin_url + '/loginpress-pro/img/bg10.jpg)';
|
273 |
+
} else if ( 'default11' == customizer_bg ) {
|
274 |
+
loginpress_bg = 'url(' + loginpress_script.plugin_url + '/loginpress-pro/img/bg11.png)';
|
275 |
+
} else if ( 'default12' == customizer_bg ) {
|
276 |
+
loginpress_bg = 'url(' + loginpress_script.plugin_url + '/loginpress-pro/img/bg12.jpg)';
|
277 |
+
} else if ( 'default13' == customizer_bg ) {
|
278 |
+
loginpress_bg = 'url(' + loginpress_script.plugin_url + '/loginpress-pro/img/bg13.jpg)';
|
279 |
+
} else if ( 'default14' == customizer_bg ) {
|
280 |
+
loginpress_bg = 'url(' + loginpress_script.plugin_url + '/loginpress-pro/img/bg14.jpg)';
|
281 |
+
} else if ( 'default15' == customizer_bg ) {
|
282 |
+
loginpress_bg = 'url(' + loginpress_script.plugin_url + '/loginpress-pro/img/bg15.jpg)';
|
283 |
+
} else if ( 'default16' == customizer_bg ) {
|
284 |
+
loginpress_bg = 'url(' + loginpress_script.plugin_url + '/loginpress-pro/img/bg16.jpg)';
|
285 |
+
} else if ( 'default17' == customizer_bg ) {
|
286 |
+
loginpress_bg = 'url(' + loginpress_script.plugin_url + '/loginpress-pro/img/bg17.jpg)';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
287 |
}
|
288 |
}
|
289 |
|
290 |
+
// Enable / Disable LoginPress Background.
|
291 |
+
wp.customize( 'loginpress_customization[loginpress_display_bg]', function(value) {
|
292 |
+
value.bind( function(loginPressVal) {
|
293 |
|
294 |
// Check the theme id.
|
295 |
+
customizer_bg = change_theme ? change_theme : loginpress_script.login_theme;
|
|
|
296 |
|
297 |
// Set custom style on customizer.
|
298 |
+
if ( loginpress_find().length == 0 ) {
|
299 |
+
$("<style type='text/css' id='loginpress-customize'></style>").appendTo(loginpress_find('head'));
|
|
|
|
|
|
|
300 |
}
|
301 |
|
302 |
+
if ( loginPressVal == false ) { // Set conditions on behalf on themes.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
303 |
|
304 |
+
if ( 'default6' == customizer_bg ) {
|
305 |
+
loginpress_find().html( "#login::after{background-image: none}" );
|
306 |
+
} else if ( 'default8' == customizer_bg ) {
|
307 |
+
loginpress_find().html( "body.login::after{background: none}" );
|
308 |
+
} else if ( 'default10' == customizer_bg ) {
|
309 |
+
loginpress_find().html( "#login::after{background-image: none}" );
|
310 |
+
} else if ( 'default17' == customizer_bg ) {
|
311 |
+
loginpress_find().html( "#login{background: none}" );
|
312 |
} else {
|
313 |
+
loginpress_find('body.login').css('background-image', 'none');
|
|
|
314 |
}
|
315 |
|
316 |
+
// Turn Off the Dependencies controls.
|
317 |
+
$('#customize-control-loginpress_customization-gallery_background').fadeOut().css( 'display', 'none' );
|
318 |
$('#customize-control-loginpress_customization-setting_background').fadeOut().css( 'display', 'none' );
|
319 |
$('#customize-control-loginpress_customization-background_repeat_radio').fadeOut().css( 'display', 'none' );
|
320 |
$('#customize-control-loginpress_customization-background_position').fadeOut().css( 'display', 'none' );
|
321 |
$('#customize-control-loginpress_customization-background_image_size').fadeOut().css( 'display', 'none' );
|
|
|
322 |
} else {
|
323 |
+
if ( localStorage.loginpress_bg ) {
|
|
|
324 |
|
325 |
loginpress_bg_ = 'url(' + localStorage.loginpress_bg + ')';
|
326 |
|
327 |
+
if ( 'default6' == customizer_bg ) {
|
328 |
+
loginpress_find().html( "#login::after{background-image: " + loginpress_bg_ + "}" );
|
329 |
+
} else if ( 'default8' == customizer_bg ) {
|
330 |
+
loginpress_find().html( "body.login::after{background: " + loginpress_bg_ + " no-repeat 0 0; background-size: cover}" );
|
331 |
+
} else if ( 'default10' == customizer_bg ) {
|
332 |
+
loginpress_find().html( "#login::after{background-image: " + loginpress_bg_ + "}" );
|
333 |
+
} else if ( 'default17' == customizer_bg ) {
|
334 |
+
loginpress_find().html( "#login{background: " + loginpress_bg_ + " no-repeat 0 0;}" );
|
335 |
+
} else {
|
336 |
+
loginpress_find('body.login').css( 'background-image', loginpress_bg_ );
|
337 |
+
}
|
338 |
|
339 |
+
} else if ( loginpress_script.loginpress_bg_url == true ) {
|
|
|
|
|
|
|
340 |
|
341 |
+
if ( 'default6' == customizer_bg ) {
|
342 |
+
loginpress_find().html( "#login::after{background-image: " + loginpress_script.loginpress_bg_url + "}" );
|
343 |
+
} else if ( 'default8' == customizer_bg ) {
|
344 |
+
loginpress_find().html( "body.login::after{background: " + loginpress_script.loginpress_bg_url + " no-repeat 0 0; background-size: cover}" );
|
345 |
+
} else if ( 'default10' == customizer_bg ) {
|
346 |
+
loginpress_find().html( "#login::after{background-image: " + loginpress_script.loginpress_bg_url + "}" );
|
347 |
+
} else if ( 'default17' == customizer_bg ) {
|
348 |
+
loginpress_find().html( "#login{background: " + loginpress_script.loginpress_bg_url + " no-repeat 0 0;}" );
|
349 |
+
} else {
|
350 |
+
loginpress_find('body.login').css( 'background-image', 'url(' + loginpress_script.loginpress_bg_url + ')' );
|
351 |
+
}
|
352 |
|
353 |
+
} else {
|
|
|
|
|
|
|
354 |
|
355 |
+
/**
|
356 |
+
* [loginpress_customizer_bg Retrive the Image URL w.r.t theme]
|
357 |
+
* @param {[string]} customizer_bg [Preset Option]
|
358 |
+
* @return {[URL]} loginpress_bg [Image URL]
|
359 |
+
*/
|
360 |
+
loginpress_customizer_bg(customizer_bg);
|
361 |
+
if( $('#loginpress-gallery .image-select:checked').length > 0 && $('#loginpress-gallery .image-select:checked').parent('.loginpress_gallery_thumbnails').index() != 0 ) {
|
362 |
+
loginpress_bg = $('#loginpress-gallery .image-select:checked').val();
|
363 |
+
loginpress_bg = 'url(' + loginpress_bg + ')';
|
364 |
+
}
|
365 |
+
console.log($('#loginpress-gallery .image-select:checked').parent('.loginpress_gallery_thumbnails').index());
|
366 |
|
|
|
|
|
|
|
367 |
|
368 |
+
if ( 'default6' == customizer_bg ) {
|
369 |
+
loginpress_find().html( "#login::after{background-image: " + loginpress_bg + "}" );
|
370 |
+
} else if ( 'default8' == customizer_bg ) {
|
371 |
+
loginpress_find().html( "body.login::after{background: " + loginpress_bg + " no-repeat 0 0; background-size: cover}" );
|
372 |
+
} else if ( 'default10' == customizer_bg ) {
|
373 |
+
loginpress_find().html( "#login::after{background-image: " + loginpress_bg + "}" );
|
374 |
+
} else if ( 'default17' == customizer_bg ) {
|
375 |
+
loginpress_find().html( "#login{background: " + loginpress_bg + " no-repeat 0 0;}" );
|
376 |
} else {
|
377 |
+
loginpress_find('body.login').css( 'background-image', loginpress_bg );
|
|
|
|
|
378 |
}
|
379 |
|
380 |
+
// Display Gallery Control.
|
381 |
+
$('#customize-control-loginpress_customization-gallery_background').fadeIn().css( 'display', 'list-item' );
|
382 |
+
if ( $('#customize-control-loginpress_customization-setting_background .attachment-media-view-image').length > 0 ) {
|
383 |
+
$('#customize-control-loginpress_customization-gallery_background').css( 'display', 'none' );
|
384 |
+
}
|
385 |
+
}
|
386 |
|
387 |
+
// Turn On the Dependencies controls.
|
388 |
+
$('#customize-control-loginpress_customization-setting_background').fadeIn().css( 'display', 'list-item' );
|
389 |
+
$('#customize-control-loginpress_customization-background_repeat_radio').fadeIn().css( 'display', 'list-item' );
|
390 |
+
$('#customize-control-loginpress_customization-background_position').fadeIn().css( 'display', 'list-item' );
|
391 |
+
$('#customize-control-loginpress_customization-background_image_size').fadeIn().css( 'display', 'list-item' );
|
392 |
|
|
|
|
|
|
|
|
|
393 |
|
394 |
+
} // endif; conditions on behalf on themes.
|
395 |
+
});
|
396 |
+
});
|
397 |
|
398 |
+
// Change LoginPress Custom Background that choosen by user.
|
399 |
+
wp.customize( 'loginpress_customization[setting_background]', function(value) {
|
400 |
+
value.bind( function(loginPressVal) {
|
|
|
401 |
|
402 |
+
customizer_bg = change_theme ? change_theme : loginpress_script.login_theme;
|
403 |
|
404 |
+
if ( loginpress_find().length == 0 ) {
|
405 |
+
$("<style type='text/css' id='loginpress-customize'></style>").appendTo( loginpress_find('head') );
|
406 |
+
}
|
|
|
407 |
|
408 |
+
if ( loginPressVal == '' ) {
|
409 |
|
410 |
+
if ( localStorage.loginpress_bg ) {
|
411 |
+
localStorage.removeItem("loginpress_bg");
|
412 |
+
}
|
|
|
413 |
|
414 |
+
/**
|
415 |
+
* [loginpress_customizer_bg Retrive the Image URL w.r.t theme]
|
416 |
+
* @param {[string]} customizer_bg [Preset Option]
|
417 |
+
* @return {[URL]} loginpress_bg [Image URL]
|
418 |
+
*/
|
419 |
+
loginpress_customizer_bg(customizer_bg);
|
420 |
+
if( $('#loginpress-gallery .image-select:checked').length > 0 && $('#loginpress-gallery .image-select:checked').parent('.loginpress_gallery_thumbnails').index() != 0 ) { // when remove custom background, set selected gallery bg
|
421 |
+
loginpress_bg = $('#loginpress-gallery .image-select:checked').val();
|
422 |
+
loginpress_bg = 'url('+loginpress_bg+')';
|
423 |
}
|
424 |
+
if ( 'default6' == customizer_bg ) {
|
425 |
+
loginpress_find().html( "#login::after{background-image: " + loginpress_bg + "}" );
|
426 |
+
} else if ( 'default8' == customizer_bg ) {
|
427 |
+
loginpress_find().html( "body.login::after{background: " + loginpress_bg + " no-repeat 0 0; background-size: cover}" );
|
428 |
+
} else if ( 'default10' == customizer_bg ) {
|
429 |
+
loginpress_find().html( "#login::after{background-image: " + loginpress_bg + "}" );
|
430 |
+
} else if ( 'default17' == customizer_bg ) {
|
431 |
+
loginpress_find().html( "#login{background: " + loginpress_bg + " no-repeat 0 0;}" );
|
432 |
} else {
|
433 |
+
loginpress_find('body.login').css( 'background-image', loginpress_bg );
|
434 |
|
435 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
436 |
|
|
|
437 |
|
438 |
+
// Display the Gallery Control.
|
439 |
+
$('#customize-control-loginpress_customization-gallery_background').fadeIn().css( 'display', 'list-item' );
|
|
|
|
|
440 |
|
441 |
+
} else {
|
442 |
|
443 |
+
// if (!localStorage.loginpress_bg) {
|
444 |
+
localStorage.setItem("loginpress_bg", loginPressVal);
|
445 |
+
// }
|
446 |
|
447 |
+
if ( 'default6' == customizer_bg ) {
|
448 |
+
loginpress_find().html( "#login::after{background-image: url(" + loginPressVal + ")}" );
|
449 |
+
} else if ( 'default8' == customizer_bg ) {
|
450 |
+
loginpress_find().html( "body.login::after{background: url(" + loginPressVal + ") no-repeat 0 0; background-size: cover}" );
|
451 |
+
} else if ( 'default10' == customizer_bg ) {
|
452 |
+
loginpress_find().html( "#login::after{background-image: url(" + loginPressVal + ")}" );
|
453 |
+
} else if ( 'default17' == customizer_bg ) {
|
454 |
+
loginpress_find().html( "#login{background: url(" + loginPressVal + ") no-repeat 0 0;}" );
|
455 |
+
} else {
|
456 |
+
loginpress_find('body.login').css( 'background-image', 'url(' + loginPressVal + ')' );
|
457 |
}
|
458 |
|
459 |
+
// Disable the Gallery Control.
|
460 |
+
$('#customize-control-loginpress_customization-gallery_background').fadeOut().css( 'display', 'none' );
|
461 |
+
}
|
|
|
462 |
|
|
|
463 |
});
|
464 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
465 |
|
466 |
+
// Change LoginPress Background Image that choosen from Gallery.
|
467 |
+
wp.customize( 'loginpress_customization[gallery_background]', function(value) {
|
468 |
+
value.bind( function(loginPressVal) {
|
469 |
+
|
470 |
+
// Check the theme id.
|
471 |
+
customizer_bg = change_theme ? change_theme : loginpress_script.login_theme;
|
472 |
|
473 |
+
// Set custom style on customizer.
|
474 |
+
if ( loginpress_find().length == 0 ) {
|
475 |
+
$("<style type='text/css' id='loginpress-customize'></style>").appendTo(loginpress_find('head'));
|
|
|
|
|
476 |
}
|
477 |
|
478 |
+
if ( loginpress_script.plugin_url + '/loginpress/img/gallery/img-1.jpg' == loginPressVal ) {
|
|
|
|
|
|
|
479 |
|
480 |
+
/**
|
481 |
+
* [loginpress_customizer_bg Retrive the Image URL w.r.t theme]
|
482 |
+
* @param {[string]} customizer_bg [Preset Option]
|
483 |
+
* @return {[URL]} loginpress_bg [Image URL]
|
484 |
+
*/
|
485 |
loginpress_customizer_bg(customizer_bg);
|
486 |
+
console.log(loginpress_bg);
|
487 |
+
if ( 'default6' == customizer_bg ) {
|
488 |
+
loginpress_find().html( "#login::after{background-image: " + loginpress_bg + "}" );
|
489 |
+
} else if ( 'default8' == customizer_bg ) {
|
490 |
+
loginpress_find().html( "body.login::after{background: " + loginpress_bg + " no-repeat 0 0; background-size: cover}" );
|
491 |
+
} else if ( 'default10' == customizer_bg ) {
|
492 |
+
loginpress_find().html( "#login::after{background-image: " + loginpress_bg + "}" );
|
493 |
+
} else if ( 'default17' == customizer_bg ) {
|
494 |
+
loginpress_find().html( "#login{background: " + loginpress_bg + " no-repeat 0 0;}" );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
495 |
} else {
|
496 |
+
loginpress_find('body.login').css( 'background-image', loginpress_bg );
|
|
|
497 |
}
|
|
|
498 |
|
499 |
+
} else {
|
|
|
|
|
500 |
|
501 |
+
if ( 'default6' == customizer_bg ) {
|
502 |
+
loginpress_find().html( "#login::after{background-image: url(" + loginPressVal + ")}" );
|
503 |
+
} else if ( 'default8' == customizer_bg ) {
|
504 |
+
loginpress_find().html( "body.login::after{background: url(" + loginPressVal + ") no-repeat 0 0; background-size: cover}" );
|
505 |
+
} else if ( 'default10' == customizer_bg ) {
|
506 |
+
loginpress_find().html( "#login::after{background-image: url(" + loginPressVal + ")}" );
|
507 |
+
} else if ( 'default17' == customizer_bg ) {
|
508 |
+
loginpress_find().html( "#login{background: url(" + loginPressVal + ") no-repeat 0 0;}" );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
509 |
} else {
|
510 |
+
loginpress_find('body.login').css( 'background-image', 'url(' + loginPressVal + ')' );
|
|
|
511 |
}
|
512 |
|
513 |
}
|
|
|
514 |
});
|
515 |
});
|
516 |
// loginpress_background_img( 'loginpress_customization[]', 'body.login' );
|
523 |
loginpress_display_control( 'loginpress_customization[footer_display_text]' );
|
524 |
loginpress_display_control( 'loginpress_customization[back_display_text]' );
|
525 |
|
526 |
+
// Update the WordPress login logo in real time...
|
527 |
+
wp.customize( 'loginpress_customization[setting_logo]', function(value) {
|
528 |
+
value.bind( function(loginPressVal) {
|
529 |
|
530 |
+
if ( loginPressVal == '' ) {
|
531 |
+
loginpress_find('#login h1 a').css( 'background-image', 'url(' + loginpress_script.admin_url + '/images/wordpress-logo.svg)' );
|
|
|
|
|
532 |
} else {
|
533 |
+
loginpress_find('#login h1 a').css( 'background-image', 'url(' + loginPressVal + ')' );
|
|
|
534 |
}
|
535 |
});
|
536 |
});
|
549 |
loginpress_attr_property( 'loginpress_customization[customize_logo_hover]', '#login h1 a', 'href' );
|
550 |
loginpress_attr_property( 'loginpress_customization[customize_logo_hover_title]', '#login h1 a', 'title' );
|
551 |
|
552 |
+
// Live Background color change.
|
553 |
+
wp.customize( 'loginpress_customization[setting_background_color]', function(value) {
|
554 |
+
value.bind( function(loginPressVal) {
|
555 |
|
556 |
+
customizer_bg = change_theme ? change_theme : loginpress_script.login_theme;
|
|
|
|
|
|
|
|
|
|
|
557 |
|
558 |
+
if ( loginpress_find('#loginpress-iframe-bgColor').length == 0 ) {
|
559 |
+
$("<style type='text/css' id='loginpress-iframe-bgColor'></style>").appendTo(loginpress_find('head'));
|
|
|
|
|
|
|
|
|
|
|
|
|
560 |
}
|
561 |
|
562 |
+
if ( loginPressVal == '' ) {
|
563 |
|
564 |
if ( 'default6' == customizer_bg || 'default10' == customizer_bg ) {
|
565 |
+
loginpress_find('#loginpress-iframe-bgColor' ).html( "#login::after{background-color: #f1f1f1}" );
|
|
|
|
|
566 |
} else if ( 'default17' == customizer_bg ) {
|
567 |
+
loginpress_find('#login').css( "background-color" , "'#f1f1f1'" );
|
|
|
568 |
} else if ( 'default8' == customizer_bg ) {
|
569 |
+
loginpress_find('#loginpress-iframe-bgColor').html( "body.login::after{background-color: #f1f1f1}" );
|
|
|
|
|
570 |
} else {
|
571 |
+
loginpress_find('body.login').css( "background-color", "#f1f1f1" );
|
|
|
572 |
}
|
573 |
} else {
|
574 |
|
575 |
if ( 'default6' == customizer_bg || 'default10' == customizer_bg ) {
|
576 |
+
loginpress_find('#loginpress-iframe-bgColor').html( "#login::after{background-color: " + loginPressVal + "}" );
|
|
|
|
|
|
|
577 |
} else if ( 'default17' == customizer_bg ) {
|
578 |
+
loginpress_find('#login').css( "background-color" , loginPressVal );
|
|
|
579 |
} else if ( 'default8' == customizer_bg ) {
|
580 |
+
loginpress_find('#loginpress-iframe-bgColor').html( "body.login::after{background-color: " + loginPressVal + "}" );
|
|
|
|
|
|
|
581 |
} else {
|
582 |
+
loginpress_find('body.login').css( "background-color", loginPressVal );
|
|
|
583 |
}
|
584 |
}
|
585 |
});
|
586 |
});
|
587 |
|
588 |
|
589 |
+
// Live Background Repeat change.
|
|
|
590 |
wp.customize( 'loginpress_customization[background_repeat_radio]', function(value) {
|
591 |
value.bind(function(loginPressVal) {
|
592 |
|
593 |
customizer_bg = change_theme ? change_theme : loginpress_script
|
594 |
.login_theme;
|
595 |
|
596 |
+
if ( loginpress_find('#loginpress-scbg-repeat').length == 0 ) {
|
597 |
+
$("<style type='text/css' id='loginpress-scbg-repeat'></style>").appendTo(loginpress_find('head'));
|
|
|
|
|
|
|
598 |
}
|
599 |
|
600 |
if ( loginPressVal != '' ) {
|
601 |
|
602 |
if ( 'default6' == customizer_bg || 'default10' == customizer_bg ) {
|
603 |
+
loginpress_find('#loginpress-scbg-repeat').html( "#login::after{background-repeat: " + loginPressVal + "}" );
|
|
|
|
|
|
|
604 |
} else if ( 'default17' == customizer_bg ) {
|
605 |
+
loginpress_find('#login').css( "background-repeat" , loginPressVal );
|
|
|
606 |
} else if ( 'default8' == customizer_bg ) {
|
607 |
+
loginpress_find('#loginpress-scbg-repeat').html( "body.login::after{background-repeat: " + loginPressVal + "}" );
|
|
|
|
|
|
|
608 |
} else {
|
609 |
+
loginpress_find('body.login').css( "background-repeat", loginPressVal );
|
|
|
610 |
}
|
611 |
|
612 |
}
|
613 |
});
|
614 |
});
|
615 |
|
616 |
+
// Live Background Image Size Change.
|
|
|
617 |
wp.customize( 'loginpress_customization[background_image_size]', function(value) {
|
618 |
+
value.bind( function(loginPressVal) {
|
619 |
|
620 |
+
customizer_bg = change_theme ? change_theme : loginpress_script.login_theme;
|
|
|
621 |
|
622 |
+
if ( loginpress_find('#loginpress-scbg-size').length == 0 ) {
|
623 |
+
$("<style type='text/css' id='loginpress-scbg-size'></style>").appendTo(loginpress_find('head'));
|
|
|
|
|
|
|
624 |
}
|
625 |
|
626 |
if ( loginPressVal != '' ) {
|
627 |
|
628 |
if ( 'default6' == customizer_bg || 'default10' == customizer_bg ) {
|
629 |
+
loginpress_find('#loginpress-scbg-size').html( "#login::after{background-size: " + loginPressVal + "}" );
|
|
|
|
|
|
|
630 |
} else if ( 'default17' == customizer_bg ) {
|
631 |
+
loginpress_find('#login').css( "background-size" , loginPressVal );
|
|
|
632 |
} else if ( 'default8' == customizer_bg ) {
|
633 |
+
loginpress_find('#loginpress-scbg-size').html( "body.login::after{background-size: " + loginPressVal + "}" );
|
|
|
|
|
|
|
634 |
} else {
|
635 |
+
loginpress_find('body.login').css( "background-size", loginPressVal );
|
|
|
636 |
}
|
637 |
|
638 |
}
|
639 |
});
|
640 |
});
|
641 |
|
642 |
+
// Live Background Position Change.
|
|
|
643 |
wp.customize( 'loginpress_customization[background_position]', function(value) {
|
644 |
+
value.bind( function(loginPressVal) {
|
645 |
|
646 |
+
customizer_bg = change_theme ? change_theme : loginpress_script.login_theme;
|
|
|
647 |
|
648 |
+
if ( loginpress_find('#loginpress-scbg-position').length == 0 ) {
|
649 |
+
$("<style type='text/css' id='loginpress-scbg-position'></style>").appendTo(loginpress_find('head'));
|
|
|
|
|
|
|
650 |
}
|
651 |
|
652 |
if ( loginPressVal != '' ) {
|
653 |
|
654 |
if ( 'default6' == customizer_bg || 'default10' == customizer_bg ) {
|
655 |
+
loginpress_find('#loginpress-scbg-position').html( "#login::after{background-position: " + loginPressVal + "}" );
|
|
|
|
|
|
|
656 |
} else if ( 'default17' == customizer_bg ) {
|
657 |
+
loginpress_find('#login').css( "background-position" , loginPressVal );
|
|
|
658 |
} else if ( 'default8' == customizer_bg ) {
|
659 |
+
loginpress_find('#loginpress-scbg-position').html( "body.login::after{background-position: " + loginPressVal + "}" );
|
|
|
|
|
|
|
660 |
} else {
|
661 |
+
loginpress_find('body.login').css( "background-position", loginPressVal );
|
|
|
662 |
}
|
663 |
|
664 |
}
|
668 |
|
669 |
loginpress_background_img( 'loginpress_customization[setting_form_background]', '#loginform');
|
670 |
|
|
|
671 |
loginpress_new_css_property( 'loginpress_customization[customize_form_width]', '#login', 'max-width', 'px' );
|
672 |
loginpress_new_css_property( 'loginpress_customization[customize_form_height]', '#loginform', 'min-height', 'px' );
|
673 |
loginpress_css_property( 'loginpress_customization[customize_form_padding]', '#loginform', 'padding' );
|
688 |
// Update the login form button background in real time...
|
689 |
var loginPressBtnClr;
|
690 |
var loginPressBtnHvr;
|
691 |
+
wp.customize( 'loginpress_customization[custom_button_color]', function(value) {
|
692 |
+
value.bind( function(loginPressVal) {
|
693 |
+
if ( loginPressVal == '' ) {
|
694 |
+
loginpress_find('.wp-core-ui #login .button-primary').css( 'background', '' );
|
695 |
+
loginpress_find('.wp-core-ui #login .button-primary').on( 'mouseover', function() {
|
696 |
+
if ( typeof loginPressBtnHvr !== "undefined" || loginPressBtnHvr === null ) {
|
697 |
+
$(this).css( 'background', loginPressBtnHvr );
|
698 |
+
} else {
|
699 |
+
$(this).css( 'background', '' );
|
700 |
+
}
|
701 |
+
}).on( 'mouseleave', function() {
|
702 |
+
$(this).css( 'background', '' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
703 |
});
|
704 |
} else {
|
705 |
+
loginpress_find('.wp-core-ui #login .button-primary').css( 'background', loginPressVal );
|
|
|
|
|
706 |
loginPressBtnClr = loginPressVal;
|
707 |
|
708 |
+
loginpress_find('.wp-core-ui #login .button-primary').on( 'mouseover', function() {
|
709 |
+
if ( typeof loginPressBtnHvr !== "undefined" || loginPressBtnHvr === null ) {
|
710 |
+
$(this).css( 'background', loginPressBtnHvr );
|
711 |
+
} else {
|
712 |
+
$(this).css( 'background', '' );
|
713 |
+
}
|
714 |
+
}).on( 'mouseleave', function() {
|
715 |
+
$(this).css( 'background', loginPressVal );
|
|
|
|
|
|
|
|
|
716 |
});
|
717 |
}
|
718 |
});
|
720 |
|
721 |
var loginPressBtnBrdrClr;
|
722 |
// Update the login form button border-color in real time...
|
723 |
+
wp.customize( 'loginpress_customization[button_border_color]', function(value) {
|
724 |
+
value.bind( function(loginPressVal) {
|
725 |
+
if ( loginPressVal == '' ) {
|
726 |
+
loginpress_find('.wp-core-ui #login .button-primary').css( 'border-color', '' );
|
|
|
|
|
|
|
727 |
} else {
|
728 |
+
loginpress_find('.wp-core-ui #login .button-primary').css( 'border-color', loginPressVal );
|
|
|
|
|
729 |
loginPressBtnBrdrClr = loginPressVal;
|
730 |
}
|
731 |
});
|
732 |
});
|
733 |
|
734 |
// Update the login form button border-color in real time...
|
735 |
+
wp.customize( 'loginpress_customization[button_hover_color]', function(value) {
|
736 |
+
value.bind( function(loginPressVal) {
|
737 |
+
if ( loginPressVal == '' ) {
|
738 |
+
loginpress_find('.wp-core-ui #login .button-primary').css( 'background', '' );
|
739 |
+
loginpress_find('.wp-core-ui #login .button-primary').on( 'mouseover', function() {
|
740 |
+
$(this).css( 'background', '' );
|
741 |
+
}).on( 'mouseleave', function() {
|
742 |
+
if ( typeof loginPressBtnClr !== "undefined" || loginPressBtnClr === null ) {
|
743 |
+
$(this).css( 'background', loginPressBtnClr );
|
|
|
|
|
|
|
|
|
|
|
|
|
744 |
} else {
|
745 |
+
$(this).css( 'background', '' );
|
746 |
}
|
747 |
});
|
748 |
} else {
|
|
|
749 |
loginPressBtnHvr = loginPressVal;
|
750 |
+
loginpress_find('.wp-core-ui #login .button-primary').on( 'mouseover', function() {
|
751 |
+
$(this).css( 'background', loginPressVal );
|
752 |
+
}).on( 'mouseleave', function() {
|
753 |
+
if ( typeof loginPressBtnClr !== "undefined" || loginPressBtnClr === null ) {
|
754 |
+
$(this).css( 'background', loginPressBtnClr );
|
|
|
|
|
|
|
|
|
|
|
|
|
755 |
} else {
|
756 |
+
$(this).css( 'background', '' );
|
757 |
}
|
758 |
});
|
759 |
}
|
761 |
});
|
762 |
|
763 |
// Update the login form button border-color in real time...
|
764 |
+
wp.customize( 'loginpress_customization[button_hover_border]', function(value) {
|
765 |
+
value.bind( function(loginPressVal) {
|
766 |
+
if ( loginPressVal == '' ) {
|
767 |
+
loginpress_find('.wp-core-ui #login .button-primary').css( 'border-color', '' );
|
|
|
|
|
|
|
768 |
} else {
|
769 |
+
loginpress_find('.wp-core-ui #login .button-primary').on( 'mouseover', function() {
|
770 |
+
$(this).css( 'border-color', loginPressVal );
|
771 |
+
}).on( 'mouseleave', function() {
|
772 |
+
if ( typeof loginPressBtnBrdrClr !== "undefined" || loginPressBtnBrdrClr === null ) {
|
773 |
+
$(this).css( 'border-color', loginPressBtnBrdrClr );
|
|
|
|
|
|
|
|
|
774 |
} else {
|
775 |
+
$(this).css( 'border-color', '' );
|
776 |
}
|
777 |
});
|
778 |
}
|
780 |
});
|
781 |
|
782 |
// Update the login form button border-color in real time...
|
783 |
+
wp.customize( 'loginpress_customization[custom_button_shadow]', function(value) {
|
784 |
+
value.bind( function(loginPressVal) {
|
785 |
+
if ( loginPressVal == '' ) {
|
786 |
+
loginpress_find('.wp-core-ui #login .button-primary').css( 'box-shadow', '' );
|
|
|
|
|
|
|
787 |
} else {
|
788 |
+
loginpress_find('.wp-core-ui #login .button-primary').css( 'box-shadow', loginPressVal );
|
|
|
|
|
789 |
}
|
790 |
});
|
791 |
});
|
792 |
|
793 |
// Update the login form button border-color in real time...
|
794 |
+
wp.customize( 'loginpress_customization[button_text_color]', function(value) {
|
795 |
+
value.bind( function(loginPressVal) {
|
796 |
+
if ( loginPressVal == '' ) {
|
797 |
+
loginpress_find('.wp-core-ui #login .button-primary').css( 'color', '' );
|
|
|
798 |
} else {
|
799 |
+
loginpress_find('.wp-core-ui #login .button-primary').css( 'color', loginPressVal );
|
|
|
|
|
800 |
}
|
801 |
});
|
802 |
});
|
812 |
var loginPressFtrClr;
|
813 |
var loginPressFtrHvr;
|
814 |
// Update the login form button border-color in real time...
|
815 |
+
wp.customize( 'loginpress_customization[login_footer_color]', function(value) {
|
816 |
+
value.bind( function(loginPressVal) {
|
817 |
|
818 |
+
if ( loginPressVal == '' ) {
|
819 |
+
loginpress_find('.login #nav a').css( 'color', '' );
|
820 |
+
loginpress_find('.login #nav a').on( 'mouseover', function() {
|
821 |
+
if ( typeof loginPressFtrHvr !== "undefined" || loginPressFtrHvr === null ) {
|
822 |
+
$(this).css( 'color', loginPressFtrHvr );
|
|
|
|
|
|
|
|
|
823 |
} else {
|
824 |
+
$(this).css( 'color', '' );
|
825 |
}
|
826 |
+
}).on( 'mouseleave', function() {
|
827 |
+
$(this).css( 'color', '' );
|
828 |
});
|
829 |
} else {
|
830 |
loginPressFtrClr = loginPressVal;
|
831 |
+
loginpress_find('.login #nav a').css( 'color', loginPressVal );
|
832 |
+
loginpress_find('.login #nav a').on( 'mouseover', function() {
|
833 |
+
if ( typeof loginPressFtrHvr !== "undefined" || loginPressFtrHvr === null ) {
|
834 |
+
$(this).css( 'color', loginPressFtrHvr );
|
|
|
|
|
|
|
|
|
835 |
} else {
|
836 |
+
$(this).css( 'color', '' );
|
837 |
}
|
838 |
+
}).on( 'mouseleave', function() {
|
839 |
+
$(this).css( 'color', loginPressVal );
|
840 |
});
|
841 |
}
|
842 |
});
|
843 |
});
|
844 |
|
845 |
// Update the login form button border-color in real time...
|
846 |
+
wp.customize( 'loginpress_customization[login_footer_color_hover]', function(value) {
|
847 |
+
value.bind( function(loginPressVal) {
|
|
|
|
|
|
|
|
|
|
|
|
|
848 |
|
849 |
+
if ( loginPressVal == '' ) {
|
850 |
+
loginpress_find('.login #nav a').css( 'color', '' );
|
851 |
+
loginpress_find('.login #nav a').on( 'mouseover', function() {
|
852 |
+
$(this).css( 'color', '' );
|
853 |
+
}).on( 'mouseleave', function() {
|
854 |
+
if ( typeof loginPressFtrClr !== "undefined" || loginPressFtrClr === null ) {
|
855 |
+
$(this).css( 'color', loginPressFtrClr );
|
|
|
856 |
} else {
|
857 |
+
$(this).css( 'color', '' );
|
858 |
}
|
859 |
});
|
860 |
} else {
|
861 |
loginPressFtrHvr = loginPressVal;
|
862 |
+
loginpress_find('.login #nav a').on( 'mouseover', function() {
|
|
|
863 |
$(this).css('color', loginPressVal);
|
864 |
}).on('mouseleave', function() {
|
865 |
+
if ( typeof loginPressFtrClr !== "undefined" || loginPressFtrClr === null ) {
|
866 |
+
$(this).css( 'color', loginPressFtrClr );
|
|
|
|
|
867 |
} else {
|
868 |
+
$(this).css( 'color', '' );
|
869 |
}
|
870 |
});
|
871 |
}
|
872 |
});
|
873 |
});
|
874 |
|
|
|
875 |
loginpress_new_css_property( 'loginpress_customization[login_footer_font_size]', '.login #nav a', 'font-size', 'px' );
|
876 |
loginpress_css_property( 'loginpress_customization[login_footer_bg_color]', '.login #nav', 'background-color' );
|
877 |
|
887 |
value.bind(function( loginPressVal ) {
|
888 |
|
889 |
if ( loginPressVal == '' ) {
|
890 |
+
loginpress_find('.login #backtoblog a').css( 'color', '' );
|
891 |
+
loginpress_find('.login #backtoblog a').on( 'mouseover', function() {
|
|
|
|
|
|
|
|
|
|
|
|
|
892 |
if ( typeof loginPressFtrBackHvr !== "undefined" || loginPressFtrBackHvr === null ) {
|
893 |
$(this).css( 'color', loginPressFtrBackHvr );
|
894 |
} else {
|
900 |
} );
|
901 |
} else {
|
902 |
loginPressFtrBackClr = loginPressVal;
|
903 |
+
loginpress_find('.login #backtoblog a').css( 'color', loginPressVal );
|
904 |
+
loginpress_find('.login #backtoblog a').on( 'mouseover', function() {
|
|
|
|
|
|
|
|
|
|
|
|
|
905 |
if ( typeof loginPressFtrBackHvr !== "undefined" || loginPressFtrBackHvr === null ) {
|
906 |
$(this).css( 'color', loginPressFtrBackHvr );
|
907 |
} else {
|
923 |
|
924 |
if ( loginPressVal == '' ) {
|
925 |
|
926 |
+
loginpress_find('.login #backtoblog a').css( 'color', '' );
|
|
|
|
|
|
|
927 |
|
928 |
+
loginpress_find('.login #backtoblog a').on( 'mouseover', function() {
|
|
|
|
|
|
|
929 |
$(this).css( 'color', '' );
|
930 |
} )
|
931 |
.on( 'mouseleave', function() {
|
937 |
});
|
938 |
} else {
|
939 |
loginPressFtrBackHvr = loginPressVal;
|
940 |
+
loginpress_find('.login #backtoblog a').on( 'mouseover', function() {
|
|
|
|
|
|
|
941 |
$(this).css( 'color', loginPressVal );
|
942 |
} )
|
943 |
.on( 'mouseleave', function() {
|
991 |
value.bind( function( loginPressVal ) {
|
992 |
|
993 |
if ( loginPressVal == false ) {
|
994 |
+
loginpress_find('.loginpress-show-love').fadeOut().hide();
|
|
|
|
|
|
|
|
|
995 |
} else {
|
996 |
+
loginpress_find('.loginpress-show-love').fadeIn().show();
|
|
|
|
|
|
|
|
|
997 |
}
|
998 |
} );
|
999 |
} );
|
1005 |
value.bind( function( loginPressVal ) {
|
1006 |
|
1007 |
if ( loginPressVal == '' ) {
|
1008 |
+
loginpress_find('.loginpress_recaptcha_wrapper .g-recaptcha').css( 'transform', '' );
|
|
|
|
|
|
|
1009 |
} else {
|
1010 |
+
loginpress_find('.loginpress_recaptcha_wrapper .g-recaptcha').css( 'transform', 'scale(' + loginPressVal + ')' );
|
|
|
|
|
|
|
1011 |
}
|
1012 |
});
|
1013 |
});
|
1014 |
|
1015 |
$(window).on('load', function() {
|
1016 |
|
|
|
1017 |
if ( $('#customize-control-loginpress_customization-loginpress_display_bg input[type="checkbox"]').is(":checked") ) {
|
1018 |
+
$('#customize-control-loginpress_customization-gallery_background').css( 'display', 'list-item' );
|
1019 |
+
$('#customize-control-loginpress_customization-setting_background').css( 'display', 'list-item' );
|
1020 |
+
$('#customize-control-loginpress_customization-background_repeat_radio').css( 'display', 'list-item' );
|
1021 |
+
$('#customize-control-loginpress_customization-background_position').css( 'display', 'list-item' );
|
1022 |
+
$('#customize-control-loginpress_customization-background_image_size').css( 'display', 'list-item' );
|
1023 |
} else {
|
1024 |
+
$('#customize-control-loginpress_customization-gallery_background').css( 'display', 'none' );
|
1025 |
$('#customize-control-loginpress_customization-setting_background').css( 'display', 'none' );
|
1026 |
$('#customize-control-loginpress_customization-background_repeat_radio').css( 'display', 'none' );
|
1027 |
$('#customize-control-loginpress_customization-background_position').css( 'display', 'none' );
|
1028 |
$('#customize-control-loginpress_customization-background_image_size').css( 'display', 'none' );
|
1029 |
}
|
1030 |
|
1031 |
+
if ( $('#customize-control-loginpress_customization-setting_background .attachment-media-view-image').length > 0 ) {
|
1032 |
+
$('#customize-control-loginpress_customization-gallery_background').css( 'display', 'none' );
|
1033 |
+
}
|
1034 |
+
|
1035 |
if ( $('#customize-control-loginpress_customization-footer_display_text input[type="checkbox"]').is(":checked") ) {
|
1036 |
|
1037 |
$('#customize-control-loginpress_customization-login_footer_text').css( 'display', 'list-item' );
|
1066 |
$('#customize-control-loginpress_customization-login_back_bg_color').css( 'display', 'none' );
|
1067 |
}
|
1068 |
|
1069 |
+
$("<style type='text/css' id='loginpress-customize'></style>").appendTo(loginpress_find('head'));
|
1070 |
+
$("<style type='text/css' id='loginpress-iframe-bgColor'></style>").appendTo(loginpress_find('head'));
|
1071 |
+
$("<style type='text/css' id='loginpress-scbg-position'></style>").appendTo(loginpress_find('head'));
|
1072 |
+
$("<style type='text/css' id='loginpress-scbg-size'></style>").appendTo(loginpress_find('head'));
|
1073 |
+
$("<style type='text/css' id='loginpress-scbg-repeat'></style>").appendTo(loginpress_find('head'));
|
|
|
|
|
|
|
|
|
|
|
1074 |
|
1075 |
|
1076 |
});
|
js/customizer-previewer.js
CHANGED
@@ -23,13 +23,16 @@
|
|
23 |
$document = $( document ); // Store references to the body and document elements
|
24 |
|
25 |
// Append our button to the <body> element
|
26 |
-
$
|
27 |
|
28 |
-
|
29 |
|
30 |
-
|
31 |
|
32 |
-
|
|
|
|
|
|
|
33 |
|
34 |
// $form.append( '<span class="loginpress-form-partial loginpress-partial customize-partial-edit-shortcut"><button class="loginpress-event-button customize-partial-edit-shortcut-button" data-customizer-event="section_form"><span class="dashicons dashicons-edit"></span></button></span>' );
|
35 |
|
23 |
$document = $( document ); // Store references to the body and document elements
|
24 |
|
25 |
// Append our button to the <body> element
|
26 |
+
if( $('.login-action-login').length > 0 ) { // If .login-action-login exist
|
27 |
|
28 |
+
$body_bg.append( '<span class="loginpress-logo-partial loginpress-partial customize-partial-edit-shortcut" title="Change Logo"><button class="loginpress-event-button customize-partial-edit-shortcut-button" data-customizer-event="customize_logo_section"><span class="dashicons dashicons-edit"></span></button></span>' );
|
29 |
|
30 |
+
$body.append( '<span class="loginpress-presets-partial loginpress-partial customize-partial-edit-shortcut" title="Change Template"><button class="loginpress-event-button customize-partial-edit-shortcut-button" data-customizer-event="customize_presets"><span class="dashicons dashicons-admin-appearance"></span></button></span>' );
|
31 |
|
32 |
+
$body.append( '<span class="loginpress-background-partial loginpress-partial customize-partial-edit-shortcut" title="Change Background"><button class="loginpress-event-button customize-partial-edit-shortcut-button" data-customizer-event="section_background"><span class="dashicons dashicons-images-alt"></span></button></span>' );
|
33 |
+
|
34 |
+
$body.append( '<span class="loginpress-footer-partial loginpress-partial customize-partial-edit-shortcut" title="Change Footer"><button class="loginpress-event-button customize-partial-edit-shortcut-button" data-customizer-event="section_fotter"><span class="dashicons dashicons-edit"></span></button></span>' );
|
35 |
+
}
|
36 |
|
37 |
// $form.append( '<span class="loginpress-form-partial loginpress-partial customize-partial-edit-shortcut"><button class="loginpress-event-button customize-partial-edit-shortcut-button" data-customizer-event="section_form"><span class="dashicons dashicons-edit"></span></button></span>' );
|
38 |
|
js/customizer.js
CHANGED
@@ -21,6 +21,12 @@
|
|
21 |
$(this).removeClass('active');
|
22 |
} );
|
23 |
} );
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
}
|
25 |
};
|
26 |
|
21 |
$(this).removeClass('active');
|
22 |
} );
|
23 |
} );
|
24 |
+
|
25 |
+
// activated loginpress partial icons
|
26 |
+
$(document).on( 'click', '.control-subsection', function() {
|
27 |
+
var trigger = $(this).attr('aria-owns').replace("sub-accordion-section-", "");
|
28 |
+
$('#customize-preview iframe').contents().find('[data-customizer-event="'+trigger+'"]').parent().addClass('active');
|
29 |
+
} );
|
30 |
}
|
31 |
};
|
32 |
|
loginpress.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: LoginPress - Customizing the WordPress Login
|
4 |
* Plugin URI: http://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://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
|
@@ -117,7 +117,7 @@ if ( ! class_exists( 'LoginPress' ) ) :
|
|
117 |
add_action( 'plugin_action_links', array( $this, 'loginpress_action_links' ), 10, 2 );
|
118 |
add_action( 'admin_init', array( $this, 'redirect_optin' ) );
|
119 |
add_filter( 'auth_cookie_expiration', array( $this, '_change_auth_cookie_expiration' ), 10, 3 );
|
120 |
-
//
|
121 |
|
122 |
}
|
123 |
|
@@ -532,34 +532,32 @@ if ( ! class_exists( 'LoginPress' ) ) :
|
|
532 |
return $links;
|
533 |
}
|
534 |
|
535 |
-
function get_addon_info_( $api, $action, $args ) {
|
536 |
|
537 |
-
|
538 |
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
|
549 |
-
|
550 |
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
|
557 |
-
|
558 |
-
|
559 |
-
return $api;
|
560 |
-
|
561 |
-
}
|
562 |
|
|
|
|
|
563 |
} // End Of Class.
|
564 |
endif;
|
565 |
|
3 |
* Plugin Name: LoginPress - Customizing the WordPress Login
|
4 |
* Plugin URI: http://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.1.0
|
7 |
* Author: WPBrigade
|
8 |
* Author URI: http://WPBrigade.com/
|
9 |
* Text Domain: loginpress
|
22 |
/**
|
23 |
* @var string
|
24 |
*/
|
25 |
+
public $version = '1.1.0';
|
26 |
|
27 |
/**
|
28 |
* @var The single instance of the class
|
117 |
add_action( 'plugin_action_links', array( $this, 'loginpress_action_links' ), 10, 2 );
|
118 |
add_action( 'admin_init', array( $this, 'redirect_optin' ) );
|
119 |
add_filter( 'auth_cookie_expiration', array( $this, '_change_auth_cookie_expiration' ), 10, 3 );
|
120 |
+
//add_filter( 'plugins_api', array( $this, 'get_addon_info_' ) , 100, 3 );
|
121 |
|
122 |
}
|
123 |
|
532 |
return $links;
|
533 |
}
|
534 |
|
535 |
+
// function get_addon_info_( $api, $action, $args ) {
|
536 |
|
537 |
+
// if ( $action == 'plugin_information' && empty( $api ) && ( ! empty( $_GET['lgp'] ) ) ) {
|
538 |
|
539 |
+
// $raw_response = wp_remote_post( 'https://wpbrigade.com/loginpress-api/search.php', array(
|
540 |
+
// 'body' => array(
|
541 |
+
// 'slug' => $args->slug
|
542 |
+
// ) )
|
543 |
+
// );
|
544 |
|
545 |
+
// if ( is_wp_error( $raw_response ) || $raw_response['response']['code'] != 200 ) {
|
546 |
+
// return false;
|
547 |
+
// }
|
548 |
|
549 |
+
// $plugin = unserialize( $raw_response['body'] );
|
550 |
|
551 |
+
// $api = new stdClass();
|
552 |
+
// $api->name = $plugin['title'];
|
553 |
+
// $api->version = $plugin['version'];
|
554 |
+
// $api->download_link = $plugin['download_url'];
|
555 |
+
// $api->tested = '10.0';
|
556 |
|
557 |
+
// }
|
|
|
|
|
|
|
|
|
558 |
|
559 |
+
// return $api;
|
560 |
+
// }
|
561 |
} // End Of Class.
|
562 |
endif;
|
563 |
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tested up to: 4.9
|
|
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 |
|
@@ -30,6 +30,19 @@ LoginPress plugin is built using The Customizer API which is getting popular for
|
|
30 |
> Multilingual & Translatable
|
31 |
> WPML Compatible
|
32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
**Features:**
|
34 |
|
35 |
* Logo: Can change the login logo {image, width, height, padding, URL and Title}.
|
@@ -64,6 +77,7 @@ LoginPress plugin is built using The Customizer API which is getting popular for
|
|
64 |
* Customize login logo padding bottom.
|
65 |
* Customize login page background image.
|
66 |
* Customize login page background color.
|
|
|
67 |
* Customize login page background image size.
|
68 |
* Customize login page without background image. You can keep it simple with different login form style.
|
69 |
* Customize login form width.
|
@@ -190,6 +204,16 @@ Please visit <a target="_blank" rel="friend" href="http://WPBrigade.com/wordpres
|
|
190 |
|
191 |
== Changelog ==
|
192 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
193 |
= 1.0.23 - 2017-12-26 =
|
194 |
* Compatibility: Compatible with WordPress 4.9.1
|
195 |
* New Feature: Implement Edit Shortcut Icons in the Customizer Preview.
|
@@ -315,5 +339,5 @@ Please visit <a target="_blank" rel="friend" href="http://WPBrigade.com/wordpres
|
|
315 |
|
316 |
== Upgrade Notice ==
|
317 |
|
318 |
-
= 1.0
|
319 |
-
*
|
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.1.0
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
30 |
> Multilingual & Translatable
|
31 |
> WPML Compatible
|
32 |
|
33 |
+
** LoginPress Addons **
|
34 |
+
|
35 |
+
We have a collection of great Free and Pro addons that makes loginpress more powerfull. Upgrade to Pro package and enjoy the show.
|
36 |
+
|
37 |
+
* Login Logout Menu (FREE)
|
38 |
+
* Social Login
|
39 |
+
* Login Widget
|
40 |
+
* Login Redirects
|
41 |
+
* Limit Login Attempts
|
42 |
+
* Hide Login
|
43 |
+
* Auto Login
|
44 |
+
|
45 |
+
|
46 |
**Features:**
|
47 |
|
48 |
* Logo: Can change the login logo {image, width, height, padding, URL and Title}.
|
77 |
* Customize login logo padding bottom.
|
78 |
* Customize login page background image.
|
79 |
* Customize login page background color.
|
80 |
+
* Background Gallery with a selected set of HD Backgrounds for Login Screen.
|
81 |
* Customize login page background image size.
|
82 |
* Customize login page without background image. You can keep it simple with different login form style.
|
83 |
* Customize login form width.
|
204 |
|
205 |
== Changelog ==
|
206 |
|
207 |
+
= 1.1.0 - 2018-01-19 =
|
208 |
+
* Compatibility: Compatible with WordPress 4.9.
|
209 |
+
* New Feature: Introducing Background Gallery with a selected set of HD Backgrounds for Login Screen.
|
210 |
+
* New Feature: Launched LoginPress addons (Auto Login, Hide Login, Login Redirects, Social Login, Login Widget, Limit Login Attempts)
|
211 |
+
* New Feature: Login Addons can be installed from addons page within the plugin.
|
212 |
+
* New Feature: Launched login logout menu addon on wordpress.org can be installed from loginpress addons screen.
|
213 |
+
* Bugfix: Custom Previewer Icon issue on Preview screen
|
214 |
+
* Bugfix: Date_function() is deprecated
|
215 |
+
* Enhancement: Code refactoring
|
216 |
+
|
217 |
= 1.0.23 - 2017-12-26 =
|
218 |
* Compatibility: Compatible with WordPress 4.9.1
|
219 |
* New Feature: Implement Edit Shortcut Icons in the Customizer Preview.
|
339 |
|
340 |
== Upgrade Notice ==
|
341 |
|
342 |
+
= 1.1.0 =
|
343 |
+
* Launched LoginPress addons - (Auto Login, Hide Login, Login Redirects, Social Login, Login Widget, Limit Login Attempts)
|