Skip to content

Instantly share code, notes, and snippets.

@RhythmShahriar
Created October 2, 2013 03:49
Show Gist options
  • Save RhythmShahriar/6788904 to your computer and use it in GitHub Desktop.
Save RhythmShahriar/6788904 to your computer and use it in GitHub Desktop.
<?php
/**-------------------------------------------
* @package WordPress Default Avatar
* @link http://rhythmshahriar.com
* @author Rhythm <rhy@rhythmshahriar.com>
* @copyright Copyright (c) 2013, Rhythm Shahriar
-------------------------------------------------*/
// Create a custom Gravatar
function rhythm_default_avatar( $avatars ) {
$new = get_stylesheet_directory_uri() . '/images/rhythm-custom-avatar.png'; //Image location, it's in your stylesheet images directory
$avatars[$new] = "Rhythm"; // Name of your Avatar
return $avatars;
}
add_filter( 'avatar_defaults', 'rhythm_default_avatar' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment