92 lines
4.1 KiB
PHP
92 lines
4.1 KiB
PHP
<?php
|
|
|
|
if ( ! defined( 'ABSPATH' ) ) exit;
|
|
|
|
$upstudy_ld_video = get_post_meta(get_the_ID(), 'upstudy_ld_video', 1);
|
|
|
|
echo '<div class="upstudy-course layout__3 review__show col__3">';
|
|
echo '<div class="course__container">';
|
|
echo '<div class="course__media">';
|
|
|
|
if ( !empty( $upstudy_ld_video )) :
|
|
|
|
echo '<div class="intro-video-sidebar">';
|
|
echo '<div class="intro-video" style="background-image:url('. esc_url( $args['thumb_url'] ) .')">';
|
|
echo '<a href="' . esc_url( $upstudy_ld_video ) . '" class="upstudy-popup-videos bla-2"></a>';
|
|
echo '</div>';
|
|
echo '</div>';
|
|
|
|
else :
|
|
|
|
echo '<a class="course-thumb" href="' . esc_url( get_the_permalink() ) . '">';
|
|
echo '<img class="w-100" src="' . esc_url( $args['thumb_url'] ) . '" alt="' . esc_attr( upstudy_thumbanil_alt_text( get_post_thumbnail_id( get_the_id() ) ) ). '">';
|
|
echo '</a>';
|
|
|
|
endif;
|
|
|
|
echo '<div class="course__meta-top">';
|
|
if ( $args['ld_cat_show'] && !empty( get_the_term_list(get_the_ID(), 'ld_course_category') )) {
|
|
echo '<div class="course__categories">';
|
|
echo get_the_term_list(get_the_ID(), 'ld_course_category');
|
|
echo '</div>';
|
|
}
|
|
if ( $args['ld_wishlist_show'] ) {
|
|
Upstudy_Wishlist::content( $post );
|
|
}
|
|
echo '</div>';
|
|
|
|
echo '</div>';
|
|
|
|
echo '<div class="course__content">';
|
|
|
|
echo '<div class="course__content--info">';
|
|
|
|
$level = str_replace('_', ' ', get_post_meta( get_the_ID(), 'upstudy_ld_course_level_key', true ));
|
|
|
|
if ( !empty($level) && $args['ld_level_show'] ) {
|
|
echo '<div class="course__levels">';
|
|
echo esc_html($level);
|
|
echo '</div>';
|
|
}
|
|
|
|
if ( $args['ld_archive_title_show'] ) {
|
|
echo '<div class="get__title--info">';
|
|
echo upstudy_get_title();
|
|
echo '</div>';
|
|
}
|
|
if ( $args['ld_excerpt_show'] ) :
|
|
echo '<div class="course-excerpt">';
|
|
echo wpautop( wp_trim_words( wp_kses_post( get_the_excerpt() ), esc_html( $args['excerpt_length'] ), esc_html( $args['excerpt_end'] ) ) );
|
|
echo '</div>';
|
|
endif;
|
|
|
|
if ( function_exists( 'ldcr_course_rating_stars' ) && $args['ld_review_show'] ) :
|
|
echo '<div class="upstudy-course-rate">';
|
|
ldcr_course_rating_stars();
|
|
echo '</div>';
|
|
endif;
|
|
|
|
if ( $args['ld_price_show'] ) {
|
|
echo '<div class="price__1">';
|
|
echo wp_kses_post( Upstudy_LD_Helper::course_price() );
|
|
echo '</div>';
|
|
}
|
|
|
|
if ( $args['ld_see_more_btn'] ) {
|
|
echo '<div class="course__meta-right">';
|
|
echo '<div class="view-more-btn">';
|
|
if (!empty( $args['ld_see_more_btn_text'] )) {
|
|
echo '<a href="' . esc_url( get_permalink() ) . '">'. $args['ld_see_more_btn_text'] .'</a>';
|
|
} else {
|
|
echo '<a href="' . esc_url( get_permalink() ) . '">'. esc_html__('Explore Now', 'upstudy').'</a>';
|
|
}
|
|
echo '</div>';
|
|
echo '</div>';
|
|
}
|
|
|
|
echo '</div>';
|
|
echo '</div>';
|
|
echo '</div>';
|
|
echo '</div>';
|
|
|