mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
urlencode only when needed. Props spikeyslam. see #5775
git-svn-id: http://svn.automattic.com/wordpress/trunk@7096 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b5903814d4
commit
259bc26542
@ -1207,13 +1207,12 @@ function get_avatar( $id_or_email, $size = '64', $default = '' ) {
|
||||
|
||||
if ( empty($default) )
|
||||
$default = "http://www.gravatar.com/avatar.php?gravatar_id=ad516503a11cd5ca435acc9bb6523536&size=$size"; // ad516503a11cd5ca435acc9bb6523536 == md5('unknown@gravatar.com')
|
||||
$default = urlencode( $default );
|
||||
|
||||
if ( !empty($email) ) {
|
||||
$out = 'http://www.gravatar.com/avatar.php?gravatar_id=';
|
||||
$out .= md5( strtolower( $email ) );
|
||||
$out .= "&size={$size}";
|
||||
$out .= "&default={$default}";
|
||||
$out .= '&default=' . urlencode( $default );
|
||||
|
||||
$rating = get_option('avatar_rating');
|
||||
if ( !empty( $rating ) )
|
||||
|
Loading…
Reference in New Issue
Block a user