Subversion Repositories ZenDark

Compare Revisions

Ignore whitespace Rev 24 → Rev 23

/CHANGELOG
1,3 → 1,3
Version 1.0.0 (r24) (2011-10-16)
Version 1.0.0 (r23) (2011-10-16)
* Initial release
/structure.css
330,7 → 330,7
 
.comment-avatar {
float: left;
margin-right: 8px;
margin-right: 5px;
}
 
.comment-meta {
/functions.php
101,20 → 101,16
 
// This check if a gravatar exists for a user, and if not return false
function validate_gravatar($email) {
/* first of all, we want to do the check only if it's needed, so
* we check that gravatars are actually enabled in settings, and
* that you want to display a blank avatar (no avatar) as default.
*/
if (get_option('show_avatars') && get_option('avatar_default') == 'blank') {
// Craft a potential url and test its headers
$hash = md5($email);
$uri = 'http://www.gravatar.com/avatar/'.$hash.'?d=404';
$headers = @get_headers($uri);
if (!preg_match("|200|", $headers[0])) $has_valid_avatar = false;
else $has_valid_avatar = true;
}
elseif (!get_option('show_avatars')) $has_valid_avatar = false;
else $has_valid_avatar = true;
// Craft a potential url and test its headers
$hash = md5($email);
$uri = 'http://www.gravatar.com/avatar/'.$hash.'?d=404';
$headers = @get_headers($uri);
if (!preg_match("|200|", $headers[0])) {
$has_valid_avatar = false;
}
else {
$has_valid_avatar = true;
}
return $has_valid_avatar;
}