|
1 <?php |
|
2 // backward compat check |
|
3 if (strpos($comment_type, 'social-') === false) { |
|
4 $comment_type = 'social-'.$comment_type; |
|
5 } |
|
6 |
|
7 // set up the comment meta class (used for icon indicator) |
|
8 switch ($comment_type) { |
|
9 case 'social-twitter': |
|
10 case 'social-facebook': |
|
11 case 'social-pingback': |
|
12 case 'social-wordpress': |
|
13 $parts = explode('-', $comment_type); |
|
14 $comment_meta_class = $parts[0].'-comment-meta-'.$parts[1]; |
|
15 break; |
|
16 default: |
|
17 $comment_meta_class = 'social-comment-meta-wordpress'; |
|
18 } |
|
19 |
|
20 ?> |
|
21 <li <?php comment_class('social-comment social-clearfix '.esc_attr($comment_type)); ?> id="li-comment-<?php comment_ID(); ?>"> |
|
22 <div class="social-comment-inner social-clearfix" id="comment-<?php comment_ID(); ?>"> |
|
23 <div class="social-comment-header"> |
|
24 <div class="social-comment-author vcard"> |
|
25 <?php |
|
26 switch ($comment_type) { |
|
27 case 'pingback': |
|
28 echo '<span class="social-comment-label">'.__('Pingback', 'social').'</span>'; |
|
29 break; |
|
30 default: |
|
31 echo get_avatar($comment, 40); |
|
32 break; |
|
33 } |
|
34 |
|
35 if (!$service instanceof Social_Service or $service->show_full_comment($comment->comment_type)) { |
|
36 printf('<cite class="social-fn fn">%s</cite>', get_comment_author_link()); |
|
37 } |
|
38 |
|
39 if ($depth > 1) { |
|
40 echo '<span class="social-replied social-imr">'.__('replied:', 'social').'</span>'; |
|
41 } |
|
42 ?> |
|
43 </div> |
|
44 <!-- .comment-author .vcard --> |
|
45 <div class="social-comment-meta <?php echo esc_attr($comment_meta_class); ?>"> |
|
46 <span class="social-posted-from"> |
|
47 <?php if ($status_url !== null): ?> |
|
48 <a href="<?php echo esc_url($status_url); ?>" title="<?php _e(sprintf('View on %s', $service->title()), 'social'); ?>" target="_blank"> |
|
49 <?php endif; ?> |
|
50 <span><?php _e('View', 'social'); ?></span> |
|
51 <?php if ($status_url !== null): ?> |
|
52 </a> |
|
53 <?php endif; ?> |
|
54 </span> |
|
55 <a href="<?php echo esc_url(get_comment_link(get_comment_ID())); ?>" class="social-posted-when" target="_blank"><?php echo esc_html(Social_Date::span_comment(strtotime($comment->comment_date_gmt))); ?></a> |
|
56 </div> |
|
57 </div> |
|
58 <div class="social-comment-body"> |
|
59 <?php if ($comment->comment_approved == '0'): ?> |
|
60 <em class="comment-awaiting-moderation"><?php _e('Your comment is awaiting moderation.', 'social'); ?></em><br /> |
|
61 <?php endif; ?> |
|
62 <?php comment_text(); ?> |
|
63 </div> |
|
64 <?php if (!$service instanceof Social_Service or $service->show_full_comment($comment->comment_type)): ?> |
|
65 <?php |
|
66 if (!empty($social_items)) { |
|
67 echo '<div class="social-items-comment">'.$social_items.'</div>'; |
|
68 } |
|
69 ?> |
|
70 <div class="social-actions entry-meta"> |
|
71 <?php |
|
72 comment_reply_link(array_merge($args, array('depth' => $depth, 'max_depth' => $args['max_depth']))); |
|
73 edit_comment_link(__('Edit', 'social'), '<span class="comment-edit-link"> · ', '</span>'); |
|
74 ?> |
|
75 </div> |
|
76 <?php endif; ?> |
|
77 <!-- .reply --> |
|
78 </div><!-- #comment-<?php echo comment_ID(); ?> --> |