mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-01 21:21:24 +01:00
Avatars for backend.
git-svn-id: http://svn.automattic.com/wordpress/trunk@6868 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
1bec10a40a
commit
089c2f1d8d
@ -63,4 +63,26 @@ function get_pending_comments_num( $post_id ) {
|
||||
return $pending;
|
||||
}
|
||||
|
||||
// Add avatars to relevant places in admin, or try to
|
||||
|
||||
function floated_admin_avatar( $name ) {
|
||||
global $comment;
|
||||
|
||||
$id = $avatar = false;
|
||||
if ( $comment->comment_author_email )
|
||||
$id = $comment->comment_author_email;
|
||||
if ( $comment->user_id )
|
||||
$id = $comment->user_id;
|
||||
|
||||
if ( $id )
|
||||
$avatar = get_avatar( $id, 32 );
|
||||
|
||||
return "$avatar $name";
|
||||
}
|
||||
|
||||
if ( '/wp-admin/edit-comments.php' == $_SERVER['PHP_SELF'] || '/wp-admin/moderation.php' == $_SERVER['PHP_SELF'] || '/wp-admin/edit.php' == $_SERVER['PHP_SELF'] ) {
|
||||
if ( get_option('show_avatars') )
|
||||
add_filter( 'comment_author', 'floated_admin_avatar' );
|
||||
}
|
||||
|
||||
?>
|
@ -1,13 +1,9 @@
|
||||
|
||||
|
||||
|
||||
a.delete:hover {
|
||||
background: #c00;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.plugins p {
|
||||
margin: 4px;
|
||||
padding: 0;
|
||||
@ -1228,3 +1224,7 @@ p#post-search {
|
||||
.wp-no-js-hidden { display: none; }
|
||||
.ui-tabs-hide { display: none; }
|
||||
.form-input-tip { color: #999; }
|
||||
|
||||
.commentlist .avatar {
|
||||
vertical-align:text-top;
|
||||
}
|
Loading…
Reference in New Issue
Block a user