PluginProbe
Friends / 4.2.2
Friends v4.2.2
4.3.2 4.3.1 4.3.0 4.2.2 4.2.1 4.2.0 4.1.0 2.7.4 2.7.5 2.7.6 2.7.7 2.7.8 2.7.9 2.8.0 2.8.1 2.8.2 2.8.3 2.8.4 2.8.5 2.8.6 2.8.7 2.8.8 2.8.9 2.9.0 2.9.1 All 88 releases
friends / templates / frontend / parts / comments-content.php

comments-content.php in Friends 4.2.2, at templates/frontend/parts/comments-content.php

49 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * This template contains the comments content in the footer for an article on /friends/.
4 *
5 * @version 1.0
6 * @package Friends
7 */
8
9 ?><footer class="comments-content card-footer <?php echo is_single() ? 'open' : 'closed'; ?>">
10 <?php
11 if ( is_single() ) {
12 $_post_id = get_the_ID();
13 $_comments = apply_filters(
14 'friends_get_comments',
15 get_comments(
16 array(
17 'post_id' => $_post_id,
18 'status' => 'approve',
19 'order' => 'ASC',
20 'orderby' => 'comment_date_gmt',
21 )
22 ),
23 $_post_id
24 );
25
26 if ( ! empty( $_comments ) ) {
27 $template_loader = Friends\Friends::template_loader();
28 ?>
29 <h5><?php esc_html_e( 'Comments' ); /* phpcs:ignore WordPress.WP.I18n.MissingArgDomain */ ?></h5>
30 <ol class="comment-list">
31 <?php
32 remove_all_filters( 'comments_template' );
33 wp_list_comments(
34 array(
35 'style' => 'ol',
36 'short_ping' => true,
37 'avatar_size' => 24,
38 ),
39 $_comments
40 );
41 ?>
42 </ol><!-- .comment-list -->
43 <?php
44 }
45 do_action( 'friends_comments_form', $_post_id );
46 }
47 ?>
48 </footer>
49