2019-07-17 16:55:09 +03:00
|
|
|
<?php if ( ! defined( 'ABSPATH' ) ) exit; ?>
|
|
|
|
|
|
2018-10-08 23:36:05 +03:00
|
|
|
<div class="um-item">
|
|
|
|
|
<div class="um-item-link">
|
|
|
|
|
<i class="um-icon-ios-paper"></i>
|
2019-07-17 16:55:09 +03:00
|
|
|
<a href="<?php echo esc_url( get_permalink( $post ) ); ?>"><?php echo esc_html( $post->post_title ); ?></a>
|
2018-10-08 23:36:05 +03:00
|
|
|
</div>
|
2015-02-01 01:30:04 +02:00
|
|
|
|
2018-10-08 23:36:05 +03:00
|
|
|
<?php if ( has_post_thumbnail( $post->ID ) ) {
|
|
|
|
|
$image_id = get_post_thumbnail_id( $post->ID );
|
|
|
|
|
$image_url = wp_get_attachment_image_src( $image_id, 'full', true ); ?>
|
|
|
|
|
|
|
|
|
|
<div class="um-item-img">
|
2019-07-16 18:40:07 +03:00
|
|
|
<a href="<?php echo esc_url( get_permalink( $post ) ); ?>">
|
2018-10-08 23:36:05 +03:00
|
|
|
<?php echo get_the_post_thumbnail( $post->ID, 'medium' ); ?>
|
|
|
|
|
</a>
|
2015-02-01 01:30:04 +02:00
|
|
|
</div>
|
2018-10-08 23:36:05 +03:00
|
|
|
|
2015-02-01 01:30:04 +02:00
|
|
|
<?php } ?>
|
2018-10-08 23:36:05 +03:00
|
|
|
|
|
|
|
|
<div class="um-item-meta">
|
|
|
|
|
<span>
|
|
|
|
|
<?php printf( __( '%s ago', 'ultimate-member' ), human_time_diff( get_the_time( 'U', $post->ID ), current_time( 'timestamp' ) ) ); ?>
|
|
|
|
|
</span>
|
|
|
|
|
<span>
|
2019-07-16 18:40:07 +03:00
|
|
|
<?php _e( 'in', 'ultimate-member' ); ?>: <?php the_category( ', ', '', $post->ID ); ?>
|
2018-10-08 23:36:05 +03:00
|
|
|
</span>
|
|
|
|
|
<span>
|
|
|
|
|
<?php $num_comments = get_comments_number( $post->ID );
|
|
|
|
|
|
|
|
|
|
if ( $num_comments == 0 ) {
|
|
|
|
|
$comments = __( 'no comments', 'ultimate-member' );
|
|
|
|
|
} elseif ( $num_comments > 1 ) {
|
|
|
|
|
$comments = sprintf( __( '%s comments', 'ultimate-member' ), $num_comments );
|
|
|
|
|
} else {
|
|
|
|
|
$comments = __( '1 comment', 'ultimate-member' );
|
|
|
|
|
} ?>
|
|
|
|
|
|
2019-07-16 18:40:07 +03:00
|
|
|
<a href="<?php echo esc_url( get_comments_link( $post->ID ) ); ?>"><?php echo $comments; ?></a>
|
2018-10-08 23:36:05 +03:00
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|