Skip to content

Instantly share code, notes, and snippets.

@stuartduff
Created July 24, 2012 01:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stuartduff/3167315 to your computer and use it in GitHub Desktop.
Save stuartduff/3167315 to your computer and use it in GitHub Desktop.
WordPress Default Custom Avatar
if ( !function_exists('custom_gravatars') ) {
function custom_gravatars( $avatar_defaults ) {
$myavatar = get_template_directory_uri() . '/images/custom-avatar.png';
$avatar_defaults[$myavatar] = 'people';
return $avatar_defaults;
}
add_filter( 'avatar_defaults', 'custom_gravatars' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment