167 lines
6.9 KiB
PHP
167 lines
6.9 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__' . esc_attr( $args['style'] ) . '">';
|
|
echo '<div class="course__container">';
|
|
|
|
if ( $args['ld_archive_media_show'] ) {
|
|
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">';
|
|
|
|
$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 multi__color">';
|
|
echo esc_html($level);
|
|
echo '</div>';
|
|
}
|
|
|
|
if ( $args['ld_wishlist_show'] ) {
|
|
Upstudy_Wishlist::content( $post );
|
|
}
|
|
|
|
echo '</div>';
|
|
|
|
echo '</div>';
|
|
|
|
} // == End media
|
|
|
|
echo '<div class="course__content">';
|
|
echo '<div class="course__content--info">';
|
|
|
|
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;
|
|
|
|
echo '<div class="course-meta-inline-wrap">';
|
|
|
|
if ( $args['ld_enroll_show'] ) {
|
|
echo '<div class="course-meta-inline">';
|
|
|
|
echo '<span class="upstudy-meta-border upstudy-course-enroll"><i class="dt-icon-user"></i></span>';
|
|
|
|
echo '<span class="value">';
|
|
echo esc_attr($args['enrolled']);
|
|
if ($args['ld_enroll_text_show']) {
|
|
_e( ' Students', 'upstudy' );
|
|
}
|
|
echo '</span>';
|
|
|
|
echo '</div>';
|
|
}
|
|
|
|
if ( $args['ld_lesson_show'] ) {
|
|
echo '<div class="course-meta-inline">';
|
|
|
|
echo '<span class="upstudy-meta-border upstudy-course-lesson"><i class="dt-icon-learn"></i></span>';
|
|
|
|
echo '<span class="value">';
|
|
echo esc_attr($args['lessons']);
|
|
if ($args['ld_lesson_text_show']) {
|
|
_e( ' Lessons', 'upstudy' );
|
|
}
|
|
echo '</span>';
|
|
|
|
echo '</div>';
|
|
}
|
|
|
|
if ( $args['ld_topic_show'] ) {
|
|
echo '<div class="course-meta-inline">';
|
|
|
|
echo '<span class="upstudy-meta-border upstudy-course-topic"><i class="dt-icon-book"></i></span>';
|
|
|
|
echo '<span class="value">';
|
|
echo esc_attr($args['topics']);
|
|
if ( $args['ld_topic_text_show'] ) {
|
|
_e( ' Topics', 'upstudy' );
|
|
}
|
|
echo '</span>';
|
|
|
|
echo '</div>';
|
|
}
|
|
|
|
$quiz = learndash_course_get_steps_by_type( get_the_ID(), 'sfwd-quiz' );
|
|
$quiz_count = $quiz ? count($quiz) : 0;
|
|
|
|
if ( $args['ld_quiz_show'] && !empty($quiz_count ) ) {
|
|
echo '<div class="course-meta-inline">';
|
|
|
|
echo '<span class="upstudy-meta-border upstudy-course-quiz"><i class="dt-icon-lightbulb"></i></span>';
|
|
|
|
echo '<span class="value">';
|
|
echo esc_html( $quiz_count );
|
|
if ( $args['ld_quiz_text_show'] ) {
|
|
_e( ' quiz', 'upstudy' );
|
|
}
|
|
echo '</span>';
|
|
|
|
echo '</div>';
|
|
}
|
|
|
|
echo '</div>'; // End Meta
|
|
|
|
if ( function_exists( 'ldcr_course_rating_stars' ) && $args['ld_review_show'] ) :
|
|
echo '<div class="upstudy-course-rate">';
|
|
ldcr_course_rating_stars();
|
|
echo '</div>';
|
|
endif;
|
|
|
|
echo '</div>';
|
|
|
|
echo '<div class="course__border"></div>';
|
|
|
|
echo '<div class="course__content--meta">';
|
|
|
|
if ($args['ld_price_show']) {
|
|
echo '<div class="course__meta-left">';
|
|
echo '<div class="price__1">';
|
|
echo wp_kses_post( Upstudy_LD_Helper::course_price() );
|
|
echo '</div>';
|
|
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__('View Details', 'upstudy').'</a>';
|
|
}
|
|
echo '</div>';
|
|
echo '</div>';
|
|
}
|
|
|
|
echo '</div>';
|
|
echo '</div>';
|
|
echo '</div>';
|
|
|
|
echo '</div>'; |