92 lines
4.1 KiB
PHP
92 lines
4.1 KiB
PHP
<?php
|
|
|
|
if ( ! defined( 'ABSPATH' ) ) exit;
|
|
|
|
$tutor_archive_media_show = Upstudy::setting( 'tutor_archive_media_show' );
|
|
$tutor_archive_title_show = Upstudy::setting( 'tutor_archive_title_show' );
|
|
$tutor_excerpt_show = Upstudy::setting( 'tutor_excerpt_show' );
|
|
$tutor_cat_show = Upstudy::setting( 'tutor_cat_show' );
|
|
$tutor_wishlist_show = Upstudy::setting( 'tutor_wishlist_show' );
|
|
$tutor_instructor_img_on_off = Upstudy::setting( 'tutor_instructor_img_on_off' );
|
|
$tutor_instructor_name_on_off = Upstudy::setting( 'tutor_instructor_name_on_off' );
|
|
$tutor_lesson_show = Upstudy::setting( 'tutor_lesson_show' );
|
|
$tutor_lesson_text_show = Upstudy::setting( 'tutor_lesson_text_show' );
|
|
$tutor_price_show = Upstudy::setting( 'tutor_price_show' );
|
|
$tutor_enroll_show = Upstudy::setting( 'tutor_enroll_show' );
|
|
$tutor_enroll_text_show = Upstudy::setting( 'tutor_enroll_text_show' );
|
|
$tutor_review_show = Upstudy::setting( 'tutor_review_show' );
|
|
$tutor_review_text_show = Upstudy::setting( 'tutor_review_text_show' );
|
|
$tutor_level_show = Upstudy::setting( 'tutor_level_show' );
|
|
$tutor_see_more_btn = Upstudy::setting( 'tutor_see_more_btn' );
|
|
$tutor_see_more_btn_text = Upstudy::setting( 'tutor_see_more_btn_text' );
|
|
$tutor_intro_video = Upstudy::setting( 'tutor_intro_video' );
|
|
$tutor_quiz_show = Upstudy::setting( 'tutor_quiz_show' );
|
|
$tutor_quiz_text_show = Upstudy::setting( 'tutor_quiz_text_show' );
|
|
|
|
$video = tutor_utils()->get_video();
|
|
$videoSource = tutor_utils()->avalue_dot( 'source', $video );
|
|
|
|
if (! empty( $video['source_youtube'] ) && $videoSource == 'youtube') {
|
|
$tutor_intro_video_url = $video["source_youtube"];
|
|
}
|
|
elseif(! empty( $video['source_vimeo'] ) && $videoSource == 'vimeo'){
|
|
$tutor_intro_video_url = $video["source_vimeo"];
|
|
}
|
|
else{
|
|
$tutor_intro_video_url = '';
|
|
}
|
|
|
|
echo '<div class="upstudy-course layout__7 review__show col__3">';
|
|
echo '<div class="course__container">';
|
|
echo '<div class="course__media">';
|
|
|
|
if ( !empty( $tutor_intro_video_url ) && $tutor_intro_video ) :
|
|
|
|
echo '<div class="intro-video-sidebar">';
|
|
echo '<div class="intro-video" style="background-image:url('. esc_url( $get_options['thumb_url'] ) .')">';
|
|
echo '<a href="' . esc_url( $tutor_intro_video_url ) . '" class="upstudy-popup-videos bla-2"><i class="dt-icon-play-button"></i></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( $get_options['thumb_url'] ) . '" alt="' . esc_attr( upstudy_thumbanil_alt_text( get_post_thumbnail_id( get_the_id() ) ) ). '">';
|
|
echo '</a>';
|
|
|
|
endif;
|
|
|
|
if ($tutor_price_show) {
|
|
echo '<div class="price__4">';
|
|
get_template_part( 'tutor/tpl-part/price');
|
|
echo '</div>';
|
|
}
|
|
|
|
if ( $tutor_level_show ) {
|
|
echo '<div class="levels_on__media course__levels">';
|
|
echo get_tutor_course_level();
|
|
echo '</div>';
|
|
}
|
|
|
|
echo '</div>';
|
|
|
|
echo '<div class="course__content">';
|
|
|
|
echo '<div class="course__content--info">';
|
|
if ( $tutor_archive_title_show ) {
|
|
echo '<div class="get__title--info">';
|
|
echo upstudy_get_title();
|
|
echo '</div>';
|
|
}
|
|
if ( $tutor_excerpt_show ) :
|
|
echo '<div class="course-excerpt">';
|
|
echo wpautop( wp_trim_words( wp_kses_post( get_the_excerpt() ), esc_html( $get_options['excerpt_length'] ), esc_html( $get_options['excerpt_end'] ) ) );
|
|
echo '</div>';
|
|
endif;
|
|
|
|
echo '</div>';
|
|
echo '</div>';
|
|
echo '</div>';
|
|
echo '</div>';
|
|
|