Posted By

labsecrets on 07/16/10


Tagged


Versions (?)

Change the default Mystery Man Avatar


 / Published in: HTML
 

Change the name of the image file from "/labrats-gravatar.jpg" to whatever you want to call the image you upload. Be sure that it is sized to 128x128px and is a .jpg format. Be sure to upload this image file to your theme directory in the "images" folder.

If you want, you can change the description text "LabSecrets - Booyah!" below as well.

  1. add_filter( 'avatar_defaults', 'newgravatar' );
  2.  
  3. function newgravatar ($avatar_defaults) {
  4. $myavatar = get_bloginfo('template_directory') . '/images/labrats-gravatar.jpg';
  5. $avatar_defaults[$myavatar] = "LabSecrets - Booyah!";
  6. return $avatar_defaults;
  7. }

Report this snippet  

You need to login to post a comment.