mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-05 21:24:35 +00:00
Posts: Provide a HiDPI version for the avatar used in post locked dialogs.
Props wpdesk, audrasjb, ocean90. Fixes #39633. git-svn-id: https://develop.svn.wordpress.org/trunk@48318 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1053,9 +1053,9 @@ function wp_check_locked_posts( $response, $data, $screen_id ) {
|
||||
'text' => sprintf( __( '%s is currently editing' ), $user->display_name ),
|
||||
);
|
||||
|
||||
$avatar = get_avatar( $user->ID, 18 );
|
||||
if ( $avatar && preg_match( "|src='([^']+)'|", $avatar, $matches ) ) {
|
||||
$send['avatar_src'] = $matches[1];
|
||||
if ( get_option( 'show_avatars' ) ) {
|
||||
$send['avatar_src'] = get_avatar_url( $user->ID, array( 'size' => 18 ) );
|
||||
$send['avatar_src_2x'] = get_avatar_url( $user->ID, array( 'size' => 36 ) );
|
||||
}
|
||||
|
||||
$checked[ $key ] = $send;
|
||||
@@ -1103,11 +1103,9 @@ function wp_refresh_post_lock( $response, $data, $screen_id ) {
|
||||
'text' => sprintf( __( '%s has taken over and is currently editing.' ), $user->display_name ),
|
||||
);
|
||||
|
||||
$avatar = get_avatar( $user->ID, 64 );
|
||||
if ( $avatar ) {
|
||||
if ( preg_match( "|src='([^']+)'|", $avatar, $matches ) ) {
|
||||
$error['avatar_src'] = $matches[1];
|
||||
}
|
||||
if ( get_option( 'show_avatars' ) ) {
|
||||
$error['avatar_src'] = get_avatar_url( $user->ID, array( 'size' => 64 ) );
|
||||
$error['avatar_src_2x'] = get_avatar_url( $user->ID, array( 'size' => 128 ) );
|
||||
}
|
||||
|
||||
$send['lock_error'] = $error;
|
||||
|
||||
Reference in New Issue
Block a user