@@ -69,10 +69,6 @@ public static function map_meta_cap( $caps, $cap, $user_id, $args ) {
6969 */
7070 public static function comment_reply_link ( $ link , $ args , $ comment ) {
7171 if ( self ::are_comments_allowed ( $ comment ) ) {
72- if ( \current_user_can ( 'activitypub ' ) && self ::was_received ( $ comment ) ) {
73- return self ::create_fediverse_reply_link ( $ link , $ args );
74- }
75-
7672 return $ link ;
7773 }
7874
@@ -95,28 +91,6 @@ public static function comment_reply_link( $link, $args, $comment ) {
9591 return \apply_filters ( 'activitypub_comment_reply_link ' , $ block );
9692 }
9793
98- /**
99- * Create a link to reply to a federated comment.
100- *
101- * This function adds a title attribute to the reply link to inform the user
102- * that the comment was received from the fediverse and the reply will be sent
103- * to the original author.
104- *
105- * @param string $link The HTML markup for the comment reply link.
106- * @param array $args The args provided by the `comment_reply_link` filter.
107- *
108- * @return string The modified HTML markup for the comment reply link.
109- */
110- private static function create_fediverse_reply_link ( $ link , $ args ) {
111- $ str_to_replace = sprintf ( '>%s< ' , $ args ['reply_text ' ] );
112- $ replace_with = sprintf (
113- ' title="%s">%s< ' ,
114- esc_attr__ ( 'This comment was received from the fediverse and your reply will be sent to the original author ' , 'activitypub ' ),
115- esc_html__ ( 'Reply with federation ' , 'activitypub ' )
116- );
117- return str_replace ( $ str_to_replace , $ replace_with , $ link );
118- }
119-
12094 /**
12195 * Check if it is allowed to comment to a comment.
12296 *
0 commit comments