diff --git a/wp-admin/css/wp-admin.css b/wp-admin/css/wp-admin.css index 441bcee58e..4629c795ec 100644 --- a/wp-admin/css/wp-admin.css +++ b/wp-admin/css/wp-admin.css @@ -3399,6 +3399,7 @@ td.plugin-title p { width: 450px; margin-left: -225px; background: #fff; + line-height: 1.5; z-index: 1000005; } @@ -3425,14 +3426,22 @@ td.plugin-title p { #notification-dialog .post-locked-avatar { float: left; - margin-right: 20px; + margin: 0 20px 20px 0; } -#notification-dialog .currently-editing { - margin-bottom: 20px; +#notification-dialog .wp-tab-first { outline: 0; } +#notification-dialog .locked-saving img { + float: left; + margin-right: 3px; +} + +#notification-dialog-wrap.saving .locked-saving, +#notification-dialog-wrap.saved .locked-saved { + display: inline; +} /*------------------------------------------------------------------------------ 11.1 - Custom Fields diff --git a/wp-admin/includes/misc.php b/wp-admin/includes/misc.php index f954c5b6fa..a1a4680a4d 100644 --- a/wp-admin/includes/misc.php +++ b/wp-admin/includes/misc.php @@ -574,12 +574,11 @@ function wp_check_locked_posts( $response, $data, $screen_id ) { $post_id = (int) substr( $key, 5 ); if ( current_user_can( 'edit_post', $post_id ) && ( $user_id = wp_check_post_lock( $post_id ) ) && ( $user = get_userdata( $user_id ) ) ) { - $send = array(); + $send = array( 'text' => sprintf( __( '%s is currently editing' ), $user->display_name ) ); if ( ( $avatar = get_avatar( $user->ID, 18 ) ) && preg_match( "|src='([^']+)'|", $avatar, $matches ) ) $send['avatar_src'] = $matches[1]; - $send['text'] = sprintf( __( '%s is currently editing' ), $user->display_name ); $checked[$key] = $send; } } @@ -608,9 +607,7 @@ function wp_refresh_post_lock( $response, $data, $screen_id ) { if ( !current_user_can('edit_post', $post_id) ) return $response; - if ( $user_id = wp_check_post_lock( $post_id ) ) { - $user = get_userdata( $user_id ); - + if ( ( $user_id = wp_check_post_lock( $post_id ) ) && ( $user = get_userdata( $user_id ) ) ) { $error = array( 'text' => sprintf( __( '%s has taken over and is currently editing.' ), $user->display_name ) ); diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php index 07509f9058..40e9fa57f4 100644 --- a/wp-admin/includes/post.php +++ b/wp-admin/includes/post.php @@ -1197,8 +1197,7 @@ function _admin_notice_post_locked() { if ( ! $post = get_post() ) return; - if ( $user = wp_check_post_lock( $post->ID ) ) { - $user = get_userdata( $user ); + if ( ( $user_id = wp_check_post_lock( $post->ID ) ) && ( $user = get_userdata( $user_id ) ) ) { $locked = apply_filters( 'show_post_locked_dialog', true, $post, $user ); } else { $locked = false; @@ -1229,6 +1228,7 @@ function _admin_notice_post_locked() {