2017-07-26 14:57:52 +03:00
< ? php UM () -> shortcodes () -> loop = UM () -> query () -> make ( 'post_type=comment&number=10&offset=0&user_id=' . um_user ( 'ID' ) ); ?>
2015-02-01 01:30:04 +02:00
2017-07-26 14:57:52 +03:00
<?php if ( UM()->shortcodes()->loop ) { ?>
2015-02-01 01:30:04 +02:00
2017-07-26 14:57:52 +03:00
<?php UM()->shortcodes()->load_template('profile/comments-single'); ?>
2015-02-01 01:30:04 +02:00
<div class="um-ajax-items">
<!--Ajax output-->
2017-07-26 14:57:52 +03:00
<?php if ( count( UM()->shortcodes()->loop) >= 10 ) { ?>
2015-02-01 01:30:04 +02:00
<div class="um-load-items">
2017-06-06 22:37:55 +08:00
<a href="#" class="um-ajax-paginate um-button" data-hook="um_load_comments" data-args="comment,10,10,<?php echo um_user('ID'); ?>"><?php _e('load more comments','ultimate-member'); ?></a>
2015-02-01 01:30:04 +02:00
</div>
<?php } ?>
</div>
<?php } else { ?>
2017-06-06 22:37:55 +08:00
<div class="um-profile-note"><span><?php echo ( um_profile_id() == get_current_user_id() ) ? __('You have not made any comments.','ultimate-member') : __('This user has not made any comments.','ultimate-member'); ?></span></div>
2015-04-15 16:59:27 +02:00
2015-02-01 01:30:04 +02:00
<?php } ?>