Version Description
- Bug fixed undefined variables in log file + Add Google Captcha Theme Settings
Download this release
Release Info
Developer | weblizar |
Plugin | Admin Custom Login |
Version | 2.6.2 |
Comparing to | |
See all releases |
Code changes from version 2.6.1 to 2.6.2
- acl-gcaptcha.php +114 -105
- admin-custom-login.php +10 -5
- css/socialcss.php +15 -9
- includes/design/text_and_color.php +44 -35
- includes/get_value.php +2 -2
- includes/googlecaptcha-settings/gcaptcha-settings.php +28 -1
- login-form-screen.php +26 -10
- readme.txt +5 -3
acl-gcaptcha.php
CHANGED
@@ -1,106 +1,115 @@
|
|
1 |
-
<?php
|
2 |
-
class ACL_gcaptcha_Login_Form {
|
3 |
-
|
4 |
-
/** @type string private key|public key */
|
5 |
-
private $public_key, $private_key;
|
6 |
-
|
7 |
-
/** class constructor */
|
8 |
-
public function __construct() {
|
9 |
-
$g_page = unserialize(get_option('Admin_custome_login_gcaptcha'));
|
10 |
-
if(isset($g_page['site_key']) && isset($g_page['secret_key'])){
|
11 |
-
$site_key = $g_page['site_key'];
|
12 |
-
$secret_key = $g_page['secret_key'];
|
13 |
-
|
14 |
-
|
15 |
-
$
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
//
|
25 |
-
add_action( '
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
<
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
</
|
50 |
-
</div>
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
?>
|
1 |
+
<?php
|
2 |
+
class ACL_gcaptcha_Login_Form {
|
3 |
+
|
4 |
+
/** @type string private key|public key */
|
5 |
+
private $public_key, $private_key;
|
6 |
+
|
7 |
+
/** class constructor */
|
8 |
+
public function __construct() {
|
9 |
+
$g_page = unserialize(get_option('Admin_custome_login_gcaptcha'));
|
10 |
+
if(isset($g_page['site_key']) && isset($g_page['secret_key'])){
|
11 |
+
$site_key = $g_page['site_key'];
|
12 |
+
$secret_key = $g_page['secret_key'];
|
13 |
+
$acl_gcaptcha_theme = $g_page['acl_gcaptcha_theme'];
|
14 |
+
}else{
|
15 |
+
$site_key = '';
|
16 |
+
$secret_key = '';
|
17 |
+
$acl_gcaptcha_theme ='yes';
|
18 |
+
}
|
19 |
+
|
20 |
+
$this->public_key = $site_key;
|
21 |
+
$this->private_key = $secret_key;
|
22 |
+
$this->acl_gcaptcha_theme = $acl_gcaptcha_theme;
|
23 |
+
|
24 |
+
// adds the captcha to the login form
|
25 |
+
add_action( 'login_form', array( $this, 'captcha_display' ) );
|
26 |
+
|
27 |
+
// authenticate the captcha answer
|
28 |
+
add_action( 'wp_authenticate_user', array( $this, 'validate_captcha_field' ), 10, 2 );
|
29 |
+
}
|
30 |
+
|
31 |
+
|
32 |
+
/** Output the ACL_gcaptcha form field. */
|
33 |
+
public function captcha_display() {
|
34 |
+
if($this->acl_gcaptcha_theme=="yes"){
|
35 |
+
$acl_gcaptcha_theme="light";
|
36 |
+
}else{
|
37 |
+
$acl_gcaptcha_theme="dark";
|
38 |
+
}
|
39 |
+
?>
|
40 |
+
<script src="https://www.google.com/recaptcha/api.js" async defer></script>
|
41 |
+
<div class="g-recaptcha" data-theme="<?php echo $acl_gcaptcha_theme; ?>" data-sitekey="<?php echo $this->public_key; ?>" style="margin-bottom:20px;"></div>
|
42 |
+
<noscript>
|
43 |
+
<div>
|
44 |
+
<div style="width: 302px; height: 422px; position: relative;">
|
45 |
+
<div style="width: 302px; height: 422px; position: absolute;">
|
46 |
+
<iframe src="https://www.google.com/recaptcha/api/fallback?k=<?=$this->public_key;?>" frameborder="0" scrolling="no"
|
47 |
+
style="width: 302px; height:422px; border-style: none;">
|
48 |
+
</iframe>
|
49 |
+
</div>
|
50 |
+
</div>
|
51 |
+
<div style="width: 300px; height: 60px; border-style: none;
|
52 |
+
bottom: 12px; left: 25px; margin: 0px; padding: 0px; right: 25px;
|
53 |
+
background: #f9f9f9; border: 1px solid #c1c1c1; border-radius: 3px;">
|
54 |
+
<textarea id="g-recaptcha-response" name="g-recaptcha-response"
|
55 |
+
class="g-recaptcha-response"
|
56 |
+
style="width: 250px; height: 40px; border: 1px solid #c1c1c1;
|
57 |
+
margin: 10px 25px; padding: 0px; resize: none;" >
|
58 |
+
</textarea>
|
59 |
+
</div>
|
60 |
+
</div>
|
61 |
+
</noscript>
|
62 |
+
<?php
|
63 |
+
}
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Verify the captcha answer
|
67 |
+
*
|
68 |
+
* @param $user string login username
|
69 |
+
* @param $password string login password
|
70 |
+
*
|
71 |
+
* @return WP_Error|WP_user
|
72 |
+
*/
|
73 |
+
public static function validate_captcha_field( $user, $password ) {
|
74 |
+
|
75 |
+
if ( ! isset( $_POST['g-recaptcha-response'] ) || ! self::captcha_verification() ) {
|
76 |
+
return new WP_Error( 'empty_captcha', '<strong>ERROR</strong>: Please confirm you are not a robot' );
|
77 |
+
}
|
78 |
+
|
79 |
+
return $user;
|
80 |
+
}
|
81 |
+
|
82 |
+
/**
|
83 |
+
* Send a GET request to verify captcha challenge
|
84 |
+
*
|
85 |
+
* @return bool
|
86 |
+
*/
|
87 |
+
public static function captcha_verification() {
|
88 |
+
|
89 |
+
$response = isset( $_POST['g-recaptcha-response'] ) ? esc_attr( $_POST['g-recaptcha-response'] ) : '';
|
90 |
+
|
91 |
+
$remote_ip = $_SERVER["REMOTE_ADDR"];
|
92 |
+
|
93 |
+
// make a GET request to the Google reCAPTCHA Server
|
94 |
+
$g_page = unserialize(get_option('Admin_custome_login_gcaptcha'));
|
95 |
+
if(isset($g_page['site_key']) && isset($g_page['secret_key'])){
|
96 |
+
$site_key = $g_page['site_key'];
|
97 |
+
$secret_key = $g_page['secret_key'];
|
98 |
+
}else{
|
99 |
+
$site_key = '';
|
100 |
+
$secret_key = '';
|
101 |
+
}
|
102 |
+
$request = wp_remote_get(
|
103 |
+
'https://www.google.com/recaptcha/api/siteverify?secret=' . $secret_key . '&response=' . $response . '&remoteip=' . $remote_ip
|
104 |
+
);
|
105 |
+
|
106 |
+
// get the request response body
|
107 |
+
$response_body = wp_remote_retrieve_body( $request );
|
108 |
+
|
109 |
+
$result = json_decode( $response_body, true );
|
110 |
+
|
111 |
+
return $result['success'];
|
112 |
+
}
|
113 |
+
}
|
114 |
+
new ACL_gcaptcha_Login_Form();
|
115 |
?>
|
admin-custom-login.php
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Plugin Name: Admin Custom Login
|
4 |
-
* Version: 2.6.
|
5 |
* Description: Customize Your WordPress Login Screen Amazingly
|
6 |
* Author: Weblizar
|
7 |
-
* Author URI:
|
8 |
-
* Plugin URI:
|
9 |
* Text Domain: admin-custom-login
|
10 |
* Domain Path: /languages
|
11 |
*/
|
@@ -344,6 +344,7 @@ function acl_export_settings() {
|
|
344 |
$site_key = $g_page['site_key'];
|
345 |
$secret_key = $g_page['secret_key'];
|
346 |
$login_enable_gcaptcha = $g_page['login_enable_gcaptcha'];
|
|
|
347 |
|
348 |
|
349 |
$ACL_ALL_Settings= serialize(array(
|
@@ -439,7 +440,9 @@ function acl_export_settings() {
|
|
439 |
|
440 |
'site_key' => $site_key,
|
441 |
'secret_key' => $secret_key,
|
442 |
-
'login_enable_gcaptcha' => $login_enable_gcaptcha
|
|
|
|
|
443 |
));
|
444 |
|
445 |
ignore_user_abort( true );
|
@@ -582,6 +585,7 @@ function acl_import_settings() {
|
|
582 |
$site_key = $ACL_Settings['site_key'];
|
583 |
$secret_key = $ACL_Settings['secret_key'];
|
584 |
$login_enable_gcaptcha = $ACL_Settings['login_enable_gcaptcha'];
|
|
|
585 |
|
586 |
$upload_dir = wp_upload_dir();
|
587 |
$plugins_dir = plugins_url();
|
@@ -791,7 +795,8 @@ function acl_import_settings() {
|
|
791 |
$g_page= serialize(array(
|
792 |
'site_key' => $site_key,
|
793 |
'secret_key' => $secret_key,
|
794 |
-
'login_enable_gcaptcha' => $login_enable_gcaptcha
|
|
|
795 |
|
796 |
));
|
797 |
update_option('Admin_custome_login_gcaptcha', $g_page);
|
1 |
<?php
|
2 |
/**
|
3 |
* Plugin Name: Admin Custom Login
|
4 |
+
* Version: 2.6.2
|
5 |
* Description: Customize Your WordPress Login Screen Amazingly
|
6 |
* Author: Weblizar
|
7 |
+
* Author URI: https://weblizar.com/plugins/
|
8 |
+
* Plugin URI: https://weblizar.com/plugins/
|
9 |
* Text Domain: admin-custom-login
|
10 |
* Domain Path: /languages
|
11 |
*/
|
344 |
$site_key = $g_page['site_key'];
|
345 |
$secret_key = $g_page['secret_key'];
|
346 |
$login_enable_gcaptcha = $g_page['login_enable_gcaptcha'];
|
347 |
+
$acl_gcaptcha_theme = $g_page['acl_gcaptcha_theme'];
|
348 |
|
349 |
|
350 |
$ACL_ALL_Settings= serialize(array(
|
440 |
|
441 |
'site_key' => $site_key,
|
442 |
'secret_key' => $secret_key,
|
443 |
+
'login_enable_gcaptcha' => $login_enable_gcaptcha,
|
444 |
+
'acl_gcaptcha_theme' => $acl_gcaptcha_theme
|
445 |
+
|
446 |
));
|
447 |
|
448 |
ignore_user_abort( true );
|
585 |
$site_key = $ACL_Settings['site_key'];
|
586 |
$secret_key = $ACL_Settings['secret_key'];
|
587 |
$login_enable_gcaptcha = $ACL_Settings['login_enable_gcaptcha'];
|
588 |
+
$acl_gcaptcha_theme = $ACL_Settings['acl_gcaptcha_theme'];
|
589 |
|
590 |
$upload_dir = wp_upload_dir();
|
591 |
$plugins_dir = plugins_url();
|
795 |
$g_page= serialize(array(
|
796 |
'site_key' => $site_key,
|
797 |
'secret_key' => $secret_key,
|
798 |
+
'login_enable_gcaptcha' => $login_enable_gcaptcha,
|
799 |
+
'acl_gcaptcha_theme' => $acl_gcaptcha_theme
|
800 |
|
801 |
));
|
802 |
update_option('Admin_custome_login_gcaptcha', $g_page);
|
css/socialcss.php
CHANGED
@@ -19,15 +19,21 @@ $social_skype_link=$Social_page['social_skype_link'];
|
|
19 |
$social_instagram_link=$Social_page['social_instagram_link'];
|
20 |
|
21 |
$login_page = unserialize(get_option('Admin_custome_login_login'));
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
if($social_icon_size=="large") { ?>
|
23 |
<style>
|
24 |
.divsocial{
|
25 |
-
text-align: <?php echo $
|
26 |
padding:20px;
|
27 |
-
<?php if($
|
28 |
padding-left : 0px;
|
29 |
<?php }?>
|
30 |
-
<?php if($
|
31 |
padding-right: 0px;
|
32 |
padding-top:42px;
|
33 |
<?php }?>
|
@@ -100,12 +106,12 @@ if($social_icon_size=="large") { ?>
|
|
100 |
<?php } else if($social_icon_size=="mediam") { ?>
|
101 |
<style>
|
102 |
.divsocial{
|
103 |
-
text-align: <?php echo $
|
104 |
padding:20px;
|
105 |
-
<?php if($
|
106 |
padding-left : 0px;
|
107 |
<?php }?>
|
108 |
-
<?php if($
|
109 |
padding-right: 0px;
|
110 |
padding-top:42px;
|
111 |
<?php }?>
|
@@ -179,12 +185,12 @@ if($social_icon_size=="large") { ?>
|
|
179 |
<?php } else { ?>
|
180 |
<style>
|
181 |
.divsocial{
|
182 |
-
text-align: <?php echo $
|
183 |
padding:20px;
|
184 |
-
<?php if($
|
185 |
padding-left : 0px;
|
186 |
<?php }?>
|
187 |
-
<?php if($
|
188 |
padding-right: 0px;
|
189 |
padding-top:42px;
|
190 |
<?php }?>
|
19 |
$social_instagram_link=$Social_page['social_instagram_link'];
|
20 |
|
21 |
$login_page = unserialize(get_option('Admin_custome_login_login'));
|
22 |
+
if(isset($login_page['login_form_float'])){
|
23 |
+
$login_form_float = $login_page['login_form_float'];
|
24 |
+
}else{
|
25 |
+
$login_form_float = "center";
|
26 |
+
}
|
27 |
+
|
28 |
if($social_icon_size=="large") { ?>
|
29 |
<style>
|
30 |
.divsocial{
|
31 |
+
text-align: <?php echo $login_form_float; ?>;
|
32 |
padding:20px;
|
33 |
+
<?php if($login_form_float == "left") {?>
|
34 |
padding-left : 0px;
|
35 |
<?php }?>
|
36 |
+
<?php if($login_form_float == "right") {?>
|
37 |
padding-right: 0px;
|
38 |
padding-top:42px;
|
39 |
<?php }?>
|
106 |
<?php } else if($social_icon_size=="mediam") { ?>
|
107 |
<style>
|
108 |
.divsocial{
|
109 |
+
text-align: <?php echo $login_form_float; ?>;
|
110 |
padding:20px;
|
111 |
+
<?php if($login_form_float == "left") {?>
|
112 |
padding-left : 0px;
|
113 |
<?php }?>
|
114 |
+
<?php if($login_form_float == "right") {?>
|
115 |
padding-right: 0px;
|
116 |
padding-top:42px;
|
117 |
<?php }?>
|
185 |
<?php } else { ?>
|
186 |
<style>
|
187 |
.divsocial{
|
188 |
+
text-align: <?php echo $login_form_float; ?>;
|
189 |
padding:20px;
|
190 |
+
<?php if($login_form_float == "left") {?>
|
191 |
padding-left : 0px;
|
192 |
<?php }?>
|
193 |
+
<?php if($login_form_float == "right") {?>
|
194 |
padding-right: 0px;
|
195 |
padding-top:42px;
|
196 |
<?php }?>
|
includes/design/text_and_color.php
CHANGED
@@ -300,23 +300,27 @@ jQuery(document).ready(function(){
|
|
300 |
</optgroup>
|
301 |
<optgroup label="Google Fonts">
|
302 |
<?php
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
|
|
|
|
|
|
|
|
320 |
</optgroup>
|
321 |
</select>
|
322 |
</td>
|
@@ -324,7 +328,7 @@ jQuery(document).ready(function(){
|
|
324 |
</table>
|
325 |
</div>
|
326 |
</div>
|
327 |
-
|
328 |
<div class="panel panel-primary panel-default content-panel">
|
329 |
<div class="panel-body">
|
330 |
<table class="form-table">
|
@@ -364,14 +368,16 @@ jQuery(document).ready(function(){
|
|
364 |
$fonts_list = json_decode($response_font_api, true);
|
365 |
// that's it
|
366 |
if(is_array($fonts_list)) {
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
|
|
|
|
375 |
}
|
376 |
?>
|
377 |
</optgroup>
|
@@ -421,10 +427,12 @@ jQuery(document).ready(function(){
|
|
421 |
$fonts_list = json_decode($response_font_api, true);
|
422 |
// that's it
|
423 |
if(is_array($fonts_list)) {
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
|
|
|
|
428 |
} else {
|
429 |
echo "<option disabled>Error to fetch Google fonts.</option>";
|
430 |
echo "<option disabled>Google font will not available in offline mode.</option>";
|
@@ -451,7 +459,6 @@ jQuery(document).ready(function(){
|
|
451 |
<tr class="" style="border-bottom:none;">
|
452 |
<td>
|
453 |
<select id="button_font_style" class="standard-dropdown" name="button_font_style" >
|
454 |
-
|
455 |
<optgroup label="Default Fonts">
|
456 |
<option value="Arial" <?php selected($RPP_Font_Style, 'Arial' ); ?>>Arial</option>
|
457 |
<option value="Arial Black" <?php selected($RPP_Font_Style, 'Arial Black' ); ?>>Arial Black</option>
|
@@ -480,10 +487,12 @@ jQuery(document).ready(function(){
|
|
480 |
$fonts_list = json_decode($response_font_api, true);
|
481 |
// that's it
|
482 |
if(is_array($fonts_list)) {
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
|
|
|
|
487 |
} else {
|
488 |
echo "<option disabled>Error to fetch Google fonts.</option>";
|
489 |
echo "<option disabled>Google font will not available in offline mode.</option>";
|
300 |
</optgroup>
|
301 |
<optgroup label="Google Fonts">
|
302 |
<?php
|
303 |
+
// fetch the Google font list
|
304 |
+
$google_api_url = 'https://www.googleapis.com/webfonts/v1/webfonts?key=AIzaSyAccXEBQEkF2rMcxcanpJKQ6y9n2lz6avM';
|
305 |
+
$response_font_api = wp_remote_retrieve_body( wp_remote_get($google_api_url, array('sslverify' => false )));
|
306 |
+
if(!is_wp_error( $response_font_api ) ) {
|
307 |
+
$fonts_list = json_decode($response_font_api, true);
|
308 |
+
// that's it
|
309 |
+
if(is_array($fonts_list)) {
|
310 |
+
if(isset($fonts_list['items'])){
|
311 |
+
$g_fonts = $fonts_list['items'];
|
312 |
+
//print_r($fonts_list);
|
313 |
+
foreach( $g_fonts as $g_font) { $font_name = $g_font['family']; ?>
|
314 |
+
<option value="<?php echo $font_name; ?>" <?php selected($RPP_Font_Style, $font_name ); ?>><?php echo $font_name; ?></option><?php
|
315 |
+
}
|
316 |
+
}
|
317 |
+
|
318 |
+
} else {
|
319 |
+
echo "<option disabled>Error to fetch Google fonts.</option>";
|
320 |
+
echo "<option disabled>Google font will not available in offline mode.</option>";
|
321 |
+
}
|
322 |
+
}
|
323 |
+
?>
|
324 |
</optgroup>
|
325 |
</select>
|
326 |
</td>
|
328 |
</table>
|
329 |
</div>
|
330 |
</div>
|
331 |
+
|
332 |
<div class="panel panel-primary panel-default content-panel">
|
333 |
<div class="panel-body">
|
334 |
<table class="form-table">
|
368 |
$fonts_list = json_decode($response_font_api, true);
|
369 |
// that's it
|
370 |
if(is_array($fonts_list)) {
|
371 |
+
if(isset($fonts_list['items'])){
|
372 |
+
$g_fonts = $fonts_list['items'];
|
373 |
+
foreach( $g_fonts as $g_font) { $font_name = $g_font['family']; ?>
|
374 |
+
<option value="<?php echo $font_name; ?>" <?php selected($RPP_Font_Style, $font_name ); ?>><?php echo $font_name; ?></option><?php
|
375 |
+
}
|
376 |
+
}
|
377 |
+
} else {
|
378 |
+
echo "<option disabled>Error to fetch Google fonts.</option>";
|
379 |
+
echo "<option disabled>Google font will not available in offline mode.</option>";
|
380 |
+
}
|
381 |
}
|
382 |
?>
|
383 |
</optgroup>
|
427 |
$fonts_list = json_decode($response_font_api, true);
|
428 |
// that's it
|
429 |
if(is_array($fonts_list)) {
|
430 |
+
if(isset($fonts_list['items'])){
|
431 |
+
$g_fonts = $fonts_list['items'];
|
432 |
+
foreach( $g_fonts as $g_font) { $font_name = $g_font['family']; ?>
|
433 |
+
<option value="<?php echo $font_name; ?>" <?php selected($RPP_Font_Style, $font_name ); ?>><?php echo $font_name; ?></option><?php
|
434 |
+
}
|
435 |
+
}
|
436 |
} else {
|
437 |
echo "<option disabled>Error to fetch Google fonts.</option>";
|
438 |
echo "<option disabled>Google font will not available in offline mode.</option>";
|
459 |
<tr class="" style="border-bottom:none;">
|
460 |
<td>
|
461 |
<select id="button_font_style" class="standard-dropdown" name="button_font_style" >
|
|
|
462 |
<optgroup label="Default Fonts">
|
463 |
<option value="Arial" <?php selected($RPP_Font_Style, 'Arial' ); ?>>Arial</option>
|
464 |
<option value="Arial Black" <?php selected($RPP_Font_Style, 'Arial Black' ); ?>>Arial Black</option>
|
487 |
$fonts_list = json_decode($response_font_api, true);
|
488 |
// that's it
|
489 |
if(is_array($fonts_list)) {
|
490 |
+
if(isset($fonts_list['items'])){
|
491 |
+
$g_fonts = $fonts_list['items'];
|
492 |
+
foreach( $g_fonts as $g_font) { $font_name = $g_font['family']; ?>
|
493 |
+
<option value="<?php echo $font_name; ?>" <?php selected($RPP_Font_Style, $font_name ); ?>><?php echo $font_name; ?></option><?php
|
494 |
+
}
|
495 |
+
}
|
496 |
} else {
|
497 |
echo "<option disabled>Error to fetch Google fonts.</option>";
|
498 |
echo "<option disabled>Google font will not available in offline mode.</option>";
|
includes/get_value.php
CHANGED
@@ -79,7 +79,8 @@ if ( ! defined( 'ABSPATH' ) ) exit;
|
|
79 |
$site_key = $g_page['site_key'];
|
80 |
$secret_key = $g_page['secret_key'];
|
81 |
$login_enable_gcaptcha = $g_page['login_enable_gcaptcha'];
|
82 |
-
|
|
|
83 |
// Get value of Slidshow image
|
84 |
$Slidshow_image = unserialize(get_option('Admin_custome_login_Slidshow'));
|
85 |
$Slidshow_image_1=$Slidshow_image['Slidshow_image_1'];
|
@@ -113,7 +114,6 @@ if ( ! defined( 'ABSPATH' ) ) exit;
|
|
113 |
$social_youtube_link =$Social_page['social_youtube_link'];
|
114 |
$social_flickr_link =$Social_page['social_flickr_link'];
|
115 |
$social_tumblr_link =$Social_page['social_tumblr_link'];
|
116 |
-
$social_vkontakte_link =$Social_page['social_vkontakte_link'];
|
117 |
$social_skype_link =$Social_page['social_skype_link'];
|
118 |
$social_instagram_link =$Social_page['social_instagram_link'];
|
119 |
$social_telegram_link =$Social_page['social_telegram_link'];
|
79 |
$site_key = $g_page['site_key'];
|
80 |
$secret_key = $g_page['secret_key'];
|
81 |
$login_enable_gcaptcha = $g_page['login_enable_gcaptcha'];
|
82 |
+
if(isset($g_page['acl_gcaptcha_theme'])){ $acl_gcaptcha_theme = $g_page['acl_gcaptcha_theme']; } else { $acl_gcaptcha_theme="yes" ;}
|
83 |
+
|
84 |
// Get value of Slidshow image
|
85 |
$Slidshow_image = unserialize(get_option('Admin_custome_login_Slidshow'));
|
86 |
$Slidshow_image_1=$Slidshow_image['Slidshow_image_1'];
|
114 |
$social_youtube_link =$Social_page['social_youtube_link'];
|
115 |
$social_flickr_link =$Social_page['social_flickr_link'];
|
116 |
$social_tumblr_link =$Social_page['social_tumblr_link'];
|
|
|
117 |
$social_skype_link =$Social_page['social_skype_link'];
|
118 |
$social_instagram_link =$Social_page['social_instagram_link'];
|
119 |
$social_telegram_link =$Social_page['social_telegram_link'];
|
includes/googlecaptcha-settings/gcaptcha-settings.php
CHANGED
@@ -85,6 +85,21 @@ if ( ! defined( 'ABSPATH' ) ) exit;
|
|
85 |
<div class="acl_gcaptcha_info"><strong>Note : </strong> After enable google captcha display please insert site key & secret key.</div>
|
86 |
</td>
|
87 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
</table>
|
89 |
</div>
|
90 |
</div>
|
@@ -165,8 +180,14 @@ function Custom_gcaptcha(Action, id){
|
|
165 |
} else {
|
166 |
var login_enable_gcaptcha = document.getElementById('login_enable_gcaptcha2').value;
|
167 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
168 |
|
169 |
-
var PostData = "Action=" + Action + "&site_key=" + site_key + "&secret_key=" + secret_key + "&login_enable_gcaptcha=" +login_enable_gcaptcha ;
|
170 |
jQuery.ajax({
|
171 |
dataType : 'html',
|
172 |
type: 'POST',
|
@@ -241,6 +262,9 @@ function Custom_gcaptcha(Action, id){
|
|
241 |
jQuery(document).ready( function() {
|
242 |
jQuery('input[name=enable_gcaptcha]').val(['yes']);
|
243 |
});
|
|
|
|
|
|
|
244 |
|
245 |
// Reset message box open
|
246 |
jQuery(".dialog-button109").click();
|
@@ -261,6 +285,7 @@ if(isset($_POST['Action'])) {
|
|
261 |
$site_key = sanitize_text_field($_POST['site_key']);
|
262 |
$secret_key = sanitize_text_field( $_POST['secret_key']);
|
263 |
$login_enable_gcaptcha = sanitize_text_field( $_POST['login_enable_gcaptcha']);
|
|
|
264 |
|
265 |
|
266 |
// save values in option table
|
@@ -268,6 +293,7 @@ if(isset($_POST['Action'])) {
|
|
268 |
'site_key' => $site_key,
|
269 |
'secret_key'=> $secret_key,
|
270 |
'login_enable_gcaptcha'=> $login_enable_gcaptcha,
|
|
|
271 |
|
272 |
));
|
273 |
update_option('Admin_custome_login_gcaptcha', $g_page);
|
@@ -280,6 +306,7 @@ if(isset($_POST['Action'])) {
|
|
280 |
'site_key'=>'',
|
281 |
'secret_key'=>'',
|
282 |
'login_enable_gcaptcha'=>'no',
|
|
|
283 |
|
284 |
));
|
285 |
update_option('Admin_custome_login_gcaptcha', $g_page);
|
85 |
<div class="acl_gcaptcha_info"><strong>Note : </strong> After enable google captcha display please insert site key & secret key.</div>
|
86 |
</td>
|
87 |
</tr>
|
88 |
+
|
89 |
+
<tr>
|
90 |
+
<th scope="row" ><?php _e('Captcha Theme',WEBLIZAR_ACL)?></th>
|
91 |
+
<td></td>
|
92 |
+
</tr>
|
93 |
+
<tr class="radio-span" style="border-bottom:none;">
|
94 |
+
<td>
|
95 |
+
<span>
|
96 |
+
<input type="radio" name="acl_gcaptcha_theme" value="yes" id="acl_gcaptcha_theme1" <?php if($acl_gcaptcha_theme=="yes")echo "checked"; ?> /> <?php _e('Light', WEBLIZAR_ACL)?><br>
|
97 |
+
</span>
|
98 |
+
<span>
|
99 |
+
<input type="radio" name="acl_gcaptcha_theme" value="no" id="acl_gcaptcha_theme2" <?php if($acl_gcaptcha_theme=="no")echo "checked"; ?> /> <?php _e('Dark', WEBLIZAR_ACL)?><br>
|
100 |
+
</span>
|
101 |
+
</td>
|
102 |
+
</tr>
|
103 |
</table>
|
104 |
</div>
|
105 |
</div>
|
180 |
} else {
|
181 |
var login_enable_gcaptcha = document.getElementById('login_enable_gcaptcha2').value;
|
182 |
}
|
183 |
+
|
184 |
+
if (document.getElementById('acl_gcaptcha_theme1').checked) {
|
185 |
+
var acl_gcaptcha_theme = document.getElementById('acl_gcaptcha_theme1').value;
|
186 |
+
} else {
|
187 |
+
var acl_gcaptcha_theme = document.getElementById('acl_gcaptcha_theme2').value;
|
188 |
+
}
|
189 |
|
190 |
+
var PostData = "Action=" + Action + "&site_key=" + site_key + "&secret_key=" + secret_key + "&login_enable_gcaptcha=" + login_enable_gcaptcha + "&acl_gcaptcha_theme=" + acl_gcaptcha_theme;
|
191 |
jQuery.ajax({
|
192 |
dataType : 'html',
|
193 |
type: 'POST',
|
262 |
jQuery(document).ready( function() {
|
263 |
jQuery('input[name=enable_gcaptcha]').val(['yes']);
|
264 |
});
|
265 |
+
jQuery(document).ready( function() {
|
266 |
+
jQuery('input[name=acl_gcaptcha_theme]').val(['yes']);
|
267 |
+
});
|
268 |
|
269 |
// Reset message box open
|
270 |
jQuery(".dialog-button109").click();
|
285 |
$site_key = sanitize_text_field($_POST['site_key']);
|
286 |
$secret_key = sanitize_text_field( $_POST['secret_key']);
|
287 |
$login_enable_gcaptcha = sanitize_text_field( $_POST['login_enable_gcaptcha']);
|
288 |
+
$acl_gcaptcha_theme = sanitize_text_field( $_POST['acl_gcaptcha_theme']);
|
289 |
|
290 |
|
291 |
// save values in option table
|
293 |
'site_key' => $site_key,
|
294 |
'secret_key'=> $secret_key,
|
295 |
'login_enable_gcaptcha'=> $login_enable_gcaptcha,
|
296 |
+
'acl_gcaptcha_theme'=>$acl_gcaptcha_theme,
|
297 |
|
298 |
));
|
299 |
update_option('Admin_custome_login_gcaptcha', $g_page);
|
306 |
'site_key'=>'',
|
307 |
'secret_key'=>'',
|
308 |
'login_enable_gcaptcha'=>'no',
|
309 |
+
'acl_gcaptcha_theme'=>'yes',
|
310 |
|
311 |
));
|
312 |
update_option('Admin_custome_login_gcaptcha', $g_page);
|
login-form-screen.php
CHANGED
@@ -10,6 +10,22 @@ function acl_er_login_logo() {
|
|
10 |
$text_and_color_page = unserialize(get_option('Admin_custome_login_text'));
|
11 |
$logo_page = unserialize(get_option('Admin_custome_login_logo'));
|
12 |
$Social_page = unserialize(get_option('Admin_custome_login_Social'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
|
14 |
if ($top_page['top_bg_type'] == "slider-background"){
|
15 |
if($top_page['top_bg_slider_animation'] == "slider-style1") {
|
@@ -86,7 +102,7 @@ function acl_er_login_logo() {
|
|
86 |
});
|
87 |
</script>
|
88 |
<style type="text/css">
|
89 |
-
<?php echo $
|
90 |
|
91 |
/* Styles loading for Admin Custome Login */
|
92 |
html {
|
@@ -120,13 +136,13 @@ function acl_er_login_logo() {
|
|
120 |
body.login div#login h1 a {
|
121 |
background-image: url(<?php echo $logo_page['logo_image']; ?>) !important;
|
122 |
padding-bottom: 30px;
|
123 |
-
<?php if($
|
124 |
margin: 0 auto;
|
125 |
<?php }?>
|
126 |
-
<?php if($
|
127 |
margin-left:30px;
|
128 |
<?php }?>
|
129 |
-
<?php if($
|
130 |
margin-right:25px;
|
131 |
<?php }?>
|
132 |
background-size: <?php echo $logo_page['logo_width'] ?>px <?php echo $logo_page['logo_height'] ?>px;
|
@@ -150,20 +166,20 @@ function acl_er_login_logo() {
|
|
150 |
add_filter( 'login_headertitle', 'my_login_logo_url_title' );
|
151 |
?>
|
152 |
|
153 |
-
<?php if($
|
154 |
#login {
|
155 |
-
float:<?php echo $
|
156 |
position: relative !important;
|
157 |
-
<?php if($
|
158 |
padding-left: 25px !important;
|
159 |
<?php }?>
|
160 |
-
<?php if($
|
161 |
padding-right: 25px !important;
|
162 |
<?php } ?>
|
163 |
}
|
164 |
<?php } ?>
|
165 |
|
166 |
-
<?php if($
|
167 |
#login{
|
168 |
position:relative !important;
|
169 |
<?php if($login_page['login_form_left'] !== "") { ?>
|
@@ -239,7 +255,7 @@ function acl_er_login_logo() {
|
|
239 |
text-shadow: <?php echo $link_shadow_color ?>;
|
240 |
}
|
241 |
|
242 |
-
<?php if($
|
243 |
.login #nav {
|
244 |
margin: 29px 0 60px;
|
245 |
}
|
10 |
$text_and_color_page = unserialize(get_option('Admin_custome_login_text'));
|
11 |
$logo_page = unserialize(get_option('Admin_custome_login_logo'));
|
12 |
$Social_page = unserialize(get_option('Admin_custome_login_Social'));
|
13 |
+
|
14 |
+
if(isset($login_page['login_custom_css'])){
|
15 |
+
$login_custom_css = $login_page['login_custom_css'];
|
16 |
+
}else{
|
17 |
+
$login_custom_css = "";
|
18 |
+
}
|
19 |
+
if(isset($login_page['login_form_float'])){
|
20 |
+
$login_form_float = $login_page['login_form_float'];
|
21 |
+
}else{
|
22 |
+
$login_form_float = "center";
|
23 |
+
}
|
24 |
+
if(isset($login_page['login_form_position'])){
|
25 |
+
$login_form_position = $login_page['login_form_position'];
|
26 |
+
}else{
|
27 |
+
$login_form_position = "default";
|
28 |
+
}
|
29 |
|
30 |
if ($top_page['top_bg_type'] == "slider-background"){
|
31 |
if($top_page['top_bg_slider_animation'] == "slider-style1") {
|
102 |
});
|
103 |
</script>
|
104 |
<style type="text/css">
|
105 |
+
<?php echo $login_custom_css; ?>
|
106 |
|
107 |
/* Styles loading for Admin Custome Login */
|
108 |
html {
|
136 |
body.login div#login h1 a {
|
137 |
background-image: url(<?php echo $logo_page['logo_image']; ?>) !important;
|
138 |
padding-bottom: 30px;
|
139 |
+
<?php if($login_form_float == "center") {?>
|
140 |
margin: 0 auto;
|
141 |
<?php }?>
|
142 |
+
<?php if($login_form_float == "left") {?>
|
143 |
margin-left:30px;
|
144 |
<?php }?>
|
145 |
+
<?php if($login_form_float == "right") {?>
|
146 |
margin-right:25px;
|
147 |
<?php }?>
|
148 |
background-size: <?php echo $logo_page['logo_width'] ?>px <?php echo $logo_page['logo_height'] ?>px;
|
166 |
add_filter( 'login_headertitle', 'my_login_logo_url_title' );
|
167 |
?>
|
168 |
|
169 |
+
<?php if($login_form_position == 'lf_float_style') { ?>
|
170 |
#login {
|
171 |
+
float:<?php echo $login_form_float; ?> !important;
|
172 |
position: relative !important;
|
173 |
+
<?php if($login_form_float == "left") { ?>
|
174 |
padding-left: 25px !important;
|
175 |
<?php }?>
|
176 |
+
<?php if($login_form_float == "right") { ?>
|
177 |
padding-right: 25px !important;
|
178 |
<?php } ?>
|
179 |
}
|
180 |
<?php } ?>
|
181 |
|
182 |
+
<?php if($login_form_position == 'lf_customize_style') { ?>
|
183 |
#login{
|
184 |
position:relative !important;
|
185 |
<?php if($login_page['login_form_left'] !== "") { ?>
|
255 |
text-shadow: <?php echo $link_shadow_color ?>;
|
256 |
}
|
257 |
|
258 |
+
<?php if($login_form_float == "right") { ?>
|
259 |
.login #nav {
|
260 |
margin: 29px 0 60px;
|
261 |
}
|
readme.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
=== Admin Custom Login ===
|
2 |
Contributors: weblizar
|
3 |
-
Donate link:
|
4 |
Tags: custom login page, custom admin login, custom login, customize wordpress login page, design wordpress login
|
5 |
Requires at least: 4.0
|
6 |
Tested up to: 4.9.6
|
7 |
-
Stable tag: 2.6.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -115,12 +115,14 @@ If you have any question contact us at here: [Plugin Support Forum ](http://word
|
|
115 |
8. http://www.naturesfolio.com Made by Sheila
|
116 |
9. Made by Mary Job
|
117 |
10. http://amirasghari.com Made by Dr. Amir Asghari
|
118 |
-
11.
|
|
|
119 |
|
120 |
== Changelog ==
|
121 |
|
122 |
For more information, see [Weblizar](http://www.weblizar.com/)
|
123 |
|
|
|
124 |
= 2.6.1 - Bug fixed undefined variables + Social icon color bug fixed.
|
125 |
= 2.6.0 - Add Google Captcha settings + Update Font Awesome Library + Update code of google font family + Add Offers Page + Add Display note to user above login form setting + Add tagline message below login form setting + Plugin tested with latest WordPress 4.9.6 version update
|
126 |
= 2.5.9 - Plugin tested with latest WordPress 4.9.5 version update
|
1 |
=== Admin Custom Login ===
|
2 |
Contributors: weblizar
|
3 |
+
Donate link: https://www.weblizar.com/
|
4 |
Tags: custom login page, custom admin login, custom login, customize wordpress login page, design wordpress login
|
5 |
Requires at least: 4.0
|
6 |
Tested up to: 4.9.6
|
7 |
+
Stable tag: 2.6.2
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
115 |
8. http://www.naturesfolio.com Made by Sheila
|
116 |
9. Made by Mary Job
|
117 |
10. http://amirasghari.com Made by Dr. Amir Asghari
|
118 |
+
11. https://texontowel.com Made by Inn Design
|
119 |
+
12. Admin Setting Dashboard
|
120 |
|
121 |
== Changelog ==
|
122 |
|
123 |
For more information, see [Weblizar](http://www.weblizar.com/)
|
124 |
|
125 |
+
= 2.6.2 - Bug fixed undefined variables in log file + Add Google Captcha Theme Settings
|
126 |
= 2.6.1 - Bug fixed undefined variables + Social icon color bug fixed.
|
127 |
= 2.6.0 - Add Google Captcha settings + Update Font Awesome Library + Update code of google font family + Add Offers Page + Add Display note to user above login form setting + Add tagline message below login form setting + Plugin tested with latest WordPress 4.9.6 version update
|
128 |
= 2.5.9 - Plugin tested with latest WordPress 4.9.5 version update
|