WordPress Gravatar Plugin for Multiple Authors

I’ve been looking for a WordPress plugin that provides multi users to show their respective gravatars on their authored posts. Different authors, different gravatars on each post. Unluckily, I have never found one. I don’t know if there exist one for I have minimal access on resources because of f*in WebSense.

Anyway, for me, the simpliest gravatar plugin is the WordPress Gravatar Plugin. It just generates the URL for the source gravatar and it’s up to you where you want to put it on your site. However, the latest available version only supports gravatar for comment authors. What I want is have it to support authors’ gravatars on posts as well.

As I have said “simple”, here’s what I did with the plugin:

  1. Added a parameter that will verify if the function was called from a post or from the comments.

    function gravatar($rating = false, $size = false, $a_post = false, $default = false, $border = false)

  2. Added a global $authordata variable
  3. Used $authordata->user_email if gravatar was called from a post

    $out = "http://www.gravatar.com/avatar.php?gravatar_id=".md5($comment->comment_author_email);
    if ($a_post)
    {
    $out = "http://www.gravatar.com/avatar.php?gravatar_id=".md5($authordata->user_email);
    }
  4. Called the gravatar function on posts
    <img id="gravatar" src="<?php gravatar('R', 40, true); ?>" alt="author's gravatar">

  5. Called the gravatar function on comments

    <img id="gravatar" src="<?php gravatar('R', 50, false); ?>>

Download the original or ask a copy of my version if you want or download it straight if you really want and see the sample here.

129 thoughts on “WordPress Gravatar Plugin for Multiple Authors”

  1. However, KMC officials said as most of the facilities at the hospital were not functioning,Michael Kors, the employees, including three doctors working on a contract basis,Michael Kors Outlet, did not show up except for picking up their pay cheques.

  2. e3300eb16b6f8e5bae9c229bc9332b8bWhy in the world would Texas file a legal action challenging the merger of American Airlines with US Airways? The answer is simple: We believe that actions by the airlines and their officials violate antitrust laws. In fact,Michael Kors Handbags, the legal violations appear so overt that it would offend my oath of office not to take action.

  3. Meanwhile, Pakistan’s constitution was amended in 2010 to render education free and compulsory for all children up to age 16. This development, some of us thought, was yet another solid affirmation of the commitment of the state toward universalising education. Many hoped that this would spawn a flurry of rigorous policy analysis and civil and political deliberation to determine what it would take to equal the challenge posed by this gigantic task. But this did not happen and instead an even more robust movement was kicked off to provide more support to private entrepreneurs. This movement, which is currently underway, draws its support from multilateral and bilateral donors, policy scientists and entrepreneurs, and even some civil society organisations.

  4. She read a lovely excerpt from Signature, about her main character Alma Whittaker as a child spinning through a party portraying a comet, clutching a flaming sparkler. “She did not know that she wasn’t flying.” (The audience felt much the same way, given the gasps of appreciation and hearty applause.) Alma, born in 1800, grows up to be a botanist consumed with the study of moss, and believe me, that’s a whole lot more exciting and engaging than it sounds. Signature is my favorite book of the last five years,, at least — and I read about 200 books a year, so that gives you some idea of how much I loved it.

  5. Jasmiinan paras hetki oli,Michael Kors Outlet, kun h?n tapasi muut suomalaiset au pairit. Oli tuki ja yst?v?t, joille puhua. Koti-ik?v? tiivistyi, kun Jasmiinan Suomesta vierailulla olleet yst?v?t l?htiv?t takaisin.

  6. The reportage on this,Michael Kors Handbags, as with so much on Assange, is variable in quality, let alone accuracy. Hacks of the Murdoch empire deride and purposely misunderstand, either through design or planned idiocy. Others find mirth in the fact that one of the world’s most renowned dissidents is complaining about misplaced or stolen luggage.

  7. In New York the three main indexes enjoyed another positive day following a series of deals between pharmaceutical giants Novartis, GlaxoSmithKline and Eli Lilly that shuffled more than $20 billion in assets.

  8. Craig Lynch,Michael Kors Watch, a spokesman for Uptown Players,Michael Kors Watches, says DTC is planning back to back productions at the Kalita Humphreys, which will mean a shorter season for his company at the theater where they’ve been producing shows since 2009.

  9. Initiated last year as a one-week affair,Michael Kors Outlet, this years expanded three-week line up will include Cantonese opera, Chinese dance and contemporary music productions. Most impressive is the venue itself: an 800-seat temporary theatre, which,Michael Kors Handbags, from the stage to the seating,Michael Kors Handbags, will be constructed specifically for this series out of recycled bamboo and wood.

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>