Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Miled

    (@miled)

    this can be done by editing wp-content\plugins\wordpress-social-login\includes\plugin.ui.php (function wsl_render_login_form, line 39+-)
    then simply replace the <img> with a plain text.

    if( get_option( 'wsl_settings_' . $provider_id . '_enabled' ) ){
      ?>
      <a class="wsl_connect_with_provider" provider="<?php echo $provider_id ?>">
         Connect with <?php echo $provider_name ?>
      </a>
      <?php
    
      $nok = false;
    }
    Thread Starter Collin

    (@collinmbarrett)

    Ok, great, thanks! I suppose there is a second part to my question, though.

    Is there a way to have this link not on the login page? I want to have a simple “Login” text link just in my header menu of every page that fires off the Google social login (all users on my site will log in through that means, not through username/password).

    Is there a way to do that?

    I am using the code below in my theme’s function.php to force a Log in/Log out link into my menu.

    add_filter('wp_nav_menu_items', 'add_login_logout_link', 10, 2);
    function add_login_logout_link($items, $args) {
            ob_start();
            wp_loginout('index.php');
    	if ( is_user_logged_in() ) {
    		$loginoutlink = ob_get_contents();
    	} else {
    		$loginoutlink = ob_get_contents();
    	}
    	ob_end_clean();
            if( $args->theme_location == 'top_menu' ) {
        	    $items .= '<li>'. $loginoutlink .'</li>';
    	}
       return $items;
    }

    I tried changing the else statement to the following, however this is improper syntax.

    } else {
            $loginoutlink = do_action( 'wordpress_social_login' ) ;
    }

    Any ideas? Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: WordPress Social Login] Do Action with standard text link.’ is closed to new replies.