HEX
Server: Apache
System: Linux webd006.cluster128.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User: zwafgyp (177615)
PHP: 7.4.33
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/zwafgyp/coolswim/wp-content/plugins/ultimate-member/templates/profile/comments.php
<?php
/**
 * Template for the profile comments
 *
 * This template can be overridden by copying it to your-theme/ultimate-member/profile/comments.php
 *
 * Page: "Profile"
 * Call: function add_comments(), function load_comments()
 *
 * @version 2.6.1
 *
 * @var int    $count_comments
 * @var object $comments
 */
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}


if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
	//Only for AJAX loading posts
	if ( ! empty( $comments ) ) {
		foreach ( $comments as $comment ) {
			UM()->get_template( 'profile/comments-single.php', '', array( 'comment' => $comment ), true );
		}
	}
} else {
	if ( ! empty( $comments ) ) { ?>
		<div class="um-ajax-items">

			<?php foreach ( $comments as $comment ) {
				UM()->get_template( 'profile/comments-single.php', '', array( 'comment' => $comment ), true );
			}

			if ( $count_comments > 10 ) { ?>
				<div class="um-load-items">
					<a href="javascript:void(0);" class="um-ajax-paginate um-button" data-hook="um_load_comments"
					   data-user_id="<?php echo esc_attr( um_get_requested_user() ); ?>" data-page="1"
					   data-pages="<?php echo esc_attr( ceil( $count_comments / 10 ) ); ?>">
						<?php _e( 'load more comments', 'ultimate-member' ); ?>
					</a>
				</div>
			<?php } ?>

		</div>

	<?php } else { ?>

		<div class="um-profile-note">
			<span>
				<?php if ( um_profile_id() == get_current_user_id() ) {
					_e( 'You have not made any comments.', 'ultimate-member' );
				} else {
					_e( 'This user has not made any comments.', 'ultimate-member' );
				} ?>
			</span>
		</div>

	<?php }
}