2) {
if($typeCurrent == 'show') {
$url_params = '?XScurrentPage=' . $custom_url;
}
}
} else {
$url_params = '?redirect_to=' . urlencode(urldecode($_GET['redirect_to']));
}
$core_provider = \WP_Social\App\Providers::get_core_providers_login();
$enabled_providers = \WP_Social\App\Settings::get_enabled_provider_conf_login();
/**
* todo - below there are some bujruki code need to change it, style icon set info also should come from array
*
*/
// loop through all the provides
foreach($core_provider AS $keyType => $valueType):
// check if the provider enable
if(!empty($enabled_providers[$keyType]['enable'])):
if(in_array('all', $attr_provider) || in_array($keyType, $attr_provider)) {
/*
------------------------------------------
arrange necessary info for all buttons
----------------------------------------
*/
$args = [
'label' => isset($provider_data[$keyType]['login_label']) ? $provider_data[$keyType]['login_label'] : 'Login with
' . $valueType . '',
'icon' => '
',
'clrClass' => 'wslu-color-scheme--' . $keyType,
];
if($valueType == 'LineApp') {
$line = new Line_App();
$args['url'] = $line->get_auth_url(get_home_url() . '/wp-json/wslu-social-login/type/' . $keyType);
} else {
$args['url'] = get_home_url() . '/wp-json/wslu-social-login/type/' . $keyType . '' . $url_params;
}
/*
-------------------------------------------------------
-require a specific markup file that contain the style
-markup file name and style key must be same
------------------------------------------------------
*/
$style_file_path = WSLU_LOGIN_PLUGIN . '/template/login/screens/default.php';
require($style_file_path);
}
endif;
endforeach;
} else {
$correntUrlLogout = esc_url(xs_current_url_custom());
?>