Created
October 26, 2013 01:29
-
-
Save FriendlyWP/7164258 to your computer and use it in GitHub Desktop.
Add custom default avatar
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// add a new default avatar to the list in WordPress admin | |
// change path to reflect where your default image lives | |
add_filter( 'avatar_defaults', 'mytheme_addgravatar' ); | |
function mytheme_addgravatar( $avatar_defaults ) { | |
$myavatar = get_bloginfo('stylesheet_directory') . '/_/images/avatar.gif'; | |
$avatar_defaults[$myavatar] = 'New Default Gravatar'; | |
return $avatar_defaults; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment