Skip to content

Instantly share code, notes, and snippets.

@asharirfan
Last active August 29, 2015 14:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save asharirfan/4c796ca147ea0e75f521 to your computer and use it in GitHub Desktop.
Save asharirfan/4c796ca147ea0e75f521 to your computer and use it in GitHub Desktop.
Gravatar Image WP Custom Function
<?php
/**
* Gravatar Image WP Custom Function
* @param string $aa_email user/author email address
* @param string $aa_size size of gravatar
* @return string gravatar image url
*/
function aa_get_gravatar($aa_email, $aa_size) {
// Convert email into md5 hash and set image size to 200 px
$aa_gravatar_url = 'http://www.gravatar.com/avatar/' . md5($aa_email) . '?s=' . $aa_size;
return $aa_gravatar_url;
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment