• Resolved kamoe

    (@kamoe)


    Hello again, on the [adverts_authors_list] page the plugin will use an image from Gravatar. Ofcourse not all users will have a profile pic on gravatar so I need some control over the image displayed. There are plugins like “WP User Avatar” but your plugin seem not to work soo well with it.

    In ordre to replace the profile pictures what is thee recommended method?

    Thank you.

Viewing 1 replies (of 1 total)
  • Plugin Author Greg Winiarski

    (@gwin)

    There isn’t any method to replace the gravatars.

    You would need to open file wpadverts-authors/templates/authors-list-item.php and customize the code to use get_avatar() function instead of get_avatar_url().

    That is replace

    
                $image = get_avatar( $author_id, apply_filters( 'wpadverts_authors_get_avatar_url', array( 
                    'size' => ($display == 'grid' ? 96 : 60 )
                ) ) );
    

    with

    
    $image = get_avatar( $author_id, apply_filters( "wpadverts_authors_avatar_size", ($display == 'grid' ? 96 : 60 ) ) ); 
    

    and

    
    <img src="<?php echo esc_attr($image) ?>" alt="" class="advert-item-grow" />
    

    with

    
    <?php echo $image ?>
    

    The same change will be in next Authors release and should allow you to use plugins like WP User Avatar.

Viewing 1 replies (of 1 total)
  • The topic ‘Gravatar – profile picture’ is closed to new replies.