• Resolved pghostine

    (@pghostine)


    USersWP and Social Login are both working well. I’d like to display social login buttons that are the same size. Try my login to see what I mean. Is there a way to define a set of social login buttons of my own? Thank you.

    • This topic was modified 5 years, 2 months ago by pghostine.
    • This topic was modified 5 years, 2 months ago by pghostine.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi,

    The google button is currently different as they specifically asked us to change it according to their policy. If you want to change it then you can do it by using the filter we have provided. Try following code in your functions.php file of currently active theme or via Code Snippet plugin and let me know if it helps or not:

    add_filter("uwp_social_login_button_html","change_uwp_social_login_button_html",10,3);
    function change_uwp_social_login_button_html($btn_output,$provider,$url){
    	if($provider=='google' && function_exists('aui') ){
    		$social_name_class = $provider;
    		$social_icon_class = "fab fa-google";
    		 $btn_output =  aui()->button( array(
    			                'href'  => $url,
    			                'class'     => 'ml-1 mb-1 border-0 btn  btn-'. $social_name_class.' btn-sm btn-circle',
    			                'content' => '<i class="'. $social_icon_class.'  fa-fw fa-lg"></i>',
    			                'data-toggle' => 'tooltip',
    			                'title' => ucfirst($provider),
    		                ) );
    	}
    	
    	return $btn_output;
    }

    Regards,
    Patrik

    Thread Starter pghostine

    (@pghostine)

    I tried inserting this code in Code Snippet. This is what it returned:

    Don’t Panic
    The code snippet you are trying to save produced a fatal error on line 0:

    Exception thrown without a stack frame
    The previous version of the snippet is unchanged, and the rest of this site should be functioning normally as before.

    Please use the back button in your browser to return to the previous page and try to fix the code error. If you prefer, you can close this page and discard the changes you just made. No changes will be made to this site.`

    Thread Starter pghostine

    (@pghostine)

    I inserted the code in functions.php and it did the trick. I don’t know why Code Snippet didn’t like it.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Social login icons’ is closed to new replies.