diff --git a/src/wp-includes/pluggable.php b/src/wp-includes/pluggable.php index 06cfee79f3..f0934588bd 100644 --- a/src/wp-includes/pluggable.php +++ b/src/wp-includes/pluggable.php @@ -2235,6 +2235,8 @@ function get_avatar( $id_or_email, $size = 96, $default = '', $alt = '', $args = return false; } + $url2x = get_avatar_url( $id_or_email, array_merge( $args, array( 'size' => $args['size'] * 2 ) ) ); + $args = get_avatar_data( $id_or_email, $args ); $url = $args['url']; @@ -2243,8 +2245,6 @@ function get_avatar( $id_or_email, $size = 96, $default = '', $alt = '', $args = return false; } - $url2x = add_query_arg( array( 's' => $args['size'] * 2 ), $args['url'] ); - $class = array( 'avatar', 'avatar-' . (int) $args['size'], 'photo' ); if ( ! $args['found_avatar'] || $args['force_default'] ) {