On Modifying the WordPress Dashboard

One of the nifty new features of WordPress 2.7 is the Gravatar support on the Dashboard screen that I see. If you leave a comment, I get to see a little icon of who you are.

That is, assuming you have a gravatar. 🙂

If you don’t have a gravatar, then I see something else on the Dashboard.

I see an outline of a person. In grey.

It’s actually a bit bland. Especially because, when people leave comments, I’ve set up my comment template to pull a pre-generated gravatar called a “wavatar.” Make a post, and you get a sort of stylized face that looks goofy. Your face may be a triangle, or it may be a square, and you may have glasses, or a monocle, or even no eyes at all.

Well, I wanted those wavatars on my dashboard. Not the dull, generic, grey thing.

Fortunately, I’m handy with editing files. 🙂

In wp-adminincludes, edit the comment.php file thusly. Find:
$avatar = get_avatar( $id, 32 );
And replace with:
$avatar = get_avatar( $id, 32, 'wavatar' );

Then, in wp-adminincludes, edit the dashboard.php file thusly. Find
<?php echo get_avatar( $comment, 50 ); ?>
And replace with:
<?php echo get_avatar( $comment, 50, 'wavatar' ); ?>
Now, when people leave comments, I get a visual representation, not just the bland, grey, formless icon that the system generates by default.

Thus endeth the coding lesson. 🙂

Published by Allyn

A writer, editor, journalist, sometimes coder, occasional historian, and all-around scholar, Allyn Gibson is the writer for Diamond Comic Distributors' monthly PREVIEWS catalog, used by comic book shops and throughout the comics industry, and the editor for its monthly order forms. In his over ten years in the industry, Allyn has interviewed comics creators and pop culture celebrities, covered conventions, analyzed industry revenue trends, and written copy for comics, toys, and other pop culture merchandise. Allyn is also known for his short fiction (including the Star Trek story "Make-Believe,"the Doctor Who short story "The Spindle of Necessity," and the ReDeus story "The Ginger Kid"). Allyn has been blogging regularly with WordPress since 2004.

Leave a Reply

Your email address will not be published. Required fields are marked *