| @@ -16,14 +16,14 @@ | ||
| 16 | 16 | |
| 17 | 17 | function loginizer_admin_promo_hooks(){ |
| 18 | 18 | global $loginizer; |
| 19 | 19 | |
| 20 | - if(!current_user_can('activate_plugins')){ | |
| 20 | + if(!current_user_can('activate_plugins') || defined('SITEPAD')){ | |
| 21 | 21 | return; |
| 22 | 22 | } |
| 23 | 23 | |
| 24 | 24 | // Is the premium features there ? |
| 25 | - if(defined('LOGINIZER_PREMIUM')){ | |
| 25 | + if(!defined('LOGINIZER_PREMIUM')){ | |
| 26 | 26 | // The promo time |
| 27 | 27 | $loginizer['promo_time'] = get_option('loginizer_promo_time'); |
| 28 | 28 | if(empty($loginizer['promo_time'])){ |
| 29 | 29 | $loginizer['promo_time'] = time(); |
| @@ -459,9 +459,9 @@ | ||
| 459 | 459 | } |
| 460 | 460 | </script> |
| 461 | 461 | |
| 462 | 462 | <hr /> |
| 463 | - <a href="http://loginizer.com" target="_blank">Loginizer</a> '.__('v'.LOGINIZER_VERSION.'. You can report any bugs ','loginizer').'<a href="http://wordpress.org/support/plugin/loginizer" target="_blank">'.__('here','loginizer').'</a>.'; | |
| 463 | + <a href="http://loginizer.com" target="_blank">Loginizer</a> v'.LOGINIZER_VERSION.'. '.__('You can report any bugs ','loginizer').'<a href="http://wordpress.org/support/plugin/loginizer" target="_blank">'.__('here','loginizer').'</a>.'; | |
| 464 | 464 | |
| 465 | 465 | } |
| 466 | 466 | |
| 467 | 467 | echo ' |
| @@ -548,11 +548,19 @@ | ||
| 548 | 548 | // Rename Login |
| 549 | 549 | add_submenu_page('loginizer', __('Security Settings', 'loginizer'), __('Rename Login', 'loginizer'), 'activate_plugins', 'loginizer', 'loginizer_security_settings'); |
| 550 | 550 | |
| 551 | 551 | } |
| 552 | - | |
| 552 | + | |
| 553 | 553 | // Brute Force |
| 554 | 554 | add_submenu_page('loginizer', __('Brute Force Settings', 'loginizer'), __('Brute Force', 'loginizer'), 'activate_plugins', 'loginizer_brute_force', 'loginizer_brute_force_settings'); |
| 555 | + | |
| 556 | + if(defined('LOGINIZER_PREMIUM')){ | |
| 557 | + // WAF Security Firewall | |
| 558 | + $expiry_date = strtotime('2026-03-01'); | |
| 559 | + $tag_new = time() < $expiry_date ? '<span style="display: inline-block; margin-left: 10px; padding: 0px 5px; color: #fff; background-color: #d63638; border-radius: 2px;">'.__('New', 'loginizer').'</span>' : ''; | |
| 560 | + | |
| 561 | + add_submenu_page('loginizer', __('Country Block', 'loginizer'), __('Country Block', 'loginizer').' '.$tag_new, 'activate_plugins', 'loginizer_firewall', 'loginizer_firewall_settings'); | |
| 562 | + } | |
| 555 | 563 | |
| 556 | 564 | // PasswordLess |
| 557 | 565 | add_submenu_page('loginizer', __($loginizer['prefix'].'PasswordLess Settings', 'loginizer'), __('PasswordLess', 'loginizer'), 'activate_plugins', 'loginizer_passwordless', 'loginizer_passwordless_settings'); |
| 558 | 566 | |
| @@ -564,21 +572,21 @@ | ||
| 564 | 572 | |
| 565 | 573 | } |
| 566 | 574 | |
| 567 | 575 | // reCaptcha |
| 568 | - add_submenu_page('loginizer', __($loginizer['prefix'].'reCAPTCHA Settings', 'loginizer'), __('reCAPTCHA', 'loginizer'), 'activate_plugins', 'loginizer_recaptcha', 'loginizer_recaptcha_settings'); | |
| 576 | + add_submenu_page('loginizer', $loginizer['prefix'].__('reCAPTCHA Settings', 'loginizer'), __('reCAPTCHA', 'loginizer'), 'activate_plugins', 'loginizer_recaptcha', 'loginizer_recaptcha_settings'); | |
| 569 | 577 | |
| 570 | 578 | // Temporary Login |
| 571 | - add_submenu_page('loginizer', __($loginizer['prefix'].'SSO', 'loginizer'), __('Single Sign On', 'loginizer'). ((time() < strtotime('30 November 2023')) ? ' <span style="color:yellow;">Update</span>' : ''), 'activate_plugins', 'loginizer_sso', 'loginizer_sso_settings'); | |
| 579 | + add_submenu_page('loginizer', $loginizer['prefix'].__('SSO', 'loginizer'), __('Single Sign On', 'loginizer'). ((time() < strtotime('30 November 2023')) ? ' <span style="color:yellow;">Update</span>' : ''), 'activate_plugins', 'loginizer_sso', 'loginizer_sso_settings'); | |
| 572 | 580 | |
| 573 | 581 | // Social Login |
| 574 | - $hook_name = add_submenu_page('loginizer', __($loginizer['prefix'].'social_login', 'loginizer'), __('Social Login', 'loginizer') . (defined('LOGINIZER_PREMIUM') && (time() < strtotime('30 June 2025')) ? ' <span style="color:yellow;font-size:12px;">Updated</span>' : ''), 'activate_plugins', 'loginizer_social_login', 'loginizer_social_login_settings'); | |
| 582 | + $hook_name = add_submenu_page('loginizer', $loginizer['prefix']. __('Social Login', 'loginizer'), __('Social Login', 'loginizer') . (defined('LOGINIZER_PREMIUM') && (time() < strtotime('30 June 2025')) ? ' <span style="color:yellow;font-size:12px;">Updated</span>' : ''), 'activate_plugins', 'loginizer_social_login', 'loginizer_social_login_settings'); | |
| 575 | 583 | |
| 576 | 584 | // Security Settings |
| 577 | 585 | if(!defined('SITEPAD')){ |
| 578 | 586 | |
| 579 | 587 | // Security Settings |
| 580 | - add_submenu_page('loginizer', __($loginizer['prefix'].'Security Settings', 'loginizer'), __('Security Settings', 'loginizer'), 'activate_plugins', 'loginizer_security', 'loginizer_security_settings'); | |
| 588 | + add_submenu_page('loginizer', $loginizer['prefix'].__('Security Settings', 'loginizer'), __('Security Settings', 'loginizer'), 'activate_plugins', 'loginizer_security', 'loginizer_security_settings'); | |
| 581 | 589 | |
| 582 | 590 | // File Checksums |
| 583 | 591 | add_submenu_page('loginizer', __('Loginizer File Checksums', 'loginizer'), __('File Checksums', 'loginizer'), 'activate_plugins', 'loginizer_checksums', 'loginizer_checksums_settings'); |
| 584 | 592 | |
| @@ -608,68 +616,60 @@ | ||
| 608 | 616 | function loginizer_promo(){ |
| 609 | 617 | |
| 610 | 618 | echo ' |
| 611 | 619 | <style> |
| 612 | -.lz_button { | |
| 613 | -background-color: #4CAF50; /* Green */ | |
| 614 | -border: none; | |
| 615 | -color: white; | |
| 616 | -padding: 8px 16px; | |
| 617 | -text-align: center; | |
| 618 | -text-decoration: none; | |
| 619 | -display: inline-block; | |
| 620 | -font-size: 16px; | |
| 621 | -margin: 4px 2px; | |
| 622 | --webkit-transition-duration: 0.4s; /* Safari */ | |
| 623 | -transition-duration: 0.4s; | |
| 624 | -cursor: pointer; | |
| 625 | -} | |
| 626 | - | |
| 627 | -.lz_button:focus{ | |
| 628 | -border: none; | |
| 629 | -color: white; | |
| 630 | -} | |
| 631 | - | |
| 632 | -.lz_button1 { | |
| 633 | -color: white; | |
| 620 | +.wp-core-ui .lz_button1 { | |
| 634 | 621 | background-color: #4CAF50; |
| 635 | -border:3px solid #4CAF50; | |
| 622 | +border-color: transparent; | |
| 623 | +border-radius: 2px; | |
| 624 | +color: #fff; | |
| 636 | 625 | } |
| 637 | 626 | |
| 638 | -.lz_button1:hover { | |
| 639 | -box-shadow: 0 6px 8px 0 rgba(0,0,0,0.24), 0 9px 25px 0 rgba(0,0,0,0.19); | |
| 640 | -color: white; | |
| 641 | -border:3px solid #4CAF50; | |
| 627 | +.wp-core-ui .lz_button1:hover { | |
| 628 | +background-color:#3b963f; | |
| 629 | +border-color: transparent; | |
| 630 | +border-radius: 2px; | |
| 631 | +color: #fff; | |
| 642 | 632 | } |
| 643 | 633 | |
| 644 | -.lz_button2 { | |
| 645 | -color: white; | |
| 634 | +.wp-core-ui .lz_button2 { | |
| 646 | 635 | background-color: #0085ba; |
| 636 | +border-color: transparent; | |
| 637 | +border-radius: 2px; | |
| 638 | +color: #fff; | |
| 647 | 639 | } |
| 648 | 640 | |
| 649 | -.lz_button2:hover { | |
| 650 | -box-shadow: 0 6px 8px 0 rgba(0,0,0,0.24), 0 9px 25px 0 rgba(0,0,0,0.19); | |
| 651 | -color: white; | |
| 641 | +.wp-core-ui .lz_button2:hover { | |
| 642 | +background-color: #0175a3; | |
| 643 | +border-color: transparent; | |
| 644 | +border-radius: 2px; | |
| 645 | +color: #fff; | |
| 652 | 646 | } |
| 653 | 647 | |
| 654 | -.lz_button3 { | |
| 655 | -color: white; | |
| 648 | +.wp-core-ui .lz_button3 { | |
| 656 | 649 | background-color: #365899; |
| 650 | +border-color: transparent; | |
| 651 | +border-radius: 2px; | |
| 652 | +color: #fff; | |
| 657 | 653 | } |
| 658 | 654 | |
| 659 | -.lz_button3:hover { | |
| 660 | -box-shadow: 0 6px 8px 0 rgba(0,0,0,0.24), 0 9px 25px 0 rgba(0,0,0,0.19); | |
| 661 | -color: white; | |
| 655 | +.wp-core-ui .lz_button3:hover { | |
| 656 | +border-color: transparent; | |
| 657 | +background-color: #274785; | |
| 658 | +color:#fff; | |
| 662 | 659 | } |
| 663 | 660 | |
| 664 | -.lz_button4 { | |
| 665 | -color: white; | |
| 666 | -background-color: rgb(66, 184, 221); | |
| 661 | +.wp-core-ui .lz_button4 { | |
| 662 | +background-color: #14171A; | |
| 663 | +border-color: transparent; | |
| 664 | +border-radius: 2px; | |
| 665 | +color: #fff; | |
| 667 | 666 | } |
| 668 | 667 | |
| 669 | -.lz_button4:hover { | |
| 670 | -box-shadow: 0 6px 8px 0 rgba(0,0,0,0.24), 0 9px 25px 0 rgba(0,0,0,0.19); | |
| 671 | -color: white; | |
| 668 | +.wp-core-ui .lz_button4:hover { | |
| 669 | +background-color: #24292E; | |
| 670 | +color: #fff; | |
| 671 | +border-color: transparent; | |
| 672 | 672 | } |
| 673 | 673 | |
| 674 | 674 | .loginizer_promo-close{ |
| 675 | 675 | float:right; |
| @@ -706,12 +706,12 @@ | ||
| 706 | 706 | </a> |
| 707 | 707 | <img src="'.LOGINIZER_URL.'/assets/images/loginizer-200.png" style="float:left; margin:10px 20px 10px 10px" width="100" /> |
| 708 | 708 | <p style="font-size:16px">We are glad you like Loginizer and have been using it since the past few days. It is time to take the next step </p> |
| 709 | 709 | <p> |
| 710 | - <a class="lz_button lz_button1" target="_blank" href="https://loginizer.com/features">Upgrade to Pro</a> | |
| 711 | - <a class="lz_button lz_button2" target="_blank" href="https://wordpress.org/support/view/plugin-reviews/loginizer">Rate it 5★\'s</a> | |
| 712 | - <a class="lz_button lz_button3" target="_blank" href="https://www.facebook.com/Loginizer-815504798591884/">Like Us on Facebook</a> | |
| 713 | - <a class="lz_button lz_button4" target="_blank" href="https://twitter.com/home?status='.rawurlencode('I use @loginizer to secure my #WordPress site - https://loginizer.com').'">Tweet about Loginizer</a> | |
| 710 | + <a class="button lz_button1" target="_blank" href="https://loginizer.com/features">'.esc_html__('Upgrade to Pro', 'loginizer').'</a> | |
| 711 | + <a class="button lz_button2" target="_blank" href="https://wordpress.org/support/view/plugin-reviews/loginizer">Rate it 5★\'s</a> | |
| 712 | + <a class="button lz_button3" target="_blank" href="https://www.facebook.com/Loginizer-815504798591884/">'.esc_html__('Like Us on Facebook', 'loginizer').'</a> | |
| 713 | + <a class="button lz_button4" target="_blank" href="https://x.com/intent/tweet?text='.rawurlencode('I use @loginizer to secure my #WordPress site - https://loginizer.com').'">'.esc_html__('Post on X about Loginizer', 'loginizer').'</a> | |
| 714 | 714 | </p> |
| 715 | 715 | </div>'; |
| 716 | 716 | |
| 717 | 717 | } |
| @@ -761,8 +761,13 @@ | ||
| 761 | 761 | function loginizer_social_login_settings(){ |
| 762 | 762 | include_once LOGINIZER_DIR . '/main/settings/social_login.php'; |
| 763 | 763 | |
| 764 | 764 | loginizer_social_login(); |
| 765 | +} | |
| 766 | + | |
| 767 | +function loginizer_firewall_settings(){ | |
| 768 | + include_once LOGINIZER_PRO_DIR . 'main/settings/waf.php'; | |
| 769 | + loginizer_pro_firewall(); | |
| 765 | 770 | } |
| 766 | 771 | |
| 767 | 772 | // Hides the interim login poup after successful login. |
| 768 | 773 | function loginizer_social_interim_js(){ |