Files
2026-04-23 04:33:43 +03:30

67 lines
2.7 KiB
PHP

<?php
$show_event_layout_style = Upstudy::setting( 'tribe_events_archive_style' );
$show_event_excerpt = Upstudy::setting( 'show_event_excerpt' );
$tribe_event_excerpt_words = Upstudy::setting( 'tribe_event_excerpt_words' );
$tbe_price = Upstudy::setting( 'tbe_price' );
$show_event_date = Upstudy::setting( 'show_event_date' );
$show_event_vanue = Upstudy::setting( 'show_event_vanue' );
$events_columns = Upstudy::setting( 'events_columns' );
$date_format = Upstudy::setting( 'upstudy_events_date_format' );
$time_format = Upstudy::setting( 'upstudy_events_time_format' );
$date_separator = Upstudy::setting( 'upstudy_events_date_separator' );
$time_separator = Upstudy::setting( 'upstudy_events_time_separator' );
$event_id = get_the_ID();
$start_date = tribe_get_start_time ( $event_id, $date_format);
$end_date = tribe_get_end_time ( $event_id, $date_format);
$start_time = tribe_get_start_date( null, false, $time_format );
$end_time = tribe_get_end_date( null, false, $time_format );
$event_vanue = tribe_get_venue();
$organizer_ids = tribe_get_organizer_ids();
$multiple = count($organizer_ids) > 1;
$event = get_post( $event_id );
$start_day = tribe_get_start_date( $event_id, false, 'd' );
$start_month = tribe_get_start_date( $event_id, false, 'M' );
$upstudy_tribe_event_thumb_src = wp_get_attachment_image_src( get_post_thumbnail_id( get_the_ID() ), 'upstudy-post-thumb' );
if ( isset( $upstudy_tribe_event_thumb_src ) && ! empty( $upstudy_tribe_event_thumb_src ) ) :
$upstudy_tribe_event_thumb_url = $upstudy_tribe_event_thumb_src[0];
else :
$upstudy_tribe_event_thumb_url = '';
endif;
echo '<div class="tpc-event-item tpc-event-style-'.esc_attr($show_event_layout_style).'">';
echo '<div class="inner">';
if ( $show_event_date ){
echo '<div class="upstudy-event-date">';
echo '<span class="day">'.$start_day.'</span>';
echo '<span class="month">'.$start_month.'</span>';
echo '</div>';
};
echo '<div class="content">';
the_title( '<h5 class="event-title"><a href="' . esc_url( get_the_permalink() ) . '" class="post-link">', '</a></h5>' );
echo '<div class="upstudy-event-meta">';
echo '<span class="event-time"><i class="dt-icon-clock"></i>'. esc_html( $start_time ).' - '.esc_html( $end_time ).'</span>';
echo '</div>';
if ( $show_event_vanue ) :
echo '<div class="upstudy-event-meta">';
echo '<span class="event-location"><i class="dt-icon-maps-and-flags"></i>'. esc_html( $event_vanue ).'</span>';
echo '</div>';
endif;
echo '</div>';
echo '</div>';
echo '</div>';