From da3bf01598cd7ca0b204083c402aec62a18ff61f Mon Sep 17 00:00:00 2001 From: andrewshuba Date: Mon, 29 Oct 2018 17:18:43 +0200 Subject: [PATCH] fix title and link to comment if comment in group discussion wall --- templates/profile/comments-single.php | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/templates/profile/comments-single.php b/templates/profile/comments-single.php index 7f48dc54..01588ecf 100644 --- a/templates/profile/comments-single.php +++ b/templates/profile/comments-single.php @@ -1,18 +1,28 @@ shortcodes()->loop as $comment ) { ?> - + comment_post_ID ); + if( $post_type == 'um_groups_discussion' ){ + $comment_id = $comment->comment_post_ID; + $group_id = get_post_meta( $comment_id, '_group_id', true); + $comment_title = get_the_title($group_id); + $link = site_url().'/groups/'.$comment_title.'/?tab=discussion'.'#commentid-'.$comment_id; + } else { + $comment_title = get_the_title($comment->comment_post_ID); + $link = get_permalink($comment->comment_post_ID); + } + ?>
- %2$s','ultimate-member'), get_permalink($comment->comment_post_ID), get_the_title($comment->comment_post_ID) ); ?> + %2$s','ultimate-member'), $link, $comment_title ); ?>
- + - + shortcodes()->modified_args) && count(UM()->shortcodes()->loop) >= 10 ) { ?> - +
- + \ No newline at end of file