I’ve updated my gravatar plugin to use the new Gravatar REST API. The new API makes it considerably easier for plugins to query the existence of a gravatar, which makes my plugin considerably easier! A few bugs have been squashed, too.

NOTE: this version is called gravatars.php, with an s. If you used a prior version, be sure to deactivate it first, else you’ll have function collisions and your blog will break.

Download the gravatars tarball. Download the gravatars zip. Feel free to peruse the README.

Place the gravatars.php file into your wp-content/plugins directory, and activate it. Create the wp-content/gravatars/ directory, if it doesn’t exist – make sure this directory is writable by your web server! Click the Options link in your admin menu, select Gravatars, and set the default options. If you enable local gravatars, click the Users link in your admin menu, select Gravatar, and define a local gravatar image for yourself, if you want one.

Edit your theme’s style.css, and add two new definitions:

note: these are the CSS declarations may not work for you. You may want something different.

Edit your theme’s comments.php file, like this. We wrap the entire thing inside an if (function_exists(‘gravatar’)) { block to make sure your site doesn’t totally break if you disable this plugin for some reason.

<gravatar /> You can insert a gravatar into any post or page with a simple tag: <gravatar />. If the email address you supply does not have a gravatar, your default gravatar image will be used, instead.

home / about / archive / RSS