Make WordPress Core

Changeset 32129


Ignore:
Timestamp:
04/14/2015 06:08:15 PM (10 years ago)
Author:
ocean90
Message:

Force default avatar for HiDPI avatars on Discussion Settings.

props SergeyBiryukov.
fixes #31972.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/options-discussion.php

    r32116 r32129  
    273273
    274274    $avatar = get_avatar( $user_email, $size, $default_key );
    275     $avatar_list .= preg_replace("/src='(.+?)'/", "src='\$1&forcedefault=1'", $avatar);
     275    $avatar = preg_replace( "/src='(.+?)'/", "src='\$1&forcedefault=1'", $avatar );
     276    $avatar = preg_replace( "/srcset='(.+?) 2x'/", "srcset='\$1&forcedefault=1 2x'", $avatar );
     277    $avatar_list .= $avatar;
    276278
    277279    $avatar_list .= ' ' . $default_name . '</label>';
Note: See TracChangeset for help on using the changeset viewer.