mirror of
https://github.com/Automattic/wordpress-activitypub
synced 2024-10-18 11:43:31 +00:00
show avatars on likes and announces
thanks @janboddez
This commit is contained in:
parent
7a19bdea17
commit
a482c90069
2 changed files with 26 additions and 0 deletions
|
@ -202,3 +202,13 @@ input.blog-user-identifier {
|
|||
content: "\f307";
|
||||
font-family: dashicons;
|
||||
}
|
||||
|
||||
.repost .dashboard-comment-wrap,
|
||||
.like .dashboard-comment-wrap {
|
||||
padding-inline-start: 63px;
|
||||
}
|
||||
|
||||
.repost .dashboard-comment-wrap .comment-author,
|
||||
.like .dashboard-comment-wrap .comment-author {
|
||||
margin-block: 0;
|
||||
}
|
||||
|
|
|
@ -25,6 +25,8 @@ class Comment {
|
|||
\add_filter( 'comment_class', array( self::class, 'comment_class' ), 10, 3 );
|
||||
\add_filter( 'get_comment_link', array( self::class, 'remote_comment_link' ), 11, 3 );
|
||||
\add_action( 'wp_enqueue_scripts', array( self::class, 'enqueue_scripts' ) );
|
||||
|
||||
\add_filter( 'get_avatar_comment_types', array( static::class, 'get_avatar_comment_types' ), 99 );
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -576,4 +578,18 @@ class Comment {
|
|||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show avatars on Activities if set
|
||||
*
|
||||
* @param array $types list of avatar enabled comment types
|
||||
*
|
||||
* @return array show avatars on Activities
|
||||
*/
|
||||
public static function get_avatar_comment_types( $types ) {
|
||||
$comment_types = self::get_comment_type_names();
|
||||
$types = array_merge( $types, $comment_types );
|
||||
|
||||
return array_unique( $types );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue