| 1 |
<?php |
| 2 |
|
| 3 |
if ( ! defined( 'ABSPATH' ) ) { |
| 4 |
exit; // Exit if accessed directly |
| 5 |
} |
| 6 |
global $comment; |
| 7 |
$comment = isset( $args['template_args']['comment'] ) ? $args['template_args']['comment'] : ''; |
| 8 |
?> |
| 9 |
<li class="uwp-profile-item-li uwp-profile-item-clearfix"> |
| 10 |
<a class="uwp-profile-item-img" href="<?php echo esc_url( get_comment_link($comment->comment_ID) ); ?>"> |
| 11 |
<?php |
| 12 |
if ( has_post_thumbnail($comment->comment_post_ID) ) { |
| 13 |
$thumb_url = get_the_post_thumbnail_url($comment->comment_post_ID, array(80, 80)); |
| 14 |
} else { |
| 15 |
$thumb_url = uwp_get_default_thumb_uri(); |
| 16 |
} |
| 17 |
?> |
| 18 |
<img class="uwp-profile-item-alignleft uwp-profile-item-thumb" src="<?php echo esc_url( $thumb_url ); ?>"> |
| 19 |
</a> |
| 20 |
|
| 21 |
<h3 class="uwp-profile-item-title"> |
| 22 |
<a href="<?php echo esc_url( get_comment_link($comment->comment_ID) ); ?>"><?php echo esc_html( get_the_title($comment->comment_post_ID) ); ?></a> |
| 23 |
</h3> |
| 24 |
<time class="uwp-profile-item-time published" datetime="<?php echo esc_attr( get_comment_time('c') ); ?>"> |
| 25 |
<?php echo esc_html( date_i18n( get_option( 'date_format' ), strtotime( get_comment_date("", $comment->comment_ID) ) ) ); ?> |
| 26 |
</time> |
| 27 |
<div class="uwp-profile-item-summary"> |
| 28 |
<?php |
| 29 |
$excerpt = strip_shortcodes(wp_trim_words( $comment->comment_content, 100, '...' )); |
| 30 |
echo esc_attr( $excerpt ); |
| 31 |
?> |
| 32 |
</div> |
| 33 |
</li> |