Link remote comments on frontend

This commit is contained in:
Django Doucet 2023-10-27 09:07:12 -06:00
parent 9af54707b9
commit 375886b3de

View file

@ -201,9 +201,11 @@ class Activitypub {
* @return string $url * @return string $url
*/ */
public static function remote_comment_link( $comment_link, $comment ) { public static function remote_comment_link( $comment_link, $comment ) {
$remote_comment_link = get_comment_meta( $comment->comment_ID, 'source_url', true ); if ( ! is_admin() ) {
if ( $remote_comment_link ) { $remote_comment_link = get_comment_meta( $comment->comment_ID, 'source_url', true );
$comment_link = esc_url( $remote_comment_link ); if ( $remote_comment_link ) {
$comment_link = esc_url( $remote_comment_link );
}
} }
return $comment_link; return $comment_link;
} }