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

    (@miled)

    yes it is possible, dlature. i’ll just give you a hint.

    function wsl_logged_in_as( $default, $commenter, $user_identity )
    {
    	if( ! $provider = get_user_meta( get_current_user_id(), 'wsl_current_provider', true ) )
    		return $default;
    
    	return
    		'<p class="logged-in-as">' .
    		'<img src="' . WORDPRESS_SOCIAL_LOGIN_PLUGIN_URL . '/assets/img/16x16/' . strtolower( $provider ) . '.png"> ' .
    		sprintf( __( 'Logged in as <a href="%s">%s</a> from %s.</p>' ), get_edit_user_link(), $user_identity, $provider );
    }
    add_filter( 'comment_form_logged_in', 'wsl_logged_in_as', 10, 3 );
    Thread Starter dlature1

    (@dlature1)

    I put that code in the same file I created yesterday (plugins/wp-social-login-custom.php),

    but nothing happened. Is there a piece I need to put into my comments.php file under my theme? I understand if you dont have time to go any further, as you hinted.

    Thread Starter dlature1

    (@dlature1)

    anyone else wanna help me with Miled’s HINT? Maybe the code goes in the wp-includes\comment-template.php file, and if so, is there an optimum spot for it? And is there something I then have to do to comments.php in my theme directory? In the meantime, I’ll keep searching for more of the unsolved pieces. Thanks, Miled for your hint. This is no doubt good code exercise for me.

    Plugin Author Miled

    (@miled)

    I understand if you dont have time to go any further, as you hinted.

    it’s not about time, i simply lack patience. apologies if i sound rude.

    now im no wordpress expert, but that filter works fine in wp 4.0 twenty twelve, so it must be an issue with your theme. could you switch it to something else for a split second and see if it works.

    View post on imgur.com

    Thread Starter dlature1

    (@dlature1)

    should I put the code in the plugins/wp-social-login-custom.php or in the wp-includes\comment-template.php ?

    Plugin Author Miled

    (@miled)

    i have used wp-social-login-custom.php

    hopefully someone more knowledgeable than me will answer this. i really don’t know why it didn’t work for you.

    Thread Starter dlature1

    (@dlature1)

    ok…put it in the first location , switched to 2012 thme, and the Provider name shows. So it’s my theme. I’ll look at the 2012 comments.php file and figure it out. Thanks, again.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘show provider name’ is closed to new replies.