Customize Default Avatar


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. //Make a new default gravatar available on the dashboard
  2. function newgravatar ($avatar_defaults) {
  3. $myavatar = get_bloginfo('template_directory') . '/images/tweaker.jpg';
  4. $avatar_defaults[$myavatar] = "Tweaker";
  5. return $avatar_defaults;
  6. }
  7. add_filter( 'avatar_defaults', 'newgravatar' );

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.