| @@ -457,21 +457,14 @@ | ||
| 457 | 457 | ]; |
| 458 | 458 | |
| 459 | 459 | $social_buttons = '<div id="lz-social-login-btns" class="'.($style == 'icon' ? 'lz-social-login-btns-icon' : 'lz-social-login-btns-full').' '.($position == 'above' || $position == 'below' ? 'lz-social-'.$padding[$position].'-padding' : '').'" style="justify-self:'.esc_attr($container_alignment).'; justify-content:'.esc_attr($button_alignment).';">'; |
| 460 | 460 | |
| 461 | - /* translators: %s: This OR is used as a separator for Either login through username OR use social login */ | |
| 462 | - $or_translated = __('OR', 'loginizer'); | |
| 463 | - | |
| 464 | 461 | // HTML of the divider in case the buttons are below the login fields |
| 465 | 462 | if(!empty($divider_pos) && $divider_pos == 'above'){ |
| 466 | - $social_buttons .= '<div class="loginizer-social-divider">'.esc_html($or_translated).'</div><br>'; | |
| 463 | + $social_buttons .= '<div class="loginizer-social-divider">OR</div><br>'; | |
| 467 | 464 | } |
| 468 | 465 | |
| 469 | 466 | include_once LOGINIZER_DIR . '/main/login-providers.php'; |
| 470 | - | |
| 471 | - // This is used to decide weather we will use Login with or Register with | |
| 472 | - $current_hook = current_action(); | |
| 473 | - $register_hooks = ['register_form', 'woocommerce_register_form']; | |
| 474 | 467 | |
| 475 | 468 | foreach($providers as $provider => $settings){ |
| 476 | 469 | if(empty($settings['enabled']) || empty($settings['tested'])){ |
| 477 | 470 | continue; |
| @@ -503,20 +496,12 @@ | ||
| 503 | 496 | $social_buttons .= '<div class="loginizer-social-button '.($style == 'icon' ? 'lz-social-button-icon' : 'lz-social-button-btn').' '.($shape == 'circle' ? 'lz-social-button-icon-circle' : 'lz-social-button-icon-square').'" onclick="loginizer_auth_popup(\''.esc_js($provider).'\', '.esc_js(!empty($settings['loginizer_social_key']) ? true : 0).')" style="'.((!empty($loginizer_login_providers[$provider]['styles']) && !empty($loginizer_login_providers[$provider]['styles'][$btn_style])) ? esc_attr($loginizer_login_providers[$provider]['styles'][$btn_style]) : esc_attr('background-color:'. esc_attr($color)). '; color:#FFF;') .'"> |
| 504 | 497 | <div class="loginizer-social-btn-logo"> |
| 505 | 498 | <img src="'.esc_url($img_url).'" height="24" alt="'.esc_attr($name).' Icon"/> |
| 506 | 499 | </div>'; |
| 507 | - | |
| 508 | - if(in_array($current_hook, $register_hooks)){ | |
| 509 | - /* translators: %s: This is for social login so the complete text would be Register With [Brand Name], eg Register With Google */ | |
| 510 | - $button_text = esc_html__('Register With', 'loginizer'); | |
| 511 | - } else { | |
| 512 | - /* translators: %s: This is for social login so the complete text would be Login With [Brand Name], eg Login With Google */ | |
| 513 | - $button_text = esc_html__('Login With', 'loginizer'); | |
| 514 | - } | |
| 515 | 500 | |
| 516 | 501 | // Button text in case of full button |
| 517 | 502 | if(!empty($loginizer['social_settings']) && $style === 'full'){ |
| 518 | - $social_buttons .= '<div class="loginizer-social-btn-text">'.esc_html($button_text).' <strong>'.esc_html($name).'</strong> | |
| 503 | + $social_buttons .= '<div class="loginizer-social-btn-text">'.esc_html__('Login With', 'loginizer').' <strong>'.esc_html($name).'</strong> | |
| 519 | 504 | </div>'; |
| 520 | 505 | } |
| 521 | 506 | |
| 522 | 507 | $social_buttons .= '</div>'; |
| @@ -527,9 +512,9 @@ | ||
| 527 | 512 | } |
| 528 | 513 | |
| 529 | 514 | // HTML of the divider in case the buttons are above the login fields |
| 530 | 515 | if(!empty($divider_pos) && $divider_pos == 'below'){ |
| 531 | - $social_buttons .= '<br><div class="loginizer-social-divider">'.esc_html($or_translated).'</div>'; | |
| 516 | + $social_buttons .= '<br><div class="loginizer-social-divider">OR</div>'; | |
| 532 | 517 | } |
| 533 | 518 | |
| 534 | 519 | $social_buttons .= '</div>'; |
| 535 | 520 | loginizer_add_social_js($page_type); |
| @@ -655,11 +640,9 @@ | ||
| 655 | 640 | |
| 656 | 641 | } |
| 657 | 642 | |
| 658 | 643 | function loginizer_social_btn_login($return = false, $id = ''){ |
| 659 | - if(!loginizer_is_blacklisted()){ | |
| 660 | - loginizer_social_btn($return, 'login'); | |
| 661 | - } | |
| 644 | + loginizer_social_btn($return, 'login'); | |
| 662 | 645 | } |
| 663 | 646 | |
| 664 | 647 | function loginizer_get_social_error(){ |
| 665 | 648 | global $loginizer; |
| @@ -686,5 +669,5 @@ | ||
| 686 | 669 | |
| 687 | 670 | // Cleaning the error data |
| 688 | 671 | delete_site_transient($error_identifier); // Deleting the data |
| 689 | 672 | //setcookie('lz_social_error', '', time() - 300, COOKIEPATH, COOKIE_DOMAIN, is_ssl(), true); // have to delete |
| 690 | -} | |
| 673 | +} | |