Return to Snippet

Revision: 47344
at June 6, 2011 01:11 by alp


Initial Code
/**
 * add a default-gravatar to options
 * http://wpengineer.com/502/add-avatar-to-wordpress-default/
 */
 
 if ( !function_exists('myfunction_add_gravatar') ) {
 	function myfunction_add_gravatar( $avatar_defaults ) {
 		$myavatar = get_bloginfo('template_directory') . '/images/icons/my_avatar.png';
 		$avatar_defaults[$myavatar] = 'My Avatar';
 		return $avatar_defaults;
 	}

 	add_filter( 'avatar_defaults', 'myfunction_add_gravatar' );
 }

Initial URL
http://wpengineer.com/502/add-avatar-to-wordpress-default/

Initial Description

                                

Initial Title
Wordpress: add a default-gravatar to options

Initial Tags
wordpress

Initial Language
PHP