PluginProbe
UsersWP – Front-end login form, User Registration, User Profile & Members Directory plugin for WP / 1.2.73
UsersWP – Front-end login form, User Registration, User Profile & Members Directory plugin for WP v1.2.73
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 / loop-comments.php

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

33 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 if ( ! defined( 'ABSPATH' ) ) {
4 exit; // Exit if accessed directly
5 }
6
7 $the_query = isset( $args['template_args']['the_query'] ) ? $args['template_args']['the_query'] : '';
8 $maximum_pages = isset( $args['template_args']['maximum_pages'] ) ? $args['template_args']['maximum_pages'] : '';
9 $title = isset( $args['template_args']['title'] ) ? $args['template_args']['title'] : __('Comments', 'userswp');
10 ?>
11 <h3><?php echo esc_attr( $title );?></h3>
12
13 <div class="uwp-profile-comments-loop">
14 <?php
15 // The Loop
16 if ($the_query) {
17 $template = "bootstrap/comments-item.php";
18 echo '<div class="cards">';
19 foreach ( $the_query as $comment ) {
20 $args['template_args']['comment'] = $comment;
21 uwp_get_template($template, $args);
22 }
23 echo '</div>';
24 } else {
25 // no comments found
26 echo aui()->alert(array( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
27 'type'=>'info',
28 'content'=> esc_html( sprintf(__('No %s found', 'userswp'), strtolower($title)) )
29 ));
30 }
31 do_action('uwp_profile_pagination', $maximum_pages);
32 ?>
33 </div>