Add Option to Default Avatars List

If you’re not thrilled with the provided options for a default avatar, you can use this to quickly add your own image to the list.

add_filter( 'avatar_defaults', 'addavatar' );
function addavatar ( $avatar_defaults ) {
    $avatar_defaults[ 'http://placekitten.com/512/512' ] = 'Placekitten';
    return $avatar_defaults;
}

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: