From 375886b3de60044cec8132c2c0fc0cd66095d571 Mon Sep 17 00:00:00 2001 From: Django Doucet Date: Fri, 27 Oct 2023 09:07:12 -0600 Subject: [PATCH] Link remote comments on frontend --- includes/class-activitypub.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/includes/class-activitypub.php b/includes/class-activitypub.php index a7cca7c..9ad45dc 100644 --- a/includes/class-activitypub.php +++ b/includes/class-activitypub.php @@ -201,9 +201,11 @@ class Activitypub { * @return string $url */ public static function remote_comment_link( $comment_link, $comment ) { - $remote_comment_link = get_comment_meta( $comment->comment_ID, 'source_url', true ); - if ( $remote_comment_link ) { - $comment_link = esc_url( $remote_comment_link ); + if ( ! is_admin() ) { + $remote_comment_link = get_comment_meta( $comment->comment_ID, 'source_url', true ); + if ( $remote_comment_link ) { + $comment_link = esc_url( $remote_comment_link ); + } } return $comment_link; }