zoom-listing.php
4.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<?php
/**
* The Template for displaying all single meetings
*
* This template can be overridden by copying it to yourtheme/video-conferencing-zoom/shortcode/zoom-listing.php.
*
* @package Video Conferencing with Zoom API/Templates
* @since 3.2.2
* @version 3.6.0
*/
global $zoom;
if ( ! vczapi_pro_version_active() && ( $zoom['api']->type === 8 || $zoom['api']->type === 3 ) || empty( $zoom ) || ! empty( $zoom['api']->code ) ) {
return;
}
do_action( 'vczapi_before_loop_zoom_listing_shortcode' );
$columns = ! empty( $zoom['columns'] ) ? $zoom['columns'] : 'vczapi-col-4';
?>
<div class="<?php echo esc_attr( $columns ); ?> vczapi-pb-3">
<div class="vczapi-list-zoom-meetings--item">
<?php if ( has_post_thumbnail() ) { ?>
<div class="vczapi-list-zoom-meetings--item__image">
<?php the_post_thumbnail(); ?>
</div><!--Image End-->
<?php } ?>
<div class="vczapi-list-zoom-meetings--item__details">
<a href="<?php echo esc_url( get_the_permalink() ) ?>" class="vczapi-list-zoom-title-link">
<h3><?php the_title(); ?></h3></a>
<div class="vczapi-list-zoom-meetings--item__details__meta">
<div class="hosted-by meta">
<strong><?php _e( 'Hosted By:', 'video-conferencing-with-zoom-api' ); ?></strong>
<span><?php echo apply_filters( 'vczapi_host_name', $zoom['host_name'] ); ?></span>
</div>
<?php
if ( vczapi_pro_version_active() && ! empty( $zoom['api']->type ) && vczapi_pro_check_type( $zoom['api']->type ) ) {
$type = ! empty( $zoom['api']->type ) ? $zoom['api']->type : false;
$timezone = ! empty( $zoom['api']->timezone ) ? $zoom['api']->timezone : false;
$occurence = ! empty( $zoom['api']->occurrences ) ? $zoom['api']->occurrences : false;
if ( ! empty( $occurence ) ) {
$start_time = Codemanas\ZoomPro\Helpers::get_latest_occurence_by_type( $type, $timezone, $occurence );
?>
<div class="start-date meta">
<strong><?php _e( 'Next Occurrence', 'video-conferencing-with-zoom-api' ); ?>:</strong>
<span><?php echo vczapi_dateConverter( $start_time, $timezone, 'F j, Y @ g:i a' ); ?></span>
</div>
<?php
} else {
?>
<div class="start-date meta">
<strong><?php _e( 'Start Time', 'video-conferencing-with-zoom-api' ); ?>:</strong>
<span><?php echo vczapi_dateConverter( $zoom['start_date'], 'UTC', 'F j, Y @ g:i a' ); ?></span>
</div>
<?php
}
?>
<div class="start-date meta">
<strong><?php _e( 'Type', 'video-conferencing-with-zoom-api' ); ?>:</strong>
<span><?php _e( 'Recurring', 'video-conferencing-with-zoom-api' ); ?></span>
</div>
<?php
} else {
?>
<div class="start-date meta">
<strong><?php _e( 'Start', 'video-conferencing-with-zoom-api' ); ?>:</strong>
<span><?php echo vczapi_dateConverter( $zoom['api']->start_time, $zoom['api']->timezone, 'F j, Y @ g:i a' ); ?></span>
</div>
<?php } ?>
<div class="timezone meta">
<strong><?php _e( 'Timezone', 'video-conferencing-with-zoom-api' ); ?>:</strong>
<span><?php echo esc_html( $zoom['api']->timezone ); ?></span>
</div>
<?php do_action( 'vczapi_additional_content_inside_zoom_listing_shortcode' ); ?>
</div>
<a href="<?php echo esc_url( get_the_permalink() ) ?>"
class="btn vczapi-btn-link"><?php _e( 'View Event', 'video-conferencing-with-zoom-api' ); ?></a>
</div><!--Details end-->
</div><!--List item end-->
</div>
<?php do_action( 'vczapi_after_loop_zoom_listing_shortcode' ); ?>