'.__('Let your friends know that you have secured your website :','loginizer').'
Loginizer '.__('v'.LOGINIZER_VERSION.'. You can report any bugs ','loginizer').''.__('here','loginizer').'.';
}
echo '
';
}
// The Loginizer Admin Options Page
function loginizer_page_header($title = 'Loginizer'){
global $loginizer;
?>
';
}
function loginizer_recaptcha_settings(){
include_once LOGINIZER_DIR . '/main/settings/recaptcha.php';
loginizer_page_recaptcha();
}
function loginizer_2fa_settings(){
include_once LOGINIZER_DIR . '/main/settings/2fa.php';
loginizer_page_2fa();
}
function loginizer_passwordless_settings(){
include_once LOGINIZER_DIR . '/main/settings/passwordless.php';
loginizer_page_passwordless();
}
function loginizer_security_settings(){
include_once LOGINIZER_DIR . '/main/settings/security.php';
loginizer_page_security();
}
function loginizer_brute_force_settings(){
include_once LOGINIZER_DIR . '/main/settings/brute-force.php';
loginizer_page_brute_force();
}
function loginizer_checksums_settings(){
include_once LOGINIZER_DIR . '/main/settings/checksum.php';
loginizer_page_checksums();
}
function loginizer_dashboard(){
include_once LOGINIZER_DIR . '/main/settings/dashboard.php';
loginizer_page_dashboard();
}
function loginizer_sso_settings(){
include_once LOGINIZER_DIR . '/main/settings/sso.php';
loginizer_sso();
}
function loginizer_social_login_settings(){
include_once LOGINIZER_DIR . '/main/settings/social_login.php';
loginizer_social_login();
}
// Hides the interim login poup after successful login.
function loginizer_social_interim_js(){
if(isset($_GET['interim_login']) && $_GET['interim_login'] === 'lz' && is_user_logged_in()){
echo '';
}
}
// Show alert when the login url gets changes from when the Loginizer social settings were setup.
function loginizer_social_login_url_alert(){
// We want to show this error to user which has sufficient privilage
if(!current_user_can('activate_plugins')){
return;
}
if(get_option('loginizer_social_login_url', '') === wp_login_url()){
return;
}
$provider_settings = get_option('loginizer_provider_settings', []);
// If we dont have any settings then it dosent matter what URL is set.
// As it will be updated once user saves the settings.
if(empty($provider_settings)){
return;
}
$has_enabled = false;
foreach($provider_settings as $provider){
if($provider['enabled']){
$has_enabled = true;
break;
}
}
// If we have no Provider enabled then just show the warning on the social login page.
if(empty($has_enabled) && (empty($_GET['page']) || $_GET['page'] !== 'loginizer_social_login')){
return;
}
echo '
'.esc_html__('You changed the login slug and have some social login apps enabled. These social login apps use the login URL as the redirect URI. This means that since the login URL has changed, the social login will now break.', 'loginizer').'
'.esc_html__('How to fix:', 'loginizer').'
'.esc_html__('When you created secret keys for the social apps, you also provided a Redirect URI. To fix this issue, you need to update that Redirect URI.', 'loginizer').'
You just need to update the /wp-login.php to the new slug you have.
';
wp_register_script('loginizer_social_alert', '', ['jquery'], LOGINIZER_VERSION, true);
wp_enqueue_script('loginizer_social_alert');
wp_add_inline_script('loginizer_social_alert', '
jQuery("#loginizer-social-login-alert").on("click", function(){
jQuery(this).closest(".notice").slideToggle();
var data = new Object();
data["action"] = "loginizer_dismiss_social_alert";
data["nonce"] = "'.wp_create_nonce('loginizer_admin_ajax').'";
var admin_url = "'.admin_url().'"+"admin-ajax.php";
jQuery.post(admin_url, data, function(response){
});
});');
}
function loginizer_softwp_upgrader_notice(){
// We want to show this error to user which has sufficient privilage
if(!current_user_can('activate_plugins')){
return;
}
/*$notice_end_time = strtotime('31 March 2025');
if(!empty($notice_end_time) && time() > $notice_end_time){
return;
}*/
$softwp_upgrade = get_option('loginizer_softwp_upgrade', 0);
if(empty($softwp_upgrade) || $softwp_upgrade < 0){
return;
}
if(empty($_GET['page']) || !preg_match('/loginizer/is', $_GET['page'])){
return;
}
echo '