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
*/
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;
}