Force default avatar for HiDPI avatars on Discussion Settings.
props SergeyBiryukov. fixes #31972. Built from https://develop.svn.wordpress.org/trunk@32129 git-svn-id: http://core.svn.wordpress.org/trunk@32108 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d31d2ff792
commit
4073ff026b
|
@ -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 />';
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.2-beta4-32128';
|
$wp_version = '4.2-beta4-32129';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue