/ Published in: PHP

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
/** * add a default-gravatar to options * http://wpengineer.com/502/add-avatar-to-wordpress-default/ */ 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' ); }
URL: http://wpengineer.com/502/add-avatar-to-wordpress-default/
Comments
