PluginProbe
UsersWP – Front-end login form, User Registration, User Profile & Members Directory plugin for WP / 1.2.32
UsersWP – Front-end login form, User Registration, User Profile & Members Directory plugin for WP v1.2.32
1.2.73 1.2.72 1.2.71 1.2.70 1.2.69 1.2.68 1.2.67 1.2.66 1.2.65 1.2.64 1.2.63 trunk 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.15 1.0.16 1.0.17 1.0.18 1.0.19 1.0.20 1.0.21 1.0.22 All 173 releases
userswp / templates / bootstrap / comments-item.php

comments-item.php in UsersWP – Front-end login form, User Registration, User Profile & Members Directory plugin for WP 1.2.32, at templates/bootstrap/comments-item.php

50 lines 2.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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 $avatar_url = get_avatar_url( $comment->comment_author_email, array( 'size' => 500 ) );
9 $user_name = isset($comment->comment_author) ? $comment->comment_author : '';
10 $user = !empty($comment->user_id) ? get_userdata( $comment->user_id ) : '';
11 if(!empty($user->display_name)) { $user_name = esc_attr( $user->display_name );}
12 ?>
13 <div class="card mb-5">
14
15 <div class="card-header">
16 <a href="<?php echo esc_url( get_comment_link($comment->comment_ID) ); ?>"><?php echo esc_html( get_the_title($comment->comment_post_ID) ); ?></a>
17 </div>
18
19 <div class="card-body">
20 <div class="row justify-content-center">
21 <div class="col-5 col-md-2 mb-3 col-xl-2 text-center">
22 <img src="<?php echo esc_url_raw( $avatar_url ); ?>" class="align-self-start img-thumbnail rounded-circle mx-auto d-block" alt="...">
23 <cite><?php echo esc_attr($user_name);?></cite>
24 </div>
25 <div class="col-12 col-md-10 col-xl-10 text-muted">
26 <?php
27 do_action( 'uwp_before_comment_summary', $comment );
28 comment_text();
29 do_action( 'uwp_after_comment_summary', $comment );
30 ?>
31 </div>
32 </div>
33 </div>
34
35 <div class="card-footer bg-white">
36 <?php
37 $footer_html = '<time class="uwp-profile-item-time published timeago" datetime="'.get_comment_time( 'c' ).'">'.date_i18n( get_option( 'date_format' ), strtotime( get_comment_date("", $comment->comment_ID) ) ).'</time>';
38 $footer_html .= aui()->button(array(
39 'type' => 'a',
40 'href' => get_comment_link($comment->comment_ID),
41 'class' => 'btn btn-sm btn-outline-primary float-right',
42 'icon' => 'fas fa-comments',
43 'title' => __( 'View Comment', 'userswp' ),
44 'content' => __( 'View Comment', 'userswp' ),
45 ));
46
47 echo apply_filters('uwp_tp_comments_item_footer', $footer_html,$comment); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
48 ?>
49 </div>
50 </div>