Created
September 20, 2012 18:09
-
-
Save jasontucker/3757446 to your computer and use it in GitHub Desktop.
How to use your Gravatar as a favicon
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//saw this on WpRecipes.com | |
function GravatarAsFavicon() { | |
//We need to establish the hashed value of your email address | |
$GetTheHash = md5(strtolower(trim('[email protected]'))); | |
echo 'http://www.gravatar.com/avatar/' . $GetTheHash . '?s=16'; | |
} | |
//in the header.php use this: | |
<link rel="shortcut icon" href="<?php GravatarAsFavicon(); ?>" /> | |
<link rel="apple-touch-icon" href="<?php GravatarAsFavicon(); ?>"> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment