Force default avatar for HiDPI avatars on Discussion Settings.
props SergeyBiryukov. fixes #31972. git-svn-id: https://develop.svn.wordpress.org/trunk@32129 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
be2e1d9937
commit
f00aa86644
|
@ -272,7 +272,9 @@ foreach ( $avatar_defaults as $default_key => $default_name ) {
|
||||||
$avatar_list .= "\n\t<label><input type='radio' name='avatar_default' id='avatar_{$default_key}' value='" . esc_attr($default_key) . "' {$selected}/> ";
|
$avatar_list .= "\n\t<label><input type='radio' name='avatar_default' id='avatar_{$default_key}' value='" . esc_attr($default_key) . "' {$selected}/> ";
|
||||||
|
|
||||||
$avatar = get_avatar( $user_email, $size, $default_key );
|
$avatar = get_avatar( $user_email, $size, $default_key );
|
||||||
$avatar_list .= preg_replace("/src='(.+?)'/", "src='\$1&forcedefault=1'", $avatar);
|
$avatar = preg_replace( "/src='(.+?)'/", "src='\$1&forcedefault=1'", $avatar );
|
||||||
|
$avatar = preg_replace( "/srcset='(.+?) 2x'/", "srcset='\$1&forcedefault=1 2x'", $avatar );
|
||||||
|
$avatar_list .= $avatar;
|
||||||
|
|
||||||
$avatar_list .= ' ' . $default_name . '</label>';
|
$avatar_list .= ' ' . $default_name . '</label>';
|
||||||
$avatar_list .= '<br />';
|
$avatar_list .= '<br />';
|
||||||
|
|
Loading…
Reference in New Issue