Version Description
- 2018-03-22 =
- New Feature: Compatible with Multisite.
- New Feature: Introducing Tool tips in customizer.
- New Feature: Introducing Login Logo (Enable / Disable) control.
- New Feature: Introducing Login Form (Transparency, Radius, Shadow, Opacity, Padding) control.
- New Feature: Introducing Login Form Labels (Text, Size, Color) control.
- New Feature: Introducing Login Form Input Field (Radius, Shadow, Opacity) control.
- New Feature: Introducing Login Button (Padding, Padding top, Padding bottom, Radius, Shadow, Opacity, Text size) control.
- New Feature: Introducing Footer Copyright Text (Enable / Disable) control.
- New Feature: Introducing Brand text position control in footer.
- Enhancement: Compatible with Plugin Password Protected.
- Enhancement: Compatible with Plugin Divi 100 Login Page.
- Enhancement: Compatible with Plugin Fusion Builder.
- Enhancement: Code refactoring.
- Bugfix: Login Logo issue in mobile Responsive.
- Bugfix: Form Background Color issue.
- Bugfix: Footer text issue in Customizer.
- Bugfix: Typos in Customizer.
- Compatibility: Compatible with WordPress 4.9.
Download this release
Release Info
Developer | hiddenpearls |
Plugin | Custom Login Page Customizer | LoginPress |
Version | 1.1.3 |
Comparing to | |
See all releases |
Code changes from version 1.1.2 to 1.1.3
- classes/class-loginpress-addons.php +18 -18
- classes/class-loginpress-promo.php +1 -1
- classes/class-loginpress-settings-api.php +27 -5
- classes/class-loginpress-setup.php +9 -8
- classes/controls/group.php +62 -0
- css/controls/loginpress-group-control.css +95 -0
- css/controls/loginpress-radio-button-control.css +60 -1
- css/style-login.php +145 -7
- css/style-previewer.css +72 -2
- css/style-review.css +154 -0
- custom.php +462 -192
- img/notification_logo.svg +166 -0
- include/class-loginpress-theme-template.php +151 -0
- include/class-remote-notification-client.php +3 -3
- include/compatibility.php +87 -0
- include/create-loginpress-page.php +205 -0
- include/customizer-strings.php +125 -0
- include/deactivate_modal.php +30 -1
- include/template-loginpress.php +560 -0
- js/admin-custom.js +9 -9
- js/customize-controls.js +272 -40
- js/customizer-previewer.js +57 -8
- js/customizer.js +29 -12
- loginpress.php +161 -17
- readme.txt +24 -4
classes/class-loginpress-addons.php
CHANGED
@@ -29,10 +29,10 @@ if ( ! class_exists( 'LoginPress_Addons' ) ) :
|
|
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 |
|
@@ -46,7 +46,7 @@ if ( ! class_exists( 'LoginPress_Addons' ) ) :
|
|
46 |
|
47 |
// Get data from the remote URL.
|
48 |
$response = wp_remote_get( $url, array( 'timeout' => 20) );
|
49 |
-
|
50 |
if ( ! is_wp_error( $response ) ) {
|
51 |
|
52 |
// Decode the data that we got.
|
@@ -75,7 +75,7 @@ if ( ! class_exists( 'LoginPress_Addons' ) ) :
|
|
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>
|
@@ -90,8 +90,8 @@ if ( ! class_exists( 'LoginPress_Addons' ) ) :
|
|
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 |
|
@@ -99,7 +99,7 @@ if ( ! class_exists( 'LoginPress_Addons' ) ) :
|
|
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{
|
@@ -176,7 +176,7 @@ if ( ! class_exists( 'LoginPress_Addons' ) ) :
|
|
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 ) ) {
|
@@ -184,7 +184,7 @@ if ( ! class_exists( 'LoginPress_Addons' ) ) :
|
|
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 |
}
|
@@ -218,7 +218,7 @@ if ( ! class_exists( 'LoginPress_Addons' ) ) :
|
|
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 ) {
|
@@ -282,7 +282,7 @@ endif;
|
|
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;
|
@@ -319,7 +319,7 @@ endif;
|
|
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;
|
@@ -333,7 +333,7 @@ endif;
|
|
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;
|
@@ -363,7 +363,7 @@ endif;
|
|
363 |
bottom: 15px;
|
364 |
left: 50%;
|
365 |
transform: translateX(-50%);
|
366 |
-
|
367 |
border: 2px solid #a5dff6 !important;
|
368 |
background: #d3f3ff54 !important;
|
369 |
cursor: default;
|
@@ -373,7 +373,7 @@ endif;
|
|
373 |
background: #36bcf2;
|
374 |
color: #444;
|
375 |
border: 0;
|
376 |
-
|
377 |
outline: none;
|
378 |
box-shadow: none;
|
379 |
}
|
@@ -403,12 +403,12 @@ endif;
|
|
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;
|
@@ -486,4 +486,4 @@ endif;
|
|
486 |
$obj_loginpress_addons->show_addon_page();
|
487 |
?>
|
488 |
</div>
|
489 |
-
</div>
|
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 |
|
46 |
|
47 |
// Get data from the remote URL.
|
48 |
$response = wp_remote_get( $url, array( 'timeout' => 20) );
|
49 |
+
|
50 |
if ( ! is_wp_error( $response ) ) {
|
51 |
|
52 |
// Decode the data that we got.
|
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>
|
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 |
|
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{
|
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 ) ) {
|
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 |
}
|
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 ) {
|
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;
|
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;
|
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;
|
363 |
bottom: 15px;
|
364 |
left: 50%;
|
365 |
transform: translateX(-50%);
|
366 |
+
|
367 |
border: 2px solid #a5dff6 !important;
|
368 |
background: #d3f3ff54 !important;
|
369 |
cursor: default;
|
373 |
background: #36bcf2;
|
374 |
color: #444;
|
375 |
border: 0;
|
376 |
+
|
377 |
outline: none;
|
378 |
box-shadow: none;
|
379 |
}
|
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;
|
486 |
$obj_loginpress_addons->show_addon_page();
|
487 |
?>
|
488 |
</div>
|
489 |
+
</div>
|
classes/class-loginpress-promo.php
CHANGED
@@ -8,7 +8,7 @@ include LOGINPRESS_ROOT_PATH .'classes/control-promo.php';
|
|
8 |
$wp_customize->add_section( 'lpcustomize_google_font', array(
|
9 |
'title' => __( 'Google Fonts', 'loginpress-pro' ),
|
10 |
// 'description' => __( 'Select Google Font', 'loginpress-pro' ),
|
11 |
-
'priority' =>
|
12 |
'panel' => 'loginpress_panel',
|
13 |
) );
|
14 |
|
8 |
$wp_customize->add_section( 'lpcustomize_google_font', array(
|
9 |
'title' => __( 'Google Fonts', 'loginpress-pro' ),
|
10 |
// 'description' => __( 'Select Google Font', 'loginpress-pro' ),
|
11 |
+
'priority' => 49,
|
12 |
'panel' => 'loginpress_panel',
|
13 |
) );
|
14 |
|
classes/class-loginpress-settings-api.php
CHANGED
@@ -451,6 +451,20 @@ if ( !class_exists( 'LoginPress_Settings_API' ) ):
|
|
451 |
echo $html;
|
452 |
}
|
453 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
454 |
/**
|
455 |
* Sanitize callback for Settings API
|
456 |
*
|
@@ -557,7 +571,7 @@ if ( !class_exists( 'LoginPress_Settings_API' ) ):
|
|
557 |
<div id="<?php echo $form['id']; ?>" class="group" style="display: none;">
|
558 |
<form method="post" action="options.php">
|
559 |
<?php
|
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'] );
|
@@ -572,7 +586,7 @@ if ( !class_exists( 'LoginPress_Settings_API' ) ):
|
|
572 |
</form>
|
573 |
<?php
|
574 |
/**
|
575 |
-
* Add Autologin Addon Action Hook
|
576 |
* @since 1.0.9
|
577 |
* @version 1.0.23
|
578 |
* @return string
|
@@ -581,7 +595,7 @@ if ( !class_exists( 'LoginPress_Settings_API' ) ):
|
|
581 |
do_action( 'loginpress_autologin_script' );
|
582 |
endif;
|
583 |
/**
|
584 |
-
* Add Login Redirects Addon Action Hook
|
585 |
* @since 1.0.23
|
586 |
* @return string
|
587 |
*/
|
@@ -589,7 +603,7 @@ if ( !class_exists( 'LoginPress_Settings_API' ) ):
|
|
589 |
do_action( 'loginpress_login_redirect_script' );
|
590 |
endif;
|
591 |
/**
|
592 |
-
* Add Limit Login Attempts Addon Action Hook
|
593 |
* @since 1.0.23
|
594 |
* @return string
|
595 |
*/
|
@@ -597,7 +611,15 @@ if ( !class_exists( 'LoginPress_Settings_API' ) ):
|
|
597 |
do_action( 'loginpress_limit_login_attempts_log_script' );
|
598 |
do_action( 'loginpress_limit_login_attempts_whitelist_script' );
|
599 |
do_action( 'loginpress_limit_login_attempts_blacklist_script' );
|
600 |
-
endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
601 |
</div>
|
602 |
<?php endforeach; ?>
|
603 |
|
451 |
echo $html;
|
452 |
}
|
453 |
|
454 |
+
/**
|
455 |
+
* Displays a search field for a Register Fields.
|
456 |
+
*
|
457 |
+
* @param array $args settings field args
|
458 |
+
* @since 1.0.23
|
459 |
+
*/
|
460 |
+
function callback_register_fields( $args ) {
|
461 |
+
|
462 |
+
$html = apply_filters( 'loginpress_register_fields', $args );
|
463 |
+
$html .= $this->get_field_description( $args );
|
464 |
+
|
465 |
+
echo $html;
|
466 |
+
}
|
467 |
+
|
468 |
/**
|
469 |
* Sanitize callback for Settings API
|
470 |
*
|
571 |
<div id="<?php echo $form['id']; ?>" class="group" style="display: none;">
|
572 |
<form method="post" action="options.php">
|
573 |
<?php
|
574 |
+
$remove_submit = array( 'loginpress_autologin', 'loginpress_login_redirects', 'loginpress_register_fields' );
|
575 |
do_action( 'wsa_form_top_' . $form['id'], $form );
|
576 |
settings_fields( $form['id'] );
|
577 |
$this->do_settings_sections( $form['id'] );
|
586 |
</form>
|
587 |
<?php
|
588 |
/**
|
589 |
+
* Add Autologin Addon Action Hook.
|
590 |
* @since 1.0.9
|
591 |
* @version 1.0.23
|
592 |
* @return string
|
595 |
do_action( 'loginpress_autologin_script' );
|
596 |
endif;
|
597 |
/**
|
598 |
+
* Add Login Redirects Addon Action Hook.
|
599 |
* @since 1.0.23
|
600 |
* @return string
|
601 |
*/
|
603 |
do_action( 'loginpress_login_redirect_script' );
|
604 |
endif;
|
605 |
/**
|
606 |
+
* Add Limit Login Attempts Addon Action Hook.
|
607 |
* @since 1.0.23
|
608 |
* @return string
|
609 |
*/
|
611 |
do_action( 'loginpress_limit_login_attempts_log_script' );
|
612 |
do_action( 'loginpress_limit_login_attempts_whitelist_script' );
|
613 |
do_action( 'loginpress_limit_login_attempts_blacklist_script' );
|
614 |
+
endif;
|
615 |
+
/**
|
616 |
+
* Add Register Custom Fields Addon Action Hook.
|
617 |
+
* @since 1.1.3
|
618 |
+
* @return string
|
619 |
+
*/
|
620 |
+
if ( $form['id'] == 'loginpress_register_fields' ) :
|
621 |
+
do_action( 'loginpress_register_fields_script' );
|
622 |
+
endif;?>
|
623 |
</div>
|
624 |
<?php endforeach; ?>
|
625 |
|
classes/class-loginpress-setup.php
CHANGED
@@ -174,14 +174,15 @@ class LoginPress_Settings {
|
|
174 |
),
|
175 |
);
|
176 |
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
|
|
185 |
|
186 |
$_settings_fields = apply_filters( 'loginpress_pro_settings', $_free_fields );
|
187 |
|
174 |
),
|
175 |
);
|
176 |
|
177 |
+
// Hide Advertisement in version 1.1.3
|
178 |
+
// if ( ! has_action( 'loginpress_pro_add_template' ) ) {
|
179 |
+
// array_unshift( $_free_fields , array(
|
180 |
+
// 'name' => 'enable_repatcha_promo',
|
181 |
+
// 'label' => __( 'Enable reCAPTCHA', 'loginpress' ),
|
182 |
+
// 'desc' => __( 'Enable LoginPress reCaptcha', 'loginpress' ),
|
183 |
+
// 'type' => 'checkbox'
|
184 |
+
// ) );
|
185 |
+
// }
|
186 |
|
187 |
$_settings_fields = apply_filters( 'loginpress_pro_settings', $_free_fields );
|
188 |
|
classes/controls/group.php
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Class for Group.
|
5 |
+
*
|
6 |
+
* @since 1.1.3
|
7 |
+
* @access public
|
8 |
+
*/
|
9 |
+
class LoginPress_Group_Control extends WP_Customize_Control {
|
10 |
+
|
11 |
+
/**
|
12 |
+
* The type of customize control being rendered.
|
13 |
+
*
|
14 |
+
* @since 1.1.3
|
15 |
+
* @access public
|
16 |
+
* @var string
|
17 |
+
*/
|
18 |
+
public $type = 'group';
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Information text for the Group.
|
22 |
+
*
|
23 |
+
* @since 1.1.3
|
24 |
+
* @access public
|
25 |
+
* @var string
|
26 |
+
*/
|
27 |
+
public $info_text;
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Enqueue scripts/styles.
|
31 |
+
*
|
32 |
+
* @since 1.0.17
|
33 |
+
* @access public
|
34 |
+
* @return void
|
35 |
+
*/
|
36 |
+
public function enqueue() {
|
37 |
+
wp_enqueue_style( 'loginpress-group-control-css', LOGINPRESS_DIR_URL . 'css/controls/loginpress-group-control.css', array(), LOGINPRESS_VERSION );
|
38 |
+
}
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Displays the control content.
|
42 |
+
*
|
43 |
+
* @since 1.0.17
|
44 |
+
* @access public
|
45 |
+
* @return void
|
46 |
+
*/
|
47 |
+
public function render_content() {
|
48 |
+
?>
|
49 |
+
|
50 |
+
<div id="input_<?php echo $this->id; ?>" class="loginpress-group-wrapper">
|
51 |
+
<h3 class="loginpress-group-heading"><?php echo esc_attr( $this->label ); ?></h3>
|
52 |
+
<div class="loginpress-group-info">
|
53 |
+
<p><span class="loginpress-group-badge badges"><?php esc_html_e( 'Info:', 'loginpress' ) ?></span><?php echo esc_html( $this->info_text ); ?></p>
|
54 |
+
</div>
|
55 |
+
</div>
|
56 |
+
|
57 |
+
|
58 |
+
<?php }
|
59 |
+
|
60 |
+
|
61 |
+
}
|
62 |
+
?>
|
css/controls/loginpress-group-control.css
ADDED
@@ -0,0 +1,95 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.loginpress-group-wrapper{
|
2 |
+
|
3 |
+
}
|
4 |
+
#customize-controls h3.loginpress-group-heading{
|
5 |
+
margin: 0 -12px;
|
6 |
+
border: 1px solid #ddd;
|
7 |
+
border-left: 0;
|
8 |
+
border-right: 0;
|
9 |
+
padding: 13px 12px;
|
10 |
+
font-size: 11px;
|
11 |
+
font-weight: 600;
|
12 |
+
letter-spacing: 2px;
|
13 |
+
line-height: 1;
|
14 |
+
text-transform: uppercase;
|
15 |
+
color: #555;
|
16 |
+
background-color: #fff;
|
17 |
+
position: relative;
|
18 |
+
}
|
19 |
+
.loginpress-group-info{
|
20 |
+
margin: 0 -12px;
|
21 |
+
background: #fff;
|
22 |
+
padding: 12px;
|
23 |
+
border-bottom: 1px solid #ddd;
|
24 |
+
}
|
25 |
+
.loginpress-group-info p{
|
26 |
+
font-size: 12px;
|
27 |
+
line-height: 16px;
|
28 |
+
margin: 0 0 10px;
|
29 |
+
}
|
30 |
+
.loginpress-group-info p:last-child{
|
31 |
+
margin-bottom: 0;
|
32 |
+
font-size: 11px;
|
33 |
+
line-height: 1.6;
|
34 |
+
color: #444;
|
35 |
+
}
|
36 |
+
.loginpress-group-badge{
|
37 |
+
margin-right: 5px;
|
38 |
+
padding: 1px 5px;
|
39 |
+
font-size: 10px;
|
40 |
+
font-weight: 600;
|
41 |
+
text-transform: uppercase;
|
42 |
+
color: #fff;
|
43 |
+
background-color: #2a93c2;
|
44 |
+
border-radius: 3px;
|
45 |
+
letter-spacing: 1px;
|
46 |
+
}
|
47 |
+
#customize-control-loginpress_customization-show_love_position .customize-control-title{
|
48 |
+
float: left;
|
49 |
+
padding-right: 10px;
|
50 |
+
}
|
51 |
+
#customize-control-loginpress_customization-loginpress_show_love .customize-control-title{
|
52 |
+
padding-right: 5px;
|
53 |
+
}
|
54 |
+
#customize-control-loginpress_customization-show_love_position.customize-control .customize-inside-control-row{
|
55 |
+
display: inline-block;
|
56 |
+
width: auto;
|
57 |
+
padding: 5px;
|
58 |
+
margin-top: -4px;
|
59 |
+
vertical-align: top;
|
60 |
+
}
|
61 |
+
#customize-controls .customize-section-title.is-in-view{
|
62 |
+
z-index: 9999;
|
63 |
+
}
|
64 |
+
#customize-controls h3.loginpress-group-heading .customize-help-toggle {
|
65 |
+
position: absolute;
|
66 |
+
top: 4px;
|
67 |
+
right: 1px;
|
68 |
+
padding: 20px 20px 10px 10px;
|
69 |
+
width: 20px;
|
70 |
+
height: 20px;
|
71 |
+
cursor: pointer;
|
72 |
+
box-shadow: none;
|
73 |
+
-webkit-appearance: none;
|
74 |
+
background: 0 0;
|
75 |
+
color: #555d66;
|
76 |
+
border: none;
|
77 |
+
border-radius: 50%;
|
78 |
+
}
|
79 |
+
#customize-controls h3.loginpress-group-heading .customize-help-toggle:before {
|
80 |
+
position: absolute;
|
81 |
+
top: 1px;
|
82 |
+
left: 1px;
|
83 |
+
padding: 4px;
|
84 |
+
}
|
85 |
+
#customize-controls h3.loginpress-group-heading .customize-help-toggle:focus{
|
86 |
+
outline: none;
|
87 |
+
}
|
88 |
+
#customize-controls h3.loginpress-group-heading .customize-help-toggle:hover:before{
|
89 |
+
color: #5b9dd9;
|
90 |
+
}
|
91 |
+
#customize-controls h3.loginpress-group-heading .customize-help-toggle:focus:before{
|
92 |
+
border-radius: 50%;
|
93 |
+
box-shadow: 0 0 0 1px #5b9dd9, 0 0 2px 1px rgba(30,140,190,.8);
|
94 |
+
color: #5b9dd9;
|
95 |
+
}
|
css/controls/loginpress-radio-button-control.css
CHANGED
@@ -94,7 +94,7 @@ input[type=checkbox].loginpress-radio-ios + .loginpress-radio-btn:active {
|
|
94 |
box-shadow: inset 0 0 0 2em #e8eae9;
|
95 |
}
|
96 |
input[type=checkbox].loginpress-radio-ios:checked + .loginpress-radio-btn {
|
97 |
-
|
98 |
background: #33b3db !important;
|
99 |
border-color: #33b3db !important;
|
100 |
}
|
@@ -125,3 +125,62 @@ input[type=checkbox].loginpress-radio-flat:checked + .loginpress-radio-btn:after
|
|
125 |
background: #7FC6A6;
|
126 |
border-color: #7FC6A6;
|
127 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
box-shadow: inset 0 0 0 2em #e8eae9;
|
95 |
}
|
96 |
input[type=checkbox].loginpress-radio-ios:checked + .loginpress-radio-btn {
|
97 |
+
|
98 |
background: #33b3db !important;
|
99 |
border-color: #33b3db !important;
|
100 |
}
|
125 |
background: #7FC6A6;
|
126 |
border-color: #7FC6A6;
|
127 |
}
|
128 |
+
|
129 |
+
/*LoginPress Multisites sub directories error message*/
|
130 |
+
.loginpress-multisite-subdir{
|
131 |
+
width: 100%;
|
132 |
+
height: 100%;
|
133 |
+
display: -webkit-box;
|
134 |
+
display: -ms-flexbox;
|
135 |
+
display: flex;
|
136 |
+
-webkit-box-pack: center;
|
137 |
+
-ms-flex-pack: center;
|
138 |
+
justify-content: center;
|
139 |
+
-webkit-box-align: center;
|
140 |
+
-ms-flex-align: center;
|
141 |
+
align-items: center;
|
142 |
+
flex-direction: column;
|
143 |
+
background: #333;
|
144 |
+
overflow: auto;
|
145 |
+
padding: 30px;
|
146 |
+
-webkit-box-sizing: border-box;
|
147 |
+
box-sizing: border-box;
|
148 |
+
}
|
149 |
+
.loginpress-multisite-subdir-inner{
|
150 |
+
width: 1200px;
|
151 |
+
max-width: 100%;
|
152 |
+
-webkit-box-sizing: border-box;
|
153 |
+
max-height: 100%;
|
154 |
+
}
|
155 |
+
.loginpress-multisite-subdir .loginpress-iframe{
|
156 |
+
width: 700px;
|
157 |
+
position: relative;
|
158 |
+
margin: 0 auto;
|
159 |
+
max-width: 100%;
|
160 |
+
}
|
161 |
+
.loginpress-multisite-subdir h3{
|
162 |
+
font-size: 32px;
|
163 |
+
line-height: 1.3;
|
164 |
+
text-align: center;
|
165 |
+
color: #fff;
|
166 |
+
}
|
167 |
+
.loginpress-multisite-subdir h3 strong{
|
168 |
+
font-weight: 700;
|
169 |
+
}
|
170 |
+
.loginpress-multisite-subdir .loginpress-iframe:before{
|
171 |
+
padding-bottom: 45.2%;
|
172 |
+
padding-top: 20px;
|
173 |
+
content: '';
|
174 |
+
display: block;
|
175 |
+
}
|
176 |
+
.loginpress-iframe iframe{
|
177 |
+
top: 0;
|
178 |
+
left: 0;
|
179 |
+
}
|
180 |
+
@media screen and (max-width: 992px) {
|
181 |
+
.loginpress-multisite-subdir h3{
|
182 |
+
font-size: 24px;
|
183 |
+
}
|
184 |
+
}
|
185 |
+
|
186 |
+
/*End LoginPress Multisites sub directories error message*/
|
css/style-login.php
CHANGED
@@ -10,7 +10,8 @@
|
|
10 |
* @var loginpress_array get_option
|
11 |
* @since 1.0.0
|
12 |
*/
|
13 |
-
$loginpress_array
|
|
|
14 |
|
15 |
function loginpress_get_option_key( $loginpress_key, $loginpress_array ) {
|
16 |
|
@@ -87,6 +88,7 @@ function loginpress_important() {
|
|
87 |
}
|
88 |
|
89 |
$loginpress_logo_img = loginpress_get_option_key( 'setting_logo', $loginpress_array );
|
|
|
90 |
$loginpress_get_logo_width = loginpress_get_option_key( 'customize_logo_width', $loginpress_array );
|
91 |
$loginpress_logo_width = loginpress_check_px( $loginpress_get_logo_width );
|
92 |
$loginpress_get_logo_height = loginpress_get_option_key( 'customize_logo_height', $loginpress_array );
|
@@ -105,6 +107,7 @@ $loginpress_background_repeat = loginpress_get_option_key( 'background_repeat_
|
|
105 |
$loginpress_background_postion = loginpress_get_option_key( 'background_position', $loginpress_array );
|
106 |
$loginpress_background_image_size = loginpress_get_option_key( 'background_image_size', $loginpress_array );
|
107 |
$loginpress_form_background_img = loginpress_get_option_key( 'setting_form_background', $loginpress_array );
|
|
|
108 |
$loginpress_form_background_clr = loginpress_get_option_key( 'form_background_color', $loginpress_array );
|
109 |
$loginpress_forget_form_bg_img = loginpress_get_option_key( 'forget_form_background', $loginpress_array );
|
110 |
$loginpress_forget_form_bg_clr = loginpress_get_option_key( 'forget_form_background_color', $loginpress_array );
|
@@ -118,6 +121,7 @@ $loginpress_form_field_margin = loginpress_get_option_key( 'textfield_margin',
|
|
118 |
$loginpress_form_field_bg = loginpress_get_option_key( 'textfield_background_color', $loginpress_array );
|
119 |
$loginpress_form_field_color = loginpress_get_option_key( 'textfield_color', $loginpress_array );
|
120 |
$loginpress_form_field_label = loginpress_get_option_key( 'textfield_label_color', $loginpress_array );
|
|
|
121 |
$loginpress_welcome_bg_color = loginpress_get_option_key( 'message_background_color', $loginpress_array );
|
122 |
$loginpress_welcome_bg_border = loginpress_get_option_key( 'message_background_border', $loginpress_array );
|
123 |
$loginpress_footer_display = loginpress_get_option_key( 'footer_display_text', $loginpress_array );
|
@@ -126,6 +130,22 @@ $loginpress_footer_text_color = loginpress_get_option_key( 'login_footer_color
|
|
126 |
$loginpress_footer_text_hover = loginpress_get_option_key( 'login_footer_color_hover', $loginpress_array );
|
127 |
$loginpress_get_footer_font_size= loginpress_get_option_key( 'login_footer_font_size', $loginpress_array );
|
128 |
$loginpress_footer_font_size = loginpress_check_px( $loginpress_get_footer_font_size );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
129 |
$loginpress_footer_bg_color = loginpress_get_option_key( 'login_footer_bg_color', $loginpress_array );
|
130 |
$loginpress_footer_links_font_size = loginpress_get_option_key( 'login_footer_links_text_size', $loginpress_array );
|
131 |
$loginpress_footer_links_hover_size = loginpress_get_option_key( 'login_footer_links_hover_size', $loginpress_array );
|
@@ -148,6 +168,26 @@ $loginpress_custom_js = loginpress_get_option_key( 'loginpress_custom_js',
|
|
148 |
|
149 |
$loginpress_display_bg = loginpress_bg_option( 'loginpress_display_bg', $loginpress_array );
|
150 |
$loginpress_theme_tem = get_option( 'customize_presets_settings', 'default1' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
151 |
// ob_start();
|
152 |
?>
|
153 |
<style type="text/css">
|
@@ -198,6 +238,18 @@ $loginpress_theme_tem = get_option( 'customize_presets_settings', 'def
|
|
198 |
background-size: <?php echo $loginpress_background_image_size; ?>;
|
199 |
<?php endif; ?>
|
200 |
<?php endif; ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
201 |
}
|
202 |
body.login:after{
|
203 |
<?php if ( $loginpress_theme_tem == 'default8' && ! empty( $loginpress_background_img ) && $loginpress_display_bg ) : ?>
|
@@ -249,7 +301,11 @@ body.login {
|
|
249 |
<?php endif; ?>
|
250 |
position: relative;
|
251 |
}
|
252 |
-
|
|
|
|
|
|
|
|
|
253 |
.interim-login.login h1 a{
|
254 |
<?php if ( ! empty( $loginpress_logo_width ) ) : ?>
|
255 |
width: <?php echo $loginpress_logo_width; ?>;
|
@@ -270,9 +326,12 @@ body.login {
|
|
270 |
<?php endif; ?>
|
271 |
<?php if ( ! empty( $loginpress_logo_width ) || ! empty( $loginpress_logo_height ) ) : ?>
|
272 |
background-size: cover <?php echo loginpress_important(); ?>;
|
|
|
|
|
273 |
<?php endif; ?>
|
|
|
274 |
<?php if ( ! empty( $loginpress_logo_padding ) ) : ?>
|
275 |
-
|
276 |
<?php endif; ?>
|
277 |
|
278 |
}
|
@@ -301,9 +360,24 @@ body.login {
|
|
301 |
<?php endif; ?>
|
302 |
}
|
303 |
.wp-core-ui #login .button-primary{
|
304 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
305 |
}
|
306 |
#loginform {
|
|
|
|
|
|
|
|
|
307 |
<?php if ( ! empty( $loginpress_form_background_img ) ) : ?>
|
308 |
background-image: url(<?php echo $loginpress_form_background_img; ?>);
|
309 |
<?php endif; ?>
|
@@ -321,13 +395,45 @@ body.login {
|
|
321 |
<?php endif; ?>
|
322 |
}
|
323 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
324 |
#login {
|
325 |
<?php if ( ! empty( $loginpress_form_width ) ) : ?>
|
326 |
max-width: <?php echo loginpress_check_px( $loginpress_form_width ); ?>;
|
327 |
<?php else : ?>
|
328 |
<?php endif; ?>
|
329 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
330 |
.login label {
|
|
|
|
|
|
|
331 |
<?php if ( ! empty( $loginpress_form_field_label ) ) : ?>
|
332 |
color: <?php echo $loginpress_form_field_label; ?>;
|
333 |
<?php endif; ?>
|
@@ -358,12 +464,18 @@ body.login {
|
|
358 |
<?php if ( ! empty( $loginpress_form_padding ) ) : ?>
|
359 |
padding: <?php echo $loginpress_form_padding; ?>;
|
360 |
<?php endif; ?>
|
|
|
|
|
|
|
361 |
}
|
362 |
|
363 |
#registerform {
|
364 |
<?php if ( ! empty( $loginpress_form_padding ) ) : ?>
|
365 |
padding: <?php echo $loginpress_form_padding; ?>;
|
366 |
<?php endif; ?>
|
|
|
|
|
|
|
367 |
}
|
368 |
|
369 |
|
@@ -397,7 +509,7 @@ body.login {
|
|
397 |
<?php endif; ?>
|
398 |
}
|
399 |
|
400 |
-
.login #nav a{
|
401 |
<?php if ( ! empty( $loginpress_footer_decoration ) ) : ?>
|
402 |
text-decoration: <?php echo $loginpress_footer_decoration; ?>;
|
403 |
<?php endif; ?>
|
@@ -410,6 +522,24 @@ body.login {
|
|
410 |
|
411 |
}
|
412 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
413 |
.login #nav a:hover{
|
414 |
<?php if ( ! empty( $loginpress_footer_text_hover ) ) : ?>
|
415 |
color: <?php echo $loginpress_footer_text_hover; ?>;
|
@@ -497,10 +627,10 @@ body.login {
|
|
497 |
text-shadow: none;
|
498 |
}
|
499 |
|
500 |
-
input:-webkit-autofill{
|
501 |
transition: all 100000s ease-in-out 0s !important;
|
502 |
transition-property: background-color, color !important;
|
503 |
-
}
|
504 |
.copyRight{
|
505 |
padding: 12px 170px;
|
506 |
}
|
@@ -517,7 +647,15 @@ input:-webkit-autofill{
|
|
517 |
.loginpress-show-love a{
|
518 |
text-decoration: none;
|
519 |
}
|
|
|
|
|
|
|
|
|
520 |
@media screen and (max-width: 767px) {
|
|
|
|
|
|
|
|
|
521 |
.copyRight{
|
522 |
padding: 12px;
|
523 |
}
|
10 |
* @var loginpress_array get_option
|
11 |
* @since 1.0.0
|
12 |
*/
|
13 |
+
$loginpress_array = (array) get_option( 'loginpress_customization' );
|
14 |
+
$loginpress_preset = get_option( 'customize_presets_settings', 'default1' );
|
15 |
|
16 |
function loginpress_get_option_key( $loginpress_key, $loginpress_array ) {
|
17 |
|
88 |
}
|
89 |
|
90 |
$loginpress_logo_img = loginpress_get_option_key( 'setting_logo', $loginpress_array );
|
91 |
+
$loginpress_logo_display = loginpress_get_option_key( 'setting_logo_display', $loginpress_array );
|
92 |
$loginpress_get_logo_width = loginpress_get_option_key( 'customize_logo_width', $loginpress_array );
|
93 |
$loginpress_logo_width = loginpress_check_px( $loginpress_get_logo_width );
|
94 |
$loginpress_get_logo_height = loginpress_get_option_key( 'customize_logo_height', $loginpress_array );
|
107 |
$loginpress_background_postion = loginpress_get_option_key( 'background_position', $loginpress_array );
|
108 |
$loginpress_background_image_size = loginpress_get_option_key( 'background_image_size', $loginpress_array );
|
109 |
$loginpress_form_background_img = loginpress_get_option_key( 'setting_form_background', $loginpress_array );
|
110 |
+
$loginpress_form_display_bg = loginpress_get_option_key( 'setting_form_display_bg', $loginpress_array );
|
111 |
$loginpress_form_background_clr = loginpress_get_option_key( 'form_background_color', $loginpress_array );
|
112 |
$loginpress_forget_form_bg_img = loginpress_get_option_key( 'forget_form_background', $loginpress_array );
|
113 |
$loginpress_forget_form_bg_clr = loginpress_get_option_key( 'forget_form_background_color', $loginpress_array );
|
121 |
$loginpress_form_field_bg = loginpress_get_option_key( 'textfield_background_color', $loginpress_array );
|
122 |
$loginpress_form_field_color = loginpress_get_option_key( 'textfield_color', $loginpress_array );
|
123 |
$loginpress_form_field_label = loginpress_get_option_key( 'textfield_label_color', $loginpress_array );
|
124 |
+
$loginpress_form_remeber_label = loginpress_get_option_key( 'remember_me_label_size', $loginpress_array );
|
125 |
$loginpress_welcome_bg_color = loginpress_get_option_key( 'message_background_color', $loginpress_array );
|
126 |
$loginpress_welcome_bg_border = loginpress_get_option_key( 'message_background_border', $loginpress_array );
|
127 |
$loginpress_footer_display = loginpress_get_option_key( 'footer_display_text', $loginpress_array );
|
130 |
$loginpress_footer_text_hover = loginpress_get_option_key( 'login_footer_color_hover', $loginpress_array );
|
131 |
$loginpress_get_footer_font_size= loginpress_get_option_key( 'login_footer_font_size', $loginpress_array );
|
132 |
$loginpress_footer_font_size = loginpress_check_px( $loginpress_get_footer_font_size );
|
133 |
+
$loginpress_remember_me_font_size= loginpress_get_option_key( 'remember_me_font_size', $loginpress_array );
|
134 |
+
$loginpress_form_label_font_size= loginpress_get_option_key( 'customize_form_label', $loginpress_array );
|
135 |
+
$loginpress_login_button_top = loginpress_get_option_key( 'login_button_top', $loginpress_array );
|
136 |
+
$loginpress_login_button_bottom = loginpress_get_option_key( 'login_button_bottom', $loginpress_array );
|
137 |
+
$loginpress_login_button_radius = loginpress_get_option_key( 'login_button_radius', $loginpress_array );
|
138 |
+
$loginpress_login_button_shadow = loginpress_get_option_key( 'login_button_shadow', $loginpress_array );
|
139 |
+
$loginpress_login_button_shadow_opacity = loginpress_get_option_key( 'login_button_shadow_opacity', $loginpress_array );
|
140 |
+
$loginpress_login_button_width = loginpress_get_option_key( 'login_button_size', $loginpress_array );
|
141 |
+
$loginpress_login_form_radius = loginpress_get_option_key( 'customize_form_radius', $loginpress_array );
|
142 |
+
$loginpress_login_form_shadow = loginpress_get_option_key( 'customize_form_shadow', $loginpress_array );
|
143 |
+
$loginpress_login_form_inset = loginpress_get_option_key( 'textfield_inset_shadow', $loginpress_array );
|
144 |
+
$loginpress_login_form_opacity = loginpress_get_option_key( 'customize_form_opacity', $loginpress_array );
|
145 |
+
$loginpress_login_textfield_radius= loginpress_get_option_key( 'textfield_radius', $loginpress_array );
|
146 |
+
$loginpress_login_button_text_size= loginpress_get_option_key( 'login_button_text_size', $loginpress_array );
|
147 |
+
$loginpress_textfield_shadow = loginpress_get_option_key( 'textfield_shadow', $loginpress_array );
|
148 |
+
$loginpress_textfield_shadow_opacity= loginpress_get_option_key( 'textfield_shadow_opacity', $loginpress_array );
|
149 |
$loginpress_footer_bg_color = loginpress_get_option_key( 'login_footer_bg_color', $loginpress_array );
|
150 |
$loginpress_footer_links_font_size = loginpress_get_option_key( 'login_footer_links_text_size', $loginpress_array );
|
151 |
$loginpress_footer_links_hover_size = loginpress_get_option_key( 'login_footer_links_hover_size', $loginpress_array );
|
168 |
|
169 |
$loginpress_display_bg = loginpress_bg_option( 'loginpress_display_bg', $loginpress_array );
|
170 |
$loginpress_theme_tem = get_option( 'customize_presets_settings', 'default1' );
|
171 |
+
|
172 |
+
/**
|
173 |
+
* loginpress_box_shadow
|
174 |
+
* @param integer $shadow [Shadow Value]
|
175 |
+
* @param integer $opacity [Opacity Value]
|
176 |
+
* @param integer $default_shadow [description]
|
177 |
+
* @return string [box-border value]
|
178 |
+
* @since 1.1.3
|
179 |
+
*/
|
180 |
+
$loginpress_inset = $loginpress_login_form_inset ? true : false; //var_dump($loginpress_inset);
|
181 |
+
function loginpress_box_shadow( $shadow, $opacity, $default_shadow = 0, $inset = false ){
|
182 |
+
|
183 |
+
$loginpress_shadow = ! empty( $shadow ) ? $shadow : $default_shadow;
|
184 |
+
$loginpress_opacity = ! empty( $opacity ) ? $opacity : 80;
|
185 |
+
$inset = $inset ? ' inset' : '';
|
186 |
+
$opacity_convertion = $loginpress_opacity / 100;
|
187 |
+
$loginpress_rgba = 'rgba( 0,0,0,' . $opacity_convertion .' )';
|
188 |
+
|
189 |
+
return '0 0 ' . $loginpress_shadow . 'px ' . $loginpress_rgba . $inset . ';';
|
190 |
+
}
|
191 |
// ob_start();
|
192 |
?>
|
193 |
<style type="text/css">
|
238 |
background-size: <?php echo $loginpress_background_image_size; ?>;
|
239 |
<?php endif; ?>
|
240 |
<?php endif; ?>
|
241 |
+
<?php if ( ! empty( $loginpress_form_display_bg ) && true == $loginpress_form_display_bg ) : ?>
|
242 |
+
background: transparent;
|
243 |
+
<?php endif; ?>
|
244 |
+
<?php if ( ! empty( $loginpress_form_background_clr ) ) : ?>
|
245 |
+
background-color: <?php echo $loginpress_form_background_clr; ?>;
|
246 |
+
<?php endif; ?>
|
247 |
+
<?php if ( ! empty( $loginpress_login_form_radius ) ) : ?>
|
248 |
+
border-radius: <?php echo $loginpress_login_form_radius . 'px'; ?>;
|
249 |
+
<?php endif; ?>
|
250 |
+
<?php if ( ! empty( $loginpress_login_form_shadow ) && ! empty( $loginpress_login_form_opacity ) ) : ?>
|
251 |
+
box-shadow: <?php echo loginpress_box_shadow( $loginpress_login_form_shadow, $loginpress_login_form_opacity ); ?>
|
252 |
+
<?php endif; ?>
|
253 |
}
|
254 |
body.login:after{
|
255 |
<?php if ( $loginpress_theme_tem == 'default8' && ! empty( $loginpress_background_img ) && $loginpress_display_bg ) : ?>
|
301 |
<?php endif; ?>
|
302 |
position: relative;
|
303 |
}
|
304 |
+
.login h1{
|
305 |
+
<?php if ( ! empty( $loginpress_logo_display ) && true == $loginpress_logo_display ) : ?>
|
306 |
+
display: none <?php echo loginpress_important(); ?>;
|
307 |
+
<?php endif; ?>
|
308 |
+
}
|
309 |
.interim-login.login h1 a{
|
310 |
<?php if ( ! empty( $loginpress_logo_width ) ) : ?>
|
311 |
width: <?php echo $loginpress_logo_width; ?>;
|
326 |
<?php endif; ?>
|
327 |
<?php if ( ! empty( $loginpress_logo_width ) || ! empty( $loginpress_logo_height ) ) : ?>
|
328 |
background-size: cover <?php echo loginpress_important(); ?>;
|
329 |
+
<?php else: ?>
|
330 |
+
background-size: cover;
|
331 |
<?php endif; ?>
|
332 |
+
|
333 |
<?php if ( ! empty( $loginpress_logo_padding ) ) : ?>
|
334 |
+
margin-bottom: <?php echo $loginpress_logo_padding . loginpress_important(); ?>;
|
335 |
<?php endif; ?>
|
336 |
|
337 |
}
|
360 |
<?php endif; ?>
|
361 |
}
|
362 |
.wp-core-ui #login .button-primary{
|
363 |
+
|
364 |
+
box-shadow: <?php echo loginpress_box_shadow( $loginpress_login_button_shadow, $loginpress_login_button_shadow_opacity ); ?>
|
365 |
+
/* box-shadow: none; */
|
366 |
+
height: auto;
|
367 |
+
line-height: 20px;
|
368 |
+
padding: 13px;
|
369 |
+
<?php if ( ! empty( $loginpress_login_button_top ) ) : ?>
|
370 |
+
padding-top: <?php echo $loginpress_login_button_top . 'px;' ?>;
|
371 |
+
<?php endif; ?>
|
372 |
+
<?php if ( ! empty( $loginpress_login_button_bottom ) ) : ?>
|
373 |
+
padding-bottom: <?php echo $loginpress_login_button_bottom . 'px;' ?>;
|
374 |
+
<?php endif; ?>
|
375 |
}
|
376 |
#loginform {
|
377 |
+
|
378 |
+
<?php if ( ! empty( $loginpress_form_display_bg ) && true == $loginpress_form_display_bg ) : ?>
|
379 |
+
background: transparent;
|
380 |
+
<?php endif; ?>
|
381 |
<?php if ( ! empty( $loginpress_form_background_img ) ) : ?>
|
382 |
background-image: url(<?php echo $loginpress_form_background_img; ?>);
|
383 |
<?php endif; ?>
|
395 |
<?php endif; ?>
|
396 |
}
|
397 |
|
398 |
+
#loginform input[type="text"], #loginform input[type="password"]{
|
399 |
+
<?php if ( ! empty( $loginpress_login_textfield_radius ) ) : ?>
|
400 |
+
border-radius: <?php echo $loginpress_login_textfield_radius . 'px;'; ?>;
|
401 |
+
<?php endif; ?>
|
402 |
+
|
403 |
+
box-shadow: <?php echo loginpress_box_shadow( $loginpress_textfield_shadow, $loginpress_textfield_shadow_opacity, '0', $loginpress_inset ); ?>
|
404 |
+
}
|
405 |
+
|
406 |
+
#registerform input[type="text"], #registerform input[type="password"], #registerform input[type="number"], #registerform input[type="email"] {
|
407 |
+
<?php if ( ! empty( $loginpress_login_textfield_radius ) ) : ?>
|
408 |
+
border-radius: <?php echo $loginpress_login_textfield_radius . 'px;'; ?>;
|
409 |
+
<?php endif; ?>
|
410 |
+
box-shadow: <?php echo loginpress_box_shadow( $loginpress_textfield_shadow, $loginpress_textfield_shadow_opacity, '0', $loginpress_inset ); ?>
|
411 |
+
}
|
412 |
+
|
413 |
+
#lostpasswordform input[type="text"]{
|
414 |
+
<?php if ( ! empty( $loginpress_login_textfield_radius ) ) : ?>
|
415 |
+
border-radius: <?php echo $loginpress_login_textfield_radius . 'px;'; ?>;
|
416 |
+
<?php endif; ?>
|
417 |
+
box-shadow: <?php echo loginpress_box_shadow( $loginpress_textfield_shadow, $loginpress_textfield_shadow_opacity, '0', $loginpress_inset ); ?>
|
418 |
+
}
|
419 |
+
|
420 |
#login {
|
421 |
<?php if ( ! empty( $loginpress_form_width ) ) : ?>
|
422 |
max-width: <?php echo loginpress_check_px( $loginpress_form_width ); ?>;
|
423 |
<?php else : ?>
|
424 |
<?php endif; ?>
|
425 |
}
|
426 |
+
|
427 |
+
.login label[for="rememberme"] {
|
428 |
+
<?php if ( ! empty( $loginpress_form_remeber_label ) ) : ?>
|
429 |
+
color: <?php echo $loginpress_form_remeber_label; ?>;
|
430 |
+
<?php endif; ?>
|
431 |
+
}
|
432 |
+
|
433 |
.login label {
|
434 |
+
<?php if( !empty( $loginpress_form_label_font_size ) && 'default2' != $loginpress_preset ) : ?>
|
435 |
+
font-size: <?php echo $loginpress_form_label_font_size . 'px;'; ?>
|
436 |
+
<?php endif; ?>
|
437 |
<?php if ( ! empty( $loginpress_form_field_label ) ) : ?>
|
438 |
color: <?php echo $loginpress_form_field_label; ?>;
|
439 |
<?php endif; ?>
|
464 |
<?php if ( ! empty( $loginpress_form_padding ) ) : ?>
|
465 |
padding: <?php echo $loginpress_form_padding; ?>;
|
466 |
<?php endif; ?>
|
467 |
+
<?php if ( ! empty( $loginpress_form_background_clr ) ) : ?>
|
468 |
+
background-color: <?php echo $loginpress_form_background_clr; ?>;
|
469 |
+
<?php endif; ?>
|
470 |
}
|
471 |
|
472 |
#registerform {
|
473 |
<?php if ( ! empty( $loginpress_form_padding ) ) : ?>
|
474 |
padding: <?php echo $loginpress_form_padding; ?>;
|
475 |
<?php endif; ?>
|
476 |
+
<?php if ( ! empty( $loginpress_form_background_clr ) ) : ?>
|
477 |
+
background-color: <?php echo $loginpress_form_background_clr; ?>;
|
478 |
+
<?php endif; ?>
|
479 |
}
|
480 |
|
481 |
|
509 |
<?php endif; ?>
|
510 |
}
|
511 |
|
512 |
+
.login #nav a, .login #nav{
|
513 |
<?php if ( ! empty( $loginpress_footer_decoration ) ) : ?>
|
514 |
text-decoration: <?php echo $loginpress_footer_decoration; ?>;
|
515 |
<?php endif; ?>
|
522 |
|
523 |
}
|
524 |
|
525 |
+
.login form .forgetmenot label{
|
526 |
+
<?php if ( ! empty( $loginpress_remember_me_font_size ) ) : ?>
|
527 |
+
font-size: <?php echo $loginpress_remember_me_font_size . 'px;'; ?>;
|
528 |
+
<?php endif; ?>
|
529 |
+
}
|
530 |
+
|
531 |
+
.login input[type="submit"]{
|
532 |
+
<?php if ( ! empty( $loginpress_login_button_text_size ) ) : ?>
|
533 |
+
font-size: <?php echo $loginpress_login_button_text_size . 'px;'; ?>;
|
534 |
+
<?php endif; ?>
|
535 |
+
<?php if ( ! empty( $loginpress_login_button_width ) ) : ?>
|
536 |
+
width: <?php echo $loginpress_login_button_width . '%;'; ?>;
|
537 |
+
<?php endif; ?>
|
538 |
+
<?php if ( ! empty( $loginpress_login_button_radius ) ) : ?>
|
539 |
+
border-radius: <?php echo $loginpress_login_button_radius . 'px;'; ?>;
|
540 |
+
<?php endif; ?>
|
541 |
+
}
|
542 |
+
|
543 |
.login #nav a:hover{
|
544 |
<?php if ( ! empty( $loginpress_footer_text_hover ) ) : ?>
|
545 |
color: <?php echo $loginpress_footer_text_hover; ?>;
|
627 |
text-shadow: none;
|
628 |
}
|
629 |
|
630 |
+
/*input:-webkit-autofill{
|
631 |
transition: all 100000s ease-in-out 0s !important;
|
632 |
transition-property: background-color, color !important;
|
633 |
+
}*/
|
634 |
.copyRight{
|
635 |
padding: 12px 170px;
|
636 |
}
|
647 |
.loginpress-show-love a{
|
648 |
text-decoration: none;
|
649 |
}
|
650 |
+
.love-postion{
|
651 |
+
left: 0;
|
652 |
+
padding-left: 20px;
|
653 |
+
}
|
654 |
@media screen and (max-width: 767px) {
|
655 |
+
.login h1 a {
|
656 |
+
max-width: 100%;
|
657 |
+
background-size: contain !important;
|
658 |
+
}
|
659 |
.copyRight{
|
660 |
padding: 12px;
|
661 |
}
|
css/style-previewer.css
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
* Style Sceet for Customizer Previewer.
|
3 |
* @since 1.0.23
|
4 |
*/
|
5 |
-
.login h1{
|
6 |
position: relative;
|
7 |
}
|
8 |
body:hover .customize-partial-edit-shortcut button{
|
@@ -15,11 +15,11 @@ body:hover .customize-partial-edit-shortcut button{
|
|
15 |
margin-left: 15px;
|
16 |
height: 30px;
|
17 |
width: 30px;
|
18 |
-
cursor: pointer;
|
19 |
}
|
20 |
.customize-partial-edit-shortcut{
|
21 |
height: 34px;
|
22 |
width: 34px;
|
|
|
23 |
}
|
24 |
.customize-partial-edit-shortcut button{
|
25 |
left: 0;
|
@@ -41,4 +41,74 @@ body:hover .customize-partial-edit-shortcut button{
|
|
41 |
bottom: 5px;
|
42 |
left: 10px;
|
43 |
cursor: pointer;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
}
|
|
|
|
|
|
2 |
* Style Sceet for Customizer Previewer.
|
3 |
* @since 1.0.23
|
4 |
*/
|
5 |
+
.login h1,#login .submit, .login form,#nav{
|
6 |
position: relative;
|
7 |
}
|
8 |
body:hover .customize-partial-edit-shortcut button{
|
15 |
margin-left: 15px;
|
16 |
height: 30px;
|
17 |
width: 30px;
|
|
|
18 |
}
|
19 |
.customize-partial-edit-shortcut{
|
20 |
height: 34px;
|
21 |
width: 34px;
|
22 |
+
cursor: pointer;
|
23 |
}
|
24 |
.customize-partial-edit-shortcut button{
|
25 |
left: 0;
|
41 |
bottom: 5px;
|
42 |
left: 10px;
|
43 |
cursor: pointer;
|
44 |
+
z-index: 12;
|
45 |
+
}
|
46 |
+
.loginpress-button-partial{
|
47 |
+
position: absolute;
|
48 |
+
right: 5px;
|
49 |
+
bottom: 15px;
|
50 |
+
}
|
51 |
+
.loginpress-nav-partial{
|
52 |
+
position: absolute;
|
53 |
+
top: -10px;
|
54 |
+
right: 10px;
|
55 |
+
}
|
56 |
+
.login form .loginpress-input-partial{
|
57 |
+
position: absolute;
|
58 |
+
top: 0;
|
59 |
+
right: 25px;
|
60 |
+
}
|
61 |
+
#login form p.submit:after{
|
62 |
+
content: '';
|
63 |
+
display: table;
|
64 |
+
clear: both;
|
65 |
+
}
|
66 |
+
.loginpress-partial:after {
|
67 |
+
content: attr(data-title);
|
68 |
+
background: rgba(51, 56, 61, 0.9);
|
69 |
+
color: #fff;
|
70 |
+
display: inline-block;
|
71 |
+
font-size: 14px;
|
72 |
+
width: 100px;
|
73 |
+
padding: 5px 10px;
|
74 |
+
position: absolute;
|
75 |
+
left: 100%;
|
76 |
+
top: 50%;
|
77 |
+
transform: translateY(-50%);
|
78 |
+
border-radius: 5px;
|
79 |
+
-webkit-transition:all 0.3s ease-in-out;
|
80 |
+
transition:all 0.3s ease-in-out;
|
81 |
+
opacity: 0;
|
82 |
+
text-align: center;
|
83 |
+
-webkit-box-shadow: 0 0 9px 0px rgba(0, 0, 0, 0.20);
|
84 |
+
box-shadow: 0 0 9px 0px rgba(0, 0, 0, 0.20);
|
85 |
+
margin-left: 5px;
|
86 |
+
font-weight: normal;
|
87 |
+
visibility: hidden;
|
88 |
+
}
|
89 |
+
.loginpress-partial:before{
|
90 |
+
content: '';
|
91 |
+
width: 0;
|
92 |
+
height: 0;
|
93 |
+
border-style: solid;
|
94 |
+
border-width: 5px 5px 5px 0;
|
95 |
+
border-color: transparent rgba(51, 56, 61, 0.9) transparent transparent;
|
96 |
+
position: absolute;
|
97 |
+
top: 50%;
|
98 |
+
left: 100%;
|
99 |
+
margin-left: 0;
|
100 |
+
margin-top: -5px;
|
101 |
+
-webkit-transition:all 0.3s ease-in-out;
|
102 |
+
transition:all 0.3s ease-in-out;
|
103 |
+
opacity: 0;
|
104 |
+
z-index: 1;
|
105 |
+
visibility: hidden;
|
106 |
+
}
|
107 |
+
.loginpress-partial:hover:before,
|
108 |
+
.loginpress-partial:hover:after{
|
109 |
+
opacity: 1;
|
110 |
+
visibility: visible;
|
111 |
}
|
112 |
+
#loginform{
|
113 |
+
overflow: visible;
|
114 |
+
}
|
css/style-review.css
CHANGED
@@ -57,3 +57,157 @@
|
|
57 |
.loginpress-dasboard-pro-link{
|
58 |
color: #0cbb0c;
|
59 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
.loginpress-dasboard-pro-link{
|
58 |
color: #0cbb0c;
|
59 |
}
|
60 |
+
|
61 |
+
/* LoginPress Add-ons CSS @since 1.1.3 */
|
62 |
+
|
63 |
+
.loginpress-alert-notice{
|
64 |
+
background: #fff;
|
65 |
+
margin: 20px 20px 0 0;
|
66 |
+
position: relative;
|
67 |
+
display: flex;
|
68 |
+
align-items: center;
|
69 |
+
clear: both;
|
70 |
+
}
|
71 |
+
.loginpress-alert-notice>*{
|
72 |
+
-webkit-box-sizing: border-box;
|
73 |
+
box-sizing: border-box;
|
74 |
+
}
|
75 |
+
.loginpress-alert-notice:after{
|
76 |
+
content: '';
|
77 |
+
display: table;
|
78 |
+
clear: both;
|
79 |
+
}
|
80 |
+
.loginpress-alert-thumbnail{
|
81 |
+
width: 300px;
|
82 |
+
text-align: center;
|
83 |
+
position: relative;
|
84 |
+
}
|
85 |
+
.loginpress-alert-thumbnail img{
|
86 |
+
width: 250px;
|
87 |
+
vertical-align: middle;
|
88 |
+
}
|
89 |
+
.loginpress-alert-text{
|
90 |
+
padding: 16px 80px 16px 80px;
|
91 |
+
overflow: hidden;
|
92 |
+
background: #1a5fa4;
|
93 |
+
position: relative;
|
94 |
+
flex: 1;
|
95 |
+
}
|
96 |
+
.loginpress-addon-notice-link:focus{
|
97 |
+
outline: none;
|
98 |
+
box-shadow: none;
|
99 |
+
}
|
100 |
+
.loginpress-alert-text:after{
|
101 |
+
width: 80px;
|
102 |
+
height: 100%;
|
103 |
+
background: #fff;
|
104 |
+
content: '';
|
105 |
+
position: absolute;
|
106 |
+
top: 0;
|
107 |
+
right: -40px;
|
108 |
+
transform: skewX(-20deg);
|
109 |
+
z-index: 1;
|
110 |
+
}
|
111 |
+
.loginpress-alert-text:before{
|
112 |
+
width: 80px;
|
113 |
+
height: 100%;
|
114 |
+
background: #fff;
|
115 |
+
content: '';
|
116 |
+
position: absolute;
|
117 |
+
top: 0;
|
118 |
+
left: -40px;
|
119 |
+
transform: skewX(-20deg);
|
120 |
+
z-index: 1;
|
121 |
+
}
|
122 |
+
.loginpress-alert-text h3{
|
123 |
+
font-size: 20px;
|
124 |
+
line-height: 24px;
|
125 |
+
margin: 0 0 10px;
|
126 |
+
color: #fff;
|
127 |
+
}
|
128 |
+
.loginpress-alert-text p{
|
129 |
+
font-size: 16px;
|
130 |
+
margin: 0;
|
131 |
+
color: #fff;
|
132 |
+
}
|
133 |
+
.loginpress-alert-button-section{
|
134 |
+
width: 300px;
|
135 |
+
text-align: center;
|
136 |
+
position: relative;
|
137 |
+
}
|
138 |
+
.loginpress-alert-button{
|
139 |
+
height: auto;
|
140 |
+
padding: 0;
|
141 |
+
color: #1a5fa4;
|
142 |
+
border: 0;
|
143 |
+
border-radius: 5px;
|
144 |
+
background: none;
|
145 |
+
font-size: 16px;
|
146 |
+
font-weight: bold;
|
147 |
+
text-decoration: underline;
|
148 |
+
cursor: pointer;
|
149 |
+
}
|
150 |
+
.loginpress-alert-button:focus{
|
151 |
+
outline: none;
|
152 |
+
box-shadow: none;
|
153 |
+
}
|
154 |
+
.wp-core-ui .loginpress-alert-notice.notice.is-dismissible{
|
155 |
+
padding: 0px;
|
156 |
+
border-left: 0px;
|
157 |
+
}
|
158 |
+
.loginpress-alert-notice .notice-dismiss{
|
159 |
+
text-decoration: none;
|
160 |
+
z-index: 1;
|
161 |
+
}
|
162 |
+
.loginpress-addon-notice-link{
|
163 |
+
display: flex;
|
164 |
+
align-items: center;
|
165 |
+
flex: 1;
|
166 |
+
text-decoration: none;
|
167 |
+
}
|
168 |
+
@media screen and (max-width: 1300px) {
|
169 |
+
.loginpress-alert-thumbnail{
|
170 |
+
width: 200px;
|
171 |
+
}
|
172 |
+
.loginpress-alert-thumbnail img{
|
173 |
+
width: 170px;
|
174 |
+
}
|
175 |
+
.loginpress-alert-button-section{
|
176 |
+
width: 200px;
|
177 |
+
}
|
178 |
+
}
|
179 |
+
@media screen and (max-width: 1100px) {
|
180 |
+
.loginpress-alert-thumbnail{
|
181 |
+
display: none;
|
182 |
+
}
|
183 |
+
.loginpress-alert-thumbnail img{
|
184 |
+
width: 150px;
|
185 |
+
}
|
186 |
+
.loginpress-alert-text{
|
187 |
+
padding-left: 30px;
|
188 |
+
}
|
189 |
+
.loginpress-alert-text:before,.loginpress-alert-text:after{
|
190 |
+
display: none;
|
191 |
+
}
|
192 |
+
}
|
193 |
+
@media screen and (max-width: 782px) {
|
194 |
+
.loginpress-alert-text{
|
195 |
+
padding-right: 40px;
|
196 |
+
padding-bottom: 50px;
|
197 |
+
}
|
198 |
+
.loginpress-alert-button-section{
|
199 |
+
width: auto;
|
200 |
+
text-align: left;
|
201 |
+
}
|
202 |
+
.loginpress-alert-button-section{
|
203 |
+
position: absolute;
|
204 |
+
bottom: 20px;
|
205 |
+
left: 33px;
|
206 |
+
}
|
207 |
+
.loginpress-alert-button{
|
208 |
+
color: #fff;
|
209 |
+
}
|
210 |
+
.loginpress-alert-notice .notice-dismiss:before{
|
211 |
+
color: #fff;
|
212 |
+
}
|
213 |
+
}
|
custom.php
CHANGED
@@ -59,7 +59,7 @@ class LoginPress_Entities {
|
|
59 |
* Enqueue jQuery and use wp_localize_script.
|
60 |
*
|
61 |
* @since 1.0.9
|
62 |
-
* @version 1.
|
63 |
*/
|
64 |
function loginpress_customizer_js() {
|
65 |
wp_enqueue_script('jquery');
|
@@ -74,6 +74,8 @@ class LoginPress_Entities {
|
|
74 |
|
75 |
|
76 |
// Get Background URL for use in Customizer JS.
|
|
|
|
|
77 |
$loginpress_bg = get_option( 'loginpress_customization');
|
78 |
$loginpress_bg_url = $loginpress_bg['setting_background'] ? $loginpress_bg['setting_background'] : false;
|
79 |
|
@@ -82,7 +84,7 @@ class LoginPress_Entities {
|
|
82 |
'admin_url' => admin_url(),
|
83 |
'plugin_url' => plugins_url(),
|
84 |
'login_theme' => get_option( 'customize_presets_settings', true ),
|
85 |
-
'loginpress_bg_url' => $loginpress_bg_url
|
86 |
);
|
87 |
|
88 |
wp_localize_script( 'loginpress-customize-control', 'loginpress_script', $loginpress_localize );
|
@@ -104,6 +106,109 @@ class LoginPress_Entities {
|
|
104 |
|
105 |
}
|
106 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
107 |
/**
|
108 |
* Register plugin settings Panel in WP Customizer
|
109 |
*
|
@@ -118,10 +223,14 @@ class LoginPress_Entities {
|
|
118 |
|
119 |
include LOGINPRESS_ROOT_PATH .'classes/controls/range.php';
|
120 |
|
|
|
|
|
121 |
include LOGINPRESS_ROOT_PATH .'classes/controls/radio-button.php';
|
122 |
|
123 |
include LOGINPRESS_ROOT_PATH .'classes/controls/miscellaneous.php';
|
124 |
|
|
|
|
|
125 |
if ( ! has_action( 'loginpress_pro_add_template' ) ) :
|
126 |
include LOGINPRESS_ROOT_PATH .'classes/class-loginpress-promo.php';
|
127 |
endif;
|
@@ -226,6 +335,26 @@ class LoginPress_Entities {
|
|
226 |
'panel' => 'loginpress_panel',
|
227 |
) );
|
228 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
229 |
$wp_customize->add_setting( 'loginpress_customization[setting_logo]', array(
|
230 |
'type' => 'option',
|
231 |
'capability' => 'manage_options',
|
@@ -233,8 +362,8 @@ class LoginPress_Entities {
|
|
233 |
) );
|
234 |
|
235 |
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'loginpress_customization[setting_logo]', array(
|
236 |
-
'label'
|
237 |
-
'section'
|
238 |
'priority' => 5,
|
239 |
'settings' => 'loginpress_customization[setting_logo]'
|
240 |
) ) );
|
@@ -242,38 +371,12 @@ class LoginPress_Entities {
|
|
242 |
/**
|
243 |
* [ Change CSS Properties Input fields with LoginPress_Range_Control ]
|
244 |
* @since 1.0.1
|
245 |
-
* @version 1.
|
246 |
*/
|
247 |
-
$logo_range_control = array( 'customize_logo_width', 'customize_logo_height', 'customize_logo_padding' );
|
248 |
-
$logo_range_default = array( '84', '84', '5' );
|
249 |
-
$logo_range_label = array( __( 'Logo Width:', 'loginpress' ), __( 'Logo Height:', 'loginpress' ), __( 'Padding Bottom:', 'loginpress' ) );
|
250 |
-
$logo_range_attrs = array(
|
251 |
-
array( 'min' => 0, 'max' => 500, 'step' => 1, 'suffix' => 'px' ),
|
252 |
-
array( 'min' => 0, 'max' => 500, 'step' => 1, 'suffix' => 'px' ),
|
253 |
-
array( 'min' => 0, 'max' => 100, 'step' => 1, 'suffix' => 'px' )
|
254 |
-
);
|
255 |
-
|
256 |
-
$logo_range = 0;
|
257 |
-
while ( $logo_range < 3 ) :
|
258 |
-
$wp_customize->add_setting( "loginpress_customization[{$logo_range_control[$logo_range]}]", array(
|
259 |
-
'default' => $logo_range_default[$logo_range],
|
260 |
-
'type' => 'option',
|
261 |
-
'capability' => 'manage_options',
|
262 |
-
'transport' => 'postMessage',
|
263 |
-
'sanitize_callback' => 'absint',
|
264 |
-
) );
|
265 |
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
'section' => 'customize_logo_section',
|
270 |
-
'settings' => "loginpress_customization[{$logo_range_control[$logo_range]}]",
|
271 |
-
'default' => $logo_range_default[$logo_range],
|
272 |
-
'input_attrs' => $logo_range_attrs[$logo_range],
|
273 |
-
) ) );
|
274 |
-
|
275 |
-
$logo_range++;
|
276 |
-
endwhile;
|
277 |
|
278 |
$logo_control = array( 'customize_logo_hover', 'customize_logo_hover_title' );
|
279 |
$logo_default = array( '', '' );
|
@@ -292,7 +395,7 @@ class LoginPress_Entities {
|
|
292 |
$wp_customize->add_control( "loginpress_customization[{$logo_control[$logo]}]", array(
|
293 |
'label' => $logo_label[$logo],
|
294 |
'section' => 'customize_logo_section',
|
295 |
-
'priority' =>
|
296 |
'settings' => "loginpress_customization[{$logo_control[$logo]}]"
|
297 |
) );
|
298 |
|
@@ -336,7 +439,7 @@ class LoginPress_Entities {
|
|
336 |
*/
|
337 |
$wp_customize->add_control( new LoginPress_Radio_Control( $wp_customize, 'loginpress_customization[loginpress_display_bg]', array(
|
338 |
'settings' => 'loginpress_customization[loginpress_display_bg]',
|
339 |
-
'label' => __( '
|
340 |
'section' => 'section_background',
|
341 |
'priority' => 10,
|
342 |
'type' => 'ios',// light, ios, flat
|
@@ -397,7 +500,7 @@ class LoginPress_Entities {
|
|
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 |
|
@@ -482,6 +585,28 @@ class LoginPress_Entities {
|
|
482 |
'panel' => 'loginpress_panel',
|
483 |
) );
|
484 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
485 |
$wp_customize->add_setting( 'loginpress_customization[setting_form_background]', array(
|
486 |
'type' => 'option',
|
487 |
'capability' => 'manage_options',
|
@@ -489,109 +614,127 @@ class LoginPress_Entities {
|
|
489 |
) );
|
490 |
|
491 |
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'loginpress_customization[setting_form_background]', array(
|
492 |
-
'label' => __( 'Form Background Image', 'loginpress' ),
|
493 |
'section' => 'section_form',
|
494 |
-
'priority' =>
|
495 |
'settings' => 'loginpress_customization[setting_form_background]'
|
496 |
) ) );
|
497 |
|
498 |
-
|
499 |
-
* [ Change CSS Properties Input fields with LoginPress_Range_Control ]
|
500 |
-
* @since 1.0.1
|
501 |
-
* @version 1.0.23
|
502 |
-
*/
|
503 |
-
$form_range_control = array( 'customize_form_width', 'customize_form_height', 'textfield_width' );
|
504 |
-
$form_range_default = array( '350', '200', '100' );
|
505 |
-
$form_range_label = array(
|
506 |
-
__( 'Form Width:', 'loginpress' ),
|
507 |
-
__( 'Form Minimum Height:', 'loginpress' ),
|
508 |
-
__( 'Input Text Field Width:', 'loginpress' ) );
|
509 |
-
$form_range_attrs = array(
|
510 |
-
array( 'min' => 0, 'max' => 800, 'step' => 1, 'suffix' => 'px' ),
|
511 |
-
array( 'min' => 0, 'max' => 500, 'step' => 1, 'suffix' => 'px' ),
|
512 |
-
array( 'min' => 0, 'max' => 100, 'step' => 1, 'suffix' => '%' )
|
513 |
-
);
|
514 |
-
$form_range_unit = array( 'px', 'px', '%' );
|
515 |
-
$form_range = 0;
|
516 |
-
while ( $form_range < 3 ) :
|
517 |
-
$wp_customize->add_setting( "loginpress_customization[{$form_range_control[$form_range]}]", array(
|
518 |
-
'default' => $form_range_default[$form_range],
|
519 |
-
'type' => 'option',
|
520 |
-
'capability' => 'manage_options',
|
521 |
-
'transport' => 'postMessage',
|
522 |
-
'sanitize_callback' => 'absint',
|
523 |
-
) );
|
524 |
-
|
525 |
-
$wp_customize->add_control( new LoginPress_Range_Control( $wp_customize, "loginpress_customization[{$form_range_control[$form_range]}]", array(
|
526 |
-
'type' => 'loginpress-range',
|
527 |
-
'label' => $form_range_label[$form_range],
|
528 |
-
'section' => 'section_form',
|
529 |
-
'settings' => "loginpress_customization[{$form_range_control[$form_range]}]",
|
530 |
-
'default' => $form_range_default[$form_range],
|
531 |
-
'input_attrs' => $form_range_attrs[$form_range],
|
532 |
-
'unit' => $form_range_unit[$form_range],
|
533 |
-
) ) );
|
534 |
-
|
535 |
-
$form_range++;
|
536 |
-
endwhile;
|
537 |
|
538 |
-
$
|
539 |
-
$
|
540 |
-
$
|
541 |
-
|
542 |
-
|
543 |
-
__( 'Input Text Field Margin:', 'loginpress' )
|
544 |
-
);
|
545 |
|
546 |
-
$
|
547 |
-
while ( $
|
548 |
|
549 |
-
$wp_customize->add_setting( "loginpress_customization[{$form_control[$
|
550 |
-
'default' => $form_default[$
|
551 |
'type' => 'option',
|
552 |
'capability' => 'manage_options',
|
553 |
'transport' => 'postMessage'
|
554 |
) );
|
555 |
|
556 |
-
$wp_customize->add_control( "loginpress_customization[{$form_control[$
|
557 |
-
'label' => $form_label[$
|
558 |
'section' => 'section_form',
|
559 |
-
|
560 |
-
'settings' => "loginpress_customization[{$form_control[$
|
561 |
) );
|
562 |
|
563 |
-
$
|
564 |
endwhile;
|
565 |
|
566 |
-
$
|
567 |
-
|
568 |
-
$
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
__( 'Label Color:', 'loginpress' ),
|
573 |
-
);
|
574 |
|
575 |
-
$
|
576 |
-
|
|
|
|
|
|
|
|
|
|
|
577 |
|
578 |
-
|
579 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
580 |
'type' => 'option',
|
581 |
'capability' => 'manage_options',
|
582 |
'transport' => 'postMessage'
|
583 |
) );
|
584 |
|
585 |
-
$wp_customize->add_control(
|
586 |
-
'label'
|
587 |
-
'section'
|
588 |
-
|
589 |
-
'settings'
|
590 |
-
) )
|
591 |
|
592 |
-
$
|
593 |
endwhile;
|
594 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
595 |
// =============================
|
596 |
// = Section for Forget Form =
|
597 |
// =============================
|
@@ -611,7 +754,7 @@ class LoginPress_Entities {
|
|
611 |
) );
|
612 |
|
613 |
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'loginpress_customization[forget_form_background]', array(
|
614 |
-
'label' => __( 'Forget Form Background Image', 'loginpress' ),
|
615 |
'section' => 'section_forget_form',
|
616 |
'priority' => 5,
|
617 |
'settings' => 'loginpress_customization[forget_form_background]'
|
@@ -625,7 +768,7 @@ class LoginPress_Entities {
|
|
625 |
) );
|
626 |
|
627 |
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'loginpress_customization[forget_form_background_color]', array(
|
628 |
-
'label' => __( 'Forget Form Background Color', 'loginpress' ),
|
629 |
'section' => 'section_forget_form',
|
630 |
'priority' => 10,
|
631 |
'settings' => 'loginpress_customization[forget_form_background_color]'
|
@@ -641,36 +784,26 @@ class LoginPress_Entities {
|
|
641 |
'panel' => 'loginpress_panel',
|
642 |
) );
|
643 |
|
644 |
-
$
|
645 |
-
$
|
646 |
-
$button_label
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
__( 'Button Border (Hover):', 'loginpress' ),
|
651 |
-
__( 'Button Box Shadow:', 'loginpress' ),
|
652 |
-
__( 'Button Text Color:', 'loginpress' )
|
653 |
-
);
|
654 |
-
|
655 |
-
$button = 0;
|
656 |
-
while ( $button < 6 ) :
|
657 |
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
) );
|
664 |
-
|
665 |
-
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, "loginpress_customization[{$button_control[$button]}]", array(
|
666 |
-
'label' => $button_label[$button],
|
667 |
-
'section' => 'section_button',
|
668 |
-
'priority' => 5,
|
669 |
-
'settings' => "loginpress_customization[{$button_control[$button]}]"
|
670 |
-
) ) );
|
671 |
|
672 |
-
|
673 |
-
|
|
|
|
|
|
|
|
|
|
|
674 |
|
675 |
// =============================
|
676 |
// = Section for Error message =
|
@@ -966,6 +1099,8 @@ class LoginPress_Entities {
|
|
966 |
'panel' => 'loginpress_panel',
|
967 |
) );
|
968 |
|
|
|
|
|
969 |
$wp_customize->add_setting( 'loginpress_customization[footer_display_text]', array(
|
970 |
'default' => true,
|
971 |
'type' => 'option',
|
@@ -980,7 +1115,7 @@ class LoginPress_Entities {
|
|
980 |
*/
|
981 |
$wp_customize->add_control( new LoginPress_Radio_Control( $wp_customize, 'loginpress_customization[footer_display_text]', array(
|
982 |
'settings' => 'loginpress_customization[footer_display_text]',
|
983 |
-
'label' => __( 'Footer Text
|
984 |
'section' => 'section_fotter',
|
985 |
'priority' => 5,
|
986 |
'type' => 'ios',// light, ios, flat
|
@@ -994,7 +1129,7 @@ class LoginPress_Entities {
|
|
994 |
) );
|
995 |
|
996 |
$wp_customize->add_control( 'loginpress_customization[login_footer_text]', array(
|
997 |
-
'label' => __( 'Lost Password Text', 'loginpress' ),
|
998 |
'section' => 'section_fotter',
|
999 |
'priority' => 10,
|
1000 |
'settings' => 'loginpress_customization[login_footer_text]',
|
@@ -1086,28 +1221,9 @@ class LoginPress_Entities {
|
|
1086 |
'settings' => 'loginpress_customization[login_footer_bg_color]'
|
1087 |
) ) );
|
1088 |
|
1089 |
-
$
|
1090 |
-
'sanitize_callback' => 'sanitize_text_field',
|
1091 |
-
) );
|
1092 |
-
|
1093 |
-
$wp_customize->add_control( new LoginPress_Misc_Control( $wp_customize, 'loginpress_customization[login_footer_br]', array(
|
1094 |
-
'section' => 'section_fotter',
|
1095 |
-
'type' => 'hr',
|
1096 |
-
'priority' => 36,
|
1097 |
-
) ) );
|
1098 |
-
// Fields for Back Link
|
1099 |
-
// $wp_customize->add_setting( 'login_back_text', array(
|
1100 |
-
// 'default' => 'Lost your password?',
|
1101 |
-
// 'type' => 'option',
|
1102 |
-
// 'capability' => 'edit_theme_options',
|
1103 |
-
// ));
|
1104 |
|
1105 |
-
|
1106 |
-
// 'label' => __( 'Lost Password Text', 'loginpress' ),
|
1107 |
-
// 'section' => 'section_fotter',
|
1108 |
-
// 'priority' => 40,
|
1109 |
-
// 'settings' => 'login_back_text',
|
1110 |
-
// ));
|
1111 |
|
1112 |
$wp_customize->add_setting( 'loginpress_customization[back_display_text]', array(
|
1113 |
'default' => true,
|
@@ -1123,7 +1239,7 @@ class LoginPress_Entities {
|
|
1123 |
*/
|
1124 |
$wp_customize->add_control( new LoginPress_Radio_Control( $wp_customize, 'loginpress_customization[back_display_text]', array(
|
1125 |
'settings' => 'loginpress_customization[back_display_text]',
|
1126 |
-
'label' => __( '"Back to" Text
|
1127 |
'section' => 'section_fotter',
|
1128 |
'priority' => 45,
|
1129 |
'type' => 'ios',// light, ios, flat
|
@@ -1209,12 +1325,34 @@ class LoginPress_Entities {
|
|
1209 |
) );
|
1210 |
|
1211 |
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'loginpress_customization[login_back_bg_color]', array(
|
1212 |
-
'label' => __( '
|
1213 |
'section' => 'section_fotter',
|
1214 |
'priority' => 70,
|
1215 |
'settings' => 'loginpress_customization[login_back_bg_color]'
|
1216 |
) ) );
|
1217 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1218 |
$wp_customize->add_setting( 'loginpress_customization[login_footer_copy_right]', array(
|
1219 |
'default' => sprintf( __('© %1$s %2$s, All Rights Reserved.', 'loginpress'), date("Y"), get_bloginfo('name') ),
|
1220 |
'type' => 'option',
|
@@ -1222,16 +1360,6 @@ class LoginPress_Entities {
|
|
1222 |
'transport' => 'postMessage'
|
1223 |
) );
|
1224 |
|
1225 |
-
$wp_customize->add_setting( 'loginpress_customization[login_back_br]', array(
|
1226 |
-
'sanitize_callback' => 'sanitize_text_field',
|
1227 |
-
) );
|
1228 |
-
|
1229 |
-
$wp_customize->add_control( new LoginPress_Misc_Control( $wp_customize, 'loginpress_customization[login_back_br]', array(
|
1230 |
-
'section' => 'section_fotter',
|
1231 |
-
'type' => 'hr',
|
1232 |
-
'priority' => 71,
|
1233 |
-
) ) );
|
1234 |
-
|
1235 |
$wp_customize->add_control( 'loginpress_customization[login_footer_copy_right]', array(
|
1236 |
'label' => __( 'Copyright Note:', 'loginpress' ),
|
1237 |
'type' => 'textarea',
|
@@ -1255,11 +1383,35 @@ class LoginPress_Entities {
|
|
1255 |
$wp_customize->add_control( new LoginPress_Radio_Control( $wp_customize, 'loginpress_customization[loginpress_show_love]', array(
|
1256 |
'settings' => 'loginpress_customization[loginpress_show_love]',
|
1257 |
'section' => 'section_fotter',
|
1258 |
-
'priority' =>
|
1259 |
'type' => 'ios',// light, ios, flat
|
1260 |
-
'label' => __( 'Show some Love. Please help
|
1261 |
) ) );
|
1262 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1263 |
// =============================
|
1264 |
// = Section for Custom CSS/JS =
|
1265 |
// =============================
|
@@ -1279,7 +1431,7 @@ class LoginPress_Entities {
|
|
1279 |
) );
|
1280 |
|
1281 |
$wp_customize->add_control( 'loginpress_customization[loginpress_custom_css]', array(
|
1282 |
-
'label' => __( 'Customize CSS', 'loginpress' ),
|
1283 |
'type' => 'textarea',
|
1284 |
'section' => 'loginpress_custom_css_js',
|
1285 |
'priority' => 5,
|
@@ -1294,7 +1446,7 @@ class LoginPress_Entities {
|
|
1294 |
) );
|
1295 |
|
1296 |
$wp_customize->add_control( 'loginpress_customization[loginpress_custom_js]', array(
|
1297 |
-
'label' => __( 'Customize JS', 'loginpress' ),
|
1298 |
'type' => 'textarea',
|
1299 |
'section' => 'loginpress_custom_css_js',
|
1300 |
'priority' => 10,
|
@@ -1333,18 +1485,34 @@ class LoginPress_Entities {
|
|
1333 |
* Manage the Login Footer Links
|
1334 |
*
|
1335 |
* @since 1.0.0
|
|
|
1336 |
* * * * * * * * * * * * * * * */
|
1337 |
public function login_page_custom_footer() {
|
1338 |
|
1339 |
-
|
1340 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1341 |
}
|
1342 |
|
|
|
|
|
|
|
1343 |
if ( $this->loginpress_key ) {
|
1344 |
|
1345 |
// echo '</div></div>';
|
1346 |
-
|
1347 |
-
echo '<div class="footer-cont">';
|
1348 |
|
1349 |
// if ( array_key_exists( 'footer_login_menu', $this->loginpress_key ) && checked( $this->loginpress_key['footer_login_menu'], true, false ) ) {
|
1350 |
//
|
@@ -1358,13 +1526,16 @@ class LoginPress_Entities {
|
|
1358 |
//
|
1359 |
// }
|
1360 |
|
1361 |
-
if ( array_key_exists( '
|
1362 |
-
|
1363 |
-
|
|
|
|
|
|
|
1364 |
}
|
1365 |
|
1366 |
-
echo '</div></div>';
|
1367 |
}
|
|
|
1368 |
}
|
1369 |
|
1370 |
/**
|
@@ -1375,6 +1546,8 @@ class LoginPress_Entities {
|
|
1375 |
public function login_page_custom_head() {
|
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' );
|
@@ -1517,6 +1690,82 @@ class LoginPress_Entities {
|
|
1517 |
|
1518 |
return $translated_text;
|
1519 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1520 |
|
1521 |
/**
|
1522 |
* Manage Welcome Messages
|
@@ -1588,14 +1837,35 @@ class LoginPress_Entities {
|
|
1588 |
/**
|
1589 |
* Hook to Redirect Page for Customize
|
1590 |
*
|
1591 |
-
* @since 1.
|
1592 |
* * * * * * * * * * * * * * * * * * */
|
1593 |
public function redirect_to_custom_page() {
|
1594 |
if ( ! empty($_GET['page'] ) ) {
|
1595 |
|
1596 |
if( ( $_GET['page'] == "abw" ) || ( $_GET['page'] == "loginpress" ) ) {
|
1597 |
|
1598 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1599 |
}
|
1600 |
}
|
1601 |
}
|
59 |
* Enqueue jQuery and use wp_localize_script.
|
60 |
*
|
61 |
* @since 1.0.9
|
62 |
+
* @version 1.1.3
|
63 |
*/
|
64 |
function loginpress_customizer_js() {
|
65 |
wp_enqueue_script('jquery');
|
74 |
|
75 |
|
76 |
// Get Background URL for use in Customizer JS.
|
77 |
+
$user = wp_get_current_user();
|
78 |
+
$name = empty( $user->user_firstname ) ? ucfirst( $user->display_name ) : ucfirst( $user->user_firstname );
|
79 |
$loginpress_bg = get_option( 'loginpress_customization');
|
80 |
$loginpress_bg_url = $loginpress_bg['setting_background'] ? $loginpress_bg['setting_background'] : false;
|
81 |
|
84 |
'admin_url' => admin_url(),
|
85 |
'plugin_url' => plugins_url(),
|
86 |
'login_theme' => get_option( 'customize_presets_settings', true ),
|
87 |
+
'loginpress_bg_url' => $loginpress_bg_url,
|
88 |
);
|
89 |
|
90 |
wp_localize_script( 'loginpress-customize-control', 'loginpress_script', $loginpress_localize );
|
106 |
|
107 |
}
|
108 |
|
109 |
+
/**
|
110 |
+
* Create a method of setting and control for LoginPress_Range_Control.
|
111 |
+
* @param object $wp_customize
|
112 |
+
* @param string $control
|
113 |
+
* @param string $default
|
114 |
+
* @param string $label
|
115 |
+
* @param array $input_attr
|
116 |
+
* @param array $unit
|
117 |
+
* @param int $index
|
118 |
+
* @return object
|
119 |
+
* @since 1.1.3
|
120 |
+
*/
|
121 |
+
function loginpress_rangle_seting( $wp_customize, $control, $default, $label, $input_attr, $unit, $section, $index, $priority = '' ){
|
122 |
+
|
123 |
+
$wp_customize->add_setting( "loginpress_customization[{$control[$index]}]", array(
|
124 |
+
'default' => $default[$index],
|
125 |
+
'type' => 'option',
|
126 |
+
'capability' => 'manage_options',
|
127 |
+
'transport' => 'postMessage',
|
128 |
+
'sanitize_callback' => 'absint',
|
129 |
+
) );
|
130 |
+
|
131 |
+
$wp_customize->add_control( new LoginPress_Range_Control( $wp_customize, "loginpress_customization[{$control[$index]}]", array(
|
132 |
+
'type' => 'loginpress-range',
|
133 |
+
'label' => $label[$index],
|
134 |
+
'section' => $section,
|
135 |
+
'priority' => $priority,
|
136 |
+
'settings' => "loginpress_customization[{$control[$index]}]",
|
137 |
+
'default' => $default[$index],
|
138 |
+
'input_attrs' => $input_attr[$index],
|
139 |
+
'unit' => $unit[$index],
|
140 |
+
) ) );
|
141 |
+
}
|
142 |
+
|
143 |
+
/**
|
144 |
+
* Create a method of setting and control for LoginPress_Group_Control.
|
145 |
+
* @param object $wp_customize
|
146 |
+
* @param string $control
|
147 |
+
* @param string $label
|
148 |
+
* @param string $section
|
149 |
+
* @param string $info_test
|
150 |
+
* @param int $index
|
151 |
+
* @return object
|
152 |
+
* @since 1.1.3
|
153 |
+
*/
|
154 |
+
function loginpress_group_setting( $wp_customize, $control, $label, $info_test, $section, $index, $priority = '' ){
|
155 |
+
|
156 |
+
$wp_customize->add_setting( "loginpress_customization[{$control[$index]}]", array(
|
157 |
+
'type' => 'option',
|
158 |
+
'capability' => 'manage_options',
|
159 |
+
'transport' => 'postMessage'
|
160 |
+
) );
|
161 |
+
|
162 |
+
$wp_customize->add_control( new LoginPress_Group_Control( $wp_customize, "loginpress_customization[{$control[$index]}]", array(
|
163 |
+
'settings' => "loginpress_customization[{$control[$index]}]",
|
164 |
+
'label' => $label[$index],
|
165 |
+
'section' => $section,
|
166 |
+
'type' => 'group',
|
167 |
+
'info_text' => $info_test[$index],
|
168 |
+
'priority' => $priority,
|
169 |
+
) ) );
|
170 |
+
}
|
171 |
+
|
172 |
+
/**
|
173 |
+
* Create a method of setting and control for WP_Customize_Color_Control.
|
174 |
+
* @param object $wp_customize
|
175 |
+
* @param string $control
|
176 |
+
* @param string $label
|
177 |
+
* @param string $section
|
178 |
+
* @param int $index
|
179 |
+
* @return object
|
180 |
+
* @since 1.1.3
|
181 |
+
*/
|
182 |
+
function loginpress_color_setting( $wp_customize, $control, $label, $section, $index, $priority = '' ){
|
183 |
+
|
184 |
+
$wp_customize->add_setting( "loginpress_customization[{$control[$index]}]", array(
|
185 |
+
// 'default' => $form_color_default[$form_color],
|
186 |
+
'type' => 'option',
|
187 |
+
'capability' => 'manage_options',
|
188 |
+
'transport' => 'postMessage'
|
189 |
+
) );
|
190 |
+
|
191 |
+
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, "loginpress_customization[{$control[$index]}]", array(
|
192 |
+
'label' => $label[$index],
|
193 |
+
'section' => $section,
|
194 |
+
'settings' => "loginpress_customization[{$control[$index]}]",
|
195 |
+
'priority' => $priority,
|
196 |
+
) ) );
|
197 |
+
}
|
198 |
+
|
199 |
+
function loginpress_hr_setting( $wp_customize, $control, $section, $index, $priority = '' ){
|
200 |
+
|
201 |
+
$wp_customize->add_setting( "loginpress_customization[{$control[$index]}]", array(
|
202 |
+
'sanitize_callback' => 'sanitize_text_field',
|
203 |
+
) );
|
204 |
+
|
205 |
+
$wp_customize->add_control( new LoginPress_Misc_Control( $wp_customize, "loginpress_customization[{$control[$index]}]", array(
|
206 |
+
'section' => $section,
|
207 |
+
'type' => 'hr',
|
208 |
+
'priority' => $priority,
|
209 |
+
) ) );
|
210 |
+
}
|
211 |
+
|
212 |
/**
|
213 |
* Register plugin settings Panel in WP Customizer
|
214 |
*
|
223 |
|
224 |
include LOGINPRESS_ROOT_PATH .'classes/controls/range.php';
|
225 |
|
226 |
+
include LOGINPRESS_ROOT_PATH .'classes/controls/group.php';
|
227 |
+
|
228 |
include LOGINPRESS_ROOT_PATH .'classes/controls/radio-button.php';
|
229 |
|
230 |
include LOGINPRESS_ROOT_PATH .'classes/controls/miscellaneous.php';
|
231 |
|
232 |
+
include LOGINPRESS_ROOT_PATH .'include/customizer-strings.php';
|
233 |
+
|
234 |
if ( ! has_action( 'loginpress_pro_add_template' ) ) :
|
235 |
include LOGINPRESS_ROOT_PATH .'classes/class-loginpress-promo.php';
|
236 |
endif;
|
335 |
'panel' => 'loginpress_panel',
|
336 |
) );
|
337 |
|
338 |
+
/**
|
339 |
+
* [ Enable / Disabe Logo Image with LoginPress_Radio_Control ]
|
340 |
+
* @since 1.1.3
|
341 |
+
*/
|
342 |
+
|
343 |
+
$wp_customize->add_setting( 'loginpress_customization[setting_logo_display]', array(
|
344 |
+
'default' => false,
|
345 |
+
'type' => 'option',
|
346 |
+
'capability' => 'manage_options',
|
347 |
+
'transport' => 'postMessage'
|
348 |
+
) );
|
349 |
+
|
350 |
+
$wp_customize->add_control( new LoginPress_Radio_Control( $wp_customize, 'loginpress_customization[setting_logo_display]', array(
|
351 |
+
'settings' => 'loginpress_customization[setting_logo_display]',
|
352 |
+
'label' => __( 'Disable Logo:', 'loginpress'),
|
353 |
+
'section' => 'customize_logo_section',
|
354 |
+
'priority' => 4,
|
355 |
+
'type' => 'ios',// light, ios, flat
|
356 |
+
) ) );
|
357 |
+
|
358 |
$wp_customize->add_setting( 'loginpress_customization[setting_logo]', array(
|
359 |
'type' => 'option',
|
360 |
'capability' => 'manage_options',
|
362 |
) );
|
363 |
|
364 |
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'loginpress_customization[setting_logo]', array(
|
365 |
+
'label' => __( 'Logo Image:', 'loginpress' ),
|
366 |
+
'section' => 'customize_logo_section',
|
367 |
'priority' => 5,
|
368 |
'settings' => 'loginpress_customization[setting_logo]'
|
369 |
) ) );
|
371 |
/**
|
372 |
* [ Change CSS Properties Input fields with LoginPress_Range_Control ]
|
373 |
* @since 1.0.1
|
374 |
+
* @version 1.1.3
|
375 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
376 |
|
377 |
+
$this->loginpress_rangle_seting( $wp_customize, $logo_range_control, $logo_range_default, $logo_range_label, $logo_range_attrs, $logo_range_unit, 'customize_logo_section', 0, 10 );
|
378 |
+
$this->loginpress_rangle_seting( $wp_customize, $logo_range_control, $logo_range_default, $logo_range_label, $logo_range_attrs, $logo_range_unit, 'customize_logo_section', 1, 15 );
|
379 |
+
$this->loginpress_rangle_seting( $wp_customize, $logo_range_control, $logo_range_default, $logo_range_label, $logo_range_attrs, $logo_range_unit, 'customize_logo_section', 2, 20 );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
380 |
|
381 |
$logo_control = array( 'customize_logo_hover', 'customize_logo_hover_title' );
|
382 |
$logo_default = array( '', '' );
|
395 |
$wp_customize->add_control( "loginpress_customization[{$logo_control[$logo]}]", array(
|
396 |
'label' => $logo_label[$logo],
|
397 |
'section' => 'customize_logo_section',
|
398 |
+
'priority' => 25,
|
399 |
'settings' => "loginpress_customization[{$logo_control[$logo]}]"
|
400 |
) );
|
401 |
|
439 |
*/
|
440 |
$wp_customize->add_control( new LoginPress_Radio_Control( $wp_customize, 'loginpress_customization[loginpress_display_bg]', array(
|
441 |
'settings' => 'loginpress_customization[loginpress_display_bg]',
|
442 |
+
'label' => __( 'Enable Background Image?', 'loginpress'),
|
443 |
'section' => 'section_background',
|
444 |
'priority' => 10,
|
445 |
'type' => 'ios',// light, ios, flat
|
500 |
$wp_customize->add_control( new LoginPress_Background_Gallery_Control( $wp_customize, 'loginpress_customization[gallery_background]',
|
501 |
array(
|
502 |
'section' => 'section_background',
|
503 |
+
'label' => __( 'Background Gallery:', 'loginpress' ),
|
504 |
'choices' => $loginpress_background
|
505 |
) ) );
|
506 |
|
585 |
'panel' => 'loginpress_panel',
|
586 |
) );
|
587 |
|
588 |
+
$this->loginpress_group_setting( $wp_customize, $group_control, $group_label, $group_info, 'section_form', 2, 4 );
|
589 |
+
|
590 |
+
/**
|
591 |
+
* [ Enable / Disabe Form Background Image with LoginPress_Radio_Control ]
|
592 |
+
* @since 1.1.3
|
593 |
+
*/
|
594 |
+
|
595 |
+
$wp_customize->add_setting( 'loginpress_customization[setting_form_display_bg]', array(
|
596 |
+
'default' => false,
|
597 |
+
'type' => 'option',
|
598 |
+
'capability' => 'manage_options',
|
599 |
+
'transport' => 'postMessage'
|
600 |
+
) );
|
601 |
+
|
602 |
+
$wp_customize->add_control( new LoginPress_Radio_Control( $wp_customize, 'loginpress_customization[setting_form_display_bg]', array(
|
603 |
+
'settings' => 'loginpress_customization[setting_form_display_bg]',
|
604 |
+
'label' => __( 'Enable Form Transparency:', 'loginpress'),
|
605 |
+
'section' => 'section_form',
|
606 |
+
'priority' => 5,
|
607 |
+
'type' => 'ios',
|
608 |
+
) ) );
|
609 |
+
|
610 |
$wp_customize->add_setting( 'loginpress_customization[setting_form_background]', array(
|
611 |
'type' => 'option',
|
612 |
'capability' => 'manage_options',
|
614 |
) );
|
615 |
|
616 |
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'loginpress_customization[setting_form_background]', array(
|
617 |
+
'label' => __( 'Form Background Image:', 'loginpress' ),
|
618 |
'section' => 'section_form',
|
619 |
+
'priority' => 6,
|
620 |
'settings' => 'loginpress_customization[setting_form_background]'
|
621 |
) ) );
|
622 |
|
623 |
+
$this->loginpress_color_setting( $wp_customize, $form_color_control, $form_color_label, 'section_form', 0, 7 );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
624 |
|
625 |
+
$this->loginpress_rangle_seting( $wp_customize, $form_range_control, $form_range_default, $form_range_label, $form_range_attrs, $form_range_unit, 'section_form', 0, 15 );
|
626 |
+
$this->loginpress_rangle_seting( $wp_customize, $form_range_control, $form_range_default, $form_range_label, $form_range_attrs, $form_range_unit, 'section_form', 1, 20 );
|
627 |
+
$this->loginpress_rangle_seting( $wp_customize, $form_range_control, $form_range_default, $form_range_label, $form_range_attrs, $form_range_unit, 'section_form', 2, 25 );
|
628 |
+
$this->loginpress_rangle_seting( $wp_customize, $form_range_control, $form_range_default, $form_range_label, $form_range_attrs, $form_range_unit, 'section_form', 3, 30 );
|
629 |
+
$this->loginpress_rangle_seting( $wp_customize, $form_range_control, $form_range_default, $form_range_label, $form_range_attrs, $form_range_unit, 'section_form', 4, 35 );
|
|
|
|
|
630 |
|
631 |
+
$form_padding = 0;
|
632 |
+
while ( $form_padding < 2 ) :
|
633 |
|
634 |
+
$wp_customize->add_setting( "loginpress_customization[{$form_control[$form_padding]}]", array(
|
635 |
+
'default' => $form_default[$form_padding],
|
636 |
'type' => 'option',
|
637 |
'capability' => 'manage_options',
|
638 |
'transport' => 'postMessage'
|
639 |
) );
|
640 |
|
641 |
+
$wp_customize->add_control( "loginpress_customization[{$form_control[$form_padding]}]", array(
|
642 |
+
'label' => $form_label[$form_padding],
|
643 |
'section' => 'section_form',
|
644 |
+
'priority' => 40,
|
645 |
+
'settings' => "loginpress_customization[{$form_control[$form_padding]}]"
|
646 |
) );
|
647 |
|
648 |
+
$form_padding++;
|
649 |
endwhile;
|
650 |
|
651 |
+
$this->loginpress_hr_setting( $wp_customize, $close_control, 'section_form', 3, 41 );
|
652 |
+
|
653 |
+
$this->loginpress_group_setting( $wp_customize, $group_control, $group_label, $group_info, 'section_form', 0, 45 );
|
654 |
+
|
655 |
+
$this->loginpress_color_setting( $wp_customize, $form_color_control, $form_color_label, 'section_form', 1, 50 );
|
656 |
+
$this->loginpress_color_setting( $wp_customize, $form_color_control, $form_color_label, 'section_form', 2, 55 );
|
|
|
|
|
657 |
|
658 |
+
$this->loginpress_rangle_seting( $wp_customize, $form_range_control, $form_range_default, $form_range_label, $form_range_attrs, $form_range_unit, 'section_form', 5, 60 );
|
659 |
+
// textfield_radius.
|
660 |
+
// $this->loginpress_rangle_seting( $wp_customize, $form_range_control, $form_range_default, $form_range_label, $form_range_attrs, $form_range_unit, 'section_form', 6, 65 );
|
661 |
+
// textfield_shadow.
|
662 |
+
// $this->loginpress_rangle_seting( $wp_customize, $form_range_control, $form_range_default, $form_range_label, $form_range_attrs, $form_range_unit, 'section_form', 7, 70 );
|
663 |
+
// textfield_shadow_opacity.
|
664 |
+
// $this->loginpress_rangle_seting( $wp_customize, $form_range_control, $form_range_default, $form_range_label, $form_range_attrs, $form_range_unit, 'section_form', 8, 75 );
|
665 |
|
666 |
+
/**
|
667 |
+
* [ Enable / Disabe Form Background Image with LoginPress_Radio_Control ]
|
668 |
+
* @since 1.1.3
|
669 |
+
*/
|
670 |
+
|
671 |
+
// $wp_customize->add_setting( 'loginpress_customization[textfield_inset_shadow]', array(
|
672 |
+
// 'default' => false,
|
673 |
+
// 'type' => 'option',
|
674 |
+
// 'capability' => 'manage_options',
|
675 |
+
// 'transport' => 'postMessage'
|
676 |
+
// ) );
|
677 |
+
//
|
678 |
+
// $wp_customize->add_control( new LoginPress_Radio_Control( $wp_customize, 'loginpress_customization[textfield_inset_shadow]', array(
|
679 |
+
// 'settings' => 'loginpress_customization[textfield_inset_shadow]',
|
680 |
+
// 'label' => __( 'Input Text Field Shadow Inset:', 'loginpress'),
|
681 |
+
// 'section' => 'section_form',
|
682 |
+
// 'priority' => 80,
|
683 |
+
// 'type' => 'ios',// light, ios, flat
|
684 |
+
// ) ) );
|
685 |
+
|
686 |
+
$input_padding = 2;
|
687 |
+
while ( $input_padding < 3 ) :
|
688 |
+
|
689 |
+
$wp_customize->add_setting( "loginpress_customization[{$form_control[$input_padding]}]", array(
|
690 |
+
'default' => $form_default[$input_padding],
|
691 |
'type' => 'option',
|
692 |
'capability' => 'manage_options',
|
693 |
'transport' => 'postMessage'
|
694 |
) );
|
695 |
|
696 |
+
$wp_customize->add_control( "loginpress_customization[{$form_control[$input_padding]}]", array(
|
697 |
+
'label' => $form_label[$input_padding],
|
698 |
+
'section' => 'section_form',
|
699 |
+
'priority' => 85,
|
700 |
+
'settings' => "loginpress_customization[{$form_control[$input_padding]}]"
|
701 |
+
) );
|
702 |
|
703 |
+
$input_padding++;
|
704 |
endwhile;
|
705 |
|
706 |
+
$this->loginpress_hr_setting( $wp_customize, $close_control, 'section_form', 4, 86 );
|
707 |
+
$this->loginpress_group_setting( $wp_customize, $group_control, $group_label, $group_info, 'section_form', 1, 90 );
|
708 |
+
|
709 |
+
// $form_input_label = 3;
|
710 |
+
// while ( $form_input_label < 5 ) :
|
711 |
+
//
|
712 |
+
// $wp_customize->add_setting( "loginpress_customization[{$form_control[$form_input_label]}]", array(
|
713 |
+
// 'default' => $form_default[$form_input_label],
|
714 |
+
// 'type' => 'option',
|
715 |
+
// 'capability' => 'manage_options',
|
716 |
+
// 'transport' => 'postMessage'
|
717 |
+
// ) );
|
718 |
+
//
|
719 |
+
// $wp_customize->add_control( "loginpress_customization[{$form_control[$form_input_label]}]", array(
|
720 |
+
// 'label' => $form_label[$form_input_label],
|
721 |
+
// 'section' => 'section_form',
|
722 |
+
// 'priority' => 91,
|
723 |
+
// 'settings' => "loginpress_customization[{$form_control[$form_input_label]}]"
|
724 |
+
// ) );
|
725 |
+
//
|
726 |
+
// $form_input_label++;
|
727 |
+
// endwhile;
|
728 |
+
|
729 |
+
$this->loginpress_color_setting( $wp_customize, $form_color_control, $form_color_label, 'section_form', 3, 95 );
|
730 |
+
$this->loginpress_color_setting( $wp_customize, $form_color_control, $form_color_label, 'section_form', 4, 100 );
|
731 |
+
|
732 |
+
// customize_form_label.
|
733 |
+
// $this->loginpress_rangle_seting( $wp_customize, $form_range_control, $form_range_default, $form_range_label, $form_range_attrs, $form_range_unit, 'section_form', 9, 105 );
|
734 |
+
// remember_me_font_size.
|
735 |
+
// $this->loginpress_rangle_seting( $wp_customize, $form_range_control, $form_range_default, $form_range_label, $form_range_attrs, $form_range_unit, 'section_form', 10, 110 );
|
736 |
+
$this->loginpress_hr_setting( $wp_customize, $close_control, 'section_form', 5, 111 );
|
737 |
+
|
738 |
// =============================
|
739 |
// = Section for Forget Form =
|
740 |
// =============================
|
754 |
) );
|
755 |
|
756 |
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'loginpress_customization[forget_form_background]', array(
|
757 |
+
'label' => __( 'Forget Form Background Image:', 'loginpress' ),
|
758 |
'section' => 'section_forget_form',
|
759 |
'priority' => 5,
|
760 |
'settings' => 'loginpress_customization[forget_form_background]'
|
768 |
) );
|
769 |
|
770 |
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'loginpress_customization[forget_form_background_color]', array(
|
771 |
+
'label' => __( 'Forget Form Background Color:', 'loginpress' ),
|
772 |
'section' => 'section_forget_form',
|
773 |
'priority' => 10,
|
774 |
'settings' => 'loginpress_customization[forget_form_background_color]'
|
784 |
'panel' => 'loginpress_panel',
|
785 |
) );
|
786 |
|
787 |
+
$this->loginpress_color_setting( $wp_customize, $button_control, $button_label, 'section_button', 0, 5 );
|
788 |
+
$this->loginpress_color_setting( $wp_customize, $button_control, $button_label, 'section_button', 1, 10 );
|
789 |
+
$this->loginpress_color_setting( $wp_customize, $button_control, $button_label, 'section_button', 2, 15 );
|
790 |
+
$this->loginpress_color_setting( $wp_customize, $button_control, $button_label, 'section_button', 3, 20 );
|
791 |
+
$this->loginpress_color_setting( $wp_customize, $button_control, $button_label, 'section_button', 4, 25 );
|
792 |
+
$this->loginpress_color_setting( $wp_customize, $button_control, $button_label, 'section_button', 5, 30 );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
793 |
|
794 |
+
/**
|
795 |
+
* [ Change Button CSS Properties with LoginPress_Range_Control ]
|
796 |
+
* @since 1.0.1
|
797 |
+
* @version 1.1.3
|
798 |
+
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
799 |
|
800 |
+
$this->loginpress_rangle_seting( $wp_customize, $button_range_control, $button_range_default, $button_range_label, $button_range_attrs, $button_range_unit, 'section_button', 0, 35 );
|
801 |
+
$this->loginpress_rangle_seting( $wp_customize, $button_range_control, $button_range_default, $button_range_label, $button_range_attrs, $button_range_unit, 'section_button', 1, 40 );
|
802 |
+
$this->loginpress_rangle_seting( $wp_customize, $button_range_control, $button_range_default, $button_range_label, $button_range_attrs, $button_range_unit, 'section_button', 2, 45 );
|
803 |
+
$this->loginpress_rangle_seting( $wp_customize, $button_range_control, $button_range_default, $button_range_label, $button_range_attrs, $button_range_unit, 'section_button', 3, 50 );
|
804 |
+
$this->loginpress_rangle_seting( $wp_customize, $button_range_control, $button_range_default, $button_range_label, $button_range_attrs, $button_range_unit, 'section_button', 4, 55 );
|
805 |
+
$this->loginpress_rangle_seting( $wp_customize, $button_range_control, $button_range_default, $button_range_label, $button_range_attrs, $button_range_unit, 'section_button', 5, 60 );
|
806 |
+
$this->loginpress_rangle_seting( $wp_customize, $button_range_control, $button_range_default, $button_range_label, $button_range_attrs, $button_range_unit, 'section_button', 6, 65 );
|
807 |
|
808 |
// =============================
|
809 |
// = Section for Error message =
|
1099 |
'panel' => 'loginpress_panel',
|
1100 |
) );
|
1101 |
|
1102 |
+
$this->loginpress_group_setting( $wp_customize, $group_control, $group_label, $group_info, 'section_fotter', 3, 4 );
|
1103 |
+
|
1104 |
$wp_customize->add_setting( 'loginpress_customization[footer_display_text]', array(
|
1105 |
'default' => true,
|
1106 |
'type' => 'option',
|
1115 |
*/
|
1116 |
$wp_customize->add_control( new LoginPress_Radio_Control( $wp_customize, 'loginpress_customization[footer_display_text]', array(
|
1117 |
'settings' => 'loginpress_customization[footer_display_text]',
|
1118 |
+
'label' => __( 'Enable Footer Text:', 'loginpress' ),
|
1119 |
'section' => 'section_fotter',
|
1120 |
'priority' => 5,
|
1121 |
'type' => 'ios',// light, ios, flat
|
1129 |
) );
|
1130 |
|
1131 |
$wp_customize->add_control( 'loginpress_customization[login_footer_text]', array(
|
1132 |
+
'label' => __( 'Lost Password Text:', 'loginpress' ),
|
1133 |
'section' => 'section_fotter',
|
1134 |
'priority' => 10,
|
1135 |
'settings' => 'loginpress_customization[login_footer_text]',
|
1221 |
'settings' => 'loginpress_customization[login_footer_bg_color]'
|
1222 |
) ) );
|
1223 |
|
1224 |
+
$this->loginpress_hr_setting( $wp_customize, $close_control, 'section_fotter', 0, 36 );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1225 |
|
1226 |
+
$this->loginpress_group_setting( $wp_customize, $group_control, $group_label, $group_info, 'section_fotter', 4, 40 );
|
|
|
|
|
|
|
|
|
|
|
1227 |
|
1228 |
$wp_customize->add_setting( 'loginpress_customization[back_display_text]', array(
|
1229 |
'default' => true,
|
1239 |
*/
|
1240 |
$wp_customize->add_control( new LoginPress_Radio_Control( $wp_customize, 'loginpress_customization[back_display_text]', array(
|
1241 |
'settings' => 'loginpress_customization[back_display_text]',
|
1242 |
+
'label' => __( 'Enable "Back to" Text:', 'loginpress' ),
|
1243 |
'section' => 'section_fotter',
|
1244 |
'priority' => 45,
|
1245 |
'type' => 'ios',// light, ios, flat
|
1325 |
) );
|
1326 |
|
1327 |
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'loginpress_customization[login_back_bg_color]', array(
|
1328 |
+
'label' => __( '"Back to" Background Color:', 'loginpress' ),
|
1329 |
'section' => 'section_fotter',
|
1330 |
'priority' => 70,
|
1331 |
'settings' => 'loginpress_customization[login_back_bg_color]'
|
1332 |
) ) );
|
1333 |
|
1334 |
+
$this->loginpress_hr_setting( $wp_customize, $close_control, 'section_fotter', 1, 71 );
|
1335 |
+
|
1336 |
+
$this->loginpress_group_setting( $wp_customize, $group_control, $group_label, $group_info, 'section_fotter', 5, 72 );
|
1337 |
+
|
1338 |
+
/**
|
1339 |
+
* [Enable / Disabe Footer Text with LoginPress_Radio_Control]
|
1340 |
+
* @since 1.1.3
|
1341 |
+
*/
|
1342 |
+
$wp_customize->add_setting( 'loginpress_customization[login_copy_right_display]', array(
|
1343 |
+
'default' => false,
|
1344 |
+
'type' => 'option',
|
1345 |
+
'capability' => 'manage_options',
|
1346 |
+
'transport' => 'postMessage'
|
1347 |
+
) );
|
1348 |
+
$wp_customize->add_control( new LoginPress_Radio_Control( $wp_customize, 'loginpress_customization[login_copy_right_display]', array(
|
1349 |
+
'settings' => 'loginpress_customization[login_copy_right_display]',
|
1350 |
+
'section' => 'section_fotter',
|
1351 |
+
'priority' => 73,
|
1352 |
+
'type' => 'ios',// light, ios, flat
|
1353 |
+
'label' => __( 'Enable Copyright Note:', 'loginpress' ),
|
1354 |
+
) ) );
|
1355 |
+
|
1356 |
$wp_customize->add_setting( 'loginpress_customization[login_footer_copy_right]', array(
|
1357 |
'default' => sprintf( __('© %1$s %2$s, All Rights Reserved.', 'loginpress'), date("Y"), get_bloginfo('name') ),
|
1358 |
'type' => 'option',
|
1360 |
'transport' => 'postMessage'
|
1361 |
) );
|
1362 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1363 |
$wp_customize->add_control( 'loginpress_customization[login_footer_copy_right]', array(
|
1364 |
'label' => __( 'Copyright Note:', 'loginpress' ),
|
1365 |
'type' => 'textarea',
|
1383 |
$wp_customize->add_control( new LoginPress_Radio_Control( $wp_customize, 'loginpress_customization[loginpress_show_love]', array(
|
1384 |
'settings' => 'loginpress_customization[loginpress_show_love]',
|
1385 |
'section' => 'section_fotter',
|
1386 |
+
'priority' => 80,
|
1387 |
'type' => 'ios',// light, ios, flat
|
1388 |
+
'label' => __( 'Show some Love. Please help others learn about this free plugin by placing small link in footer. Thank you very much!', 'loginpress' ),
|
1389 |
) ) );
|
1390 |
|
1391 |
+
/**
|
1392 |
+
* [Love position on footer.]
|
1393 |
+
* @since 1.1.3
|
1394 |
+
*/
|
1395 |
+
$wp_customize->add_setting( 'loginpress_customization[show_love_position]', array(
|
1396 |
+
'default' => 'right',
|
1397 |
+
'type' => 'option',
|
1398 |
+
'capability' => 'manage_options',
|
1399 |
+
'transport' => 'postMessage'
|
1400 |
+
) );
|
1401 |
+
|
1402 |
+
$wp_customize->add_control( 'loginpress_customization[show_love_position]', array(
|
1403 |
+
'label' => __( 'Love Position:', 'loginpress' ),
|
1404 |
+
'section' => 'section_fotter',
|
1405 |
+
'priority' => 85,
|
1406 |
+
'settings' => 'loginpress_customization[show_love_position]',
|
1407 |
+
'type' => 'radio',
|
1408 |
+
'choices' => array(
|
1409 |
+
'left' => 'Left',
|
1410 |
+
'right' => 'Right',
|
1411 |
+
),
|
1412 |
+
) );
|
1413 |
+
$this->loginpress_hr_setting( $wp_customize, $close_control, 'section_fotter', 2, 90 );
|
1414 |
+
|
1415 |
// =============================
|
1416 |
// = Section for Custom CSS/JS =
|
1417 |
// =============================
|
1431 |
) );
|
1432 |
|
1433 |
$wp_customize->add_control( 'loginpress_customization[loginpress_custom_css]', array(
|
1434 |
+
'label' => __( 'Customize CSS:', 'loginpress' ),
|
1435 |
'type' => 'textarea',
|
1436 |
'section' => 'loginpress_custom_css_js',
|
1437 |
'priority' => 5,
|
1446 |
) );
|
1447 |
|
1448 |
$wp_customize->add_control( 'loginpress_customization[loginpress_custom_js]', array(
|
1449 |
+
'label' => __( 'Customize JS:', 'loginpress' ),
|
1450 |
'type' => 'textarea',
|
1451 |
'section' => 'loginpress_custom_css_js',
|
1452 |
'priority' => 10,
|
1485 |
* Manage the Login Footer Links
|
1486 |
*
|
1487 |
* @since 1.0.0
|
1488 |
+
* @version 1.1.3
|
1489 |
* * * * * * * * * * * * * * * */
|
1490 |
public function login_page_custom_footer() {
|
1491 |
|
1492 |
+
/**
|
1493 |
+
* Add brand postion class.
|
1494 |
+
* @since 1.1.3
|
1495 |
+
*/
|
1496 |
+
$position = ''; // Empty variable for storing position class.
|
1497 |
+
if ( $this->loginpress_key ) {
|
1498 |
+
if ( isset( $this->loginpress_key['show_love_position'] ) && $this->loginpress_key['show_love_position'] == 'left' ) {
|
1499 |
+
$position = ' love-postion';
|
1500 |
+
}
|
1501 |
+
}
|
1502 |
+
|
1503 |
+
if ( empty( $this->loginpress_key ) || ( isset( $this->loginpress_key['loginpress_show_love'] ) && $this->loginpress_key['loginpress_show_love'] != '' ) ) {
|
1504 |
+
echo '<div class="loginpress-show-love' . $position . '">' . __( 'Powered by:', 'loginpress' ) . ' <a href="https://wpbrigade.com" target="_blank">LoginPress</a></div>';
|
1505 |
+
} elseif ( empty( $this->loginpress_key ) || ( ! isset( $this->loginpress_key['loginpress_show_love'] ) ) ) {
|
1506 |
+
echo '<div class="loginpress-show-love' . $position . '">' . __( 'Powered by:', 'loginpress' ) . ' <a href="https://wpbrigade.com" target="_blank">LoginPress</a></div>';
|
1507 |
}
|
1508 |
|
1509 |
+
echo '<div class="footer-wrapper">';
|
1510 |
+
echo '<div class="footer-cont">';
|
1511 |
+
|
1512 |
if ( $this->loginpress_key ) {
|
1513 |
|
1514 |
// echo '</div></div>';
|
1515 |
+
|
|
|
1516 |
|
1517 |
// if ( array_key_exists( 'footer_login_menu', $this->loginpress_key ) && checked( $this->loginpress_key['footer_login_menu'], true, false ) ) {
|
1518 |
//
|
1526 |
//
|
1527 |
// }
|
1528 |
|
1529 |
+
if ( array_key_exists( 'login_copy_right_display', $this->loginpress_key ) && true == $this->loginpress_key['login_copy_right_display'] ) {
|
1530 |
+
if ( array_key_exists( 'login_footer_copy_right', $this->loginpress_key ) && ! empty( $this->loginpress_key['login_footer_copy_right'] ) ) {
|
1531 |
+
echo '<div class="copyRight">'.$this->loginpress_key['login_footer_copy_right'].'</div>';
|
1532 |
+
} else {
|
1533 |
+
echo '<div class="copyRight">'. sprintf( __('© %1$s %2$s, All Rights Reserved.', 'loginpress'), date("Y"), get_bloginfo('name') ) .'</div>';
|
1534 |
+
}
|
1535 |
}
|
1536 |
|
|
|
1537 |
}
|
1538 |
+
echo '</div></div>';
|
1539 |
}
|
1540 |
|
1541 |
/**
|
1546 |
public function login_page_custom_head() {
|
1547 |
|
1548 |
add_filter( 'gettext', array( $this, 'change_lostpassword_message' ), 20, 3 );
|
1549 |
+
add_filter( 'gettext', array( $this, 'change_username_label' ), 20, 3 );
|
1550 |
+
add_filter( 'gettext', array( $this, 'change_password_label' ), 20, 3 );
|
1551 |
// Include CSS File in heared.
|
1552 |
wp_enqueue_script( 'jquery' );
|
1553 |
include( LOGINPRESS_DIR_PATH . 'css/style-presets.php' );
|
1690 |
|
1691 |
return $translated_text;
|
1692 |
}
|
1693 |
+
/**
|
1694 |
+
* Change Username Label from Form.
|
1695 |
+
* @param [type] $translated_text [description]
|
1696 |
+
* @param [type] $text [description]
|
1697 |
+
* @param [type] $domain [description]
|
1698 |
+
* @return string
|
1699 |
+
* @since 1.1.3
|
1700 |
+
*/
|
1701 |
+
public function change_username_label( $translated_text, $text, $domain ){
|
1702 |
+
|
1703 |
+
if ( $this->loginpress_key ) {
|
1704 |
+
$default = 'Username or Email Address';
|
1705 |
+
$options = $this->loginpress_key;
|
1706 |
+
$loginpress_setting = get_option( 'loginpress_setting' );
|
1707 |
+
|
1708 |
+
// $label = array_key_exists( 'form_username_label', $options ) ? $options['form_username_label'] : '';
|
1709 |
+
$login_order = isset( $loginpress_setting['login_order'] ) ? $loginpress_setting['login_order'] : '';
|
1710 |
+
|
1711 |
+
// If the option does not exist, return the text unchanged.
|
1712 |
+
if ( ! $loginpress_setting && $default === $text ) {
|
1713 |
+
return $translated_text;
|
1714 |
+
}
|
1715 |
+
|
1716 |
+
// If options exsit, then translate away.
|
1717 |
+
if ( $loginpress_setting && $default === $text ) {
|
1718 |
+
|
1719 |
+
// Check if the option exists.
|
1720 |
+
if ( '' != $login_order ) {
|
1721 |
+
if ( 'username' == $login_order ) {
|
1722 |
+
$label = __( 'Username', 'loginpress' );
|
1723 |
+
} elseif ( 'email' == $login_order ) {
|
1724 |
+
$label = __( 'Email Address', 'loginpress' );
|
1725 |
+
} else {
|
1726 |
+
$label = 'Username or Email Address';
|
1727 |
+
}
|
1728 |
+
$translated_text = esc_html( $label );
|
1729 |
+
} else {
|
1730 |
+
return $translated_text;
|
1731 |
+
}
|
1732 |
+
}
|
1733 |
+
}
|
1734 |
+
return $translated_text;
|
1735 |
+
}
|
1736 |
+
/**
|
1737 |
+
* Change Password Label from Form.
|
1738 |
+
* @param [type] $translated_text [description]
|
1739 |
+
* @param [type] $text [description]
|
1740 |
+
* @param [type] $domain [description]
|
1741 |
+
* @return string
|
1742 |
+
* @since 1.1.3
|
1743 |
+
*/
|
1744 |
+
public function change_password_label( $translated_text, $text, $domain ) {
|
1745 |
+
|
1746 |
+
if ( $this->loginpress_key ) {
|
1747 |
+
$default = 'Password';
|
1748 |
+
$options = $this->loginpress_key;
|
1749 |
+
$label = array_key_exists( 'form_password_label', $options ) ? $options['form_password_label'] : '';
|
1750 |
+
|
1751 |
+
// If the option does not exist, return the text unchanged.
|
1752 |
+
if ( ! $options && $default === $text ) {
|
1753 |
+
return $translated_text;
|
1754 |
+
}
|
1755 |
+
|
1756 |
+
// If options exsit, then translate away.
|
1757 |
+
if ( $options && $default === $text ) {
|
1758 |
+
|
1759 |
+
// Check if the option exists.
|
1760 |
+
if ( array_key_exists( 'form_password_label', $options ) ) {
|
1761 |
+
$translated_text = esc_html( $label );
|
1762 |
+
} else {
|
1763 |
+
return $translated_text;
|
1764 |
+
}
|
1765 |
+
}
|
1766 |
+
}
|
1767 |
+
return $translated_text;
|
1768 |
+
}
|
1769 |
|
1770 |
/**
|
1771 |
* Manage Welcome Messages
|
1837 |
/**
|
1838 |
* Hook to Redirect Page for Customize
|
1839 |
*
|
1840 |
+
* @since 1.1.3
|
1841 |
* * * * * * * * * * * * * * * * * * */
|
1842 |
public function redirect_to_custom_page() {
|
1843 |
if ( ! empty($_GET['page'] ) ) {
|
1844 |
|
1845 |
if( ( $_GET['page'] == "abw" ) || ( $_GET['page'] == "loginpress" ) ) {
|
1846 |
|
1847 |
+
if ( is_multisite() ) { // if subdirectories are used in multisite.
|
1848 |
+
|
1849 |
+
$loginpress_obj = new LoginPress();
|
1850 |
+
$loginpress_page = $loginpress_obj->get_loginpress_page();
|
1851 |
+
|
1852 |
+
$page = get_permalink( $loginpress_page );
|
1853 |
+
|
1854 |
+
// Generate the redirect url.
|
1855 |
+
$url = add_query_arg(
|
1856 |
+
array(
|
1857 |
+
'autofocus[panel]' => 'loginpress_panel',
|
1858 |
+
'url' => rawurlencode( $page ),
|
1859 |
+
),
|
1860 |
+
admin_url( 'customize.php' )
|
1861 |
+
);
|
1862 |
+
|
1863 |
+
wp_safe_redirect( $url );
|
1864 |
+
|
1865 |
+
} else {
|
1866 |
+
|
1867 |
+
wp_redirect( get_admin_url() . "customize.php?url=" . wp_login_url() );
|
1868 |
+
}
|
1869 |
}
|
1870 |
}
|
1871 |
}
|
img/notification_logo.svg
ADDED
@@ -0,0 +1,166 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="utf-8"?>
|
2 |
+
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
3 |
+
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
4 |
+
width="1031.7px" height="246.1px" viewBox="36 157.9 1031.7 246.1" style="enable-background:new 36 157.9 1031.7 246.1;"
|
5 |
+
xml:space="preserve">
|
6 |
+
<style type="text/css">
|
7 |
+
.st0{fill:#B5D1FF;}
|
8 |
+
.st1{fill:#1A5FA4;}
|
9 |
+
.st2{fill:#1B62A7;}
|
10 |
+
.st3{fill:#F4F5F5;}
|
11 |
+
.st4{fill:#DDE9EE;}
|
12 |
+
.st5{fill:#F9C71A;}
|
13 |
+
.st6{fill:#F0A422;}
|
14 |
+
.st7{fill:#448AFF;stroke:#1B62A7;stroke-width:2;stroke-miterlimit:10;}
|
15 |
+
.st8{fill:#1B62A7;stroke:#1B62A7;stroke-miterlimit:10;}
|
16 |
+
.st9{fill:#F0A422;stroke:#1B62A7;stroke-width:2;stroke-miterlimit:10;}
|
17 |
+
.st10{fill:#1A61A7;}
|
18 |
+
.st11{fill:#EFA20E;}
|
19 |
+
.st12{fill:#DDE9EF;}
|
20 |
+
.st13{fill:#F0A422;stroke:#1B62A7;stroke-miterlimit:10;}
|
21 |
+
.st14{fill:#F9C50F;}
|
22 |
+
.st15{fill:#2561A3;}
|
23 |
+
.st16{enable-background:new ;}
|
24 |
+
.st17{fill:#FFFFFF;}
|
25 |
+
</style>
|
26 |
+
<path id="XMLID_13_" class="st0" d="M224.1,226.9c0,0-14-12.1-8.8-28.7c5.2-16.7,31.7-40.3-31.7-40.3S30.2,157.6,36.3,269.2
|
27 |
+
c4.6,84,11.5,96.3,23.5,96.3c14-0.1,32.7-0.5,48.7-16.6c13.8-13.9,23.8-12.4,82.7-24.2c79.5-16,95.9-37,95.9-53
|
28 |
+
s-24.9-24.6-37.8-30.5C236.5,235.3,224.1,226.9,224.1,226.9z"/>
|
29 |
+
<ellipse id="XMLID_23_" class="st1" cx="145.8" cy="333.4" rx="103.5" ry="3.8"/>
|
30 |
+
<g id="XMLID_18_">
|
31 |
+
<path id="XMLID_237_" class="st2" d="M205.5,325.6H45.1c-3.2,0-5.7-2.5-5.7-5.7v-138c0-3.2,2.5-5.7,5.7-5.7h160.5
|
32 |
+
c3.2,0,5.7,2.5,5.7,5.7V320C211.3,323.1,208.8,325.6,205.5,325.6z"/>
|
33 |
+
<path id="XMLID_236_" class="st3" d="M200.2,324.3H45.9c-2.9,0-5-2.3-5-5V182.9c0-2.9,2.3-5,5-5h154.3c2.4,0,4.4,2,4.4,4.4V320
|
34 |
+
C204.6,322.3,202.7,324.3,200.2,324.3z"/>
|
35 |
+
<path id="XMLID_235_" class="st4" d="M200.5,179h-4.2L42.2,318.1c0,4,2.2,4.6,4.4,4.6h153.2c1.8,0,3.4-1.5,3.4-3.4V181.6
|
36 |
+
C203.1,180.3,202,179,200.5,179z"/>
|
37 |
+
<g id="XMLID_233_">
|
38 |
+
<path id="XMLID_234_" class="st5" d="M203.1,199.7H42.3v-16.6c0-2.2,1.8-4,4-4h152.4c2.4,0,4.4,2,4.4,4.4L203.1,199.7L203.1,199.7
|
39 |
+
z"/>
|
40 |
+
</g>
|
41 |
+
<g id="XMLID_229_">
|
42 |
+
<circle id="XMLID_232_" class="st2" cx="65.1" cy="189.3" r="4.1"/>
|
43 |
+
<circle id="XMLID_231_" class="st2" cx="52.3" cy="189.3" r="4.1"/>
|
44 |
+
<circle id="XMLID_230_" class="st2" cx="78.1" cy="189.3" r="4.1"/>
|
45 |
+
</g>
|
46 |
+
<path id="XMLID_228_" class="st6" d="M200.4,179H196l-23.2,20.5H203v-17.7C203.1,180.3,202,179,200.4,179z"/>
|
47 |
+
<rect id="XMLID_227_" x="42.3" y="199.7" class="st2" width="161" height="1.5"/>
|
48 |
+
<path id="XMLID_2_" class="st7" d="M130.2,238.3H67.3c-6,0-10.9-4.9-10.9-10.9l0,0c0-6,4.9-10.9,10.9-10.9h62.9
|
49 |
+
c6,0,10.9,4.9,10.9,10.9l0,0C141.1,233.4,136.2,238.3,130.2,238.3z"/>
|
50 |
+
<path id="XMLID_3_" class="st8" d="M108.1,230.1H67c-1.5,0-2.7-1.2-2.7-2.7l0,0c0-1.5,1.2-2.7,2.7-2.7h41.1c1.5,0,2.7,1.2,2.7,2.7
|
51 |
+
l0,0C110.8,228.9,109.6,230.1,108.1,230.1z"/>
|
52 |
+
<path id="XMLID_4_" class="st7" d="M130.2,268.6H67.3c-6,0-10.9-4.9-10.9-10.9l0,0c0-6,4.9-10.9,10.9-10.9h62.9
|
53 |
+
c6,0,10.9,4.9,10.9,10.9l0,0C141.1,263.7,136.2,268.6,130.2,268.6z"/>
|
54 |
+
<path id="XMLID_5_" class="st9" d="M130.2,298.9h-37c-6,0-10.9-4.9-10.9-10.9l0,0c0-6,4.9-10.9,10.9-10.9h37
|
55 |
+
c6,0,10.9,4.9,10.9,10.9l0,0C141.1,294,136.2,298.9,130.2,298.9z"/>
|
56 |
+
<path id="XMLID_7_" class="st8" d="M67,260.3L67,260.3c-1.5,0-2.7-1.2-2.7-2.7l0,0c0-1.5,1.2-2.7,2.7-2.7l0,0
|
57 |
+
c1.5,0,2.7,1.2,2.7,2.7l0,0C69.6,259.2,68.4,260.3,67,260.3z"/>
|
58 |
+
<path id="XMLID_8_" class="st8" d="M75.5,260.3L75.5,260.3c-1.5,0-2.7-1.2-2.7-2.7l0,0c0-1.5,1.2-2.7,2.7-2.7l0,0
|
59 |
+
c1.5,0,2.7,1.2,2.7,2.7l0,0C78.1,259.2,76.9,260.3,75.5,260.3z"/>
|
60 |
+
<path id="XMLID_9_" class="st8" d="M83.9,260.3L83.9,260.3c-1.5,0-2.7-1.2-2.7-2.7l0,0c0-1.5,1.2-2.7,2.7-2.7l0,0
|
61 |
+
c1.5,0,2.7,1.2,2.7,2.7l0,0C86.6,259.2,85.4,260.3,83.9,260.3z"/>
|
62 |
+
<path id="XMLID_10_" class="st8" d="M92.4,260.3L92.4,260.3c-1.5,0-2.7-1.2-2.7-2.7l0,0c0-1.5,1.2-2.7,2.7-2.7l0,0
|
63 |
+
c1.5,0,2.7,1.2,2.7,2.7l0,0C95.1,259.2,93.9,260.3,92.4,260.3z"/>
|
64 |
+
<path id="XMLID_11_" class="st8" d="M100.9,260.3L100.9,260.3c-1.5,0-2.7-1.2-2.7-2.7l0,0c0-1.5,1.2-2.7,2.7-2.7l0,0
|
65 |
+
c1.5,0,2.7,1.2,2.7,2.7l0,0C103.6,259.2,102.4,260.3,100.9,260.3z"/>
|
66 |
+
<path id="XMLID_12_" class="st8" d="M109.4,260.3L109.4,260.3c-1.5,0-2.7-1.2-2.7-2.7l0,0c0-1.5,1.2-2.7,2.7-2.7l0,0
|
67 |
+
c1.5,0,2.7,1.2,2.7,2.7l0,0C112.1,259.2,110.9,260.3,109.4,260.3z"/>
|
68 |
+
</g>
|
69 |
+
<g id="XMLID_22_">
|
70 |
+
<path id="XMLID_399_" class="st10" d="M206.3,207.9L206.3,207.9c-20.7,0-37.4,13.6-36.5,30.3v20.6H190v-19.5
|
71 |
+
c0-6.3,6.3-11.5,14.1-11.5l0,0c7.8,0,14.1,5.2,14.1,11.5V277h-12.4v11.7h37.9v-50.5C243.7,221.5,226.9,207.9,206.3,207.9z"/>
|
72 |
+
<path id="XMLID_398_" class="st11" d="M204.2,211L204.2,211c-17.9,0-32.4,11.8-32.4,26.3V257H188v-18.1c0-7.2,7.2-13.2,16.2-13.2
|
73 |
+
l0,0c8.9,0,16.2,5.8,16.2,13.2v18.2V277v11.7h16.3v-51.3C236.7,222.8,222.1,211,204.2,211z"/>
|
74 |
+
<path id="XMLID_397_" class="st10" d="M256,348.8h-98.6c-2.9,0-5.3-2.3-5.3-5.3v-75.7c0,0,0-0.1,0.1-0.1h109c0,0,0.1,0,0.1,0.1
|
75 |
+
v75.6C261.3,346.5,258.9,348.8,256,348.8z"/>
|
76 |
+
<path id="XMLID_365_" class="st3" d="M246.5,347.7h-88c-2.9,0-5.2-2.3-5.2-5.2v-73.6h98.5v73.5
|
77 |
+
C251.7,345.3,249.4,347.7,246.5,347.7z"/>
|
78 |
+
<path id="XMLID_364_" class="st12" d="M154.8,339.8c0,5.1,1.6,6.7,9.1,6.7h81.7c2.7,0,4.9-2.2,4.9-4.9v-70.7H249L154.8,339.8z"/>
|
79 |
+
<path id="XMLID_14_" class="st13" d="M225.3,316.9h-45.6c-4.3,0-7.8-3.5-7.8-7.8v-1.7c0-4.3,3.5-7.8,7.8-7.8h45.6
|
80 |
+
c4.3,0,7.8,3.5,7.8,7.8v1.7C233,313.4,229.6,316.9,225.3,316.9z"/>
|
81 |
+
<path id="XMLID_15_" class="st14" d="M189.1,316.3h-8.2c-4.7,0-8.5-3.6-8.5-8l0,0c0-4.4,3.8-8,8.5-8h32L189.1,316.3z"/>
|
82 |
+
<circle id="XMLID_6_" class="st8" cx="202.4" cy="308.3" r="4.3"/>
|
83 |
+
<circle id="XMLID_17_" class="st8" cx="186" cy="308.3" r="4.3"/>
|
84 |
+
<circle id="XMLID_16_" class="st8" cx="219.3" cy="308.3" r="4.3"/>
|
85 |
+
</g>
|
86 |
+
<g id="XMLID_24_">
|
87 |
+
<g id="XMLID_28_">
|
88 |
+
<path class="st15" d="M256.2,404H54.7c-10.2,0-18.5-8.3-18.5-18.6l0,0c0-10.2,8.3-18.6,18.5-18.6h201.5c10.2,0,18.5,8.3,18.5,18.6
|
89 |
+
l0,0C274.5,395.7,266.2,404,256.2,404z"/>
|
90 |
+
</g>
|
91 |
+
<g id="XMLID_27_" class="st16">
|
92 |
+
<path class="st17" d="M76.7,393.7v-18.2h3.1v15.6h8v2.6H76.7z"/>
|
93 |
+
<path class="st17" d="M105.5,386.8c0,2.2-0.6,4-1.8,5.3c-1.2,1.3-2.9,1.9-5,1.9c-1.3,0-2.5-0.3-3.6-0.9c-1-0.6-1.8-1.4-2.4-2.5
|
94 |
+
c-0.6-1.1-0.8-2.3-0.8-3.8c0-2.2,0.6-4,1.8-5.2c1.2-1.3,2.9-1.9,5-1.9c2.1,0,3.7,0.6,4.9,1.9C104.8,382.9,105.5,384.6,105.5,386.8
|
95 |
+
z M95,386.8c0,3.2,1.2,4.8,3.7,4.8c2.4,0,3.6-1.6,3.6-4.8c0-3.1-1.2-4.7-3.7-4.7c-1.3,0-2.2,0.4-2.8,1.2
|
96 |
+
C95.3,384.1,95,385.3,95,386.8z"/>
|
97 |
+
<path class="st17" d="M123,379.9v1.6l-2.4,0.4c0.2,0.3,0.4,0.6,0.6,1.1c0.1,0.4,0.2,0.9,0.2,1.3c0,1.4-0.5,2.5-1.5,3.3
|
98 |
+
c-1,0.8-2.4,1.2-4.2,1.2c-0.5,0-0.9,0-1.2-0.1c-0.7,0.4-1,0.8-1,1.4c0,0.3,0.2,0.6,0.5,0.7c0.3,0.2,0.9,0.2,1.7,0.2h2.5
|
99 |
+
c1.6,0,2.8,0.3,3.6,1s1.2,1.6,1.2,2.8c0,1.6-0.7,2.8-2,3.6c-1.3,0.8-3.3,1.3-5.8,1.3c-2,0-3.4-0.3-4.5-1c-1-0.7-1.5-1.6-1.5-2.8
|
100 |
+
c0-0.8,0.3-1.6,0.8-2.1c0.6-0.6,1.3-1,2.3-1.2c-0.4-0.2-0.7-0.4-1-0.8c-0.3-0.4-0.4-0.8-0.4-1.2c0-0.5,0.2-1,0.5-1.3
|
101 |
+
c0.3-0.4,0.8-0.7,1.3-1.1c-0.7-0.3-1.3-0.8-1.8-1.5c-0.5-0.7-0.7-1.5-0.7-2.4c0-1.5,0.5-2.7,1.5-3.5c1-0.8,2.4-1.2,4.2-1.2
|
102 |
+
c0.4,0,0.8,0,1.3,0.1c0.4,0.1,0.8,0.1,1,0.2H123z M111.8,395.8c0,0.6,0.3,1.1,0.9,1.5c0.6,0.3,1.4,0.5,2.5,0.5
|
103 |
+
c1.7,0,2.9-0.2,3.7-0.7c0.8-0.5,1.2-1.1,1.2-1.8c0-0.6-0.2-1-0.7-1.3c-0.4-0.3-1.3-0.4-2.5-0.4h-2.3c-0.9,0-1.6,0.2-2.1,0.6
|
104 |
+
C112,394.6,111.8,395.2,111.8,395.8z M113.1,384.4c0,0.9,0.2,1.5,0.7,2c0.5,0.5,1.1,0.7,2,0.7c1.8,0,2.6-0.9,2.6-2.7
|
105 |
+
c0-0.9-0.2-1.6-0.7-2.1c-0.4-0.5-1.1-0.7-2-0.7c-0.9,0-1.5,0.2-2,0.7C113.3,382.8,113.1,383.5,113.1,384.4z"/>
|
106 |
+
<path class="st17" d="M127.5,376.3c0-0.5,0.1-0.9,0.4-1.2c0.3-0.3,0.7-0.4,1.3-0.4c0.5,0,1,0.1,1.3,0.4c0.3,0.3,0.4,0.7,0.4,1.2
|
107 |
+
c0,0.5-0.1,0.9-0.4,1.2c-0.3,0.3-0.7,0.4-1.3,0.4c-0.6,0-1-0.1-1.3-0.4C127.6,377.2,127.5,376.8,127.5,376.3z M130.7,393.7h-3
|
108 |
+
v-13.8h3V393.7z"/>
|
109 |
+
<path class="st17" d="M149.6,393.7h-3.1v-8.5c0-1.1-0.2-1.9-0.7-2.4c-0.4-0.5-1.2-0.8-2.1-0.8c-1.3,0-2.2,0.4-2.8,1.1
|
110 |
+
c-0.6,0.7-0.9,2-0.9,3.7v6.9h-3v-13.8h2.4l0.4,1.8h0.2c0.4-0.7,1-1.2,1.8-1.5c0.8-0.4,1.7-0.5,2.6-0.5c3.4,0,5.2,1.7,5.2,5V393.7z
|
111 |
+
"/>
|
112 |
+
<path class="st17" d="M168.7,381c0,1.9-0.6,3.4-1.9,4.4s-3.1,1.5-5.5,1.5h-2v6.8h-3.1v-18.2h5.5c2.4,0,4.1,0.5,5.3,1.4
|
113 |
+
C168.1,377.8,168.7,379.2,168.7,381z M159.2,384.4h1.6c1.6,0,2.8-0.3,3.5-0.8s1.1-1.4,1.1-2.5c0-1-0.3-1.8-1-2.3s-1.7-0.8-3.1-0.8
|
114 |
+
h-2.2V384.4z"/>
|
115 |
+
<path class="st17" d="M181.4,379.7c0.6,0,1.1,0,1.5,0.1l-0.3,2.7c-0.4-0.1-0.9-0.1-1.3-0.1c-1.2,0-2.2,0.4-3,1.1
|
116 |
+
c-0.8,0.8-1.1,1.8-1.1,3v7.2h-3v-13.8h2.4l0.4,2.4h0.2c0.5-0.8,1.1-1.5,1.9-2C179.7,379.9,180.5,379.7,181.4,379.7z"/>
|
117 |
+
<path class="st17" d="M193.8,393.9c-2.2,0-4-0.6-5.2-1.9c-1.3-1.2-1.9-3-1.9-5.2c0-2.2,0.6-4,1.7-5.3c1.2-1.3,2.8-1.9,4.8-1.9
|
118 |
+
c1.9,0,3.4,0.6,4.5,1.7s1.6,2.6,1.6,4.6v1.6h-9.6c0,1.3,0.4,2.4,1.1,3.1c0.7,0.7,1.7,1.1,3,1.1c0.8,0,1.6-0.1,2.4-0.2
|
119 |
+
c0.7-0.2,1.5-0.4,2.4-0.8v2.4c-0.7,0.3-1.5,0.6-2.3,0.7S194.8,393.9,193.8,393.9z M193.2,381.9c-1,0-1.7,0.3-2.3,0.9
|
120 |
+
c-0.6,0.6-0.9,1.4-1,2.6h6.5c0-1.1-0.3-2-0.9-2.6C194.9,382.2,194.2,381.9,193.2,381.9z"/>
|
121 |
+
<path class="st17" d="M214.4,389.8c0,1.3-0.5,2.4-1.5,3.1c-1,0.7-2.5,1.1-4.4,1.1c-1.9,0-3.4-0.3-4.6-0.8v-2.5
|
122 |
+
c1.7,0.7,3.3,1.1,4.7,1.1c1.9,0,2.8-0.5,2.8-1.6c0-0.3-0.1-0.6-0.3-0.9c-0.2-0.2-0.5-0.5-1-0.7c-0.5-0.3-1.1-0.5-2-0.8
|
123 |
+
c-1.7-0.6-2.8-1.2-3.4-1.8c-0.6-0.6-0.9-1.4-0.9-2.4c0-1.2,0.5-2.1,1.5-2.7c1-0.7,2.3-1,4-1c1.7,0,3.3,0.3,4.8,1l-1,2.2
|
124 |
+
c-1.5-0.6-2.8-0.9-3.9-0.9c-1.6,0-2.4,0.4-2.4,1.3c0,0.4,0.2,0.8,0.6,1.1s1.3,0.7,2.7,1.2c1.2,0.4,2,0.8,2.6,1.2
|
125 |
+
c0.5,0.4,0.9,0.8,1.2,1.3C214.3,388.5,214.4,389.1,214.4,389.8z"/>
|
126 |
+
<path class="st17" d="M229.3,389.8c0,1.3-0.5,2.4-1.5,3.1c-1,0.7-2.5,1.1-4.4,1.1c-1.9,0-3.4-0.3-4.6-0.8v-2.5
|
127 |
+
c1.7,0.7,3.3,1.1,4.7,1.1c1.9,0,2.8-0.5,2.8-1.6c0-0.3-0.1-0.6-0.3-0.9c-0.2-0.2-0.5-0.5-1-0.7c-0.5-0.3-1.1-0.5-2-0.8
|
128 |
+
c-1.7-0.6-2.8-1.2-3.4-1.8c-0.6-0.6-0.9-1.4-0.9-2.4c0-1.2,0.5-2.1,1.5-2.7c1-0.7,2.3-1,4-1c1.7,0,3.3,0.3,4.8,1l-1,2.2
|
129 |
+
c-1.5-0.6-2.8-0.9-3.9-0.9c-1.6,0-2.4,0.4-2.4,1.3c0,0.4,0.2,0.8,0.6,1.1s1.3,0.7,2.7,1.2c1.2,0.4,2,0.8,2.6,1.2
|
130 |
+
c0.5,0.4,0.9,0.8,1.2,1.3C229.2,388.5,229.3,389.1,229.3,389.8z"/>
|
131 |
+
</g>
|
132 |
+
</g>
|
133 |
+
<g id="XMLID_25_">
|
134 |
+
<path id="XMLID_38_" d="M338.5,223.6H353v99.6h47.7v12.1h-62.2V223.6z"/>
|
135 |
+
<path id="XMLID_40_" d="M486.6,294.6c0,29.7-20.6,42.6-39.9,42.6c-21.7,0-38.5-15.9-38.5-41.3c0-26.8,17.6-42.6,39.8-42.6
|
136 |
+
C471,253.3,486.6,270,486.6,294.6z M422.9,295.4c0,17.6,10.1,30.8,24.4,30.8c13.9,0,24.4-13.1,24.4-31.2c0-13.6-6.8-30.8-24-30.8
|
137 |
+
C430.4,264.2,422.9,280.2,422.9,295.4z"/>
|
138 |
+
<path id="XMLID_43_" d="M574.1,255.1c-0.3,5.8-0.7,12.3-0.7,22v46.6c0,18.4-3.6,29.7-11.4,36.6c-7.8,7.3-19.1,9.6-29.2,9.6
|
139 |
+
c-9.6,0-20.2-2.3-26.7-6.6l3.6-11.1c5.3,3.3,13.6,6.3,23.5,6.3c14.9,0,25.9-7.8,25.9-28v-9h-0.3c-4.5,7.5-13.1,13.4-25.5,13.4
|
140 |
+
c-19.9,0-34.1-16.9-34.1-39.1c0-27.2,17.7-42.6,36.1-42.6c13.9,0,21.5,7.3,25,13.9h0.3l0.7-12.1L574.1,255.1L574.1,255.1z
|
141 |
+
M559,286.8c0-2.5-0.2-4.6-0.8-6.6c-2.7-8.5-9.8-15.4-20.4-15.4c-13.9,0-23.9,11.8-23.9,30.3c0,15.7,8,28.8,23.7,28.8
|
142 |
+
c9,0,17.1-5.6,20.2-14.9c0.8-2.5,1.2-5.3,1.2-7.8L559,286.8L559,286.8z"/>
|
143 |
+
<path id="XMLID_46_" d="M612.9,232.6c0.2,5-3.5,9-9.3,9c-5.1,0-8.8-4-8.8-9c0-5.1,3.8-9.1,9.1-9.1
|
144 |
+
C609.4,223.5,612.9,227.4,612.9,232.6z M596.6,335.3v-80.2h14.6v80.2H596.6z"/>
|
145 |
+
<path id="XMLID_49_" d="M635.4,276.8c0-8.3-0.2-15.1-0.7-21.7h12.9l0.8,13.3h0.3c4-7.6,13.3-15.1,26.5-15.1
|
146 |
+
c11.1,0,28.3,6.6,28.3,34.1v47.9h-14.6v-46.2c0-12.9-4.8-23.7-18.6-23.7c-9.6,0-17.1,6.8-19.6,14.9c-0.7,1.8-1,4.3-1,6.8v48.2
|
147 |
+
h-14.6v-58.5H635.4z"/>
|
148 |
+
<path id="XMLID_51_" d="M727.9,225c7-1.2,16.1-2.2,27.7-2.2c14.3,0,24.7,3.3,31.3,9.3c6.1,5.3,9.8,13.4,9.8,23.4
|
149 |
+
c0,10.1-3,18.1-8.6,23.9c-7.6,8.1-20.1,12.3-34.1,12.3c-4.3,0-8.3-0.2-11.6-1v44.8H728V225H727.9z M742.3,278.8
|
150 |
+
c3.1,0.8,7.1,1.2,11.9,1.2c17.4,0,28-8.5,28-23.9c0-14.8-10.4-21.9-26.4-21.9c-6.3,0-11.1,0.5-13.6,1.2L742.3,278.8L742.3,278.8z"
|
151 |
+
/>
|
152 |
+
<path id="XMLID_54_" d="M812.9,280.2c0-9.4-0.2-17.6-0.7-25H825l0.5,15.7h0.7c3.6-10.8,12.4-17.6,22.2-17.6c1.7,0,2.8,0.2,4.1,0.5
|
153 |
+
v13.8c-1.5-0.3-3-0.5-5-0.5c-10.3,0-17.6,7.8-19.6,18.7c-0.3,2-0.7,4.3-0.7,6.8v42.8h-14.4v-55.2H812.9z"/>
|
154 |
+
<path id="XMLID_56_" d="M873.6,297.9c0.3,19.7,12.9,27.8,27.5,27.8c10.4,0,16.7-1.8,22.2-4.1l2.5,10.4c-5.1,2.3-13.9,5-26.7,5
|
155 |
+
c-24.7,0-39.4-16.2-39.4-40.4s14.3-43.3,37.6-43.3c26.2,0,33.1,23,33.1,37.8c0,3-0.3,5.3-0.5,6.8L873.6,297.9L873.6,297.9z
|
156 |
+
M916.3,287.4c0.2-9.3-3.8-23.7-20.2-23.7c-14.8,0-21.2,13.6-22.4,23.7H916.3z"/>
|
157 |
+
<path id="XMLID_59_" d="M946.5,320.4c4.3,2.8,11.9,5.8,19.2,5.8c10.6,0,15.6-5.3,15.6-11.9c0-7-4.1-10.8-14.9-14.8
|
158 |
+
c-14.4-5.1-21.2-13.1-21.2-22.7c0-12.9,10.4-23.5,27.7-23.5c8.1,0,15.2,2.3,19.7,5l-3.6,10.6c-3.1-2-9-4.6-16.4-4.6
|
159 |
+
c-8.6,0-13.4,5-13.4,10.9c0,6.6,4.8,9.6,15.2,13.6c13.9,5.3,21,12.3,21,24.2c0,14.1-10.9,24-30,24c-8.8,0-16.9-2.2-22.5-5.5
|
160 |
+
L946.5,320.4z"/>
|
161 |
+
<path id="XMLID_61_" d="M1012.1,320.4c4.3,2.8,11.9,5.8,19.2,5.8c10.6,0,15.6-5.3,15.6-11.9c0-7-4.1-10.8-14.9-14.8
|
162 |
+
c-14.4-5.1-21.2-13.1-21.2-22.7c0-12.9,10.4-23.5,27.7-23.5c8.1,0,15.2,2.3,19.7,5l-3.6,10.6c-3.1-2-9-4.6-16.4-4.6
|
163 |
+
c-8.6,0-13.4,5-13.4,10.9c0,6.6,4.8,9.6,15.2,13.6c13.9,5.3,21,12.3,21,24.2c0,14.1-10.9,24-30,24c-8.8,0-16.9-2.2-22.5-5.5
|
164 |
+
L1012.1,320.4z"/>
|
165 |
+
</g>
|
166 |
+
</svg>
|
include/class-loginpress-theme-template.php
ADDED
@@ -0,0 +1,151 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* LoginPress template functions.
|
4 |
+
*
|
5 |
+
* @since 1.1.3
|
6 |
+
*/
|
7 |
+
|
8 |
+
// Exit if accessed directly.
|
9 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
+
exit;
|
11 |
+
}
|
12 |
+
|
13 |
+
if ( ! class_exists( 'LoginPress_Theme_Template' ) ) :
|
14 |
+
/**
|
15 |
+
* Add LoginPress Templates to to use in the theme.
|
16 |
+
*/
|
17 |
+
class LoginPress_Theme_Template {
|
18 |
+
|
19 |
+
/**
|
20 |
+
* A reference to an instance of this class.
|
21 |
+
* @var string
|
22 |
+
*/
|
23 |
+
private static $instance;
|
24 |
+
|
25 |
+
/**
|
26 |
+
* The array of templates that this plugin tracks.
|
27 |
+
* @var string
|
28 |
+
*/
|
29 |
+
protected $templates;
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Returns an instance of this class.
|
33 |
+
*/
|
34 |
+
public static function get_instance() {
|
35 |
+
|
36 |
+
if ( null == self::$instance ) {
|
37 |
+
self::$instance = new LoginPress_Theme_Template();
|
38 |
+
}
|
39 |
+
|
40 |
+
return self::$instance;
|
41 |
+
|
42 |
+
}
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Initializes the plugin by setting filters and administration functions.
|
46 |
+
*/
|
47 |
+
private function __construct() {
|
48 |
+
|
49 |
+
$this->templates = array();
|
50 |
+
|
51 |
+
|
52 |
+
// Add a filter to the attributes metabox to inject template into the cache.
|
53 |
+
if ( version_compare( floatval( get_bloginfo( 'version' ) ), '4.7', '<' ) ) {
|
54 |
+
// 4.6 and older
|
55 |
+
add_filter( 'page_attributes_dropdown_pages_args', array( $this, 'register_project_templates' ) );
|
56 |
+
} else {
|
57 |
+
// Add a filter to the wp 4.7 version attributes metabox
|
58 |
+
add_filter( 'theme_page_templates', array( $this, 'add_new_template' ) );
|
59 |
+
}
|
60 |
+
|
61 |
+
// Add a filter to the save post to inject out template into the page cache.
|
62 |
+
add_filter( 'wp_insert_post_data', array( $this, 'register_project_templates' ) );
|
63 |
+
|
64 |
+
|
65 |
+
// Add a filter to the template include to determine if the page has our template assigned and return it's path.
|
66 |
+
add_filter( 'template_include', array( $this, 'view_project_template') );
|
67 |
+
|
68 |
+
|
69 |
+
// Add templates.
|
70 |
+
$this->templates = array(
|
71 |
+
'template-loginpress.php' => 'LoginPress',
|
72 |
+
);
|
73 |
+
|
74 |
+
}
|
75 |
+
|
76 |
+
/**
|
77 |
+
* Adds our template to the page dropdown for v4.7+
|
78 |
+
*
|
79 |
+
*/
|
80 |
+
public function add_new_template( $posts_templates ) {
|
81 |
+
|
82 |
+
$posts_templates = array_merge( $posts_templates, $this->templates );
|
83 |
+
return $posts_templates;
|
84 |
+
}
|
85 |
+
|
86 |
+
/**
|
87 |
+
* Adds our template to the pages cache in order to trick WordPress
|
88 |
+
* into thinking the template file exists where it doens't really exist.
|
89 |
+
*/
|
90 |
+
public function register_project_templates( $atts ) {
|
91 |
+
|
92 |
+
// Create the key used for the themes cache.
|
93 |
+
$cache_key = 'page_templates-' . md5( get_theme_root() . '/' . get_stylesheet() );
|
94 |
+
|
95 |
+
// Retrieve the cache list.
|
96 |
+
// If it doesn't exist, or it's empty prepare an array.
|
97 |
+
$templates = wp_get_theme()->get_page_templates();
|
98 |
+
if ( empty( $templates ) ) {
|
99 |
+
$templates = array();
|
100 |
+
}
|
101 |
+
|
102 |
+
// New cache, therefore remove the old one
|
103 |
+
wp_cache_delete( $cache_key , 'themes');
|
104 |
+
|
105 |
+
// Now add our template to the list of templates by merging our templates
|
106 |
+
// with the existing templates array from the cache.
|
107 |
+
$templates = array_merge( $templates, $this->templates );
|
108 |
+
|
109 |
+
// Add the modified cache to allow WordPress to pick it up for listing
|
110 |
+
// available templates
|
111 |
+
wp_cache_add( $cache_key, $templates, 'themes', 1800 );
|
112 |
+
|
113 |
+
return $atts;
|
114 |
+
|
115 |
+
}
|
116 |
+
|
117 |
+
/**
|
118 |
+
* Checks if the template is assigned to the page.
|
119 |
+
*/
|
120 |
+
public function view_project_template( $template ) {
|
121 |
+
|
122 |
+
// Get global post
|
123 |
+
global $post;
|
124 |
+
|
125 |
+
// Return template if post is empty
|
126 |
+
if ( ! $post ) {
|
127 |
+
return $template;
|
128 |
+
}
|
129 |
+
|
130 |
+
// Return default template if we don't have a custom one defined
|
131 |
+
if ( ! isset( $this->templates[ get_post_meta( $post->ID, '_wp_page_template', true ) ] ) ) {
|
132 |
+
return $template;
|
133 |
+
}
|
134 |
+
|
135 |
+
$file = plugin_dir_path( __FILE__ ). get_post_meta( $post->ID, '_wp_page_template', true );
|
136 |
+
|
137 |
+
// Just to be safe, we check if the file exist first
|
138 |
+
if ( file_exists( $file ) ) {
|
139 |
+
return $file;
|
140 |
+
} else {
|
141 |
+
echo $file;
|
142 |
+
}
|
143 |
+
|
144 |
+
// Return template
|
145 |
+
return $template;
|
146 |
+
|
147 |
+
}
|
148 |
+
|
149 |
+
}
|
150 |
+
endif;
|
151 |
+
add_action( 'plugins_loaded', array( 'LoginPress_Theme_Template', 'get_instance' ) );
|
include/class-remote-notification-client.php
CHANGED
@@ -271,7 +271,7 @@ if ( ! class_exists( 'Remote_Dashboard_Notifications_Client' ) ) {
|
|
271 |
* @since 0.1.0
|
272 |
*/
|
273 |
public function style() { ?>
|
274 |
-
<style type="text/css">div.rn-alert{padding:15px 35px 15px 15px;margin-bottom:20px;border:1px solid transparent;-webkit-box-shadow:none;box-shadow:none}div.rn-alert p:empty{display:none}div.rn-alert ol,div.rn-alert ol li,div.rn-alert ul,div.rn-alert ul li{list-style:inherit!important}div.rn-alert ol,div.rn-alert ul{padding-left:30px}div.rn-alert hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0;margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}div.rn-alert h1,h2,h3,h4,h5,h6{margin-top:0;color:inherit}div.rn-alert a{font-weight:700}div.rn-alert a:hover{text-decoration:underline}div.rn-alert>p{margin:0;padding:0;line-height:1}div.rn-alert>p,div.rn-alert>ul{margin-bottom:0}div.rn-alert>p+p{margin-top:5px}div.rn-alert .rn-dismiss-btn{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;position:relative;top:-2px;right:-21px;padding:0;cursor:pointer;background:0;border:0;-webkit-appearance:none;float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20);text-decoration:none}div.rn-alert-success{background-color:#dff0d8;border-color:#d6e9c6;color:#3c763d}div.rn-alert-success hr{border-top-color:#c9e2b3}div.rn-alert-success a{color:#2b542c}div.rn-alert-info{background-color:#d9edf7;border-color:#bce8f1;color:#31708f}div.rn-alert-info hr{border-top-color:#a6e1ec}div.rn-alert-info a{color:#245269}div.rn-alert-warning{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}div.rn-alert-warning hr{border-top-color:#f7e1b5}div.rn-alert-warning a{color:#66512c}div.rn-alert-danger{background-color:#f2dede;border-color:#ebccd1;color:#a94442}div.rn-alert-danger hr{border-top-color:#e4b9c0}div.rn-alert-danger a{color:#843534}</style>
|
275 |
<?php }
|
276 |
|
277 |
/**
|
@@ -409,7 +409,7 @@ if ( ! class_exists( 'Remote_Dashboard_Notifications_Client' ) ) {
|
|
409 |
if ( ! isset( $notification->date_end ) ) {
|
410 |
return false;
|
411 |
}
|
412 |
-
|
413 |
if ( empty( $notification->date_end ) || strtotime( $notification->date_end ) > time() ) {
|
414 |
return false;
|
415 |
}
|
@@ -853,4 +853,4 @@ if ( ! class_exists( 'TAV_Remote_Notification_Client' ) ) {
|
|
853 |
}
|
854 |
}
|
855 |
|
856 |
-
}
|
271 |
* @since 0.1.0
|
272 |
*/
|
273 |
public function style() { ?>
|
274 |
+
<style type="text/css">div.rn-alert{padding:15px 35px 15px 15px;margin-bottom:20px;border:1px solid transparent;-webkit-box-shadow:none;box-shadow:none}div.rn-alert p:empty{display:none}div.rn-alert ol,div.rn-alert ol li,div.rn-alert ul,div.rn-alert ul li{list-style:inherit!important}div.rn-alert ol,div.rn-alert ul{padding-left:30px}div.rn-alert hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0;margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}div.rn-alert h1,div.rn-alert h2,div.rn-alert h3,div.rn-alert h4,div.rn-alert h5,div.rn-alert h6{margin-top:0;color:inherit}div.rn-alert a{font-weight:700}div.rn-alert a:hover{text-decoration:underline}div.rn-alert>p{margin:0;padding:0;line-height:1}div.rn-alert>p,div.rn-alert>ul{margin-bottom:0}div.rn-alert>p+p{margin-top:5px}div.rn-alert .rn-dismiss-btn{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;position:relative;top:-2px;right:-21px;padding:0;cursor:pointer;background:0;border:0;-webkit-appearance:none;float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20);text-decoration:none}div.rn-alert-success{background-color:#dff0d8;border-color:#d6e9c6;color:#3c763d}div.rn-alert-success hr{border-top-color:#c9e2b3}div.rn-alert-success a{color:#2b542c}div.rn-alert-info{background-color:#d9edf7;border-color:#bce8f1;color:#31708f}div.rn-alert-info hr{border-top-color:#a6e1ec}div.rn-alert-info a{color:#245269}div.rn-alert-warning{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}div.rn-alert-warning hr{border-top-color:#f7e1b5}div.rn-alert-warning a{color:#66512c}div.rn-alert-danger{background-color:#f2dede;border-color:#ebccd1;color:#a94442}div.rn-alert-danger hr{border-top-color:#e4b9c0}div.rn-alert-danger a{color:#843534}</style>
|
275 |
<?php }
|
276 |
|
277 |
/**
|
409 |
if ( ! isset( $notification->date_end ) ) {
|
410 |
return false;
|
411 |
}
|
412 |
+
|
413 |
if ( empty( $notification->date_end ) || strtotime( $notification->date_end ) > time() ) {
|
414 |
return false;
|
415 |
}
|
853 |
}
|
854 |
}
|
855 |
|
856 |
+
}
|
include/compatibility.php
CHANGED
@@ -42,4 +42,91 @@ function loginpress_upgrade_1_0_22() {
|
|
42 |
}
|
43 |
}
|
44 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
?>
|
42 |
}
|
43 |
}
|
44 |
}
|
45 |
+
|
46 |
+
if ( ! class_exists( 'LoginPress_Compatibility' ) ) :
|
47 |
+
|
48 |
+
/**
|
49 |
+
* LoginPress compatibility Class is used to make LoginPress compatibile with other plugins.
|
50 |
+
* Remove conflictions.
|
51 |
+
* Add CSS Support.
|
52 |
+
* @since 1.0.3
|
53 |
+
*/
|
54 |
+
class LoginPress_Compatibility {
|
55 |
+
|
56 |
+
public function __construct() {
|
57 |
+
$this->dependencies();
|
58 |
+
}
|
59 |
+
|
60 |
+
public function dependencies() {
|
61 |
+
|
62 |
+
add_action( 'wp_print_scripts', array( $this, 'dequeue_conflicted_script' ), 100 );
|
63 |
+
add_action( 'login_headerurl', array( $this, 'remove_conflicted_action' ) );
|
64 |
+
add_action( 'init', array( $this, 'enqueue_loginpress_compatibility_script') );
|
65 |
+
}
|
66 |
+
|
67 |
+
public function enqueue_loginpress_compatibility_script() {
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Enqueue LoginPress CSS on Password_Protected plugin.
|
71 |
+
*
|
72 |
+
* Hooked to the password_protected_login_head action,
|
73 |
+
* so that it is after the script was enqueued.
|
74 |
+
* @since 1.0.3
|
75 |
+
*/
|
76 |
+
if ( class_exists( 'Password_Protected' ) ) {
|
77 |
+
add_action( 'password_protected_login_head', array( $this, 'enqueue_loginpress_script' ) );
|
78 |
+
}
|
79 |
+
}
|
80 |
+
|
81 |
+
/**
|
82 |
+
* dequeue_conflicted_script
|
83 |
+
* @since 1.0.3
|
84 |
+
*/
|
85 |
+
public function dequeue_conflicted_script() {
|
86 |
+
|
87 |
+
/**
|
88 |
+
* Dequeue the Divi Login script.
|
89 |
+
*
|
90 |
+
* Hooked to the wp_print_scripts action, with a late priority (100),
|
91 |
+
* so that it is after the script was enqueued.
|
92 |
+
* @since 1.0.3
|
93 |
+
*/
|
94 |
+
if ( class_exists( 'ET_Divi_100_Custom_Login_Page_Config' ) ) {
|
95 |
+
wp_dequeue_style( 'custom-login-pages' );
|
96 |
+
wp_dequeue_script( 'custom-login-pages-icon-font' );
|
97 |
+
wp_dequeue_script( 'custom-login-pages-scripts' );
|
98 |
+
}
|
99 |
+
}
|
100 |
+
|
101 |
+
/**
|
102 |
+
* remove_conflicted_action
|
103 |
+
* @since 1.0.3
|
104 |
+
*/
|
105 |
+
public function remove_conflicted_action() {
|
106 |
+
|
107 |
+
/**
|
108 |
+
* Remove the Divi login_footer hook 'print_styles'
|
109 |
+
*So that confliction is removed.
|
110 |
+
*
|
111 |
+
* @since 1.0.3
|
112 |
+
*/
|
113 |
+
if ( class_exists( 'ET_Divi_100_Custom_Login_Page_Config' ) ) {
|
114 |
+
|
115 |
+
remove_action( 'login_footer', array( ET_Divi_100_Custom_Login_Page::instance(), 'print_styles' ) );
|
116 |
+
}
|
117 |
+
}
|
118 |
+
|
119 |
+
/**
|
120 |
+
* Include LoginPress CSS for Support with other plugins.
|
121 |
+
* @since 1.0.3
|
122 |
+
*/
|
123 |
+
public function enqueue_loginpress_script() {
|
124 |
+
include( LOGINPRESS_DIR_PATH . 'css/style-presets.php' );
|
125 |
+
include( LOGINPRESS_DIR_PATH . 'css/style-login.php' );
|
126 |
+
}
|
127 |
+
}
|
128 |
+
|
129 |
+
endif;
|
130 |
+
|
131 |
+
new LoginPress_Compatibility;
|
132 |
?>
|
include/create-loginpress-page.php
ADDED
@@ -0,0 +1,205 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Create LoginPress Page.
|
4 |
+
*
|
5 |
+
* @package LoginPress
|
6 |
+
* @author WPBrigade
|
7 |
+
* @since 1.1.3
|
8 |
+
*/
|
9 |
+
|
10 |
+
// Exit if accessed directly.
|
11 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
12 |
+
exit;
|
13 |
+
}
|
14 |
+
|
15 |
+
/**
|
16 |
+
*
|
17 |
+
*/
|
18 |
+
class LoginPress_Page_Create {
|
19 |
+
|
20 |
+
function __construct()
|
21 |
+
{
|
22 |
+
$this->_init();
|
23 |
+
$this->_hooks();
|
24 |
+
}
|
25 |
+
|
26 |
+
function _hooks(){
|
27 |
+
add_action( 'wpmu_new_blog', array( $this, 'loginpress_new_site_created' ), 10, 6 );
|
28 |
+
}
|
29 |
+
|
30 |
+
public function _init(){
|
31 |
+
global $wpdb;
|
32 |
+
|
33 |
+
if ( ! current_user_can( 'activate_plugins' ) ) {
|
34 |
+
return;
|
35 |
+
}
|
36 |
+
|
37 |
+
if ( is_multisite() ) {
|
38 |
+
|
39 |
+
foreach ( $wpdb->get_col( "SELECT blog_id FROM $wpdb->blogs LIMIT 100" ) as $blog_id ) {
|
40 |
+
switch_to_blog( $blog_id );
|
41 |
+
$this->loginpress_run_install();
|
42 |
+
restore_current_blog();
|
43 |
+
}
|
44 |
+
|
45 |
+
} else {
|
46 |
+
$this->loginpress_run_install();
|
47 |
+
}
|
48 |
+
}
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Run the LoginPress install process
|
52 |
+
*
|
53 |
+
* @return void
|
54 |
+
*/
|
55 |
+
public function loginpress_run_install() {
|
56 |
+
|
57 |
+
/* translators: 1: Name of this plugin */
|
58 |
+
$post_content = sprintf( __( '<p>This page is used by %1$s to preview the login page in the Customizer.</p>', 'loginpress' ), 'LoginPress' );
|
59 |
+
|
60 |
+
$pages = apply_filters(
|
61 |
+
'loginpress_create_pages', array(
|
62 |
+
'loginpress' => array(
|
63 |
+
'name' => _x( 'loginpress', 'Page slug', 'loginpress' ),
|
64 |
+
'title' => _x( 'LoginPress', 'Page title', 'loginpress' ),
|
65 |
+
'content' => $post_content,
|
66 |
+
),
|
67 |
+
)
|
68 |
+
);
|
69 |
+
|
70 |
+
foreach ( $pages as $key => $page ) {
|
71 |
+
$this->loginpress_create_page( esc_sql( $page['name'] ), 'loginpress_page', $page['title'], $page['content'] );
|
72 |
+
}
|
73 |
+
}
|
74 |
+
|
75 |
+
/**
|
76 |
+
* Create a page and store the ID in an option.
|
77 |
+
*
|
78 |
+
* @param mixed $slug Slug for the new page.
|
79 |
+
* @param string $option Option name to store the page's ID.
|
80 |
+
* @param string $page_title (default: '') Title for the new page.
|
81 |
+
* @param string $page_content (default: '') Content for the new page.
|
82 |
+
* @return int page ID
|
83 |
+
*/
|
84 |
+
public function loginpress_create_page( $slug, $option = '', $page_title = '', $page_content = '' ) {
|
85 |
+
global $wpdb;
|
86 |
+
|
87 |
+
// Set up options.
|
88 |
+
$options = array();
|
89 |
+
|
90 |
+
// Pull options from WP.
|
91 |
+
$loginpress_setting = get_option( 'loginpress_setting', array() );
|
92 |
+
$option_value = array_key_exists( 'loginpress_page', $loginpress_setting ) ? $loginpress_setting['loginpress_page'] : false;
|
93 |
+
|
94 |
+
if ( $option_value > 0 && ( $page_object = get_post( $option_value ) ) ) {
|
95 |
+
if ( 'page' === $page_object->post_type && ! in_array( $page_object->post_status, array( 'pending', 'trash', 'future', 'auto-draft' ), true ) ) {
|
96 |
+
// Valid page is already in place.
|
97 |
+
return $page_object->ID;
|
98 |
+
}
|
99 |
+
}
|
100 |
+
|
101 |
+
// Search for an existing page with the specified page slug.
|
102 |
+
$loginpress_page_found = $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_type='page' AND post_status NOT IN ( 'pending', 'trash', 'future', 'auto-draft' ) AND post_name = %s LIMIT 1;", $slug ) );
|
103 |
+
|
104 |
+
$loginpress_page_found = apply_filters( 'loginpress_create_page_id', $loginpress_page_found, $slug, $page_content );
|
105 |
+
|
106 |
+
if ( $loginpress_page_found ) {
|
107 |
+
|
108 |
+
if ( $option ) {
|
109 |
+
|
110 |
+
$options['loginpress_page'] = $loginpress_page_found;
|
111 |
+
$loginpress_page_found = isset( $page_id ) ? $loginpress_page_found : $option_value;
|
112 |
+
$merged_options = array_merge( $loginpress_setting, $options );
|
113 |
+
$loginpress_setting = $merged_options;
|
114 |
+
|
115 |
+
update_option( 'loginpress_setting', $loginpress_setting );
|
116 |
+
}
|
117 |
+
return $loginpress_page_found;
|
118 |
+
}
|
119 |
+
|
120 |
+
// Search for an existing page with the specified page slug.
|
121 |
+
$loginpress_trashed_found = $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_type='page' AND post_status = 'trash' AND post_name = %s LIMIT 1;", $slug ) );
|
122 |
+
|
123 |
+
if ( $loginpress_trashed_found ) {
|
124 |
+
$page_id = $loginpress_trashed_found;
|
125 |
+
$page_data = array(
|
126 |
+
'ID' => $page_id,
|
127 |
+
'post_status' => 'publish',
|
128 |
+
);
|
129 |
+
|
130 |
+
wp_update_post( $page_data );
|
131 |
+
|
132 |
+
} else {
|
133 |
+
|
134 |
+
$page_data = array(
|
135 |
+
'post_status' => 'publish',
|
136 |
+
'post_type' => 'page',
|
137 |
+
'post_author' => 1,
|
138 |
+
'post_name' => $slug,
|
139 |
+
'post_title' => $page_title,
|
140 |
+
'post_content' => $page_content,
|
141 |
+
'comment_status' => 'closed',
|
142 |
+
);
|
143 |
+
|
144 |
+
$page_id = wp_insert_post( $page_data );
|
145 |
+
}
|
146 |
+
|
147 |
+
if ( $option ) {
|
148 |
+
|
149 |
+
$options['loginpress_page'] = $page_id;
|
150 |
+
$page_id = isset( $page_id ) ? $page_id : $option_value;
|
151 |
+
$merged_options = array_merge( $loginpress_setting, $options );
|
152 |
+
$loginpress_setting = $merged_options;
|
153 |
+
|
154 |
+
update_option( 'loginpress_setting', $loginpress_setting );
|
155 |
+
}
|
156 |
+
|
157 |
+
// Assign the LoginPress template.
|
158 |
+
$this->loginpress_attach_template_to_page( $page_id, 'template-loginpress.php' );
|
159 |
+
|
160 |
+
return $page_id;
|
161 |
+
}
|
162 |
+
|
163 |
+
/**
|
164 |
+
* Attaches the specified template to the page identified by the specified name.
|
165 |
+
*
|
166 |
+
* @param int|int $page The id of the page to attach the template.
|
167 |
+
* @param int|int $template The template's filename (assumes .php' is specified).
|
168 |
+
*
|
169 |
+
* @returns -1 if the page does not exist; otherwise, the ID of the page.
|
170 |
+
*/
|
171 |
+
public function loginpress_attach_template_to_page( $page, $template ) {
|
172 |
+
|
173 |
+
// Only attach the template if the page exists.
|
174 |
+
if ( -1 !== $page ) {
|
175 |
+
update_post_meta( $page, '_wp_page_template', $template );
|
176 |
+
}
|
177 |
+
|
178 |
+
return $page;
|
179 |
+
}
|
180 |
+
|
181 |
+
/**
|
182 |
+
* When a new Blog is created in multisite, check if LoginPress is network activated, and run the installer
|
183 |
+
*
|
184 |
+
* @param int|int $blog_id The Blog ID created.
|
185 |
+
* @param int|int $user_id The User ID set as the admin.
|
186 |
+
* @param string $domain The URL.
|
187 |
+
* @param string $path Site Path.
|
188 |
+
* @param int|int $site_id The Site ID.
|
189 |
+
* @param array|array $meta Blog Meta.
|
190 |
+
* @return void
|
191 |
+
*/
|
192 |
+
public function loginpress_new_site_created( $blog_id, $user_id, $domain, $path, $site_id, $meta ) {
|
193 |
+
|
194 |
+
if ( is_plugin_active_for_network( plugin_basename( LOGINPRESS_ROOT_FILE ) ) ) {
|
195 |
+
|
196 |
+
switch_to_blog( $blog_id );
|
197 |
+
$this->_init();
|
198 |
+
restore_current_blog();
|
199 |
+
|
200 |
+
}
|
201 |
+
}
|
202 |
+
}
|
203 |
+
|
204 |
+
|
205 |
+
?>
|
include/customizer-strings.php
ADDED
@@ -0,0 +1,125 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Customizer strings for the logo control.
|
4 |
+
* @since 1.1.3
|
5 |
+
*/
|
6 |
+
$logo_range_control = array( 'customize_logo_width', 'customize_logo_height', 'customize_logo_padding' );
|
7 |
+
$logo_range_default = array( '84', '84', '0' );
|
8 |
+
$logo_range_label = array( __( 'Logo Width:', 'loginpress' ), __( 'Logo Height:', 'loginpress' ), __( 'Space Bottom:', 'loginpress' ) );
|
9 |
+
$logo_range_attrs = array(
|
10 |
+
array( 'min' => 0, 'max' => 500, 'step' => 1, 'suffix' => 'px' ),
|
11 |
+
array( 'min' => 0, 'max' => 500, 'step' => 1, 'suffix' => 'px' ),
|
12 |
+
array( 'min' => 0, 'max' => 100, 'step' => 1, 'suffix' => 'px' )
|
13 |
+
);
|
14 |
+
$logo_range_unit = array( 'px', 'px', 'px' );
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Customizer strings for the grouping control.
|
18 |
+
* @since 1.1.3
|
19 |
+
*/
|
20 |
+
$group_control = array( 'login_input_group', 'login_label_group', 'login_form_group', 'footer_form_group', 'footer_back_group', 'footer_group' );
|
21 |
+
$group_label = array(
|
22 |
+
__( 'Input Fields:', 'loginpress'),
|
23 |
+
__( 'Input Field Labels:', 'loginpress'),
|
24 |
+
__( 'Login Form:', 'loginpress'),
|
25 |
+
__( 'Lost Your Password Text', 'loginpress' ),
|
26 |
+
__( 'Back To Site Text', 'loginpress' ),
|
27 |
+
__( 'LoginPress Footer Text', 'loginpress' ) );
|
28 |
+
$group_info = array(
|
29 |
+
__( 'This section helps you to easily Customize the login form input field elements.', 'loginpress' ),
|
30 |
+
__( 'This section helps you to easily Customize the login form input field labels.', 'loginpress' ),
|
31 |
+
__( 'This section helps you to easily Customize the login form elements whether they are form lables, fields or backgrounds.', 'loginpress' ),
|
32 |
+
__( ' Customize the "Lost your password" and "Register" text section under the form.', 'loginpress' ),
|
33 |
+
__( 'Customize the "Back to" text section under the form.', 'loginpress' ),
|
34 |
+
__( 'Customize the copyright note and branding sections at the footer of login page.', 'loginpress' ) );
|
35 |
+
/** ------------------Grouping Control-------------------- */
|
36 |
+
|
37 |
+
/**
|
38 |
+
* [ Customizer strings for the section login form. ]
|
39 |
+
* @since 1.1.3
|
40 |
+
*/
|
41 |
+
$form_range_control = array( 'customize_form_width', 'customize_form_height', 'customize_form_radius', 'customize_form_shadow', 'customize_form_opacity', 'textfield_width', 'textfield_radius', 'textfield_shadow', 'textfield_shadow_opacity', 'customize_form_label', 'remember_me_font_size' );
|
42 |
+
$form_range_default = array( '350', '200', '0', '0', '0', '100', '0', '0', '80', '14', '13' );
|
43 |
+
$form_range_label = array(
|
44 |
+
__( 'Form Width:', 'loginpress' ),
|
45 |
+
__( 'Form Minimum Height:', 'loginpress' ),
|
46 |
+
__( 'Form Radius:', 'loginpress' ),
|
47 |
+
__( 'Form Shadow:', 'loginpress' ),
|
48 |
+
__( 'Form Shadow Opacity:', 'loginpress' ),
|
49 |
+
__( 'Input Text Field Width:', 'loginpress' ),
|
50 |
+
__( 'Input Text Field Radius:', 'loginpress' ),
|
51 |
+
__( 'Input Text Field Shadow:', 'loginpress' ),
|
52 |
+
__( 'Input Text Field Shadow Opacity:', 'loginpress' ),
|
53 |
+
__( 'Input Field Label Font Size:', 'loginpress' ),
|
54 |
+
__( 'Remember Me Font Size:', 'loginpress' ) );
|
55 |
+
$form_range_attrs = array(
|
56 |
+
array( 'min' => 320, 'max' => 800, 'step' => 1, 'suffix' => 'px' ), // form width
|
57 |
+
array( 'min' => 0, 'max' => 500, 'step' => 1, 'suffix' => 'px' ), // form height
|
58 |
+
array( 'min' => 0, 'max' => 100, 'step' => 1, 'suffix' => 'px' ), // form radius
|
59 |
+
array( 'min' => 0, 'max' => 30, 'step' => 1, 'suffix' => 'px' ), // form shadow
|
60 |
+
array( 'min' => 0, 'max' => 100, 'step' => 1, 'suffix' => '%' ), // form Opacity
|
61 |
+
array( 'min' => 0, 'max' => 100, 'step' => 1, 'suffix' => '%' ), // textfield width
|
62 |
+
array( 'min' => 0, 'max' => 30, 'step' => 1, 'suffix' => 'px' ), // textfield radius
|
63 |
+
array( 'min' => 0, 'max' => 30, 'step' => 1, 'suffix' => 'px' ), // textfield shadow
|
64 |
+
array( 'min' => 0, 'max' => 100, 'step' => 1, 'suffix' => '%' ), // textfield Opacity
|
65 |
+
array( 'min' => 9, 'max' => 30, 'step' => 1, 'suffix' => 'px' ), // testfield label
|
66 |
+
array( 'min' => 9, 'max' => 30, 'step' => 1, 'suffix' => 'px' ) // readme label
|
67 |
+
);
|
68 |
+
$form_range_unit = array( 'px', 'px', 'px', 'px', '%', '%', 'px', 'px', '%', 'px', 'px' );
|
69 |
+
//--------------------
|
70 |
+
$form_color_control = array( 'form_background_color', 'textfield_background_color', 'textfield_color', 'textfield_label_color', 'remember_me_label_size' );
|
71 |
+
$form_color_default = array( '#FFF', '#FFF', '#333', '#777', '#72777c' );
|
72 |
+
$form_color_label = array(
|
73 |
+
__( 'Form Background Color:', 'loginpress' ),
|
74 |
+
__( 'Input Field Background Color:', 'loginpress' ),
|
75 |
+
__( 'Input Field Text Color:', 'loginpress' ),
|
76 |
+
__( 'Input Field Label Color:', 'loginpress' ),
|
77 |
+
__( 'Remember me Label Color:', 'loginpress' ),
|
78 |
+
);
|
79 |
+
//--------------------
|
80 |
+
$form_control = array( 'customize_form_padding', 'customize_form_border', 'textfield_margin', 'form_username_label', 'form_password_label' );
|
81 |
+
$form_default = array( '0 24px 12px', '', '2px 6px 18px 0px', __( 'Username or Email Address', 'loginpress' ), __( 'Password', 'loginpress' ) );
|
82 |
+
$form_label = array(
|
83 |
+
__( 'Form Padding:', 'loginpress' ),
|
84 |
+
__( 'Border (Example: 2px dotted black):', 'loginpress' ),
|
85 |
+
__( 'Input Text Field Margin:', 'loginpress' ),
|
86 |
+
__( 'Username Label:', 'loginpress' ),
|
87 |
+
__( 'Password Label:', 'loginpress' ),
|
88 |
+
);
|
89 |
+
/** -----------------Sectin Login Form------------------ */
|
90 |
+
|
91 |
+
/**
|
92 |
+
* [ Customizer strings for the section button beauty. ]
|
93 |
+
* @since 1.1.3
|
94 |
+
*/
|
95 |
+
$button_control = array( 'custom_button_color', 'button_border_color', 'button_hover_color', 'button_hover_border', 'custom_button_shadow', 'button_text_color' );
|
96 |
+
$button_default = array( '#2EA2CC', '#0074A2', '#1E8CBE', '#0074A2', '#78C8E6', '#FFF' );
|
97 |
+
$button_label = array(
|
98 |
+
__( 'Button Color:', 'loginpress' ),
|
99 |
+
__( 'Button Border Color:', 'loginpress' ),
|
100 |
+
__( 'Button Color (Hover):', 'loginpress' ),
|
101 |
+
__( 'Button Border (Hover):', 'loginpress' ),
|
102 |
+
__( 'Button Box Shadow:', 'loginpress' ),
|
103 |
+
__( 'Button Text Color:', 'loginpress' )
|
104 |
+
);
|
105 |
+
|
106 |
+
$button_range_control = array( 'login_button_size', 'login_button_top', 'login_button_bottom', 'login_button_radius', 'login_button_shadow', 'login_button_shadow_opacity', 'login_button_text_size' );
|
107 |
+
$button_range_default = array( '100', '13', '13', '5', '0', '80', '15' );
|
108 |
+
$button_range_label = array( __( 'Button Size:', 'loginpress' ), __( 'Button Top Padding:', 'loginpress' ), __( 'Button Bottom Padding:', 'loginpress' ), __( 'Radius:', 'loginpress' ), __( 'Shadow:', 'loginpress' ), __( 'Shadow Opacity:', 'loginpress' ), __( 'Text Size:', 'loginpress' ) );
|
109 |
+
$button_range_attrs = array(
|
110 |
+
array( 'min' => 20, 'max' => 100, 'step' => 1, 'suffix' => '%' ),
|
111 |
+
array( 'min' => 0, 'max' => 30, 'step' => 1, 'suffix' => 'px' ),
|
112 |
+
array( 'min' => 0, 'max' => 30, 'step' => 1, 'suffix' => 'px' ),
|
113 |
+
array( 'min' => 0, 'max' => 50, 'step' => 1, 'suffix' => 'px' ),
|
114 |
+
array( 'min' => 0, 'max' => 30, 'step' => 1, 'suffix' => 'px' ),
|
115 |
+
array( 'min' => 0, 'max' => 100, 'step' => 1, 'suffix' => 'px' ),
|
116 |
+
array( 'min' => 7, 'max' => 35, 'step' => 1, 'suffix' => 'px' ),
|
117 |
+
);
|
118 |
+
$button_range_unit = array( '%', 'px', 'px', 'px', 'px', '%', 'px' );
|
119 |
+
/** -----------------Sectin Button Beauty------------------ */
|
120 |
+
|
121 |
+
/**
|
122 |
+
* [ Customizer strings for the group close. ]
|
123 |
+
* @since 1.1.3
|
124 |
+
*/
|
125 |
+
$close_control = array( 'login_input_br', 'login_label_br', 'login_form_br', 'footer_form_br', 'footer_back_br', 'footer_br' );
|
include/deactivate_modal.php
CHANGED
@@ -79,17 +79,32 @@
|
|
79 |
.loginpress-spinner img{
|
80 |
margin-top: 3px;
|
81 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
|
83 |
</style>
|
84 |
<div class="loginpress-popup-overlay">
|
85 |
<div class="loginpress-serveypanel">
|
86 |
<form action="#" method="post" id="loginpress-deactivate-form">
|
87 |
<div class="loginpress-popup-header">
|
88 |
-
<h2><?php _e( 'Quick feedback', 'loginpress' ); ?></h2>
|
89 |
</div>
|
90 |
<div class="loginpress-popup-body">
|
91 |
<h3><?php _e( 'If you have a moment, please let us know why you are deactivating:', 'loginpress' ); ?></h3>
|
92 |
<ul id="loginpress-reason-list">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
93 |
<li class="loginpress-reason" data-input-type="" data-input-placeholder="">
|
94 |
<label>
|
95 |
<span>
|
@@ -203,12 +218,25 @@
|
|
203 |
});
|
204 |
$('input[type="radio"][name="loginpress-selected-reason"]').on('click', function(event) {
|
205 |
$(".loginpress-popup-allow-deactivate").removeAttr('disabled');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
206 |
});
|
207 |
$(document).on('submit', '#loginpress-deactivate-form', function(event) {
|
208 |
event.preventDefault();
|
209 |
|
210 |
var _reason = $('input[type="radio"][name="loginpress-selected-reason"]:checked').val();
|
211 |
var _reason_details = '';
|
|
|
212 |
if ( _reason == 2 ) {
|
213 |
_reason_details = $("input[type='text'][name='better_plugin']").val();
|
214 |
} else if ( _reason == 7 ) {
|
@@ -252,6 +280,7 @@
|
|
252 |
$(".loginpress-reason-input").hide();
|
253 |
$('body').removeClass('loginpress-hidden');
|
254 |
$('.message.error-message').hide();
|
|
|
255 |
}
|
256 |
});
|
257 |
|
79 |
.loginpress-spinner img{
|
80 |
margin-top: 3px;
|
81 |
}
|
82 |
+
.loginpress-pro-message{
|
83 |
+
padding-left: 24px;
|
84 |
+
color: red;
|
85 |
+
font-weight: 600;
|
86 |
+
display: none;
|
87 |
+
}
|
88 |
|
89 |
</style>
|
90 |
<div class="loginpress-popup-overlay">
|
91 |
<div class="loginpress-serveypanel">
|
92 |
<form action="#" method="post" id="loginpress-deactivate-form">
|
93 |
<div class="loginpress-popup-header">
|
94 |
+
<h2><?php _e( 'Quick feedback about LoginPress', 'loginpress' ); ?></h2>
|
95 |
</div>
|
96 |
<div class="loginpress-popup-body">
|
97 |
<h3><?php _e( 'If you have a moment, please let us know why you are deactivating:', 'loginpress' ); ?></h3>
|
98 |
<ul id="loginpress-reason-list">
|
99 |
+
<li class="loginpress-reason loginpress-reason-pro" data-input-type="" data-input-placeholder="">
|
100 |
+
<label>
|
101 |
+
<span>
|
102 |
+
<input type="radio" name="loginpress-selected-reason" value="pro">
|
103 |
+
</span>
|
104 |
+
<span><?php _e( " I upgraded to LoginPress Pro", 'loginpress' ); ?></span>
|
105 |
+
</label>
|
106 |
+
<div class="loginpress-pro-message"><?php _e( 'No need to deactivate this LoginPress Core version. Pro version works as an add-on with Core version.', 'loginpress' ); ?></div>
|
107 |
+
</li>
|
108 |
<li class="loginpress-reason" data-input-type="" data-input-placeholder="">
|
109 |
<label>
|
110 |
<span>
|
218 |
});
|
219 |
$('input[type="radio"][name="loginpress-selected-reason"]').on('click', function(event) {
|
220 |
$(".loginpress-popup-allow-deactivate").removeAttr('disabled');
|
221 |
+
$(".loginpress-popup-skip-feedback").removeAttr('disabled');
|
222 |
+
$('.message.error-message').hide();
|
223 |
+
$('.loginpress-pro-message').hide();
|
224 |
+
});
|
225 |
+
|
226 |
+
$('.loginpress-reason-pro label').on('click', function(){
|
227 |
+
if($(this).find('input[type="radio"]').is(':checked')){
|
228 |
+
$(this).next('.loginpress-pro-message').show().end().end().parent().siblings().find('.loginpress-reason-input').hide();
|
229 |
+
$(this).next('.loginpress-pro-message').show()
|
230 |
+
$('.loginpress-popup-allow-deactivate').attr('disabled', 'disabled');
|
231 |
+
$('.loginpress-popup-skip-feedback').attr('disabled', 'disabled');
|
232 |
+
}
|
233 |
});
|
234 |
$(document).on('submit', '#loginpress-deactivate-form', function(event) {
|
235 |
event.preventDefault();
|
236 |
|
237 |
var _reason = $('input[type="radio"][name="loginpress-selected-reason"]:checked').val();
|
238 |
var _reason_details = '';
|
239 |
+
|
240 |
if ( _reason == 2 ) {
|
241 |
_reason_details = $("input[type='text'][name='better_plugin']").val();
|
242 |
} else if ( _reason == 7 ) {
|
280 |
$(".loginpress-reason-input").hide();
|
281 |
$('body').removeClass('loginpress-hidden');
|
282 |
$('.message.error-message').hide();
|
283 |
+
$('.loginpress-pro-message').hide();
|
284 |
}
|
285 |
});
|
286 |
|
include/template-loginpress.php
ADDED
@@ -0,0 +1,560 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Template Name: LoginPress
|
4 |
+
*
|
5 |
+
* Template to display the WordPress login page in the WP-Customizer.
|
6 |
+
*
|
7 |
+
* @package LoginPress
|
8 |
+
* @author WPBrigade
|
9 |
+
* @since 1.1.3
|
10 |
+
*/
|
11 |
+
|
12 |
+
// Redirect if viewed from outside the Customizer.
|
13 |
+
|
14 |
+
if ( ! is_customize_preview() ) {
|
15 |
+
|
16 |
+
$loginpress_obj = new LoginPress();
|
17 |
+
$loginpress_page = $loginpress_obj->get_loginpress_page();;
|
18 |
+
|
19 |
+
$page = get_permalink( $loginpress_page );
|
20 |
+
|
21 |
+
// Generate the redirect url.
|
22 |
+
$url = add_query_arg(
|
23 |
+
array(
|
24 |
+
'autofocus[panel]' => 'loginpress_panel',
|
25 |
+
'return' => admin_url( 'index.php' ),
|
26 |
+
'url' => rawurlencode( $page ),
|
27 |
+
),
|
28 |
+
admin_url( 'customize.php' )
|
29 |
+
);
|
30 |
+
|
31 |
+
wp_safe_redirect( $url );
|
32 |
+
}
|
33 |
+
|
34 |
+
/** Make sure that the WordPress bootstrap has run before continuing. */
|
35 |
+
require( ABSPATH . '/wp-load.php' );
|
36 |
+
|
37 |
+
// Redirect to https login if forced to use SSL
|
38 |
+
if ( force_ssl_admin() && ! is_ssl() ) {
|
39 |
+
if ( 0 === strpos($_SERVER['REQUEST_URI'], 'http') ) {
|
40 |
+
wp_redirect( set_url_scheme( $_SERVER['REQUEST_URI'], 'https' ) );
|
41 |
+
exit();
|
42 |
+
} else {
|
43 |
+
wp_redirect( 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
|
44 |
+
exit();
|
45 |
+
}
|
46 |
+
}
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Output the login page header.
|
50 |
+
*
|
51 |
+
* @param string $title Optional. WordPress login Page title to display in the `<title>` element.
|
52 |
+
* Default 'Log In'.
|
53 |
+
* @param string $message Optional. Message to display in header. Default empty.
|
54 |
+
* @param WP_Error $wp_error Optional. The error to pass. Default empty.
|
55 |
+
*/
|
56 |
+
function login_header( $title = 'Log In', $message = '', $wp_error = '' ) {
|
57 |
+
global $error, $interim_login, $action;
|
58 |
+
|
59 |
+
// Don't index any of these forms
|
60 |
+
add_action( 'login_head', 'wp_no_robots' );
|
61 |
+
|
62 |
+
add_action( 'login_head', 'wp_login_viewport_meta' );
|
63 |
+
|
64 |
+
if ( empty($wp_error) )
|
65 |
+
$wp_error = new WP_Error();
|
66 |
+
|
67 |
+
$login_title = get_bloginfo( 'name', 'display' );
|
68 |
+
|
69 |
+
/* translators: Login screen title. 1: Login screen name, 2: Network or site name */
|
70 |
+
$login_title = sprintf( __( '%1$s ‹ %2$s — WordPress' ), $title, $login_title );
|
71 |
+
|
72 |
+
/**
|
73 |
+
* Filters the title tag content for login page.
|
74 |
+
*
|
75 |
+
* @since 4.9.0
|
76 |
+
*
|
77 |
+
* @param string $login_title The page title, with extra context added.
|
78 |
+
* @param string $title The original page title.
|
79 |
+
*/
|
80 |
+
$login_title = apply_filters( 'login_title', $login_title, $title );
|
81 |
+
|
82 |
+
?><!DOCTYPE html>
|
83 |
+
<!--[if IE 8]>
|
84 |
+
<html xmlns="http://www.w3.org/1999/xhtml" class="ie8" <?php language_attributes(); ?>>
|
85 |
+
<![endif]-->
|
86 |
+
<!--[if !(IE 8) ]><!-->
|
87 |
+
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
|
88 |
+
<!--<![endif]-->
|
89 |
+
<head>
|
90 |
+
<title><?php echo $login_title; ?></title>
|
91 |
+
<?php
|
92 |
+
|
93 |
+
wp_enqueue_style( 'login' );
|
94 |
+
|
95 |
+
/**
|
96 |
+
* Enqueue scripts and styles for the login page.
|
97 |
+
*
|
98 |
+
* @since 3.1.0
|
99 |
+
*/
|
100 |
+
do_action( 'login_enqueue_scripts' );
|
101 |
+
|
102 |
+
/**
|
103 |
+
* Fires in the login page header after scripts are enqueued.
|
104 |
+
*
|
105 |
+
* @since 2.1.0
|
106 |
+
*/
|
107 |
+
do_action( 'login_head' );
|
108 |
+
|
109 |
+
$classes = array( 'login-action-' . $action, 'wp-core-ui' );
|
110 |
+
if ( is_rtl() )
|
111 |
+
$classes[] = 'rtl';
|
112 |
+
if ( $interim_login ) {
|
113 |
+
$classes[] = 'interim-login';
|
114 |
+
?>
|
115 |
+
<style type="text/css">html{background-color: transparent;}</style>
|
116 |
+
<?php
|
117 |
+
|
118 |
+
if ( 'success' === $interim_login )
|
119 |
+
$classes[] = 'interim-login-success';
|
120 |
+
}
|
121 |
+
$classes[] =' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_locale() ) ) );
|
122 |
+
|
123 |
+
/**
|
124 |
+
* Filters the login page body classes.
|
125 |
+
*
|
126 |
+
* @since 3.5.0
|
127 |
+
*
|
128 |
+
* @param array $classes An array of body classes.
|
129 |
+
* @param string $action The action that brought the visitor to the login page.
|
130 |
+
*/
|
131 |
+
$classes = apply_filters( 'login_body_class', $classes, $action );
|
132 |
+
?>
|
133 |
+
</head>
|
134 |
+
<body class="login <?php echo esc_attr( implode( ' ', $classes ) ); ?>">
|
135 |
+
<?php
|
136 |
+
/**
|
137 |
+
* Fires in the login page header after the body tag is opened.
|
138 |
+
*
|
139 |
+
* @since 4.6.0
|
140 |
+
*/
|
141 |
+
do_action( 'login_header' );
|
142 |
+
|
143 |
+
if ( is_multisite() ) {
|
144 |
+
$login_header_url = network_home_url();
|
145 |
+
$login_header_title = get_network()->site_name;
|
146 |
+
} else {
|
147 |
+
$login_header_url = __( 'https://wordpress.org/' );
|
148 |
+
$login_header_title = __( 'Powered by WordPress' );
|
149 |
+
}
|
150 |
+
|
151 |
+
/**
|
152 |
+
* Filters link URL of the header logo above login form.
|
153 |
+
*
|
154 |
+
* @since 2.1.0
|
155 |
+
*
|
156 |
+
* @param string $login_header_url Login header logo URL.
|
157 |
+
*/
|
158 |
+
$login_header_url = apply_filters( 'login_headerurl', $login_header_url );
|
159 |
+
|
160 |
+
/**
|
161 |
+
* Filters the title attribute of the header logo above login form.
|
162 |
+
*
|
163 |
+
* @since 2.1.0
|
164 |
+
*
|
165 |
+
* @param string $login_header_title Login header logo title attribute.
|
166 |
+
*/
|
167 |
+
$login_header_title = apply_filters( 'login_headertitle', $login_header_title );
|
168 |
+
|
169 |
+
/*
|
170 |
+
* To match the URL/title set above, Multisite sites have the blog name,
|
171 |
+
* while single sites get the header title.
|
172 |
+
*/
|
173 |
+
if ( is_multisite() ) {
|
174 |
+
$login_header_text = get_bloginfo( 'name', 'display' );
|
175 |
+
} else {
|
176 |
+
$login_header_text = $login_header_title;
|
177 |
+
}
|
178 |
+
|
179 |
+
?>
|
180 |
+
<div id="login">
|
181 |
+
<h1><a href="<?php echo esc_url( $login_header_url ); ?>" title="<?php echo esc_attr( $login_header_title ); ?>" tabindex="-1"><?php echo $login_header_text; ?></a></h1>
|
182 |
+
<?php
|
183 |
+
|
184 |
+
unset( $login_header_url, $login_header_title );
|
185 |
+
|
186 |
+
/**
|
187 |
+
* Filters the message to display above the login form.
|
188 |
+
*
|
189 |
+
* @since 2.1.0
|
190 |
+
*
|
191 |
+
* @param string $message Login message text.
|
192 |
+
*/
|
193 |
+
$message = apply_filters( 'login_message', $message );
|
194 |
+
if ( !empty( $message ) )
|
195 |
+
echo $message . "\n";
|
196 |
+
|
197 |
+
// In case a plugin uses $error rather than the $wp_errors object
|
198 |
+
if ( !empty( $error ) ) {
|
199 |
+
$wp_error->add('error', $error);
|
200 |
+
unset($error);
|
201 |
+
}
|
202 |
+
|
203 |
+
if ( $wp_error->get_error_code() ) {
|
204 |
+
$errors = '';
|
205 |
+
$messages = '';
|
206 |
+
foreach ( $wp_error->get_error_codes() as $code ) {
|
207 |
+
$severity = $wp_error->get_error_data( $code );
|
208 |
+
foreach ( $wp_error->get_error_messages( $code ) as $error_message ) {
|
209 |
+
if ( 'message' == $severity )
|
210 |
+
$messages .= ' ' . $error_message . "<br />\n";
|
211 |
+
else
|
212 |
+
$errors .= ' ' . $error_message . "<br />\n";
|
213 |
+
}
|
214 |
+
}
|
215 |
+
if ( ! empty( $errors ) ) {
|
216 |
+
/**
|
217 |
+
* Filters the error messages displayed above the login form.
|
218 |
+
*
|
219 |
+
* @since 2.1.0
|
220 |
+
*
|
221 |
+
* @param string $errors Login error message.
|
222 |
+
*/
|
223 |
+
echo '<div id="login_error">' . apply_filters( 'login_errors', $errors ) . "</div>\n";
|
224 |
+
}
|
225 |
+
if ( ! empty( $messages ) ) {
|
226 |
+
/**
|
227 |
+
* Filters instructional messages displayed above the login form.
|
228 |
+
*
|
229 |
+
* @since 2.5.0
|
230 |
+
*
|
231 |
+
* @param string $messages Login messages.
|
232 |
+
*/
|
233 |
+
echo '<p class="message">' . apply_filters( 'login_messages', $messages ) . "</p>\n";
|
234 |
+
}
|
235 |
+
}
|
236 |
+
} // End of login_header()
|
237 |
+
|
238 |
+
/**
|
239 |
+
* Outputs the footer for the login page.
|
240 |
+
*
|
241 |
+
* @param string $input_id Which input to auto-focus
|
242 |
+
*/
|
243 |
+
function login_footer($input_id = '') {
|
244 |
+
global $interim_login;
|
245 |
+
|
246 |
+
// Don't allow interim logins to navigate away from the page.
|
247 |
+
if ( ! $interim_login ): ?>
|
248 |
+
<p id="backtoblog"><a href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php
|
249 |
+
/* translators: %s: site title */
|
250 |
+
printf( _x( '← Back to %s', 'site' ), get_bloginfo( 'title', 'display' ) );
|
251 |
+
?></a></p>
|
252 |
+
<?php endif; ?>
|
253 |
+
|
254 |
+
</div>
|
255 |
+
|
256 |
+
<?php if ( !empty($input_id) ) : ?>
|
257 |
+
<script type="text/javascript">
|
258 |
+
try{document.getElementById('<?php echo $input_id; ?>').focus();}catch(e){}
|
259 |
+
if(typeof wpOnload=='function')wpOnload();
|
260 |
+
</script>
|
261 |
+
<?php endif; ?>
|
262 |
+
|
263 |
+
<?php
|
264 |
+
/**
|
265 |
+
* Fires in the login page footer.
|
266 |
+
*
|
267 |
+
* @since 3.1.0
|
268 |
+
*/
|
269 |
+
do_action( 'login_footer' ); ?>
|
270 |
+
<div class="clear"></div>
|
271 |
+
</body>
|
272 |
+
</html>
|
273 |
+
<?php
|
274 |
+
}
|
275 |
+
|
276 |
+
|
277 |
+
/**
|
278 |
+
* @since 3.7.0
|
279 |
+
*/
|
280 |
+
function wp_login_viewport_meta() {
|
281 |
+
?>
|
282 |
+
<meta name="viewport" content="width=device-width" />
|
283 |
+
<?php
|
284 |
+
}
|
285 |
+
|
286 |
+
|
287 |
+
$action = isset($_REQUEST['action']) ? $_REQUEST['action'] : 'login';
|
288 |
+
$errors = new WP_Error();
|
289 |
+
|
290 |
+
if ( isset($_GET['key']) )
|
291 |
+
$action = 'resetpass';
|
292 |
+
|
293 |
+
// validate action so as to default to the login screen
|
294 |
+
if ( !in_array( $action, array( 'postpass', 'logout', 'lostpassword', 'retrievepassword', 'resetpass', 'rp', 'register', 'login' ), true ) && false === has_filter( 'login_form_' . $action ) )
|
295 |
+
$action = 'login';
|
296 |
+
|
297 |
+
nocache_headers();
|
298 |
+
|
299 |
+
header('Content-Type: '.get_bloginfo('html_type').'; charset='.get_bloginfo('charset'));
|
300 |
+
|
301 |
+
if ( defined( 'RELOCATE' ) && RELOCATE ) { // Move flag is set
|
302 |
+
if ( isset( $_SERVER['PATH_INFO'] ) && ($_SERVER['PATH_INFO'] != $_SERVER['PHP_SELF']) )
|
303 |
+
$_SERVER['PHP_SELF'] = str_replace( $_SERVER['PATH_INFO'], '', $_SERVER['PHP_SELF'] );
|
304 |
+
|
305 |
+
$url = dirname( set_url_scheme( 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] ) );
|
306 |
+
if ( $url != get_option( 'siteurl' ) )
|
307 |
+
update_option( 'siteurl', $url );
|
308 |
+
}
|
309 |
+
|
310 |
+
//Set a cookie now to see if they are supported by the browser.
|
311 |
+
$secure = ( 'https' === parse_url( wp_login_url(), PHP_URL_SCHEME ) );
|
312 |
+
setcookie( TEST_COOKIE, 'WP Cookie check', 0, COOKIEPATH, COOKIE_DOMAIN, $secure );
|
313 |
+
if ( SITECOOKIEPATH != COOKIEPATH )
|
314 |
+
setcookie( TEST_COOKIE, 'WP Cookie check', 0, SITECOOKIEPATH, COOKIE_DOMAIN, $secure );
|
315 |
+
|
316 |
+
$lang = ! empty( $_GET['wp_lang'] ) ? sanitize_text_field( $_GET['wp_lang'] ) : '';
|
317 |
+
$switched_locale = switch_to_locale( $lang );
|
318 |
+
|
319 |
+
/**
|
320 |
+
* Fires when the login form is initialized.
|
321 |
+
*
|
322 |
+
* @since 3.2.0
|
323 |
+
*/
|
324 |
+
do_action( 'login_init' );
|
325 |
+
|
326 |
+
/**
|
327 |
+
* Fires before a specified login form action.
|
328 |
+
*
|
329 |
+
* The dynamic portion of the hook name, `$action`, refers to the action
|
330 |
+
* that brought the visitor to the login form. Actions include 'postpass',
|
331 |
+
* 'logout', 'lostpassword', etc.
|
332 |
+
*
|
333 |
+
* @since 2.8.0
|
334 |
+
*/
|
335 |
+
do_action( "login_form_{$action}" );
|
336 |
+
|
337 |
+
$http_post = ('POST' == $_SERVER['REQUEST_METHOD']);
|
338 |
+
$interim_login = isset($_REQUEST['interim-login']);
|
339 |
+
|
340 |
+
/**
|
341 |
+
* Filters the separator used between login form navigation links.
|
342 |
+
*
|
343 |
+
* @since 4.9.0
|
344 |
+
*
|
345 |
+
* @param string $login_link_separator The separator used between login form navigation links.
|
346 |
+
*/
|
347 |
+
$login_link_separator = apply_filters( 'login_link_separator', ' | ' );
|
348 |
+
|
349 |
+
switch ($action) {
|
350 |
+
|
351 |
+
case 'lostpassword' :
|
352 |
+
case 'retrievepassword' :
|
353 |
+
|
354 |
+
/**
|
355 |
+
* Filters the URL redirected to after submitting the lostpassword/retrievepassword form.
|
356 |
+
*
|
357 |
+
* @since 3.0.0
|
358 |
+
*
|
359 |
+
* @param string $lostpassword_redirect The redirect destination URL.
|
360 |
+
*/
|
361 |
+
$redirect_to = apply_filters( 'lostpassword_redirect', $lostpassword_redirect );
|
362 |
+
|
363 |
+
/**
|
364 |
+
* Fires before the lost password form.
|
365 |
+
*
|
366 |
+
* @since 1.5.1
|
367 |
+
*/
|
368 |
+
do_action( 'lost_password' );
|
369 |
+
|
370 |
+
login_header(__('Lost Password'), '<p class="message">' . __('Please enter your username or email address. You will receive a link to create a new password via email.') . '</p>', $errors);
|
371 |
+
|
372 |
+
$user_login = '';
|
373 |
+
|
374 |
+
if ( isset( $_POST['user_login'] ) && is_string( $_POST['user_login'] ) ) {
|
375 |
+
$user_login = wp_unslash( $_POST['user_login'] );
|
376 |
+
}
|
377 |
+
|
378 |
+
?>
|
379 |
+
|
380 |
+
<form name="lostpasswordform" id="lostpasswordform" action="<?php echo esc_url( network_site_url( 'wp-login.php?action=lostpassword', 'login_post' ) ); ?>" method="post">
|
381 |
+
<p>
|
382 |
+
<label for="user_login" ><span><?php _e( 'Username or Email Address' ); ?></span><br />
|
383 |
+
<input type="text" name="user_login" id="user_login" class="input" value="<?php echo esc_attr($user_login); ?>" size="20" /></label>
|
384 |
+
</p>
|
385 |
+
<?php
|
386 |
+
/**
|
387 |
+
* Fires inside the lostpassword form tags, before the hidden fields.
|
388 |
+
*
|
389 |
+
* @since 2.1.0
|
390 |
+
*/
|
391 |
+
do_action( 'lostpassword_form' ); ?>
|
392 |
+
<input type="hidden" name="redirect_to" value="<?php echo esc_attr( $redirect_to ); ?>" />
|
393 |
+
<p class="submit"><input type="submit" name="wp-submit" id="wp-submit" class="button button-primary button-large" value="<?php esc_attr_e('Get New Password'); ?>" /></p>
|
394 |
+
</form>
|
395 |
+
|
396 |
+
<p id="nav">
|
397 |
+
<a href="<?php echo esc_url( wp_login_url() ); ?>"><?php _e('Log in') ?></a>
|
398 |
+
<?php
|
399 |
+
if ( get_option( 'users_can_register' ) ) :
|
400 |
+
$registration_url = sprintf( '<a href="%s">%s</a>', esc_url( wp_registration_url() ), __( 'Register' ) );
|
401 |
+
|
402 |
+
echo esc_html( $login_link_separator );
|
403 |
+
|
404 |
+
/** This filter is documented in wp-includes/general-template.php */
|
405 |
+
echo apply_filters( 'register', $registration_url );
|
406 |
+
endif;
|
407 |
+
?>
|
408 |
+
</p>
|
409 |
+
|
410 |
+
<?php
|
411 |
+
login_footer('user_login');
|
412 |
+
|
413 |
+
|
414 |
+
|
415 |
+
break;
|
416 |
+
|
417 |
+
case 'resetpass' :
|
418 |
+
case 'register' :
|
419 |
+
if ( is_multisite() ) {
|
420 |
+
/**
|
421 |
+
* Filters the Multisite sign up URL.
|
422 |
+
*
|
423 |
+
* @since 3.0.0
|
424 |
+
*
|
425 |
+
* @param string $sign_up_url The sign up URL.
|
426 |
+
*/
|
427 |
+
wp_redirect( apply_filters( 'wp_signup_location', network_site_url( 'wp-signup.php' ) ) );
|
428 |
+
exit;
|
429 |
+
}
|
430 |
+
|
431 |
+
if ( !get_option('users_can_register') ) {
|
432 |
+
wp_redirect( site_url('wp-login.php?registration=disabled') );
|
433 |
+
exit();
|
434 |
+
}
|
435 |
+
|
436 |
+
$user_login = '';
|
437 |
+
$user_email = '';
|
438 |
+
|
439 |
+
if ( $http_post ) {
|
440 |
+
if ( isset( $_POST['user_login'] ) && is_string( $_POST['user_login'] ) ) {
|
441 |
+
$user_login = $_POST['user_login'];
|
442 |
+
}
|
443 |
+
|
444 |
+
if ( isset( $_POST['user_email'] ) && is_string( $_POST['user_email'] ) ) {
|
445 |
+
$user_email = wp_unslash( $_POST['user_email'] );
|
446 |
+
}
|
447 |
+
|
448 |
+
$errors = register_new_user($user_login, $user_email);
|
449 |
+
if ( !is_wp_error($errors) ) {
|
450 |
+
$redirect_to = !empty( $_POST['redirect_to'] ) ? $_POST['redirect_to'] : 'wp-login.php?checkemail=registered';
|
451 |
+
wp_safe_redirect( $redirect_to );
|
452 |
+
exit();
|
453 |
+
}
|
454 |
+
}
|
455 |
+
|
456 |
+
$registration_redirect = ! empty( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '';
|
457 |
+
/**
|
458 |
+
* Filters the registration redirect URL.
|
459 |
+
*
|
460 |
+
* @since 3.0.0
|
461 |
+
*
|
462 |
+
* @param string $registration_redirect The redirect destination URL.
|
463 |
+
*/
|
464 |
+
$redirect_to = apply_filters( 'registration_redirect', $registration_redirect );
|
465 |
+
login_header(__('Registration Form'), '<p class="message register">' . __('Register For This Site') . '</p>', $errors);
|
466 |
+
?>
|
467 |
+
<form name="registerform" id="registerform" action="<?php echo esc_url( site_url( 'wp-login.php?action=register', 'login_post' ) ); ?>" method="post" novalidate="novalidate">
|
468 |
+
<p>
|
469 |
+
<label for="user_login"><?php _e('Username') ?><br />
|
470 |
+
<input type="text" name="user_login" id="user_login" class="input" value="<?php echo esc_attr(wp_unslash($user_login)); ?>" size="20" /></label>
|
471 |
+
</p>
|
472 |
+
<p>
|
473 |
+
<label for="user_email"><?php _e('Email') ?><br />
|
474 |
+
<input type="email" name="user_email" id="user_email" class="input" value="<?php echo esc_attr( wp_unslash( $user_email ) ); ?>" size="25" /></label>
|
475 |
+
</p>
|
476 |
+
<?php
|
477 |
+
/**
|
478 |
+
* Fires following the 'Email' field in the user registration form.
|
479 |
+
*
|
480 |
+
* @since 2.1.0
|
481 |
+
*/
|
482 |
+
do_action( 'register_form' );
|
483 |
+
?>
|
484 |
+
<p id="reg_passmail"><?php _e( 'Registration confirmation will be emailed to you.' ); ?></p>
|
485 |
+
<br class="clear" />
|
486 |
+
<input type="hidden" name="redirect_to" value="<?php echo esc_attr( $redirect_to ); ?>" />
|
487 |
+
<p class="submit"><input type="submit" name="wp-submit" id="wp-submit" class="button button-primary button-large" value="<?php esc_attr_e('Register'); ?>" /></p>
|
488 |
+
</form>
|
489 |
+
|
490 |
+
<p id="nav">
|
491 |
+
<a href="<?php echo esc_url( wp_login_url() ); ?>"><?php _e( 'Log in' ); ?></a>
|
492 |
+
<?php echo esc_html( $login_link_separator ); ?>
|
493 |
+
<a href="<?php echo esc_url( wp_lostpassword_url() ); ?>"><?php _e( 'Lost your password?' ); ?></a>
|
494 |
+
</p>
|
495 |
+
|
496 |
+
<?php
|
497 |
+
login_footer('user_login');
|
498 |
+
|
499 |
+
break;
|
500 |
+
|
501 |
+
case 'login' :
|
502 |
+
default:
|
503 |
+
$secure_cookie = '';
|
504 |
+
$customize_login = isset( $_REQUEST['customize-login'] );
|
505 |
+
if ( $customize_login )
|
506 |
+
wp_enqueue_script( 'customize-base' );
|
507 |
+
|
508 |
+
login_header(__('Log In'), '', $errors);
|
509 |
+
$aria_describedby_error = '';
|
510 |
+
?>
|
511 |
+
|
512 |
+
<form name="loginform" id="loginform" action="<?php echo esc_url( site_url( 'wp-login.php', 'login_post' ) ); ?>" method="post" autocomplete="off">
|
513 |
+
<p>
|
514 |
+
<label for="user_login"><span><?php _e( 'Username or Email Address' ); ?></span><br />
|
515 |
+
<input type="text" name="log" id="user_login"<?php echo $aria_describedby_error; ?> class="input" value="<?php echo esc_attr( $user_login ); ?>" size="20" autocomplete="off"/></label>
|
516 |
+
</p>
|
517 |
+
<p>
|
518 |
+
<label for="user_pass"><span><?php _e( 'Password' ); ?></span><br />
|
519 |
+
<input type="password" name="pwd" id="user_pass"<?php echo $aria_describedby_error; ?> class="input" value="" size="20" autocomplete="off"/></label>
|
520 |
+
</p>
|
521 |
+
<?php
|
522 |
+
/**
|
523 |
+
* Fires following the 'Password' field in the login form.
|
524 |
+
*
|
525 |
+
* @since 2.1.0
|
526 |
+
*/
|
527 |
+
do_action( 'login_form' );
|
528 |
+
if (isset($_POST)) {
|
529 |
+
$rememberme = ! empty( $_POST['rememberme'] );
|
530 |
+
} else {
|
531 |
+
$rememberme = '';
|
532 |
+
}
|
533 |
+
?>
|
534 |
+
<p class="forgetmenot"><label for="rememberme"><input name="rememberme" type="checkbox" id="rememberme" value="forever" <?php checked( $rememberme ); ?> /> <?php esc_html_e( 'Remember Me' ); ?></label></p>
|
535 |
+
<p class="submit">
|
536 |
+
<input type="submit" name="wp-submit" id="wp-submit" class="button button-primary button-large" value="<?php esc_attr_e('Log In'); ?>" />
|
537 |
+
</p>
|
538 |
+
</form>
|
539 |
+
|
540 |
+
<?php if ( ! $interim_login ) { ?>
|
541 |
+
<p id="nav">
|
542 |
+
<?php if ( ! isset( $_GET['checkemail'] ) || ! in_array( $_GET['checkemail'], array( 'confirm', 'newpass' ) ) ) :
|
543 |
+
if ( get_option( 'users_can_register' ) ) :
|
544 |
+
$registration_url = sprintf( '<a href="%s">%s</a>', esc_url( wp_registration_url() ), __( 'Register' ) );
|
545 |
+
|
546 |
+
/** This filter is documented in wp-includes/general-template.php */
|
547 |
+
echo apply_filters( 'register', $registration_url );
|
548 |
+
|
549 |
+
echo esc_html( $login_link_separator );
|
550 |
+
endif;
|
551 |
+
?>
|
552 |
+
<a href="<?php echo esc_url( wp_lostpassword_url() ); ?>"><?php _e( 'Lost your password?' ); ?></a>
|
553 |
+
<?php endif; ?>
|
554 |
+
</p>
|
555 |
+
<?php } ?>
|
556 |
+
|
557 |
+
<?php
|
558 |
+
login_footer();
|
559 |
+
break;
|
560 |
+
} // end action switch
|
js/admin-custom.js
CHANGED
@@ -14,15 +14,15 @@
|
|
14 |
'https://www.youtube.com/embed/GMAwsHomJlE');
|
15 |
});
|
16 |
|
17 |
-
$("#wpb-loginpress_setting\\[enable_repatcha_promo\\]").on('click', function() {
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
}); // on click promo checkbox.
|
26 |
|
27 |
// Remove Disabled attribute from Import Button.
|
28 |
$( '#loginPressImport' ).on( 'change', function( event ) {
|
14 |
'https://www.youtube.com/embed/GMAwsHomJlE');
|
15 |
});
|
16 |
|
17 |
+
// $("#wpb-loginpress_setting\\[enable_repatcha_promo\\]").on('click', function() {
|
18 |
+
//
|
19 |
+
// var promotion = $('#wpb-loginpress_setting\\[enable_repatcha_promo\\]');
|
20 |
+
// if ( promotion.is(":checked") ) {
|
21 |
+
// $('tr.recapthca-promo-img').show();
|
22 |
+
// } else {
|
23 |
+
// $('tr.recapthca-promo-img').hide();
|
24 |
+
// }
|
25 |
+
// }); // on click promo checkbox.
|
26 |
|
27 |
// Remove Disabled attribute from Import Button.
|
28 |
$( '#loginPressImport' ).on( 'change', function( event ) {
|
js/customize-controls.js
CHANGED
@@ -1,10 +1,19 @@
|
|
1 |
/**
|
2 |
* This file handling some LIVE to the LoginPress Customizer live preview.
|
3 |
*/
|
4 |
-
jQuery(document).ready(function() {
|
5 |
|
6 |
-
|
|
|
|
|
7 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
jQuery( '.customize-control-checkbox-multiple input[type="radio"]' ).on( 'change', function() {
|
9 |
|
10 |
checkbox_values = jQuery(this)
|
@@ -28,6 +37,16 @@ jQuery(document).ready(function() {
|
|
28 |
.delay(500)
|
29 |
.trigger( 'change' );
|
30 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
} );
|
32 |
} ); // jQuery( document ).ready
|
33 |
|
@@ -39,19 +58,23 @@ jQuery(document).ready(function() {
|
|
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 |
} );
|
@@ -59,13 +82,13 @@ jQuery(document).ready(function() {
|
|
59 |
} // ! loginpress_background_img();
|
60 |
|
61 |
// function for change LoginPress CSS in real time...
|
62 |
-
function loginpress_css_property( setting, target, property ) {
|
63 |
// Update the login logo width in real time...
|
64 |
wp.customize( setting, function( value ) {
|
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 |
}
|
@@ -87,6 +110,78 @@ jQuery(document).ready(function() {
|
|
87 |
} );
|
88 |
} );
|
89 |
} // finish loginpress_css_property();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
// function for change LoginPress attribute in real time...
|
91 |
function loginpress_attr_property( setting, target, property ) {
|
92 |
wp.customize( setting, function( value ) {
|
@@ -155,6 +250,26 @@ jQuery(document).ready(function() {
|
|
155 |
} );
|
156 |
}
|
157 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
158 |
var change_theme;
|
159 |
|
160 |
/**
|
@@ -243,6 +358,29 @@ jQuery(document).ready(function() {
|
|
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]
|
@@ -314,11 +452,8 @@ jQuery(document).ready(function() {
|
|
314 |
}
|
315 |
|
316 |
// Turn Off the Dependencies controls.
|
317 |
-
$('#customize-control-loginpress_customization-
|
318 |
-
|
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 |
|
@@ -362,7 +497,6 @@ jQuery(document).ready(function() {
|
|
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 ) {
|
@@ -385,11 +519,10 @@ jQuery(document).ready(function() {
|
|
385 |
}
|
386 |
|
387 |
// Turn On the Dependencies controls.
|
388 |
-
$('#customize-control-loginpress_customization-
|
389 |
-
$('#customize-control-loginpress_customization-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
|
394 |
} // endif; conditions on behalf on themes.
|
395 |
});
|
@@ -535,6 +668,19 @@ jQuery(document).ready(function() {
|
|
535 |
});
|
536 |
});
|
537 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
538 |
/**
|
539 |
* [loginpress_new_css_property Apply Live JS on WordPress Login Page Logo]
|
540 |
* @param {[type]} loginpress_customization [Section ID]
|
@@ -544,7 +690,7 @@ jQuery(document).ready(function() {
|
|
544 |
*/
|
545 |
loginpress_new_css_property( 'loginpress_customization[customize_logo_width]', '#login h1 a', 'width', 'px' );
|
546 |
loginpress_new_css_property( 'loginpress_customization[customize_logo_height]', '#login h1 a', 'height', 'px' );
|
547 |
-
loginpress_new_css_property( 'loginpress_customization[customize_logo_padding]', '#login h1 a', '
|
548 |
|
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' );
|
@@ -678,12 +824,22 @@ jQuery(document).ready(function() {
|
|
678 |
loginpress_input_property( 'loginpress_customization[textfield_background_color]', 'background' );
|
679 |
loginpress_input_property( 'loginpress_customization[textfield_color]', 'color' );
|
680 |
|
681 |
-
loginpress_css_property( 'loginpress_customization[form_background_color]', '#loginform', 'background-color' );
|
682 |
-
loginpress_css_property( 'loginpress_customization[textfield_label_color]', '.login label', 'color' );
|
|
|
|
|
|
|
|
|
|
|
|
|
683 |
|
684 |
loginpress_background_img( 'loginpress_customization[forget_form_background]', '#lostpasswordform' );
|
685 |
loginpress_css_property( 'loginpress_customization[forget_form_background_color]', '#lostpasswordform', 'background-color' );
|
686 |
|
|
|
|
|
|
|
|
|
687 |
//Buttons starts.
|
688 |
// Update the login form button background in real time...
|
689 |
var loginPressBtnClr;
|
@@ -691,6 +847,7 @@ jQuery(document).ready(function() {
|
|
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 ) {
|
@@ -734,8 +891,10 @@ jQuery(document).ready(function() {
|
|
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 |
-
|
|
|
739 |
loginpress_find('.wp-core-ui #login .button-primary').on( 'mouseover', function() {
|
740 |
$(this).css( 'background', '' );
|
741 |
}).on( 'mouseleave', function() {
|
@@ -801,10 +960,17 @@ jQuery(document).ready(function() {
|
|
801 |
});
|
802 |
});
|
803 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
804 |
/**
|
805 |
* WordPress Login Page Footer Message.
|
806 |
*/
|
807 |
-
|
808 |
|
809 |
// loginpress_css_property( 'loginpress_customization[footer_display_text]', '.login #nav', 'display' );
|
810 |
loginpress_css_property( 'loginpress_customization[login_footer_text_decoration]', '.login #nav a', 'text-decoration' );
|
@@ -816,8 +982,8 @@ jQuery(document).ready(function() {
|
|
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 {
|
@@ -828,8 +994,8 @@ jQuery(document).ready(function() {
|
|
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 {
|
@@ -873,7 +1039,9 @@ jQuery(document).ready(function() {
|
|
873 |
});
|
874 |
|
875 |
loginpress_new_css_property( 'loginpress_customization[login_footer_font_size]', '.login #nav a', 'font-size', 'px' );
|
876 |
-
|
|
|
|
|
877 |
|
878 |
// loginpress_css_property( 'loginpress_customization[back_display_text]', '.login #backtoblog', 'display' );
|
879 |
loginpress_css_property( 'loginpress_customization[login_back_text_decoration]', '.login #backtoblog a', 'text-decoration' );
|
@@ -915,6 +1083,17 @@ jQuery(document).ready(function() {
|
|
915 |
});
|
916 |
});
|
917 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
918 |
/**
|
919 |
* Change LoginPress 'Back to Blog(link)' hover color live.
|
920 |
*/
|
@@ -956,7 +1135,7 @@ jQuery(document).ready(function() {
|
|
956 |
*/
|
957 |
loginpress_new_css_property( 'loginpress_customization[login_back_font_size]', '.login #backtoblog a', 'font-size', 'px' );
|
958 |
loginpress_css_property( 'loginpress_customization[login_back_font_size]', '.login #backtoblog a', 'font-size' );
|
959 |
-
loginpress_css_property( 'loginpress_customization[login_back_bg_color]', '.login #backtoblog', 'background-color' );
|
960 |
loginpress_footer_text_message( 'loginpress_customization[login_footer_copy_right]', '.copyRight' );
|
961 |
|
962 |
/**
|
@@ -992,8 +1171,43 @@ jQuery(document).ready(function() {
|
|
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 |
} );
|
@@ -1014,24 +1228,37 @@ jQuery(document).ready(function() {
|
|
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-
|
1019 |
-
$('#customize-control-loginpress_customization-setting_background
|
1020 |
-
|
1021 |
-
|
1022 |
-
$('#customize-control-loginpress_customization-background_image_size').css( 'display', 'list-item' );
|
1023 |
} else {
|
1024 |
-
$('#customize-control-loginpress_customization-
|
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,13 +1293,18 @@ jQuery(document).ready(function() {
|
|
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 |
});
|
1077 |
|
1078 |
})(jQuery);
|
1 |
/**
|
2 |
* This file handling some LIVE to the LoginPress Customizer live preview.
|
3 |
*/
|
4 |
+
jQuery(document).ready(function($) {
|
5 |
|
6 |
+
// Update gallery default thumbnail on load. @since 1.1.3
|
7 |
+
var defaultThumbnails = jQuery('.customize-control-checkbox-multiple input[type="radio"]:checked').next('label').find('img').attr('src');
|
8 |
+
$('.loginpress_gallery_thumbnails:first-child').find('img').attr({'src': defaultThumbnails,'title': defaultThumbnails});
|
9 |
|
10 |
+
/**
|
11 |
+
* Presets Settings
|
12 |
+
* @param {[type]} ) { checkbox_values [checkbox value]
|
13 |
+
* @return {[type]} [description]
|
14 |
+
* @since 1.0.9
|
15 |
+
* @version 1.1.3
|
16 |
+
*/
|
17 |
jQuery( '.customize-control-checkbox-multiple input[type="radio"]' ).on( 'change', function() {
|
18 |
|
19 |
checkbox_values = jQuery(this)
|
37 |
.delay(500)
|
38 |
.trigger( 'change' );
|
39 |
|
40 |
+
// Update gallery default thumbnail on presets change. @since 1.1.3
|
41 |
+
var defaultThumbnails = jQuery(this).next('label').find('img').attr('src');
|
42 |
+
$('.loginpress_gallery_thumbnails:first-child').find('img').attr({'src': defaultThumbnails,'title': defaultThumbnails});
|
43 |
+
// if theme is not Company remove label controls.
|
44 |
+
if(checkbox_values == 'default2'){
|
45 |
+
$('#customize-control-loginpress_customization-textfield_label_color,#customize-control-loginpress_customization-customize_form_label').hide();
|
46 |
+
}else{
|
47 |
+
$('#customize-control-loginpress_customization-textfield_label_color,#customize-control-loginpress_customization-customize_form_label').show();
|
48 |
+
}
|
49 |
+
|
50 |
} );
|
51 |
} ); // jQuery( document ).ready
|
52 |
|
58 |
* @param {String} [finder='#loginpress-customize'] [find class in customizer]
|
59 |
* @return {[type]} [iframe content finder]
|
60 |
* @since 1.1.0
|
61 |
+
* @version 1.1.3
|
62 |
*/
|
63 |
function loginpress_find( finder = '#loginpress-customize' ) {
|
|
|
|
|
|
|
64 |
|
65 |
+
var customizer_finder = $('#customize-preview iframe').contents().find( finder );
|
66 |
+
return customizer_finder;
|
67 |
+
}
|
68 |
+
var formbgimg = '';
|
69 |
// function for change LoginPress background-image in real time...
|
70 |
function loginpress_background_img( setting, target ) {
|
71 |
wp.customize( setting, function( value ) {
|
72 |
value.bind( function( loginPressVal ) {
|
73 |
if ( loginPressVal == '' ) {
|
74 |
+
formbgimg = '';
|
75 |
loginpress_find( target ).css( 'background-image', 'none' );
|
76 |
} else {
|
77 |
+
formbgimg = loginPressVal;
|
78 |
loginpress_find( target ).css( 'background-image', 'url(' + loginPressVal + ')' );
|
79 |
}
|
80 |
} );
|
82 |
} // ! loginpress_background_img();
|
83 |
|
84 |
// function for change LoginPress CSS in real time...
|
85 |
+
function loginpress_css_property( setting, target, property, em = false ) {
|
86 |
// Update the login logo width in real time...
|
87 |
wp.customize( setting, function( value ) {
|
88 |
value.bind( function( loginPressVal ) {
|
89 |
|
90 |
if ( loginPressVal == '' ) {
|
91 |
+
loginpress_find( target ).css( property, em );
|
92 |
} else {
|
93 |
loginpress_find( target ).css( property, loginPressVal );
|
94 |
}
|
110 |
} );
|
111 |
} );
|
112 |
} // finish loginpress_css_property();
|
113 |
+
|
114 |
+
// Declare Variable values for button shadow and button Opacity. Since 1.1.3
|
115 |
+
|
116 |
+
var loginpress_button_shadow_opacity = 'rgba(0,0,0,1)',
|
117 |
+
loginpress_button_shadow = 0,
|
118 |
+
loginpress_button_inset_shadow = '';
|
119 |
+
$(window).on('load', function(){
|
120 |
+
loginpress_button_shadow_opacity = 'rgba(0,0,0,'+(parseInt($('#customize-control-loginpress_customization-textfield_shadow_opacity').find('.loginpress-range-slider_val').val())/100)+')';
|
121 |
+
loginpress_button_shadow = $('#customize-control-loginpress_customization-textfield_shadow').find('.loginpress-range-slider_val').val();
|
122 |
+
if($('#customize-control-loginpress_customization-textfield_inset_shadow').find('.loginpress-radio.loginpress-radio-ios').is(':checked')== true){
|
123 |
+
loginpress_button_inset_shadow = ' inset';
|
124 |
+
}
|
125 |
+
loginpress_find( '#loginform input[type="text"], #loginform input[type="password"]' ).css( 'box-shadow', '0 0 ' + loginpress_button_shadow + 'px ' + loginpress_button_shadow_opacity + loginpress_button_inset_shadow );
|
126 |
+
// if theme is not Company remove label controls.
|
127 |
+
var checkbox_values = $('#customize-control-customize_presets_settings input[type=radio]:checked').val();
|
128 |
+
if(checkbox_values == 'default2'){
|
129 |
+
$('#customize-control-loginpress_customization-textfield_label_color,#customize-control-loginpress_customization-customize_form_label').hide();
|
130 |
+
}else{
|
131 |
+
$('#customize-control-loginpress_customization-textfield_label_color,#customize-control-loginpress_customization-customize_form_label').show();
|
132 |
+
}
|
133 |
+
});
|
134 |
+
|
135 |
+
// function for change LoginPress Button Shadow in real time... since 1.1.3
|
136 |
+
function loginpress_shadow_property( setting, target, property, suffix ) {
|
137 |
+
// Update the login logo width in real time...
|
138 |
+
wp.customize( setting, function( value ) {
|
139 |
+
value.bind( function( loginPressVal ) {
|
140 |
+
|
141 |
+
if ( loginPressVal == '' ) {
|
142 |
+
loginpress_find( target ).css( property, '' );
|
143 |
+
} else {
|
144 |
+
loginpress_button_shadow = loginPressVal;
|
145 |
+
loginpress_find( target ).css( property, '0 0 ' + loginPressVal + 'px ' + loginpress_button_shadow_opacity + loginpress_button_inset_shadow );
|
146 |
+
}
|
147 |
+
} );
|
148 |
+
} );
|
149 |
+
} // finish loginpress_css_property();
|
150 |
+
|
151 |
+
|
152 |
+
// function for change LoginPress CSS in real time...
|
153 |
+
function loginpress_shadow_opacity_property( setting, target, property, suffix ) {
|
154 |
+
// Update the login logo width in real time...
|
155 |
+
wp.customize( setting, function( value ) {
|
156 |
+
value.bind( function( loginPressVal ) {
|
157 |
+
|
158 |
+
if ( loginPressVal == '' ) {
|
159 |
+
// loginpress_find( target ).css( property, '' );
|
160 |
+
} else {
|
161 |
+
loginpress_button_shadow_opacity = 'rgba(0,0,0,'+(loginPressVal/100)+')';
|
162 |
+
loginpress_find( target ).css( property, '0 0 ' + loginpress_button_shadow + 'px ' + loginpress_button_shadow_opacity + loginpress_button_inset_shadow );
|
163 |
+
// loginpress_shadow_property( 'loginpress_customization[login_button_shadow]', '.login input[type="submit"]', 'box-shadow', 'px' );
|
164 |
+
}
|
165 |
+
} );
|
166 |
+
} );
|
167 |
+
} // finish loginpress_css_property();
|
168 |
+
|
169 |
+
wp.customize( 'loginpress_customization[textfield_inset_shadow]', function( value ) {
|
170 |
+
value.bind( function( loginPressVal ) {
|
171 |
+
if ( loginPressVal == true ) {
|
172 |
+
// loginpress_find( target ).css( property, '' );
|
173 |
+
loginpress_button_inset_shadow = ' inset';
|
174 |
+
|
175 |
+
} else {
|
176 |
+
loginpress_button_inset_shadow = '';
|
177 |
+
// loginpress_button_shadow_opacity = 'rgba(0,0,0,'+(loginPressVal/100)+')';
|
178 |
+
//
|
179 |
+
// loginpress_shadow_property( 'loginpress_customization[login_button_shadow]', '.login input[type="submit"]', 'box-shadow', 'px' );
|
180 |
+
}
|
181 |
+
loginpress_find( '#loginform input[type="text"], #loginform input[type="password"]' ).css( 'box-shadow', '0 0 ' + loginpress_button_shadow + 'px ' + loginpress_button_shadow_opacity + loginpress_button_inset_shadow );
|
182 |
+
} );
|
183 |
+
} );
|
184 |
+
|
185 |
// function for change LoginPress attribute in real time...
|
186 |
function loginpress_attr_property( setting, target, property ) {
|
187 |
wp.customize( setting, function( value ) {
|
250 |
} );
|
251 |
}
|
252 |
|
253 |
+
/**
|
254 |
+
* loginpress_change_form_label LoginPress (Label) Text live Control.
|
255 |
+
* @param id [Unique ID of the section. ]
|
256 |
+
* @param target [CSS Property]
|
257 |
+
* @since 1.1.3
|
258 |
+
* @return string [CSS property]
|
259 |
+
*/
|
260 |
+
function loginpress_change_form_label( id, target ) {
|
261 |
+
wp.customize( id, function( value ) {
|
262 |
+
value.bind( function( loginPressVal ) {
|
263 |
+
|
264 |
+
if ( loginPressVal == '' ) {
|
265 |
+
loginpress_find( target ).html('');
|
266 |
+
} else {
|
267 |
+
loginpress_find( target ).html( loginPressVal );
|
268 |
+
}
|
269 |
+
} );
|
270 |
+
} );
|
271 |
+
}
|
272 |
+
|
273 |
var change_theme;
|
274 |
|
275 |
/**
|
358 |
});
|
359 |
}
|
360 |
|
361 |
+
// Update the login logo width in real time...
|
362 |
+
wp.customize( 'loginpress_customization[setting_form_display_bg]', function( value ) {
|
363 |
+
value.bind( function( loginPressVal ) {
|
364 |
+
var formbg;
|
365 |
+
if($('#customize-control-loginpress_customization-form_background_color .wp-color-picker').val().length>0){
|
366 |
+
formbg = $('#customize-control-loginpress_customization-form_background_color .wp-color-picker').val();
|
367 |
+
}
|
368 |
+
|
369 |
+
if ( loginPressVal == true ) {
|
370 |
+
loginpress_find( '#login, #loginform' ).css( 'background-color', 'transparent' );
|
371 |
+
loginpress_find( '#login, #loginform' ).css( 'background-image', 'none' );
|
372 |
+
$('#customize-control-loginpress_customization-form_background_color').fadeOut().hide();
|
373 |
+
$('#customize-control-loginpress_customization-setting_form_background').fadeOut().hide();
|
374 |
+
} else{
|
375 |
+
loginpress_find('#loginform').css('background-image', 'url('+formbgimg+')');
|
376 |
+
loginpress_find( '#login, #loginform' ).css( 'background-color', formbg );
|
377 |
+
|
378 |
+
$('#customize-control-loginpress_customization-form_background_color').fadeIn().show();
|
379 |
+
$('#customize-control-loginpress_customization-setting_form_background').fadeIn().show();
|
380 |
+
}
|
381 |
+
} );
|
382 |
+
} );
|
383 |
+
|
384 |
/**
|
385 |
* [loginpress_customizer_bg LoginPress Customizer Background Image Control that Retrive the Image URL w.r.t theme]
|
386 |
* @param {[string]} customizer_bg [Preset Option]
|
452 |
}
|
453 |
|
454 |
// Turn Off the Dependencies controls.
|
455 |
+
$('#customize-control-loginpress_customization-loginpress_display_bg').nextAll().hide();
|
456 |
+
|
|
|
|
|
|
|
457 |
} else {
|
458 |
if ( localStorage.loginpress_bg ) {
|
459 |
|
497 |
loginpress_bg = $('#loginpress-gallery .image-select:checked').val();
|
498 |
loginpress_bg = 'url(' + loginpress_bg + ')';
|
499 |
}
|
|
|
500 |
|
501 |
|
502 |
if ( 'default6' == customizer_bg ) {
|
519 |
}
|
520 |
|
521 |
// Turn On the Dependencies controls.
|
522 |
+
$('#customize-control-loginpress_customization-loginpress_display_bg').nextAll().show();
|
523 |
+
if($('#customize-control-loginpress_customization-setting_background .attachment-thumb').length>0){
|
524 |
+
$('#customize-control-loginpress_customization-gallery_background').hide();
|
525 |
+
}
|
|
|
526 |
|
527 |
} // endif; conditions on behalf on themes.
|
528 |
});
|
668 |
});
|
669 |
});
|
670 |
|
671 |
+
// Enable / Disabe WordPress login logo in real time... since 1.1.3
|
672 |
+
wp.customize( 'loginpress_customization[setting_logo_display]', function(value) {
|
673 |
+
value.bind( function(loginPressVal) {
|
674 |
+
if ( loginPressVal == true ) {
|
675 |
+
loginpress_find('#login h1').fadeOut();
|
676 |
+
$('#customize-control-loginpress_customization-setting_logo_display').nextAll().hide();
|
677 |
+
} else {
|
678 |
+
loginpress_find('#login h1').fadeIn();
|
679 |
+
$('#customize-control-loginpress_customization-setting_logo_display').nextAll().show();
|
680 |
+
}
|
681 |
+
});
|
682 |
+
});
|
683 |
+
|
684 |
/**
|
685 |
* [loginpress_new_css_property Apply Live JS on WordPress Login Page Logo]
|
686 |
* @param {[type]} loginpress_customization [Section ID]
|
690 |
*/
|
691 |
loginpress_new_css_property( 'loginpress_customization[customize_logo_width]', '#login h1 a', 'width', 'px' );
|
692 |
loginpress_new_css_property( 'loginpress_customization[customize_logo_height]', '#login h1 a', 'height', 'px' );
|
693 |
+
loginpress_new_css_property( 'loginpress_customization[customize_logo_padding]', '#login h1 a', 'margin-bottom', 'px' );
|
694 |
|
695 |
loginpress_attr_property( 'loginpress_customization[customize_logo_hover]', '#login h1 a', 'href' );
|
696 |
loginpress_attr_property( 'loginpress_customization[customize_logo_hover_title]', '#login h1 a', 'title' );
|
824 |
loginpress_input_property( 'loginpress_customization[textfield_background_color]', 'background' );
|
825 |
loginpress_input_property( 'loginpress_customization[textfield_color]', 'color' );
|
826 |
|
827 |
+
loginpress_css_property( 'loginpress_customization[form_background_color]', '#loginform, #login', 'background-color', '#FFF' );
|
828 |
+
loginpress_css_property( 'loginpress_customization[textfield_label_color]', '.login label[for="user_login"], .login label[for="user_pass"]', 'color', '#777' );
|
829 |
+
loginpress_css_property( 'loginpress_customization[remember_me_label_size]', '.login label[for="rememberme"]', 'color', '#777' );
|
830 |
+
|
831 |
+
loginpress_new_css_property( 'loginpress_customization[textfield_radius]', '#loginform input[type="text"], #loginform input[type="password"], #registerform input[type="text"], #registerform input[type="password"], #registerform input[type="number"], #registerform input[type="email"], #lostpasswordform input[type="text"]', 'border-radius', 'px' );
|
832 |
+
|
833 |
+
loginpress_shadow_property( 'loginpress_customization[textfield_shadow]', '#loginform input[type="text"], #loginform input[type="password"], #registerform input[type="text"], #registerform input[type="password"], #registerform input[type="number"], #registerform input[type="email"], #lostpasswordform input[type="text"]', 'box-shadow', 'px' );
|
834 |
+
loginpress_shadow_opacity_property( 'loginpress_customization[textfield_shadow_opacity]', '#loginform input[type="text"], #loginform input[type="password"], #registerform input[type="text"], #registerform input[type="password"], #registerform input[type="number"], #registerform input[type="email"], #lostpasswordform input[type="text"]', 'box-shadow', 'px' );
|
835 |
|
836 |
loginpress_background_img( 'loginpress_customization[forget_form_background]', '#lostpasswordform' );
|
837 |
loginpress_css_property( 'loginpress_customization[forget_form_background_color]', '#lostpasswordform', 'background-color' );
|
838 |
|
839 |
+
loginpress_new_css_property( 'loginpress_customization[customize_form_radius]', '#login', 'border-radius', 'px' );
|
840 |
+
loginpress_shadow_property( 'loginpress_customization[customize_form_shadow]', '#login', 'box-shadow', 'px' );
|
841 |
+
loginpress_shadow_opacity_property( 'loginpress_customization[customize_form_opacity]', '#login', 'box-shadow', 'px' );
|
842 |
+
|
843 |
//Buttons starts.
|
844 |
// Update the login form button background in real time...
|
845 |
var loginPressBtnClr;
|
847 |
wp.customize( 'loginpress_customization[custom_button_color]', function(value) {
|
848 |
value.bind( function(loginPressVal) {
|
849 |
if ( loginPressVal == '' ) {
|
850 |
+
loginPressBtnClr = undefined;
|
851 |
loginpress_find('.wp-core-ui #login .button-primary').css( 'background', '' );
|
852 |
loginpress_find('.wp-core-ui #login .button-primary').on( 'mouseover', function() {
|
853 |
if ( typeof loginPressBtnHvr !== "undefined" || loginPressBtnHvr === null ) {
|
891 |
// Update the login form button border-color in real time...
|
892 |
wp.customize( 'loginpress_customization[button_hover_color]', function(value) {
|
893 |
value.bind( function(loginPressVal) {
|
894 |
+
console.log(loginPressVal);
|
895 |
if ( loginPressVal == '' ) {
|
896 |
+
loginPressBtnHvr = undefined;
|
897 |
+
// loginpress_find('.wp-core-ui #login .button-primary').css( 'background', '' );
|
898 |
loginpress_find('.wp-core-ui #login .button-primary').on( 'mouseover', function() {
|
899 |
$(this).css( 'background', '' );
|
900 |
}).on( 'mouseleave', function() {
|
960 |
});
|
961 |
});
|
962 |
|
963 |
+
/**
|
964 |
+
* WordPress Login Form Label Change.
|
965 |
+
* @since 1.1.3
|
966 |
+
*/
|
967 |
+
loginpress_change_form_label( 'loginpress_customization[form_username_label]', '.login label[for="user_login"] span' );
|
968 |
+
loginpress_change_form_label( 'loginpress_customization[form_password_label]', '.login label[for="user_pass"] span' );
|
969 |
+
|
970 |
/**
|
971 |
* WordPress Login Page Footer Message.
|
972 |
*/
|
973 |
+
loginpress_change_form_label( 'loginpress_customization[login_footer_text]', '.login #nav a:nth-child(3)' );
|
974 |
|
975 |
// loginpress_css_property( 'loginpress_customization[footer_display_text]', '.login #nav', 'display' );
|
976 |
loginpress_css_property( 'loginpress_customization[login_footer_text_decoration]', '.login #nav a', 'text-decoration' );
|
982 |
value.bind( function(loginPressVal) {
|
983 |
|
984 |
if ( loginPressVal == '' ) {
|
985 |
+
loginpress_find('.login #nav a, .login #nav').css( 'color', '' );
|
986 |
+
loginpress_find('.login #nav a, .login #nav').on( 'mouseover', function() {
|
987 |
if ( typeof loginPressFtrHvr !== "undefined" || loginPressFtrHvr === null ) {
|
988 |
$(this).css( 'color', loginPressFtrHvr );
|
989 |
} else {
|
994 |
});
|
995 |
} else {
|
996 |
loginPressFtrClr = loginPressVal;
|
997 |
+
loginpress_find('.login #nav a, .login #nav').css( 'color', loginPressVal );
|
998 |
+
loginpress_find('.login #nav a, .login #nav').on( 'mouseover', function() {
|
999 |
if ( typeof loginPressFtrHvr !== "undefined" || loginPressFtrHvr === null ) {
|
1000 |
$(this).css( 'color', loginPressFtrHvr );
|
1001 |
} else {
|
1039 |
});
|
1040 |
|
1041 |
loginpress_new_css_property( 'loginpress_customization[login_footer_font_size]', '.login #nav a', 'font-size', 'px' );
|
1042 |
+
loginpress_new_css_property( 'loginpress_customization[customize_form_label]', '.login label[for="user_login"], .login label[for="user_pass"]', 'font-size', 'px' );
|
1043 |
+
loginpress_new_css_property( 'loginpress_customization[remember_me_font_size]', '.login form .forgetmenot label', 'font-size', 'px' );
|
1044 |
+
loginpress_css_property( 'loginpress_customization[login_footer_bg_color]', '.login #nav', 'background-color', 'transparent' );
|
1045 |
|
1046 |
// loginpress_css_property( 'loginpress_customization[back_display_text]', '.login #backtoblog', 'display' );
|
1047 |
loginpress_css_property( 'loginpress_customization[login_back_text_decoration]', '.login #backtoblog a', 'text-decoration' );
|
1083 |
});
|
1084 |
});
|
1085 |
|
1086 |
+
/**
|
1087 |
+
* Change LoginPress 'Button' CSS. Since 1.1.3
|
1088 |
+
*/
|
1089 |
+
loginpress_new_css_property( 'loginpress_customization[login_button_size]', '.login input[type="submit"]', 'width', '%' );
|
1090 |
+
loginpress_new_css_property( 'loginpress_customization[login_button_top]', '.wp-core-ui .button-group.button-large .button, .wp-core-ui .button.button-large', 'padding-top', 'px' );
|
1091 |
+
loginpress_new_css_property( 'loginpress_customization[login_button_bottom]', '.wp-core-ui .button-group.button-large .button, .wp-core-ui .button.button-large', 'padding-bottom', 'px' );
|
1092 |
+
loginpress_new_css_property( 'loginpress_customization[login_button_radius]', '.login input[type="submit"]', 'border-radius', 'px' );
|
1093 |
+
loginpress_shadow_property( 'loginpress_customization[login_button_shadow]', '.login input[type="submit"]', 'box-shadow', 'px' );
|
1094 |
+
loginpress_shadow_opacity_property( 'loginpress_customization[login_button_shadow_opacity]', '.login input[type="submit"]', 'box-shadow', 'px' );
|
1095 |
+
loginpress_new_css_property( 'loginpress_customization[login_button_text_size]', '.login input[type="submit"]', 'font-size', 'px' );
|
1096 |
+
|
1097 |
/**
|
1098 |
* Change LoginPress 'Back to Blog(link)' hover color live.
|
1099 |
*/
|
1135 |
*/
|
1136 |
loginpress_new_css_property( 'loginpress_customization[login_back_font_size]', '.login #backtoblog a', 'font-size', 'px' );
|
1137 |
loginpress_css_property( 'loginpress_customization[login_back_font_size]', '.login #backtoblog a', 'font-size' );
|
1138 |
+
loginpress_css_property( 'loginpress_customization[login_back_bg_color]', '.login #backtoblog', 'background-color', 'transparent' );
|
1139 |
loginpress_footer_text_message( 'loginpress_customization[login_footer_copy_right]', '.copyRight' );
|
1140 |
|
1141 |
/**
|
1171 |
|
1172 |
if ( loginPressVal == false ) {
|
1173 |
loginpress_find('.loginpress-show-love').fadeOut().hide();
|
1174 |
+
$('#customize-control-loginpress_customization-loginpress_show_love').nextAll().hide();
|
1175 |
} else {
|
1176 |
+
if(loginpress_find('.loginpress-show-love').length===0){
|
1177 |
+
$('<div class="loginpress-show-love">Powered by: <a href="https://wpbrigade.com" target="_blank">LoginPress</a></div>').insertBefore($('#customize-preview iframe').contents().find('.footer-wrapper'));
|
1178 |
+
}
|
1179 |
loginpress_find('.loginpress-show-love').fadeIn().show();
|
1180 |
+
$('#customize-control-loginpress_customization-loginpress_show_love').nextAll().show();
|
1181 |
+
}
|
1182 |
+
} );
|
1183 |
+
} );
|
1184 |
+
|
1185 |
+
/**
|
1186 |
+
* Set position of Footer link.
|
1187 |
+
*/
|
1188 |
+
wp.customize( 'loginpress_customization[show_love_position]', function( value ) {
|
1189 |
+
value.bind( function( loginPressVal ) {
|
1190 |
+
if ( loginPressVal == 'left' ) {
|
1191 |
+
loginpress_find('.loginpress-show-love').addClass('love-postion');
|
1192 |
+
} else {
|
1193 |
+
loginpress_find('.loginpress-show-love').removeClass('love-postion');
|
1194 |
+
}
|
1195 |
+
} );
|
1196 |
+
} );
|
1197 |
+
|
1198 |
+
/**
|
1199 |
+
* Set position of Footer link.
|
1200 |
+
*/
|
1201 |
+
wp.customize( 'loginpress_customization[login_copy_right_display]', function( value ) {
|
1202 |
+
value.bind( function( loginPressVal ) {
|
1203 |
+
if ( loginPressVal == true ) {
|
1204 |
+
if( loginpress_find('.copyRight').length == 0 ){
|
1205 |
+
loginpress_find('.footer-cont').html('<div class="copyRight">'+$('[id="_customize-input-loginpress_customization[login_footer_copy_right]"]').val()+'</div>');
|
1206 |
+
}
|
1207 |
+
$('#customize-control-loginpress_customization-login_footer_copy_right').show();
|
1208 |
+
} else {
|
1209 |
+
loginpress_find('.copyRight').remove();
|
1210 |
+
$('#customize-control-loginpress_customization-login_footer_copy_right').hide();
|
1211 |
}
|
1212 |
} );
|
1213 |
} );
|
1228 |
|
1229 |
$(window).on('load', function() {
|
1230 |
|
1231 |
+
if ( $('#customize-control-loginpress_customization-setting_logo_display input[type="checkbox"]').is(":checked") ) {
|
1232 |
+
$('#customize-control-loginpress_customization-setting_logo_display').nextAll().hide();
|
1233 |
+
} else {
|
1234 |
+
$('#customize-control-loginpress_customization-setting_logo_display').nextAll().show();
|
1235 |
+
}
|
1236 |
+
|
1237 |
+
if ( $('#customize-control-loginpress_customization-loginpress_show_love input[type="checkbox"]').is(":checked") ) {
|
1238 |
+
$('#customize-control-loginpress_customization-loginpress_show_love').nextAll().show();
|
1239 |
+
} else {
|
1240 |
+
$('#customize-control-loginpress_customization-loginpress_show_love').nextAll().hide();
|
1241 |
+
}
|
1242 |
+
|
1243 |
if ( $('#customize-control-loginpress_customization-loginpress_display_bg input[type="checkbox"]').is(":checked") ) {
|
1244 |
+
$('#customize-control-loginpress_customization-loginpress_display_bg').nextAll().show();
|
1245 |
+
if($('#customize-control-loginpress_customization-setting_background .attachment-thumb').length>0){
|
1246 |
+
$('#customize-control-loginpress_customization-gallery_background').hide();
|
1247 |
+
}
|
|
|
1248 |
} else {
|
1249 |
+
$('#customize-control-loginpress_customization-loginpress_display_bg').nextAll().hide();
|
|
|
|
|
|
|
|
|
1250 |
}
|
1251 |
|
1252 |
if ( $('#customize-control-loginpress_customization-setting_background .attachment-media-view-image').length > 0 ) {
|
1253 |
$('#customize-control-loginpress_customization-gallery_background').css( 'display', 'none' );
|
1254 |
}
|
1255 |
|
1256 |
+
if ( $('#customize-control-loginpress_customization-setting_form_display_bg input[type="checkbox"]').is(":checked") ) {
|
1257 |
+
$('#customize-control-loginpress_customization-form_background_color').css( 'display', 'none' );
|
1258 |
+
} else {
|
1259 |
+
$('#customize-control-loginpress_customization-form_background_color').css( 'display', 'list-item' );
|
1260 |
+
}
|
1261 |
+
|
1262 |
if ( $('#customize-control-loginpress_customization-footer_display_text input[type="checkbox"]').is(":checked") ) {
|
1263 |
|
1264 |
$('#customize-control-loginpress_customization-login_footer_text').css( 'display', 'list-item' );
|
1293 |
$('#customize-control-loginpress_customization-login_back_bg_color').css( 'display', 'none' );
|
1294 |
}
|
1295 |
|
1296 |
+
if ( $('#customize-control-loginpress_customization-login_copy_right_display input[type="checkbox"]').is(":checked") ) {
|
1297 |
+
$('#customize-control-loginpress_customization-login_footer_copy_right').css( 'display', 'list-item' );
|
1298 |
+
} else {
|
1299 |
+
$('#customize-control-loginpress_customization-login_footer_copy_right').css( 'display', 'none' );
|
1300 |
+
}
|
1301 |
+
|
1302 |
$("<style type='text/css' id='loginpress-customize'></style>").appendTo(loginpress_find('head'));
|
1303 |
$("<style type='text/css' id='loginpress-iframe-bgColor'></style>").appendTo(loginpress_find('head'));
|
1304 |
$("<style type='text/css' id='loginpress-scbg-position'></style>").appendTo(loginpress_find('head'));
|
1305 |
$("<style type='text/css' id='loginpress-scbg-size'></style>").appendTo(loginpress_find('head'));
|
1306 |
$("<style type='text/css' id='loginpress-scbg-repeat'></style>").appendTo(loginpress_find('head'));
|
1307 |
|
|
|
1308 |
});
|
1309 |
|
1310 |
})(jQuery);
|
js/customizer-previewer.js
CHANGED
@@ -17,21 +17,29 @@
|
|
17 |
// Init
|
18 |
init: function () {
|
19 |
|
20 |
-
var $body = $(
|
21 |
-
$body_bg = $(
|
22 |
-
$form = $(
|
|
|
|
|
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>' );
|
@@ -55,6 +63,12 @@
|
|
55 |
}
|
56 |
|
57 |
$('.loginpress-partial.customize-partial-edit-shortcut').removeClass( 'active' );
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
$el.addClass( 'active' );
|
59 |
} );
|
60 |
|
@@ -68,9 +82,44 @@
|
|
68 |
/**
|
69 |
* Prevent Submit Button for customizer
|
70 |
*/
|
71 |
-
$document.on( 'click touch', '.submit', function( e ) {
|
72 |
e.preventDefault();
|
73 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
}
|
75 |
};
|
76 |
|
17 |
// Init
|
18 |
init: function () {
|
19 |
|
20 |
+
var $body = $('body'),
|
21 |
+
$body_bg = $('#login h1'),
|
22 |
+
$form = $('#login form'),
|
23 |
+
$button = $('#login .submit'),
|
24 |
+
$nav = $('#nav a:first-child'),
|
25 |
$document = $( document ); // Store references to the body and document elements
|
26 |
|
27 |
// Append our button to the <body> element
|
28 |
if( $('.login-action-login').length > 0 ) { // If .login-action-login exist
|
29 |
|
30 |
+
$body_bg.append( '<span class="loginpress-logo-partial loginpress-partial customize-partial-edit-shortcut" data-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>' );
|
31 |
|
32 |
+
$body.append( '<span class="loginpress-presets-partial loginpress-partial customize-partial-edit-shortcut" data-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>' );
|
33 |
|
34 |
+
$body.append( '<span class="loginpress-background-partial loginpress-partial customize-partial-edit-shortcut" data-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>' );
|
35 |
|
36 |
+
$body.append( '<span class="loginpress-footer-partial loginpress-partial customize-partial-edit-shortcut" data-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>' );
|
37 |
+
|
38 |
+
$button.append( '<span class="loginpress-button-partial loginpress-partial customize-partial-edit-shortcut" data-title="Customize Button"><button class="loginpress-event-button customize-partial-edit-shortcut-button" data-customizer-event="section_button"><span class="dashicons dashicons-edit"></span></button></span>' );
|
39 |
+
|
40 |
+
$( '<span class="loginpress-nav-partial loginpress-partial customize-partial-edit-shortcut" data-title="Customize Navigation"><button class="loginpress-event-button customize-partial-edit-shortcut-button" data-customizer-event="section_fotter"><span class="dashicons dashicons-edit"></span></button></span>' ).insertAfter($nav);
|
41 |
+
|
42 |
+
$form.append( '<span class="loginpress-input-partial loginpress-partial customize-partial-edit-shortcut" data-title="Customize Form"><button class="loginpress-event-button customize-partial-edit-shortcut-button" data-customizer-event="section_form"><span class="dashicons dashicons-edit"></span></button></span>' );
|
43 |
}
|
44 |
|
45 |
// $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>' );
|
63 |
}
|
64 |
|
65 |
$('.loginpress-partial.customize-partial-edit-shortcut').removeClass( 'active' );
|
66 |
+
if($el.hasClass('loginpress-footer-partial')){
|
67 |
+
$('.loginpress-nav-partial').addClass('active');
|
68 |
+
}
|
69 |
+
if($el.hasClass('loginpress-nav-partial')){
|
70 |
+
$('.loginpress-footer-partial').addClass('active');
|
71 |
+
}
|
72 |
$el.addClass( 'active' );
|
73 |
} );
|
74 |
|
82 |
/**
|
83 |
* Prevent Submit Button for customizer
|
84 |
*/
|
85 |
+
$document.on( 'click touch', '.submit, #backtoblog a', function( e ) {
|
86 |
e.preventDefault();
|
87 |
});
|
88 |
+
/**
|
89 |
+
* Add spans to labels
|
90 |
+
*/
|
91 |
+
$(window).on('load',function(){
|
92 |
+
$('label').each(function(){
|
93 |
+
// console.log($(this).html());
|
94 |
+
var headerClone = $(this).clone();
|
95 |
+
$(headerClone).find('br').remove();
|
96 |
+
$(headerClone).find('input').remove();
|
97 |
+
var currentText = $(headerClone).html().replace(/(\r\n|\n|\r|\t)/gm,"");
|
98 |
+
|
99 |
+
var newHtml = $(this).html().replace(currentText,"<span>"+currentText+"</span>");
|
100 |
+
$(this).html(newHtml);
|
101 |
+
});
|
102 |
+
});
|
103 |
+
|
104 |
+
|
105 |
+
/* remove border around all input elements */
|
106 |
+
if (navigator.userAgent.toLowerCase().indexOf("chrome") >= 0) {
|
107 |
+
$(window).load(function () {
|
108 |
+
$('input:-webkit-autofill').each(function () {
|
109 |
+
console.log($(this).length);
|
110 |
+
var text = $(this).val();
|
111 |
+
var sText = text.substring(text.length - 1, text.length);
|
112 |
+
var id = $(this).attr('id');
|
113 |
+
$(this).after(this.outerHTML).remove();
|
114 |
+
$('input[id=' + id + ']').val(text.slice(0,-1));
|
115 |
+
setTimeout(function(){
|
116 |
+
$('input[id=' + id + ']').val(text.slice(0,-1)+sText);
|
117 |
+
}, 1000)
|
118 |
+
});
|
119 |
+
});
|
120 |
+
}
|
121 |
+
|
122 |
+
|
123 |
}
|
124 |
};
|
125 |
|
js/customizer.js
CHANGED
@@ -2,6 +2,7 @@
|
|
2 |
* Customizer Communicator
|
3 |
*
|
4 |
* @since 1.0.23
|
|
|
5 |
*/
|
6 |
( function ( exports, $ ) {
|
7 |
"use strict";
|
@@ -15,39 +16,55 @@
|
|
15 |
var self = this; // Store a reference to "this" in case callback functions need to reference it
|
16 |
|
17 |
// Listen to the "customize-section-back" event for removing 'active' class from customize-partial-edit-shortcut.
|
18 |
-
|
19 |
$(document).on( 'click', '.customize-section-back', function() {
|
20 |
-
|
21 |
-
|
22 |
-
|
|
|
|
|
|
|
|
|
23 |
} );
|
24 |
-
|
25 |
// activated loginpress partial icons
|
26 |
$(document).on( 'click', '.control-subsection', function() {
|
27 |
-
|
28 |
-
$(
|
|
|
|
|
|
|
29 |
} );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
}
|
31 |
};
|
32 |
|
33 |
|
34 |
/**
|
35 |
-
* Capture the instance of the Preview since it is private (this has changed in WordPress 4.0)
|
36 |
*/
|
37 |
OldPreviewer = api.Previewer;
|
38 |
api.Previewer = OldPreviewer.extend( {
|
39 |
initialize: function( params, options ) {
|
40 |
-
// Store a reference to the Previewer
|
41 |
api.myCustomizerPreviewer.preview = this;
|
42 |
|
43 |
-
// Call the old Previewer's initialize function
|
44 |
OldPreviewer.prototype.initialize.call( this, params, options );
|
45 |
}
|
46 |
} );
|
47 |
|
48 |
-
// Document Ready
|
49 |
$( function() {
|
50 |
-
// Initialize our Previewer
|
51 |
api.myCustomizerPreviewer.init();
|
52 |
} );
|
53 |
} )( wp, jQuery );
|
2 |
* Customizer Communicator
|
3 |
*
|
4 |
* @since 1.0.23
|
5 |
+
* @version 1.1.3
|
6 |
*/
|
7 |
( function ( exports, $ ) {
|
8 |
"use strict";
|
16 |
var self = this; // Store a reference to "this" in case callback functions need to reference it
|
17 |
|
18 |
// Listen to the "customize-section-back" event for removing 'active' class from customize-partial-edit-shortcut.
|
|
|
19 |
$(document).on( 'click', '.customize-section-back', function() {
|
20 |
+
// if not multisites. 1.1.3
|
21 |
+
if (! $("#customize-preview iframe").hasClass('loginpress_multisite_active') ) {
|
22 |
+
|
23 |
+
$('#customize-preview iframe').contents().find('.loginpress-partial.customize-partial-edit-shortcut').each( function(){
|
24 |
+
$(this).removeClass('active');
|
25 |
+
} );
|
26 |
+
}
|
27 |
} );
|
28 |
+
|
29 |
// activated loginpress partial icons
|
30 |
$(document).on( 'click', '.control-subsection', function() {
|
31 |
+
// if not multisites. 1.1.3
|
32 |
+
if (! $("#customize-preview iframe").hasClass('loginpress_multisite_active') ) {
|
33 |
+
var trigger = $(this).attr('aria-owns').replace("sub-accordion-section-", "");
|
34 |
+
$('#customize-preview iframe').contents().find('[data-customizer-event="'+trigger+'"]').parent().addClass('active');
|
35 |
+
}
|
36 |
} );
|
37 |
+
$('#customize-controls h3.loginpress-group-heading').each(function(){
|
38 |
+
if($(this).next('.loginpress-group-info').length>0){
|
39 |
+
$(this).next('.loginpress-group-info').hide();
|
40 |
+
$(this).append('<button type="button" class="customize-help-toggle dashicons dashicons-editor-help" aria-expanded="false"><span class="screen-reader-text">Help</span></button>');
|
41 |
+
}
|
42 |
+
});
|
43 |
+
$(document).on('click', '#customize-controls h3.loginpress-group-heading .customize-help-toggle', function(){
|
44 |
+
$(this).parent().next('.loginpress-group-info').slideToggle();
|
45 |
+
});
|
46 |
+
|
47 |
}
|
48 |
};
|
49 |
|
50 |
|
51 |
/**
|
52 |
+
* Capture the instance of the Preview since it is private (this has changed in WordPress 4.0).
|
53 |
*/
|
54 |
OldPreviewer = api.Previewer;
|
55 |
api.Previewer = OldPreviewer.extend( {
|
56 |
initialize: function( params, options ) {
|
57 |
+
// Store a reference to the Previewer.
|
58 |
api.myCustomizerPreviewer.preview = this;
|
59 |
|
60 |
+
// Call the old Previewer's initialize function.
|
61 |
OldPreviewer.prototype.initialize.call( this, params, options );
|
62 |
}
|
63 |
} );
|
64 |
|
65 |
+
// Document Ready.
|
66 |
$( function() {
|
67 |
+
// Initialize our Previewer.
|
68 |
api.myCustomizerPreviewer.init();
|
69 |
} );
|
70 |
} )( wp, jQuery );
|
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.1.
|
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.1.
|
26 |
|
27 |
/**
|
28 |
* @var The single instance of the class
|
@@ -81,6 +81,9 @@ if ( ! class_exists( 'LoginPress' ) ) :
|
|
81 |
include_once( LOGINPRESS_DIR_PATH . 'classes/class-loginpress-setup.php' );
|
82 |
include_once( LOGINPRESS_DIR_PATH . 'classes/class-loginpress-ajax.php' );
|
83 |
include_once( LOGINPRESS_DIR_PATH . 'classes/class-loginpress-filter-plugin.php' );
|
|
|
|
|
|
|
84 |
|
85 |
$loginpress_setting = get_option( 'loginpress_setting' );
|
86 |
|
@@ -114,10 +117,15 @@ if ( ! class_exists( 'LoginPress' ) ) :
|
|
114 |
add_action( 'admin_enqueue_scripts', array( $this, '_admin_scripts' ) );
|
115 |
add_action( 'admin_footer', array( $this, 'add_deactive_modal' ) );
|
116 |
add_action( 'admin_init', array( $this, 'loginpress_review_notice' ) );
|
|
|
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 |
|
@@ -201,6 +209,65 @@ if ( ! class_exists( 'LoginPress' ) ) :
|
|
201 |
public function init() {
|
202 |
// Before init action
|
203 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
204 |
/**
|
205 |
* Add new page in Apperance to customize Login Page
|
206 |
*/
|
@@ -379,11 +446,41 @@ if ( ! class_exists( 'LoginPress' ) ) :
|
|
379 |
|
380 |
}
|
381 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
382 |
/**
|
383 |
* Ask users to review our plugin on wordpress.org
|
384 |
*
|
385 |
* @since 1.0.11
|
386 |
* @return boolean false
|
|
|
387 |
*/
|
388 |
public function loginpress_review_notice() {
|
389 |
|
@@ -408,23 +505,8 @@ if ( ! class_exists( 'LoginPress' ) ) :
|
|
408 |
add_action( 'admin_notices' , array( $this, 'loginpress_review_notice_message' ) );
|
409 |
endif;
|
410 |
|
411 |
-
if ( is_multisite() ) {
|
412 |
-
add_action( 'admin_notices' , array( $this, 'loginpress_multisite_admin_message' ) );
|
413 |
-
add_action( 'network_admin_notices', array( $this, 'loginpress_multisite_admin_message' ) );
|
414 |
-
}
|
415 |
}
|
416 |
|
417 |
-
/**
|
418 |
-
* Multisite Admin Notice.
|
419 |
-
*
|
420 |
-
* @since 1.0.12
|
421 |
-
*/
|
422 |
-
public function loginpress_multisite_admin_message() {
|
423 |
-
|
424 |
-
echo sprintf( __( '%1$s%2$sHi, LoginPress is not compatible with multisite right now. %3$s Checkout this Ticket in WordPress core %4$s %5$s%6$s', 'loginpress' ),
|
425 |
-
'<div class="notice notice-error is-dismissible">', '<p>', '<a href="https://core.trac.wordpress.org/ticket/40069" target="_blank">', '</a>', '</p>', '</div>' );
|
426 |
-
}
|
427 |
-
|
428 |
/**
|
429 |
* Check and Dismiss review message.
|
430 |
*
|
@@ -496,6 +578,68 @@ if ( ! class_exists( 'LoginPress' ) ) :
|
|
496 |
<?php
|
497 |
}
|
498 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
499 |
/**
|
500 |
* Add a link to the settings page to the plugins list
|
501 |
*
|
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.3
|
7 |
* Author: WPBrigade
|
8 |
* Author URI: http://WPBrigade.com/
|
9 |
* Text Domain: loginpress
|
22 |
/**
|
23 |
* @var string
|
24 |
*/
|
25 |
+
public $version = '1.1.3';
|
26 |
|
27 |
/**
|
28 |
* @var The single instance of the class
|
81 |
include_once( LOGINPRESS_DIR_PATH . 'classes/class-loginpress-setup.php' );
|
82 |
include_once( LOGINPRESS_DIR_PATH . 'classes/class-loginpress-ajax.php' );
|
83 |
include_once( LOGINPRESS_DIR_PATH . 'classes/class-loginpress-filter-plugin.php' );
|
84 |
+
if ( is_multisite() ) {
|
85 |
+
require_once( LOGINPRESS_DIR_PATH . 'include/class-loginpress-theme-template.php' );
|
86 |
+
}
|
87 |
|
88 |
$loginpress_setting = get_option( 'loginpress_setting' );
|
89 |
|
117 |
add_action( 'admin_enqueue_scripts', array( $this, '_admin_scripts' ) );
|
118 |
add_action( 'admin_footer', array( $this, 'add_deactive_modal' ) );
|
119 |
add_action( 'admin_init', array( $this, 'loginpress_review_notice' ) );
|
120 |
+
add_action( 'admin_init' , array( $this, 'loginpress_addon_notice' ) );
|
121 |
add_action( 'plugin_action_links', array( $this, 'loginpress_action_links' ), 10, 2 );
|
122 |
add_action( 'admin_init', array( $this, 'redirect_optin' ) );
|
123 |
add_filter( 'auth_cookie_expiration', array( $this, '_change_auth_cookie_expiration' ), 10, 3 );
|
124 |
//add_filter( 'plugins_api', array( $this, 'get_addon_info_' ) , 100, 3 );
|
125 |
+
if ( is_multisite() ) {
|
126 |
+
add_action( 'admin_init', array( $this, 'redirect_loginpress_edit_page' ) );
|
127 |
+
add_action( 'admin_init', array( $this, 'check_loginpress_page' ) );
|
128 |
+
}
|
129 |
|
130 |
}
|
131 |
|
209 |
public function init() {
|
210 |
// Before init action
|
211 |
}
|
212 |
+
|
213 |
+
/**
|
214 |
+
* Create LoginPress Page Template.
|
215 |
+
*
|
216 |
+
* @since 1.1.3
|
217 |
+
*/
|
218 |
+
public function check_loginpress_page() {
|
219 |
+
|
220 |
+
// Retrieve the Login Designer admin page option, that was created during the activation process.
|
221 |
+
$option = $this->get_loginpress_page();
|
222 |
+
|
223 |
+
include LOGINPRESS_DIR_PATH . 'include/create-loginpress-page.php';
|
224 |
+
// Retrieve the status of the page, if the option is available.
|
225 |
+
if ( $option ) {
|
226 |
+
$page = get_post( $option );
|
227 |
+
$status = $page->post_status;
|
228 |
+
} else {
|
229 |
+
$status = null;
|
230 |
+
}
|
231 |
+
|
232 |
+
// Check the status of the page. Let's fix it, if the page is missing or in the trash.
|
233 |
+
if ( empty( $status ) || 'trash' === $status ) {
|
234 |
+
new LoginPress_Page_Create();
|
235 |
+
}
|
236 |
+
}
|
237 |
+
|
238 |
+
/**
|
239 |
+
* function for redirect the LoginPress page on editing.
|
240 |
+
*
|
241 |
+
* @since 1.1.3
|
242 |
+
*/
|
243 |
+
public function redirect_loginpress_edit_page() {
|
244 |
+
global $pagenow;
|
245 |
+
|
246 |
+
$page = $this->get_loginpress_page();
|
247 |
+
|
248 |
+
if ( ! $page ) {
|
249 |
+
return;
|
250 |
+
}
|
251 |
+
|
252 |
+
$page_url = get_permalink( $page );
|
253 |
+
$page_id = get_post( $page );
|
254 |
+
$page_id = $page->ID;
|
255 |
+
|
256 |
+
// Generate the redirect url.
|
257 |
+
$url = add_query_arg(
|
258 |
+
array(
|
259 |
+
'autofocus[section]' => 'loginpress_panel',
|
260 |
+
'url' => rawurlencode( $page_url ),
|
261 |
+
),
|
262 |
+
admin_url( 'customize.php' )
|
263 |
+
);
|
264 |
+
|
265 |
+
/* Check current admin page. */
|
266 |
+
if ( $pagenow == 'post.php' && isset( $_GET['post'] ) && $_GET['post'] == $page_id ) {
|
267 |
+
wp_safe_redirect( $url );
|
268 |
+
}
|
269 |
+
}
|
270 |
+
|
271 |
/**
|
272 |
* Add new page in Apperance to customize Login Page
|
273 |
*/
|
446 |
|
447 |
}
|
448 |
|
449 |
+
/**
|
450 |
+
* Ask users to review our plugin on wordpress.org
|
451 |
+
*
|
452 |
+
* @since 1.1.3
|
453 |
+
* @return boolean false
|
454 |
+
*/
|
455 |
+
public function loginpress_addon_notice() {
|
456 |
+
|
457 |
+
$this->loginpress_addon_dismissal();
|
458 |
+
|
459 |
+
$activation_time = get_site_option( 'loginpress_addon_active_time' );
|
460 |
+
$addon_dismissal = get_site_option( 'loginpress_addon_dismiss' );
|
461 |
+
|
462 |
+
if ( 'yes' == $addon_dismissal ) return;
|
463 |
+
|
464 |
+
if ( ! $activation_time ) :
|
465 |
+
|
466 |
+
$activation_time = time();
|
467 |
+
add_site_option( 'loginpress_addon_active_time', $activation_time );
|
468 |
+
endif;
|
469 |
+
|
470 |
+
// 432000 = 5 Days in seconds.
|
471 |
+
// if ( time() - $activation_time > 432000 ) :
|
472 |
+
|
473 |
+
add_action( 'admin_notices' , array( $this, 'loginpress_addon_notice_text' ) );
|
474 |
+
// endif;
|
475 |
+
|
476 |
+
}
|
477 |
+
|
478 |
/**
|
479 |
* Ask users to review our plugin on wordpress.org
|
480 |
*
|
481 |
* @since 1.0.11
|
482 |
* @return boolean false
|
483 |
+
* @version 1.1.3
|
484 |
*/
|
485 |
public function loginpress_review_notice() {
|
486 |
|
505 |
add_action( 'admin_notices' , array( $this, 'loginpress_review_notice_message' ) );
|
506 |
endif;
|
507 |
|
|
|
|
|
|
|
|
|
508 |
}
|
509 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
510 |
/**
|
511 |
* Check and Dismiss review message.
|
512 |
*
|
578 |
<?php
|
579 |
}
|
580 |
|
581 |
+
/**
|
582 |
+
* Review notice message
|
583 |
+
*
|
584 |
+
* @since 1.1.3
|
585 |
+
*/
|
586 |
+
public function loginpress_addon_notice_text() {
|
587 |
+
|
588 |
+
$scheme = ( parse_url( $_SERVER['REQUEST_URI'], PHP_URL_QUERY ) ) ? '&' : '?';
|
589 |
+
$url = $_SERVER['REQUEST_URI'] . $scheme . 'loginpress_addon_dismiss=yes';
|
590 |
+
$dismiss_url = wp_nonce_url( $url, 'loginpress-addon-nonce' );
|
591 |
+
wp_enqueue_style( 'loginpress_review_stlye', plugins_url( 'css/style-review.css', __FILE__ ), array(), LOGINPRESS_VERSION );
|
592 |
+
?>
|
593 |
+
<div class="loginpress-alert-notice">
|
594 |
+
<a href="<?php echo $dismiss_url ?>" class="notice-dismiss" ><span class="screen-reader-text"></span></a>
|
595 |
+
<a href="#" class="loginpress-addon-notice-link" target="_loginpress">
|
596 |
+
<div class="loginpress-alert-thumbnail">
|
597 |
+
<img src="<?php echo plugins_url( 'img/notification_logo.svg', __FILE__ ) ?>" alt="">
|
598 |
+
</div>
|
599 |
+
<div class="loginpress-alert-text">
|
600 |
+
<h3><?php _e( 'Introducing LoginPress Addons!', 'loginpress' ) ?></h3>
|
601 |
+
<p><?php _e( 'Extend LoginPress with these add-ons and supercharge your login pages.', 'loginpress' ) ?></p>
|
602 |
+
</div>
|
603 |
+
</a>
|
604 |
+
<div class="loginpress-alert-button-section">
|
605 |
+
<a href="" class="loginpress-alert-button" target="_loginpress"><?php _e( 'Learn More', 'loginpress' ) ?></a>
|
606 |
+
</div>
|
607 |
+
</div>
|
608 |
+
<?php
|
609 |
+
}
|
610 |
+
|
611 |
+
/**
|
612 |
+
* Check and Dismiss addon message.
|
613 |
+
*
|
614 |
+
* @since 1.1.3
|
615 |
+
*/
|
616 |
+
private function loginpress_addon_dismissal() {
|
617 |
+
|
618 |
+
if ( ! is_admin() ||
|
619 |
+
! current_user_can( 'manage_options' ) ||
|
620 |
+
! isset( $_GET['_wpnonce'] ) ||
|
621 |
+
! wp_verify_nonce( sanitize_key( wp_unslash( $_GET['_wpnonce'] ) ), 'loginpress-addon-nonce' ) ||
|
622 |
+
! isset( $_GET['loginpress_addon_dismiss'] ) ) :
|
623 |
+
|
624 |
+
return;
|
625 |
+
endif;
|
626 |
+
|
627 |
+
add_site_option( 'loginpress_addon_dismiss', 'yes' );
|
628 |
+
}
|
629 |
+
|
630 |
+
/**
|
631 |
+
* Pull the Login Designer page from options.
|
632 |
+
*
|
633 |
+
* @access public
|
634 |
+
*/
|
635 |
+
public function get_loginpress_page() {
|
636 |
+
|
637 |
+
$loginpress_settings = get_option( 'loginpress_setting', array() );
|
638 |
+
$page = array_key_exists( 'loginpress_page', $loginpress_settings ) ? get_post( $loginpress_settings['loginpress_page'] ) : false;
|
639 |
+
|
640 |
+
return $page;
|
641 |
+
}
|
642 |
+
|
643 |
/**
|
644 |
* Add a link to the settings page to the plugins list
|
645 |
*
|
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.1.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -131,7 +131,7 @@ Muhammad Adnan
|
|
131 |
|
132 |
= How to get started with LoginPress? =
|
133 |
|
134 |
-
In your WordPress Dashboard, navigate to
|
135 |
|
136 |
= Who should use LoginPress? =
|
137 |
|
@@ -204,6 +204,26 @@ Please visit <a target="_blank" rel="friend" href="http://WPBrigade.com/wordpres
|
|
204 |
|
205 |
== Changelog ==
|
206 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
207 |
= 1.1.2 - 2018-01-20 =
|
208 |
* Compatibility: Compatible with WordPress 4.9.
|
209 |
* Bugfix: logo sizing
|
@@ -348,5 +368,5 @@ Please visit <a target="_blank" rel="friend" href="http://WPBrigade.com/wordpres
|
|
348 |
|
349 |
== Upgrade Notice ==
|
350 |
|
351 |
-
= 1.1.
|
352 |
-
* Launched LoginPress addons - (Auto Login, Hide Login, Login Redirects, Social Login, Login Widget, Limit Login Attempts) + couple of bug fixes.
|
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.3
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
131 |
|
132 |
= How to get started with LoginPress? =
|
133 |
|
134 |
+
In your WordPress Dashboard, navigate to LoginPress > Settings to get started.
|
135 |
|
136 |
= Who should use LoginPress? =
|
137 |
|
204 |
|
205 |
== Changelog ==
|
206 |
|
207 |
+
= 1.1.3 - 2018-03-22 =
|
208 |
+
* New Feature: Compatible with Multisite.
|
209 |
+
* New Feature: Introducing Tool tips in customizer.
|
210 |
+
* New Feature: Introducing Login Logo (Enable / Disable) control.
|
211 |
+
* New Feature: Introducing Login Form (Transparency, Radius, Shadow, Opacity, Padding) control.
|
212 |
+
* New Feature: Introducing Login Form Labels (Text, Size, Color) control.
|
213 |
+
* New Feature: Introducing Login Form Input Field (Radius, Shadow, Opacity) control.
|
214 |
+
* New Feature: Introducing Login Button (Padding, Padding top, Padding bottom, Radius, Shadow, Opacity, Text size) control.
|
215 |
+
* New Feature: Introducing Footer Copyright Text (Enable / Disable) control.
|
216 |
+
* New Feature: Introducing Brand text position control in footer.
|
217 |
+
* Enhancement: Compatible with Plugin Password Protected.
|
218 |
+
* Enhancement: Compatible with Plugin Divi 100 Login Page.
|
219 |
+
* Enhancement: Compatible with Plugin Fusion Builder.
|
220 |
+
* Enhancement: Code refactoring.
|
221 |
+
* Bugfix: Login Logo issue in mobile Responsive.
|
222 |
+
* Bugfix: Form Background Color issue.
|
223 |
+
* Bugfix: Footer text issue in Customizer.
|
224 |
+
* Bugfix: Typos in Customizer.
|
225 |
+
* Compatibility: Compatible with WordPress 4.9.
|
226 |
+
|
227 |
= 1.1.2 - 2018-01-20 =
|
228 |
* Compatibility: Compatible with WordPress 4.9.
|
229 |
* Bugfix: logo sizing
|
368 |
|
369 |
== Upgrade Notice ==
|
370 |
|
371 |
+
= 1.1.3 =
|
372 |
+
* Launched LoginPress addons - (Auto Login, Hide Login, Login Redirects, Social Login, Login Widget, Limit Login Attempts) + Multiple New Features + couple of bug fixes.
|