__( 'Login using Social Apps like Google, Facebook, LinkedIn, Microsoft, Instagram.', 'flw' ),
'customize_selective_refresh' => true,
)
);
}
public function widget( $args, $instance ) {
extract( $args );
echo $args['before_widget'];
$this->openidloginForm();
echo $args['after_widget'];
}
public function update( $new_instance, $old_instance ) {
$instance = array();
$instance['wid_title'] = strip_tags( $new_instance['wid_title'] );
return $instance;
}
public function openidloginForm(){
global $post;
//$this->error_message();
$selected_theme = get_option('mo_openid_login_theme');
$appsConfigured = get_option('mo_openid_google_enable') | get_option('mo_openid_salesforce_enable') | get_option('mo_openid_facebook_enable') | get_option('mo_openid_linkedin_enable') | get_option('mo_openid_instagram_enable') | get_option('mo_openid_amazon_enable') | get_option('mo_openid_windowslive_enable') | get_option('mo_openid_twitter_enable') | get_option('mo_openid_vkontakte_enable');
$spacebetweenicons = get_option('mo_login_icon_space');
$customWidth = get_option('mo_login_icon_custom_width');
$customHeight = get_option('mo_login_icon_custom_height');
$customSize = get_option('mo_login_icon_custom_size');
$customBackground = get_option('mo_login_icon_custom_color');
$customTheme = get_option('mo_openid_login_custom_theme');
$customTextofTitle = get_option('mo_openid_login_button_customize_text');
$customBoundary = get_option('mo_login_icon_custom_boundary');
$customLogoutName = get_option('mo_openid_login_widget_customize_logout_name_text');
$customLogoutLink = get_option('mo_openid_login_widget_customize_logout_text');
if( ! is_user_logged_in() ) {
if( $appsConfigured ) {
$this->mo_openid_load_login_script();
?>
No apps configured. Please contact your administrator.
display_name, $customLogoutName);
$link_with_username = $customLogoutName;
if (empty($customLogoutName) || empty($customLogoutLink)) {
?>
$customText
";
if($customTheme == 'default'){
if( get_option('mo_openid_facebook_enable') ) {
if($selected_theme == 'longbutton'){
$html .= "
" . $buttonText . " Facebook"; }
else{
$html .= "
";
}
}
if( get_option('mo_openid_google_enable') ) {
if($selected_theme == 'longbutton'){
$html .= "
" . $buttonText . " Google";
}
else{
$html .= "
";
}
}
if( get_option('mo_openid_vkontakte_enable') ) {
if($selected_theme == 'longbutton'){
$html .= "
" . $buttonText . " Vkontakte";
}
else{
$html .= "
";
}
}
if( get_option('mo_openid_twitter_enable') ) {
if($selected_theme == 'longbutton'){
$html .= ""; }
else{
$html .= "
";
}
}
if( get_option('mo_openid_linkedin_enable') ) {
if($selected_theme == 'longbutton'){
$html .= "
" . $buttonText . " LinkedIn";
}
else{
$html .= "
";
}
}if( get_option('mo_openid_instagram_enable') ) {
if($selected_theme == 'longbutton'){
$html .= "
" . $buttonText . " Instagram";
}
else{
$html .= "
";
}
}if( get_option('mo_openid_amazon_enable') ) {
if($selected_theme == 'longbutton'){
$html .= "
" . $buttonText . " Amazon";
}
else{
$html .= "
";
}
}if( get_option('mo_openid_salesforce_enable') ) {
if($selected_theme == 'longbutton'){
$html .= "
" . $buttonText . " Salesforce";
}
else{
$html .= "
";
}
}if( get_option('mo_openid_windowslive_enable') ) {
if($selected_theme == 'longbutton'){
$html .= "
" . $buttonText . " Microsoft";
}
else{
$html .= "
";
}
}
}
if($customTheme == 'custom'){
if( get_option('mo_openid_facebook_enable') ) {
if($selected_theme == 'longbutton'){
$html .= "
" . $buttonText . " Facebook";
}
else{
$html .= "
";
}
}
if( get_option('mo_openid_google_enable') ) {
if($selected_theme == 'longbutton'){
$html .= "
" . $buttonText . " Google";
}
else{
$html .= "
";
}
}
if( get_option('mo_openid_vkontakte_enable') ) {
if($selected_theme == 'longbutton'){
$html .= "
" . $buttonText . " Vkontakte";
}
else{
$html .= "
";
}
}
if( get_option('mo_openid_twitter_enable') ) {
if($selected_theme == 'longbutton'){
$html .= "
" . $buttonText . " Twitter";
}
else{
$html .= "
";
}
}
if( get_option('mo_openid_linkedin_enable') ) {
if($selected_theme == 'longbutton'){
$html .= "
" . $buttonText . " LinkedIn";
}
else{
$html .= "
";
}
}if( get_option('mo_openid_instagram_enable') ) {
if($selected_theme == 'longbutton'){
$html .= "
" . $buttonText . " Instagram";
}
else{
$html .= "
";
}
}if( get_option('mo_openid_amazon_enable') ) {
if($selected_theme == 'longbutton'){
$html .= "
" . $buttonText . " Amazon";
}
else{
$html .= "
";
}
}if( get_option('mo_openid_salesforce_enable') ) {
if($selected_theme == 'longbutton'){
$html .= "
" . $buttonText . " Salesforce";
}
else{
$html .= "
";
}
}if( get_option('mo_openid_windowslive_enable') ) {
if($selected_theme == 'longbutton'){
$html .= "
" . $buttonText . " Microsoft";
}
else{
$html .= "
";
}
}
}
$html .= '
No apps configured. Please contact your administrator.
';
}
}else {
global $current_user;
$current_user = wp_get_current_user();
$customLogoutName = str_replace('##username##', $current_user->display_name, $customLogoutName);
$flw = __($customLogoutLink,"flw");
if (empty($customLogoutName) || empty($customLogoutLink)) {
$html .= '