Building a function that will place one of 5 different avatars in the comments section.
Created
January 18, 2016 02:00
-
-
Save michaelmusgrove/f7615cab04ac70d7ab17 to your computer and use it in GitHub Desktop.
Replace Gravatar in WP
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_filter( ‘avatar_defaults’, ‘newgravatar’ ); | |
function newgravatar ($avatar_defaults) { | |
$myavatar = get_bloginfo(‘template_directory’) . ‘/images/gravataricon.gif’,‘/images/gravataricon.gif1’,‘/images/gravataricon.gif2’,‘/images/gravataricon.gif3’,‘/images/gravataricon.gif4’; | |
$avatar_defaults[$myavatar] = "webdesignPOP"; | |
return $avatar_defaults; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment