Created
January 15, 2010 02:10
-
-
Save chuckreynolds/277722 to your computer and use it in GitHub Desktop.
Adds a default Gravatar through functions.php to Wordpress
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
<?php | |
// Add a default Gravatar if user doesn't have one | |
if ( !function_exists('rYno_newgravatar') ) { | |
function rYno_newgravatar( $avatar_defaults ) { | |
$newgravatar = get_bloginfo('template_url').'/images/new-gravatar.gif'; | |
$avatar_defaults[$newgravatar] = 'New Custom Gravatar'; | |
return $avatar_defaults; | |
} | |
add_filter( 'avatar_defaults', 'rYno_newgravatar' ); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment