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:
Dominik Schilling 2015-04-14 18:09:26 +00:00
parent d31d2ff792
commit 4073ff026b
2 changed files with 4 additions and 2 deletions

View File

@ -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&amp;forcedefault=1'", $avatar); $avatar = preg_replace( "/src='(.+?)'/", "src='\$1&amp;forcedefault=1'", $avatar );
$avatar = preg_replace( "/srcset='(.+?) 2x'/", "srcset='\$1&amp;forcedefault=1 2x'", $avatar );
$avatar_list .= $avatar;
$avatar_list .= ' ' . $default_name . '</label>'; $avatar_list .= ' ' . $default_name . '</label>';
$avatar_list .= '<br />'; $avatar_list .= '<br />';

View File

@ -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.