This commit is contained in:
2026-04-23 04:33:43 +03:30
commit edde2ea185
11109 changed files with 3335449 additions and 0 deletions
@@ -0,0 +1,91 @@
<?php
/**
* Template for displaying content of single course.
*
* @author ThimPress
* @package LearnPress/Templates
* @version 4.0.0
*/
use \Upstudy\Filter;
get_header();
if ( ! isset( $layout_data ) ) :
$layout_data = array();
endif;
if ( ! isset( $style ) ) :
$style = Upstudy::setting( 'lp_course_archive_style' );
endif;
if ( isset( $_GET['course_preset'] ) ) :
$style = Filter::grid_layout_keys();
endif;
$default_data = array(
'style' => $style
);
$layout_data = wp_parse_args( $layout_data, $default_data );
$upstudy_course_container = array();
$masonry_status = Upstudy::setting( 'lp_course_masonry_layout' );
$wrapper = 'upstudy-lms-courses-grid upstudy-row upstudy-course-archive';
if ( $masonry_status || isset( $_GET['masonry'] ) ) :
$wrapper = $wrapper . ' ' . 'tpc-masonry-grid-wrapper';
$upstudy_course_container[] = 'tpc-masonry-item';
endif;
if ( ! isset( $column ) ) :
$column = apply_filters( 'upstudy_course_archive_grid_column', array( 'upstudy-col-lg-4 upstudy-col-md-6 upstudy-col-sm-12' ) );
endif;
if ( isset( $_GET['column'] ) ) :
if ( $_GET['column'] == 2 ) :
$column = array( 'upstudy-col-lg-6 upstudy-col-md-6 upstudy-col-sm-12' );
endif;
endif;
$upstudy_course_container[] = 'upstudy-course-style-' . esc_attr( $style );
$upstudy_course_container = array_merge( $upstudy_course_container, $column );
$args = array(
'post_type' => LP_COURSE_CPT,
'order' => 'DESC',
'paged' => get_query_var( 'paged' ) ? intval( get_query_var( 'paged' ) ) : 1,
'posts_per_page' => LP()->settings->get( 'learn_press_archive_course_limit' )
);
$args = apply_filters( 'upstudy_lp_course_archive_args', $args );
$query = new WP_Query( $args );
echo '<div class="tpc-site-content-inner' . esc_attr( apply_filters( 'upstudy_container_class', ' upstudy-container' ) ) . '">';
do_action( 'upstudy_before_content' );
upstudy_lp_course_header_top_bar( $query );
if ( $query->have_posts() ) :
echo '<div class="' . esc_attr( $wrapper ) . '">';
while ( $query->have_posts() ) : $query->the_post(); ?>
<div id="post-<?php the_ID(); ?>" <?php post_class( apply_filters( 'upstudy_course_loop_classes', $upstudy_course_container ) ); ?> data-sal>
<?php
learn_press_get_template( 'tpl-part/course/th-layouts.php', compact( 'layout_data' ) );
?>
</div>
<?php
endwhile;
wp_reset_postdata();
echo '</div>';
$GLOBALS['wp_query']->max_num_pages = $query->max_num_pages;
upstudy_numeric_pagination();
else :
_e( 'Sorry, No Course Found.', 'upstudy' );
endif;
do_action( 'upstudy_after_content' );
echo '</div>';
get_footer();
@@ -0,0 +1,47 @@
<?php
/**
* Template for displaying archive courses breadcrumb.
*
* This template can be overridden by copying it to yourtheme/learnpress/global/breadcrumb.php.
*
* @author ThimPress
* @package Learnpress/Templates
* @version 3.0.0
*/
defined( 'ABSPATH' ) || exit();
$lp_single_page_layout = Upstudy::setting( 'lp_single_page_layout' );
if ($lp_single_page_layout == '2') : // The section visible only for layout 2
if ( empty( $breadcrumb ) ) {
return;
}
echo esc_attr($wrap_before);
foreach ( $breadcrumb as $key => $crumb ) {
echo esc_attr($before);
echo '<li>';
if ( ! empty( $crumb[1] ) && sizeof( $breadcrumb ) !== $key + 1 ) {
echo '<a href="' . esc_url( $crumb[1] ) . '"><span>' . esc_html( $crumb[0] ) . '</span></a>';
} else {
echo '<span>' . esc_html( $crumb[0] ) . '</span>';
}
echo '</li>';
echo esc_attr($after);
if ( sizeof( $breadcrumb ) !== $key + 1 ) {
echo esc_attr($delimiter);
}
}
echo esc_attr($wrap_after);
endif; // End section only visible for layout 2
@@ -0,0 +1,44 @@
<?php
/**
* Template for displaying own courses in courses tab of user profile page.
* Edit by Nhamdv
*
* @author ThimPress
* @package Learnpress/Templates
* @version 4.0.9
*/
defined( 'ABSPATH' ) || exit();
?>
<?php if ( $current_page === 1 ) : ?>
<div class="lp-archive-courses">
<ul <?php lp_item_course_class( array( 'profile-courses-list row' ) ); ?> data-layout="grid" data-size="3">
<?php endif; ?>
<?php
global $post;
foreach ( $course_ids as $id ) {
$course = learn_press_get_course( $id );
$post = get_post( $id );
setup_postdata( $post );
$course_data = $user->get_course_data( $id );
$course_results = $course_data->calculate_course_results();
learn_press_get_template_part( 'content', 'course-grid' );
}
wp_reset_postdata();
?>
<?php if ( $current_page === 1 ) : ?>
</ul>
</div>
<?php endif; ?>
<?php if ( $num_pages > 1 && $current_page < $num_pages && $current_page === 1 ) : ?>
<div class="lp_profile_course_progress__nav">
<button data-paged="<?php echo absint( $current_page + 1 ); ?>" data-number="<?php echo absint( $num_pages ); ?>"><?php esc_html_e( 'View more', 'upstudy' ); ?></button>
</div>
<?php endif; ?>
@@ -0,0 +1,33 @@
<?php
/**
* Template for displaying content of single course offline.
*
* @author ThimPress
* @package LearnPress/Templates
* @version 4.2.7
* @version 1.0.1
*/
use LearnPress\Models\CourseModel;
defined( 'ABSPATH' ) || exit;
/**
* Header for page
*/
if ( ! wp_is_block_theme() ) {
do_action( 'learn-press/template-header' );
}
$lp_single_page_layout = Upstudy::setting('lp_single_page_layout');
if (in_array($lp_single_page_layout, ['1', '2', '3', '4', '5', '6'])) {
get_template_part('learnpress/tpl-part/single/single-layout', $lp_single_page_layout);
}
/**
* Footer for page
*/
if ( ! wp_is_block_theme() ) {
do_action( 'learn-press/template-footer' );
}
@@ -0,0 +1,15 @@
<?php
/**
* The template for displaying learnpress single page
*/
get_header();
$lp_single_page_layout = Upstudy::setting('lp_single_page_layout');
if (in_array($lp_single_page_layout, ['1', '2', '3', '4', '5', '6'])) {
get_template_part('learnpress/tpl-part/single/single-layout', $lp_single_page_layout);
}
get_footer();
@@ -0,0 +1,16 @@
<?php
$post_id = upstudy_get_id();
$lp_single_page_layout = Upstudy::setting( 'lp_single_page_layout' );
if ( $lp_single_page_layout == '3' ) {
return;
}
?>
<div class="upstudy-col-lg-4 order-1 order-lg-2 lp-sidebar-col">
<?php get_template_part( 'learnpress/tpl-part/single/single', 'sidebar'); ?>
</div>
@@ -0,0 +1,152 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
$upstudy_lp_video = get_post_meta(get_the_ID(), 'upstudy_lp_video', 1);
echo '<div class="upstudy-course layout__' . esc_attr( $layout_data['style'] ) . '">';
echo '<div class="course__container course_box_shadow">';
if ( $layout_data['show_media'] ) {
echo '<div class="course__media course_overlay">';
if ( !empty( $upstudy_lp_video )) :
echo '<div class="intro-video-sidebar">';
echo '<div class="intro-video" style="background-image:url('. esc_url( $layout_data['thumb_url'] ) .')">';
// echo '<a href="' . esc_url( $upstudy_lp_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( $layout_data['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 ( $layout_data['show_cat'] && !empty( get_the_term_list(get_the_ID(), 'course_category') )) {
echo '<div class="course__categories">';
echo get_the_term_list(get_the_ID(), 'course_category');
echo '</div>';
}
if ( $layout_data['show_wishlist'] ) {
upstudy_lp_wishlist_icon( get_the_ID() );
}
echo '</div>';
if ( $layout_data['show_author_img'] || $layout_data['show_author_name']):
echo '<div class="author__name">';
if ( $layout_data['show_author_img'] ) {
echo get_avatar( get_the_author_meta( 'ID' ), 32 );
}
if ( $layout_data['show_author_name'] ) {
the_author();
}
echo '</div>';
endif;
echo '</div>';
} // == End media
echo '<div class="course__content">';
echo '<div class="course__content--info">';
if ( $layout_data['show_title'] ) {
echo '<div class="get__title--info">';
echo upstudy_get_title();
echo '</div>';
}
if ( $layout_data['show_excerpt'] ) :
echo '<div class="course-excerpt course-excerpt-grid">';
echo wpautop( wp_trim_words( wp_kses_post( get_the_excerpt() ), esc_html( $layout_data['excerpt_length'] ), esc_html( $layout_data['excerpt_end'] ) ) );
echo '</div>';
endif;
if ( $layout_data['show_enrolled'] ) {
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( $layout_data['enrolled'] );
if ( $layout_data['show_enrolled_text']) {
_e( ' Students', 'upstudy' );
}
echo '</span>';
echo '</div>';
}
if ( $layout_data['show_lessons'] ) {
echo '<div class="course-meta-inline">';
echo '<span class="upstudy-meta-border upstudy-course-lesson"><i class="dt-icon-book"></i></span>';
echo '<span class="value">';
echo esc_attr($layout_data['lessons']);
if ( $layout_data['show_lessons_text'] ) {
_e( ' Lessons', 'upstudy' );
}
echo '</span>';
echo '</div>';
}
if ( $layout_data['show_quiz'] ) {
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">';
$course = \LP_Global::course();
$lessons = $course->get_items('lp_quiz', false) ? count($course->get_items('lp_quiz', false)) : 0;
printf('%s', $lessons);
if ( $layout_data['show_quiz_text'] ) {
_e( ' quiz', 'upstudy' );
}
echo '</span>';
echo '</div>';
}
echo '</div>'; // <div class="course__content--info">
echo '<div class="course__border"></div>';
echo '<div class="course__content--meta">';
if ( $layout_data['show_price'] ) {
echo '<div class="course__meta-left">';
echo '<div class="price__1">';
get_template_part( 'learnpress/tpl-part/price');
echo '</div>';
echo '</div>';
}
if ( $layout_data['show_button'] ) {
echo '<div class="course__meta-right">';
echo '<div class="view-more-btn">';
if (!empty($layout_data['button_text'])) {
echo '<a href="' . esc_url( get_permalink() ) . '">'. $layout_data['button_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>';
@@ -0,0 +1,81 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
$upstudy_lp_video = get_post_meta(get_the_ID(), 'upstudy_lp_video', 1);
echo '<div class="upstudy-course layout__' . esc_attr( $layout_data['style'] ) . ' col__3">';
echo '<div class="course__container">';
if ( $layout_data['show_media'] ) {
echo '<div class="course__media">';
if ( !empty( $upstudy_lp_video )) :
echo '<div class="intro-video-sidebar">';
echo '<div class="intro-video" style="background-image:url('. esc_url( $layout_data['thumb_url'] ) .')">';
echo '<a href="' . esc_url( $upstudy_lp_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( $layout_data['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">';
echo '</div>';
if ( $layout_data['show_price'] ) {
echo '<div class="price__2">';
get_template_part( 'learnpress/tpl-part/price');
echo '</div>';
}
if ( $layout_data['lp_instructor_name_on_off'] ){
echo '<div class="author__name"><i class="dt-icon-user"></i>';
if ( $layout_data['lp_instructor_name_on_off'] ) { the_author();}
echo '</div>';;
}
echo '</div>';
} // == End media
echo '<div class="course__content">';
echo '<div class="course__content--info">';
if ( $layout_data['show_title'] ) {
echo '<div class="get__title--info">';
echo upstudy_get_title();
echo '</div>';
}
if ( $layout_data['show_excerpt'] ) :
echo '<div class="course-excerpt course-excerpt-grid">';
echo wpautop( wp_trim_words( wp_kses_post( get_the_excerpt() ), esc_html( $layout_data['excerpt_length'] ), esc_html( $layout_data['excerpt_end'] ) ) );
echo '</div>';
endif;
if ( $layout_data['show_button'] ) {
echo '<div class="course__meta-right">';
echo '<div class="view-more-btn">';
if (!empty( $layout_data['button_text'] )) {
echo '<a href="' . esc_url( get_permalink() ) . '">'. $layout_data['button_text'] .'</a>';
} else {
echo '<a href="' . esc_url( get_permalink() ) . '">'. esc_html__('View Details', 'upstudy').'</a>';
}
echo '<i class="dt-icon-right-arrow"></i></div>';
echo '</div>';
}
echo '</div>';
echo '</div>';
echo '</div>';
echo '</div>';
@@ -0,0 +1,91 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
$upstudy_lp_video = get_post_meta(get_the_ID(), 'upstudy_lp_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_lp_video )) :
echo '<div class="intro-video-sidebar">';
echo '<div class="intro-video" style="background-image:url('. esc_url( $layout_data['thumb_url'] ) .')">';
echo '<a href="' . esc_url( $upstudy_lp_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( $layout_data['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 ( $layout_data['lp_cat_show'] && !empty( get_the_term_list(get_the_ID(), 'course_category') )) {
echo '<div class="course__categories">';
echo get_the_term_list(get_the_ID(), 'course_category');
echo '</div>';
}
if ( $layout_data['show_wishlist'] ) {
upstudy_lp_wishlist_icon( get_the_ID() );
}
echo '</div>';
echo '</div>';
echo '<div class="course__content">';
echo '<div class="course__content--info">';
$level = learn_press_get_post_level( get_the_ID() );
if ( $layout_data['lp_level_show'] ) {
echo '<div class="course__levels">';
echo esc_html($level);
echo '</div>';
}
if ( $layout_data['show_title'] ) {
echo '<div class="get__title--info">';
echo upstudy_get_title();
echo '</div>';
}
if ( $layout_data['show_excerpt'] ) :
echo '<div class="course-excerpt">';
echo wpautop( wp_trim_words( wp_kses_post( get_the_excerpt() ), esc_html( $layout_data['excerpt_length'] ), esc_html( $layout_data['excerpt_end'] ) ) );
echo '</div>';
endif;
if ( class_exists( 'LP_Addon_Course_Review_Preload' ) && $layout_data['lp_review_show'] ) :
echo '<div class="upstudy-course-rate">';
upstudy_lp_course_ratings();
echo '</div>';
endif;
if ( $layout_data['show_price'] ) {
echo '<div class="price__1">';
get_template_part( 'learnpress/tpl-part/price');
echo '</div>';
}
if ( $layout_data['show_button'] ) {
echo '<div class="course__meta-right">';
echo '<div class="view-more-btn">';
if (!empty( $layout_data['button_text'] )) {
echo '<a href="' . esc_url( get_permalink() ) . '">'. $layout_data['button_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>';
@@ -0,0 +1,152 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
$upstudy_lp_video = get_post_meta(get_the_ID(), 'upstudy_lp_video', 1);
echo '<div class="upstudy-course layout__' . esc_attr( $layout_data['style'] ) . '">';
echo '<div class="course__container">';
if ( $layout_data['show_media'] ) {
echo '<div class="course__media">';
if ( !empty( $upstudy_lp_video )) :
echo '<div class="intro-video-sidebar">';
echo '<div class="intro-video" style="background-image:url('. esc_url( $layout_data['thumb_url'] ) .')">';
echo '<a href="' . esc_url( $upstudy_lp_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( $layout_data['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 = learn_press_get_post_level( get_the_ID() );
if ( $layout_data['lp_level_show'] ) {
echo '<div class="course__levels multi__color">';
echo esc_html($level);
echo '</div>';
}
if ( $layout_data['show_wishlist'] ) {
upstudy_lp_wishlist_icon( get_the_ID() );
}
echo '</div>';
echo '</div>';
} // == End media
echo '<div class="course__content">';
echo '<div class="course__content--info">';
if ( $layout_data['show_title'] ) {
echo '<div class="get__title--info">';
echo upstudy_get_title();
echo '</div>';
}
if ( $layout_data['show_excerpt'] ) :
echo '<div class="course-excerpt">';
echo wpautop( wp_trim_words( wp_kses_post( get_the_excerpt() ), esc_html( $layout_data['excerpt_length'] ), esc_html( $layout_data['excerpt_end'] ) ) );
echo '</div>';
endif;
echo '<div class="course-meta-inline-wrap">';
if ( $layout_data['show_enrolled'] ) {
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($layout_data['enrolled']);
if ($layout_data['show_enrolled_text']) {
_e( ' Students', 'upstudy' );
}
echo '</span>';
echo '</div>';
}
if ( $layout_data['show_lessons'] ) {
echo '<div class="course-meta-inline">';
echo '<span class="upstudy-meta-border upstudy-course-lesson"><i class="dt-icon-book"></i></span>';
echo '<span class="value">';
echo esc_attr($layout_data['lessons']);
if ($layout_data['show_lessons_text']) {
_e( ' Lessons', 'upstudy' );
}
echo '</span>';
echo '</div>';
}
if ( $layout_data['lp_quiz_show'] ) {
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">';
$course = \LP_Global::course();
$lessons = $course->get_items('lp_quiz', false) ? count($course->get_items('lp_quiz', false)) : 0;
printf('%s', $lessons);
if ( $layout_data['show_quiz_text'] ) {
_e( ' quiz', 'upstudy' );
}
echo '</span>';
echo '</div>';
}
echo '</div>'; // End Meta
if ( class_exists( 'LP_Addon_Course_Review_Preload' ) && $layout_data['lp_review_show'] ) :
echo '<div class="upstudy-course-rate">';
upstudy_lp_course_ratings();
echo '</div>';
endif;
echo '</div>';
echo '<div class="course__border"></div>';
echo '<div class="course__content--meta">';
if ($layout_data['show_price']) {
echo '<div class="course__meta-left">';
echo '<div class="price__1">';
get_template_part( 'learnpress/tpl-part/price');
echo '</div>';
echo '</div>';
}
if ( $layout_data['show_button'] ) {
echo '<div class="course__meta-right">';
echo '<div class="view-more-btn">';
if (!empty($layout_data['button_text'])) {
echo '<a href="' . esc_url( get_permalink() ) . '">'. layout_data['$button_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>';
@@ -0,0 +1,112 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
$upstudy_lp_video = get_post_meta(get_the_ID(), 'upstudy_lp_video', 1);
echo '<div class="upstudy-course layout__5 review__show col__3">';
echo '<div class="course__container">';
echo '<div class="course__media">';
// if ( !empty( $upstudy_lp_video )) :
// echo '<div class="intro-video-sidebar">';
// echo '<div class="intro-video" style="background-image:url('. esc_url( $layout_data['thumb_url'] ) .')">';
// echo '<a href="' . esc_url( $upstudy_lp_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( $layout_data['thumb_url'] ) . '" alt="' . esc_attr( upstudy_thumbanil_alt_text( get_post_thumbnail_id( get_the_id() ) ) ). '">';
echo '</a>';
// endif;
if ( $layout_data['show_price'] ) {
echo '<div class="price__5">';
get_template_part( 'learnpress/tpl-part/price');
echo '</div>';
}
echo '</div>';
echo '<div class="course__content">';
echo '<div class="course__content--info">';
echo '<div class="course-meta-inline-wrap">';
if ( $layout_data['show_enrolled'] ) {
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($layout_data['enrolled']);
if ($layout_data['show_enrolled_text']) {
_e( ' Students', 'upstudy' );
}
echo '</span>';
echo '</div>';
}
if ( $layout_data['show_lessons'] ) {
echo '<div class="course-meta-inline">';
echo '<span class="upstudy-meta-border upstudy-course-lesson"><i class="dt-icon-book"></i></span>';
echo '<span class="value">';
echo esc_attr($layout_data['lessons']);
if ($layout_data['show_lessons_text']) {
_e( ' Lessons', 'upstudy' );
}
echo '</span>';
echo '</div>';
}
if ( $layout_data['lp_quiz_show'] ) {
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">';
$course = \LP_Global::course();
$lessons = $course->get_items('lp_quiz', false) ? count($course->get_items('lp_quiz', false)) : 0;
printf('%s', $lessons);
if ( $layout_data['show_quiz_text'] ) {
_e( ' quiz', 'upstudy' );
}
echo '</span>';
echo '</div>';
}
echo '</div>'; // End Meta
if ( $layout_data['show_title'] ) {
echo '<div class="get__title--info">';
echo upstudy_get_title();
echo '</div>';
}
if ( $layout_data['show_button'] ) {
echo '<div class="course__meta-right">';
echo '<div class="view-more-btn">';
if (!empty($layout_data['button_text'])) {
echo '<a href="' . esc_url( get_permalink() ) . '">'. $layout_data['button_text'] .'</a>';
} else {
echo '<a href="' . esc_url( get_permalink() ) . '">'. esc_html__('View More', 'upstudy').'</a>';
}
echo '</div>';
echo '</div>';
}
echo '</div>';
echo '</div>';
echo '</div>';
echo '</div>';
@@ -0,0 +1,120 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
$upstudy_lp_video = get_post_meta(get_the_ID(), 'upstudy_lp_video', 1);
echo '<div class="upstudy-course layout__' . esc_attr( $layout_data['style'] ) . '">';
echo '<div class="course__container">';
if ( $layout_data['show_media'] ) {
echo '<div class="course__media">';
echo '<a class="no-course-thumb" href="' . esc_url( get_the_permalink() ) . '">';
echo '<div class="upstudy-triangle-up"></div>';
echo '<div class="upstudy-circle"></div>';
echo '<div class="upstudy-rectangle"></div>';
echo '<div class="upstudy-circle-border"></div>';
echo '</a>';
echo '<div class="course__meta-top">';
if ( $layout_data['show_wishlist'] ) {
upstudy_lp_wishlist_icon( get_the_ID() );
}
echo '</div>';
if ( $layout_data['show_title'] ) {
echo '<div class="top--title">';
echo upstudy_get_title();
echo '</div>';
}
if ( !empty( $upstudy_lp_video ) ) :
echo '<a href="' . esc_url( $upstudy_lp_video ) . '" class="intro-video upstudy-popup-videos bla-2"><i class="dt-icon-play-button"></i></a>';
endif;
echo '</div>';
} // == End media
echo '<div class="course__content">';
echo '<div class="course__content--info">';
if ($layout_data['show_price']) {
echo '<div class="price__1">';
get_template_part( 'learnpress/tpl-part/price');
echo '</div>';
}
if ( $layout_data['show_enrolled'] || $layout_data['show_lessons'] || $layout_data['lp_quiz_show'] || $layout_data['show_excerpt'] ) {
echo '<div class="course-meta-inline-wrap">';
if ( $layout_data['show_enrolled'] ) {
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($layout_data['enrolled']);
if ($layout_data['show_enrolled_text']) {
_e( ' Students', 'upstudy' );
}
echo '</span>';
echo '</div>';
}
if ( $layout_data['show_lessons'] ) {
echo '<div class="course-meta-inline">';
echo '<span class="upstudy-meta-border upstudy-course-lesson"><i class="dt-icon-book"></i></span>';
echo '<span class="value">';
echo esc_attr($layout_data['lessons']);
if ($layout_data['show_lessons_text']) {
_e( ' Lessons', 'upstudy' );
}
echo '</span>';
echo '</div>';
}
if ( $layout_data['lp_quiz_show'] ) {
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">';
$course = \LP_Global::course();
$lessons = $course->get_items('lp_quiz', false) ? count($course->get_items('lp_quiz', false)) : 0;
printf('%s', $lessons);
if ( $layout_data['show_quiz_text'] ) {
_e( ' quiz', 'upstudy' );
}
echo '</span>';
echo '</div>';
}
echo '</div>'; // End Meta
}
if ( $layout_data['show_excerpt'] ) :
echo '<div class="course-excerpt">';
echo wpautop( wp_trim_words( wp_kses_post( get_the_excerpt() ), esc_html( $layout_data['excerpt_length'] ), esc_html( $layout_data['excerpt_end'] ) ) );
echo '</div>';
endif;
echo '</div>'; //
echo '</div>';
echo '</div>';
echo '</div>';
@@ -0,0 +1,113 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
echo '<div class="upstudy-course layout-' . esc_attr( $layout_data['style'] ) . '">';
echo '<div class="course__container">';
echo '<div class="course__media">';
echo '<a class="course-thumb" href="' . esc_url( get_the_permalink() ) . '">';
echo '<img class="w-100" src="' . esc_url( $layout_data['thumb_url'] ) . '" alt="' . esc_attr( upstudy_thumbanil_alt_text( get_post_thumbnail_id( get_the_id() ) ) ). '">';
echo '</a>';
echo '<div class="course__meta-top">';
if ( $layout_data['show_cat_list'] && !empty( get_the_term_list(get_the_ID(), 'course_category') )) {
echo '<div class="course__categories">';
echo get_the_term_list(get_the_ID(), 'course_category');
echo '</div>';
}
if ( $layout_data['show_wishlist_list'] ) {
upstudy_lp_wishlist_icon( get_the_ID() );
}
echo '</div>';
echo '</div>';
echo '<div class="course__content">';
if ( $layout_data['show_price'] ) {
echo '<div class="price__1">';
get_template_part( 'learnpress/tpl-part/price');
echo '</div>';
}
if ( $layout_data['show_title'] ) {
echo upstudy_get_title();
}
if ( class_exists( 'LP_Addon_Course_Review_Preload' ) && $layout_data['show_review_list'] ) :
echo '<div class="upstudy-course-rate">';
upstudy_lp_course_ratings();
echo '</div>';
endif;
if ( $layout_data['show_excerpt_list'] ) :
echo '<div class="course-excerpt course-excerpt-list">';
echo wpautop( wp_trim_words( wp_kses_post( get_the_excerpt() ), esc_html( $layout_data['excerpt_length'] ), esc_html( $layout_data['excerpt_end'] ) ) );
echo '</div>';
endif;
echo '<div class="course__content--meta">';
if ( $layout_data['show_lessons_list'] || $layout_data['show_enrolled_list'] || $layout_data['show_quiz_list'] ) {
echo '<div class="course__meta-left">';
if ( $layout_data['show_enrolled_list'] ) {
echo '<span 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( $layout_data['enrolled'] );
if ( $layout_data['show_enrolled_text']) {
_e( ' Students', 'upstudy' );
}
echo '</span>';
echo '</span>';
}
if ( $layout_data['show_lessons_list'] ) {
echo '<span class="course-meta-inline">';
echo '<span class="upstudy-meta-border upstudy-course-lesson"><i class="dt-icon-book"></i></span>';
echo '<span class="value">';
echo esc_attr($layout_data['lessons']);
if ( $layout_data['show_lessons_text'] ) {
_e( ' Lessons', 'upstudy' );
}
echo '</span>';
echo '</span>';
}
if ( $layout_data['show_quiz_list'] ) {
echo '<span class="course-meta-inline">';
echo '<span class="upstudy-meta-border upstudy-course-quiz"><i class="dt-icon-lightbulb"></i></span>';
echo '<span class="value">';
$course = \LP_Global::course();
$lessons = $course->get_items('lp_quiz', false) ? count($course->get_items('lp_quiz', false)) : 0;
printf('%s', $lessons);
if ( $layout_data['show_quiz_text'] ) {
_e( ' quiz', 'upstudy' );
}
echo '</span>';
echo '</span>';
}
echo '</div>';
}
echo '</div>';
echo '</div>';
echo '</div>';
echo '</div>';
@@ -0,0 +1,105 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
$lp_archive_media_show = Upstudy::setting( 'lp_archive_media_show' );
$lp_archive_title_show = Upstudy::setting( 'lp_archive_title_show' );
$lp_excerpt_show = Upstudy::setting( 'lp_excerpt_show' );
$lp_cat_show = Upstudy::setting( 'lp_cat_show' );
$lp_wishlist_show = Upstudy::setting( 'lp_wishlist_show' );
$lp_instructor_img_on_off = Upstudy::setting( 'lp_instructor_img_on_off' );
$lp_instructor_name_on_off = Upstudy::setting( 'lp_instructor_name_on_off' );
$lp_lesson_show = Upstudy::setting( 'lp_lesson_show' );
$lp_quiz_show = Upstudy::setting( 'lp_quiz_show' );
$lp_price_show = Upstudy::setting( 'lp_price_show' );
$lp_enroll_show = Upstudy::setting( 'lp_enroll_show' );
$lp_review_show = Upstudy::setting( 'lp_review_show' );
$lp_review_text_show = Upstudy::setting( 'lp_review_text_show' );
$lp_level_show = Upstudy::setting( 'lp_level_show' );
$lp_see_more_btn = Upstudy::setting( 'lp_see_more_btn' );
$lp_see_more_btn_text = Upstudy::setting( 'lp_see_more_btn_text' );
echo '<div class="upstudy-course layout-' . esc_attr( $layout_data['style'] ) . '">';
echo '<div class="course__container">';
echo '<div class="course__media">';
echo '<a class="course-thumb" href="' . esc_url( get_the_permalink() ) . '">';
echo '<img class="w-100" src="' . esc_url( $layout_data['thumb_url'] ) . '" alt="' . esc_attr( upstudy_thumbanil_alt_text( get_post_thumbnail_id( get_the_id() ) ) ). '">';
echo '</a>';
echo '<div class="course__meta-top">';
if ( $tutor_cat_show && !empty( get_the_term_list(get_the_ID(), 'course_category') )) {
echo '<div class="course__categories">';
echo get_the_term_list(get_the_ID(), 'course_category');
echo '</div>';
}
if ( $lp_wishlist_show ) {
upstudy_lp_wishlist_icon( get_the_ID() );
}
echo '</div>';
echo '</div>';
echo '<div class="course__content">';
if ($lp_price_show) {
echo '<div class="price__1">';
get_template_part( 'learnpress/tpl-part/price');
echo '</div>';
}
// if ( $tutor_archive_title_show ) {
echo upstudy_get_title();
// }
if ( class_exists( 'LP_Addon_Course_Review_Preload' ) && $lp_review_show ) :
echo '<div class="upstudy-course-rate">';
upstudy_lp_course_ratings();
echo '</div>';
endif;
// if ( $tutor_list_excerpt_show ) :
echo '<div class="course-excerpt course-excerpt-list">';
echo wpautop( wp_trim_words( wp_kses_post( get_the_excerpt() ), esc_html( $layout_data['excerpt_length'] ), esc_html( $layout_data['excerpt_end'] ) ) );
echo '</div>';
// endif;
echo '<div class="course__content--meta">';
if ( $lp_enroll_show || $lp_lesson_show || $lp_quiz_show ) {
echo '<div class="course__meta-left">';
if ( $lp_enroll_show ) {
echo '<span class="course-enroll"><i class="flaticon-study"></i>';
echo esc_html( $layout_data['enrolled'] );
_e( ' Students', 'upstudy' );
echo '</span>';
}
if ( $lp_lesson_show ) {
echo '<span class="course-lessons"><i class="flaticon-book"></i>';
echo esc_html( $layout_data['lessons'] );
_e( ' Lessons', 'upstudy' );
echo '</span>';
}
if ( $lp_quiz_show ) {
echo '<span class="course-quiz"><i class="flaticon-pin"></i>';
$course = \LP_Global::course();
$lessons = $course->get_items('lp_quiz', false) ? count($course->get_items('lp_quiz', false)) : 0;
printf('%s', $lessons);
_e( ' quiz', 'upstudy' );
echo '</span>';
}
echo '</div>';
}
echo '</div>';
echo '</div>';
echo '</div>';
echo '</div>';
@@ -0,0 +1,19 @@
<?php
// Ensure this file is being accessed within the WordPress environment
defined('ABSPATH') || exit();
use \Upstudy\Filter;
// Ensure $layout_data is an array if not already set
$layout_data = isset($layout_data) ? $layout_data : array();
// Get the default options from the Upstudy_LP_LMS_Controls method
$default_data = Filter::Upstudy_LP_LMS_Controls();
$features = $default_data['features'];
// Merge the provided options with the default options
$layout_data = wp_parse_args($layout_data, $default_data);
// Load the template with the specified style from the options
learn_press_get_template('tpl-part/course/el-layout-' . $layout_data['style'] . '.php', compact('layout_data', 'features'));
@@ -0,0 +1,152 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
$upstudy_lp_video = get_post_meta(get_the_ID(), 'upstudy_lp_video', 1);
echo '<div class="upstudy-course layout__' . esc_attr( $layout_data['style'] ) . '">';
echo '<div class="course__container course_box_shadow">';
if ( $layout_data['lp_archive_media_show'] ) {
echo '<div class="course__media course_overlay">';
if ( !empty( $upstudy_lp_video )) :
echo '<div class="intro-video-sidebar">';
echo '<div class="intro-video" style="background-image:url('. esc_url( $layout_data['thumb_url'] ) .')">';
// echo '<a href="' . esc_url( $upstudy_lp_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( $layout_data['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 ( $layout_data['lp_cat_show'] && !empty( get_the_term_list(get_the_ID(), 'course_category') )) {
echo '<div class="course__categories">';
echo get_the_term_list(get_the_ID(), 'course_category');
echo '</div>';
}
if ( $layout_data['lp_wishlist_show'] ) {
upstudy_lp_wishlist_icon( get_the_ID() );
}
echo '</div>';
if ( $layout_data['lp_instructor_img_on_off'] || $layout_data['lp_instructor_name_on_off']):
echo '<div class="author__name">';
if ( $layout_data['lp_instructor_img_on_off'] ) {
echo get_avatar( get_the_author_meta( 'ID' ), 32 );
}
if ( $layout_data['lp_instructor_name_on_off'] ) {
the_author();
}
echo '</div>';
endif;
echo '</div>';
} // == End media
echo '<div class="course__content">';
echo '<div class="course__content--info">';
if ( $layout_data['lp_archive_title_show'] ) {
echo '<div class="get__title--info">';
echo upstudy_get_title();
echo '</div>';
}
if ( $layout_data['lp_excerpt_show'] ) :
echo '<div class="course-excerpt course-excerpt-grid">';
echo wpautop( wp_trim_words( wp_kses_post( get_the_excerpt() ), esc_html( $layout_data['excerpt_length'] ), esc_html( $layout_data['excerpt_end'] ) ) );
echo '</div>';
endif;
if ( $layout_data['lp_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( $layout_data['enrolled'] );
if ( $layout_data['lp_enroll_text_show']) {
_e( ' Students', 'upstudy' );
}
echo '</span>';
echo '</div>';
}
if ( $layout_data['lp_lesson_show'] ) {
echo '<div class="course-meta-inline">';
echo '<span class="upstudy-meta-border upstudy-course-lesson"><i class="dt-icon-book"></i></span>';
echo '<span class="value">';
echo esc_attr($layout_data['lessons']);
if ( $layout_data['lp_quiz_text_show'] ) {
_e( ' Lessons', 'upstudy' );
}
echo '</span>';
echo '</div>';
}
if ( $layout_data['lp_quiz_show'] ) {
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">';
$course = \LP_Global::course();
$lessons = $course->get_items('lp_quiz', false) ? count($course->get_items('lp_quiz', false)) : 0;
printf('%s', $lessons);
if ( $layout_data['lp_quiz_text_show'] ) {
_e( ' quiz', 'upstudy' );
}
echo '</span>';
echo '</div>';
}
echo '</div>'; // <div class="course__content--info">
echo '<div class="course__border"></div>';
echo '<div class="course__content--meta">';
if ( $layout_data['lp_price_show'] ) {
echo '<div class="course__meta-left">';
echo '<div class="price__1">';
get_template_part( 'learnpress/tpl-part/price');
echo '</div>';
echo '</div>';
}
if ( $layout_data['lp_see_more_btn'] ) {
echo '<div class="course__meta-right">';
echo '<div class="view-more-btn">';
if (!empty($layout_data['lp_see_more_btn_text'])) {
echo '<a href="' . esc_url( get_permalink() ) . '">'. $layout_data['lp_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>';
@@ -0,0 +1,81 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
$upstudy_lp_video = get_post_meta(get_the_ID(), 'upstudy_lp_video', 1);
echo '<div class="upstudy-course layout__' . esc_attr( $layout_data['style'] ) . ' col__3">';
echo '<div class="course__container">';
if ( $layout_data['lp_archive_media_show'] ) {
echo '<div class="course__media">';
if ( !empty( $upstudy_lp_video )) :
echo '<div class="intro-video-sidebar">';
echo '<div class="intro-video" style="background-image:url('. esc_url( $layout_data['thumb_url'] ) .')">';
echo '<a href="' . esc_url( $upstudy_lp_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( $layout_data['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">';
echo '</div>';
if ( $layout_data['lp_price_show'] ) {
echo '<div class="price__2">';
get_template_part( 'learnpress/tpl-part/price');
echo '</div>';
}
if ( $layout_data['lp_instructor_name_on_off'] ){
echo '<div class="author__name"><i class="dt-icon-user"></i>';
if ( $layout_data['lp_instructor_name_on_off'] ) { the_author();}
echo '</div>';;
}
echo '</div>';
} // == End media
echo '<div class="course__content">';
echo '<div class="course__content--info">';
if ( $layout_data['lp_archive_title_show'] ) {
echo '<div class="get__title--info">';
echo upstudy_get_title();
echo '</div>';
}
if ( $layout_data['lp_excerpt_show'] ) :
echo '<div class="course-excerpt course-excerpt-grid">';
echo wpautop( wp_trim_words( wp_kses_post( get_the_excerpt() ), esc_html( $layout_data['excerpt_length'] ), esc_html( $layout_data['excerpt_end'] ) ) );
echo '</div>';
endif;
if ( $layout_data['lp_see_more_btn'] ) {
echo '<div class="course__meta-right">';
echo '<div class="view-more-btn">';
if (!empty( $layout_data['lp_see_more_btn_text'] )) {
echo '<a href="' . esc_url( get_permalink() ) . '">'. $layout_data['lp_see_more_btn_text'] .'</a>';
} else {
echo '<a href="' . esc_url( get_permalink() ) . '">'. esc_html__('View Details', 'upstudy').'</a>';
}
echo '<i class="dt-icon-right-arrow"></i></div>';
echo '</div>';
}
echo '</div>';
echo '</div>';
echo '</div>';
echo '</div>';
@@ -0,0 +1,91 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
$upstudy_lp_video = get_post_meta(get_the_ID(), 'upstudy_lp_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_lp_video )) :
echo '<div class="intro-video-sidebar">';
echo '<div class="intro-video" style="background-image:url('. esc_url( $layout_data['thumb_url'] ) .')">';
echo '<a href="' . esc_url( $upstudy_lp_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( $layout_data['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 ( $layout_data['lp_cat_show'] && !empty( get_the_term_list(get_the_ID(), 'course_category') )) {
echo '<div class="course__categories">';
echo get_the_term_list(get_the_ID(), 'course_category');
echo '</div>';
}
if ( $layout_data['lp_wishlist_show'] ) {
upstudy_lp_wishlist_icon( get_the_ID() );
}
echo '</div>';
echo '</div>';
echo '<div class="course__content">';
echo '<div class="course__content--info">';
$level = learn_press_get_post_level( get_the_ID() );
if ( $layout_data['lp_level_show'] ) {
echo '<div class="course__levels">';
echo esc_html($level);
echo '</div>';
}
if ( $layout_data['lp_archive_title_show'] ) {
echo '<div class="get__title--info">';
echo upstudy_get_title();
echo '</div>';
}
if ( $layout_data['lp_excerpt_show'] ) :
echo '<div class="course-excerpt">';
echo wpautop( wp_trim_words( wp_kses_post( get_the_excerpt() ), esc_html( $layout_data['excerpt_length'] ), esc_html( $layout_data['excerpt_end'] ) ) );
echo '</div>';
endif;
if ( class_exists( 'LP_Addon_Course_Review_Preload' ) && $layout_data['lp_review_show'] ) :
echo '<div class="upstudy-course-rate">';
upstudy_lp_course_ratings();
echo '</div>';
endif;
if ( $layout_data['lp_price_show'] ) {
echo '<div class="price__1">';
get_template_part( 'learnpress/tpl-part/price');
echo '</div>';
}
if ( $layout_data['lp_see_more_btn'] ) {
echo '<div class="course__meta-right">';
echo '<div class="view-more-btn">';
if (!empty( $layout_data['lp_see_more_btn_text'] )) {
echo '<a href="' . esc_url( get_permalink() ) . '">'. $layout_data['lp_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>';
@@ -0,0 +1,152 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
$upstudy_lp_video = get_post_meta(get_the_ID(), 'upstudy_lp_video', 1);
echo '<div class="upstudy-course layout__' . esc_attr( $layout_data['style'] ) . '">';
echo '<div class="course__container">';
if ( $layout_data['lp_archive_media_show'] ) {
echo '<div class="course__media">';
if ( !empty( $upstudy_lp_video )) :
echo '<div class="intro-video-sidebar">';
echo '<div class="intro-video" style="background-image:url('. esc_url( $layout_data['thumb_url'] ) .')">';
echo '<a href="' . esc_url( $upstudy_lp_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( $layout_data['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 = learn_press_get_post_level( get_the_ID() );
if ( $layout_data['lp_level_show'] ) {
echo '<div class="course__levels multi__color">';
echo esc_html($level);
echo '</div>';
}
if ( $layout_data['lp_wishlist_show'] ) {
upstudy_lp_wishlist_icon( get_the_ID() );
}
echo '</div>';
echo '</div>';
} // == End media
echo '<div class="course__content">';
echo '<div class="course__content--info">';
if ( $layout_data['lp_archive_title_show'] ) {
echo '<div class="get__title--info">';
echo upstudy_get_title();
echo '</div>';
}
if ( $layout_data['lp_excerpt_show'] ) :
echo '<div class="course-excerpt">';
echo wpautop( wp_trim_words( wp_kses_post( get_the_excerpt() ), esc_html( $layout_data['excerpt_length'] ), esc_html( $layout_data['excerpt_end'] ) ) );
echo '</div>';
endif;
echo '<div class="course-meta-inline-wrap">';
if ( $layout_data['lp_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($layout_data['enrolled']);
if ($layout_data['lp_enroll_text_show']) {
_e( ' Students', 'upstudy' );
}
echo '</span>';
echo '</div>';
}
if ( $layout_data['lp_lesson_show'] ) {
echo '<div class="course-meta-inline">';
echo '<span class="upstudy-meta-border upstudy-course-lesson"><i class="dt-icon-book"></i></span>';
echo '<span class="value">';
echo esc_attr($layout_data['lessons']);
if ($layout_data['lp_lesson_text_show']) {
_e( ' Lessons', 'upstudy' );
}
echo '</span>';
echo '</div>';
}
if ( $layout_data['lp_quiz_show'] ) {
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">';
$course = \LP_Global::course();
$lessons = $course->get_items('lp_quiz', false) ? count($course->get_items('lp_quiz', false)) : 0;
printf('%s', $lessons);
if ( $layout_data['lp_quiz_text_show'] ) {
_e( ' quiz', 'upstudy' );
}
echo '</span>';
echo '</div>';
}
echo '</div>'; // End Meta
if ( class_exists( 'LP_Addon_Course_Review_Preload' ) && $layout_data['lp_review_show'] ) :
echo '<div class="upstudy-course-rate">';
upstudy_lp_course_ratings();
echo '</div>';
endif;
echo '</div>';
echo '<div class="course__border"></div>';
echo '<div class="course__content--meta">';
if ($layout_data['lp_price_show']) {
echo '<div class="course__meta-left">';
echo '<div class="price__1">';
get_template_part( 'learnpress/tpl-part/price');
echo '</div>';
echo '</div>';
}
if ( $layout_data['lp_see_more_btn'] ) {
echo '<div class="course__meta-right">';
echo '<div class="view-more-btn">';
if (!empty($layout_data['lp_see_more_btn_text'])) {
echo '<a href="' . esc_url( get_permalink() ) . '">'. layout_data['$lp_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>';
@@ -0,0 +1,113 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
$upstudy_lp_video = get_post_meta(get_the_ID(), 'upstudy_lp_video', 1);
echo '<div class="upstudy-course layout__5 review__show col__3">';
echo '<div class="course__container">';
echo '<div class="course__media">';
// if ( !empty( $upstudy_lp_video )) :
// echo '<div class="intro-video-sidebar">';
// echo '<div class="intro-video" style="background-image:url('. esc_url( $layout_data['thumb_url'] ) .')">';
// echo '<a href="' . esc_url( $upstudy_lp_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( $layout_data['thumb_url'] ) . '" alt="' . esc_attr( upstudy_thumbanil_alt_text( get_post_thumbnail_id( get_the_id() ) ) ). '">';
echo '</a>';
// endif;
if ( $layout_data['lp_price_show'] ) {
echo '<div class="price__5">';
get_template_part( 'learnpress/tpl-part/price');
echo '</div>';
}
echo '</div>';
echo '<div class="course__content">';
echo '<div class="course__content--info">';
echo '<div class="course-meta-inline-wrap">';
if ( $layout_data['lp_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($layout_data['enrolled']);
if ($lp_lesson_text_show) {
_e( ' Students', 'upstudy' );
}
echo '</span>';
echo '</div>';
}
if ( $layout_data['lp_lesson_show'] ) {
echo '<div class="course-meta-inline">';
echo '<span class="upstudy-meta-border upstudy-course-lesson"><i class="dt-icon-book"></i></span>';
echo '<span class="value">';
echo esc_attr($layout_data['lessons']);
if ($layout_data['lp_lesson_text_show']) {
_e( ' Lessons', 'upstudy' );
}
echo '</span>';
echo '</div>';
}
if ( $layout_data['lp_quiz_show'] ) {
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">';
$course = \LP_Global::course();
$lessons = $course->get_items('lp_quiz', false) ? count($course->get_items('lp_quiz', false)) : 0;
printf('%s', $lessons);
if ( $layout_data['lp_quiz_text_show'] ) {
_e( ' quiz', 'upstudy' );
}
echo '</span>';
echo '</div>';
}
echo '</div>'; // End Meta
if ( $layout_data['lp_archive_title_show'] ) {
echo '<div class="get__title--info">';
echo upstudy_get_title();
echo '</div>';
}
if ( $layout_data['lp_see_more_btn'] ) {
echo '<div class="course__meta-right">';
echo '<div class="view-more-btn">';
if (!empty($layout_data['lp_see_more_btn_text'])) {
echo '<a href="' . esc_url( get_permalink() ) . '">'. $layout_data['lp_see_more_btn_text'] .'</a>';
} else {
echo '<a href="' . esc_url( get_permalink() ) . '">'. esc_html__('View More', 'upstudy').'</a>';
}
echo '</div>';
echo '</div>';
}
echo '</div>';
echo '</div>';
echo '</div>';
echo '</div>';
@@ -0,0 +1,120 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
$upstudy_lp_video = get_post_meta(get_the_ID(), 'upstudy_lp_video', 1);
echo '<div class="upstudy-course layout__' . esc_attr( $layout_data['style'] ) . '">';
echo '<div class="course__container">';
if ( $layout_data['lp_archive_media_show'] ) {
echo '<div class="course__media">';
echo '<a class="no-course-thumb" href="' . esc_url( get_the_permalink() ) . '">';
echo '<div class="upstudy-triangle-up"></div>';
echo '<div class="upstudy-circle"></div>';
echo '<div class="upstudy-rectangle"></div>';
echo '<div class="upstudy-circle-border"></div>';
echo '</a>';
echo '<div class="course__meta-top">';
if ( $layout_data['lp_wishlist_show'] ) {
upstudy_lp_wishlist_icon( get_the_ID() );
}
echo '</div>';
if ( $layout_data['lp_archive_title_show'] ) {
echo '<div class="top--title">';
echo upstudy_get_title();
echo '</div>';
}
if ( !empty( $upstudy_lp_video ) ) :
echo '<a href="' . esc_url( $upstudy_lp_video ) . '" class="intro-video upstudy-popup-videos bla-2"><i class="dt-icon-play-button"></i></a>';
endif;
echo '</div>';
} // == End media
echo '<div class="course__content">';
echo '<div class="course__content--info">';
if ($layout_data['lp_price_show']) {
echo '<div class="price__1">';
get_template_part( 'learnpress/tpl-part/price');
echo '</div>';
}
if ( $layout_data['lp_enroll_show'] || $layout_data['lp_lesson_show'] || $layout_data['lp_quiz_show'] || $layout_data['lp_excerpt_show'] ) {
echo '<div class="course-meta-inline-wrap">';
if ( $layout_data['lp_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($layout_data['enrolled']);
if ($layout_data['lp_enroll_text_show']) {
_e( ' Students', 'upstudy' );
}
echo '</span>';
echo '</div>';
}
if ( $layout_data['lp_lesson_show'] ) {
echo '<div class="course-meta-inline">';
echo '<span class="upstudy-meta-border upstudy-course-lesson"><i class="dt-icon-book"></i></span>';
echo '<span class="value">';
echo esc_attr($layout_data['lessons']);
if ($layout_data['lp_lesson_text_show']) {
_e( ' Lessons', 'upstudy' );
}
echo '</span>';
echo '</div>';
}
if ( $layout_data['lp_quiz_show'] ) {
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">';
$course = \LP_Global::course();
$lessons = $course->get_items('lp_quiz', false) ? count($course->get_items('lp_quiz', false)) : 0;
printf('%s', $lessons);
if ( $layout_data['lp_quiz_text_show'] ) {
_e( ' quiz', 'upstudy' );
}
echo '</span>';
echo '</div>';
}
echo '</div>'; // End Meta
}
if ( $layout_data['lp_excerpt_show'] ) :
echo '<div class="course-excerpt">';
echo wpautop( wp_trim_words( wp_kses_post( get_the_excerpt() ), esc_html( $layout_data['excerpt_length'] ), esc_html( $layout_data['excerpt_end'] ) ) );
echo '</div>';
endif;
echo '</div>'; //
echo '</div>';
echo '</div>';
echo '</div>';
@@ -0,0 +1,18 @@
<?php
defined('ABSPATH') || exit();
use \Upstudy\Filter;
// Ensure $layout_data is an array if not already set
$layout_data = isset($layout_data) ? $layout_data : array();
// Get the default options from the Upstudy_LP_LMS_Controls method
$default_data = Filter::Upstudy_LP_LMS_Controls();
$features = $default_data['features'];
// Merge the provided options with the default options
$layout_data = wp_parse_args($layout_data, $default_data);
// Get the template with the specified style from the options
learn_press_get_template('tpl-part/course/th-layout-' . $layout_data['style'] . '.php', compact('layout_data', 'features'));
@@ -0,0 +1,19 @@
<?Php
$course = LP_Global::course();
// Render
//echo '<span class="course-price">';
if ( $price = $course->get_price_html() ) :
if ( $course->get_origin_price() != $course->get_price() ) :
echo '<span class="origin-price">', esc_html( $course->get_origin_price_html() ), '</span>';
endif;
echo '<span class="price">', esc_html($price), '</span>';
endif;
//echo '</span>';
@@ -0,0 +1,11 @@
<?php
$tutor_intro_video_position = Upstudy::setting( 'tutor_intro_video_position' );
if ( $tutor_intro_video_position == 'intro_video_content') :
tutor_utils()->has_video_in_single() ? tutor_course_video() : get_tutor_course_thumbnail();
endif;
@@ -0,0 +1,31 @@
<?php
$lp_intro_video_position = Upstudy::setting( 'lp_intro_video_position' );
$lp_single_page_layout = Upstudy::setting( 'lp_single_page_layout' );
$upstudy_lp_video = get_post_meta( get_the_ID(), 'upstudy_lp_video', true);
if ($upstudy_lp_video) :
echo '<div class="intro-video-sidebar intro-video-sidebar is__sidebar">';
echo '<div class="intro-video-content">';
echo '<div class="intro-video" style="background-image: url(' . esc_url( get_the_post_thumbnail_url(get_the_ID(),'full') ) . ')">';
echo '<a href="' . esc_url( $upstudy_lp_video ) . '" class="upstudy-popup-videos bla-2">';
echo '<i class="dt-icon-play-button"></i>';
echo '</a>';
echo '</div>';
echo '</div>';
echo '</div>'; // End intro-video-sidebar
elseif( has_post_thumbnail()) :
echo '<div class="post-thumbnail">';
the_post_thumbnail( 'large' );
echo '</div>';
endif;
//}
@@ -0,0 +1,12 @@
<?php
$tutor_intro_video_position = Upstudy::setting( 'tutor_intro_video_position' );
if ( $tutor_intro_video_position == 'intro_video_sidebar' ) :
echo '<div class="intro-video-sidebar intro-video-content is__sidebar">';
tutor_utils()->has_video_in_single() ? tutor_course_video() : get_tutor_course_thumbnail();
echo '</div>';
endif;
@@ -0,0 +1,25 @@
<?php
$lp_custom_feature_group = get_post_meta(get_the_ID(), 'lp_custom_feature_group', true);
if ($lp_custom_feature_group) {
foreach ((array) $lp_custom_feature_group as $key => $entry) {
$icon = !empty($entry['lp_custom_feature_group_icon']) ? $entry['lp_custom_feature_group_icon'] : 'dt-icon-play-button';
$label = !empty($entry['lp_custom_feature_group_label']) ? $entry['lp_custom_feature_group_label'] : '';
$value = !empty($entry['lp_custom_feature_group_value']) ? $entry['lp_custom_feature_group_value'] : '';
$unit = !empty($entry['lp_custom_feature_group_unit']) ? $entry['lp_custom_feature_group_unit'] : '';
// Detect icon type
$if_has_dashicons = (strpos($icon, 'dashicons') !== false) ? 'dashicons' : '';
$if_has_fontawesome = (strpos($icon, 'fa-') !== false) ? 'fa' : '';
echo '<li>';
echo '<span class="label"><i class="meta-icon ' . esc_attr($if_has_fontawesome . ' ' . $if_has_dashicons . ' ' . $icon) . '"></i> ' . esc_html($label) . '</span>';
echo '<span class="value">';
echo '<span class="tutor-meta-level">' . esc_html($value) . '</span>';
if ($unit) {
echo '<span class="tutor-meta-value tutor-color-secondary tutor-mr-4">' . esc_html($unit) . '</span>';
}
echo '</span>';
echo '</li>';
}
}
@@ -0,0 +1,31 @@
<?php
$lp_single_page_layout = Upstudy::setting( 'lp_single_page_layout' );
$lp_instructor_single = Upstudy::setting( 'lp_instructor_single' );
$lp_single_last_update = Upstudy::setting( 'lp_single_last_update' );
$lp_lesson_single = Upstudy::setting( 'lp_lesson_single' );
$lp_single_enroll_btn = Upstudy::setting( 'lp_single_enroll_btn' );
$lp_duration_single = Upstudy::setting( 'lp_duration_single' );
$lp_single_review = Upstudy::setting( 'lp_single_review' );
$lp_course_feature_quizzes_show = Upstudy::setting( 'lp_course_feature_quizzes_show' );
$lp_course_feature_duration_show = Upstudy::setting( 'lp_course_feature_duration_show' );
$lp_course_feature_lessons_show = Upstudy::setting( 'lp_course_feature_lessons_show' );
$lp_single_last_update = Upstudy::setting( 'lp_single_last_update' );
$lp_course_feature_enroll_show = Upstudy::setting( 'lp_course_feature_enroll_show' );
if ( in_array( $lp_single_page_layout, array('3')) ) {
echo '<div class="upstudy-course-single-header-meta-01">';
if ($lp_instructor_single) {
echo '<div class="course-instructor post-author">';
echo '<span class="meta-value"><i class="meta-icon dt-icon-user"></i>';
the_author();
echo '</span>';
echo '</div>';
}
echo '</div>';
}
@@ -0,0 +1,71 @@
<?php
/**
* The template for displaying course single page
*/
$course_id = get_the_ID();
$course_rating = tutor_utils()->get_course_rating( $course_id );
$is_enrolled = tutor_utils()->is_enrolled( $course_id, get_current_user_id() );
// Prepare the nav items.
$course_nav_item = apply_filters( 'tutor_course/single/nav_items', tutor_utils()->course_nav_items(), $course_id );
$is_public = \TUTOR\Course_List::is_public( $course_id );
$is_mobile = wp_is_mobile();
$enrollment_box_position = tutor_utils()->get_option( 'enrollment_box_position_in_mobile', 'bottom' );
if ( '-1' === $enrollment_box_position ) {
$enrollment_box_position = 'bottom';
}
$student_must_login_to_view_course = tutor_utils()->get_option( 'student_must_login_to_view_course' );
tutor_utils()->tutor_custom_header();
if ( ! is_user_logged_in() && ! $is_public && $student_must_login_to_view_course ) {
tutor_load_template( 'login' );
tutor_utils()->tutor_custom_footer();
return;
}
$tutor_intro_video_position = Upstudy::setting( 'tutor_intro_video_position' );
$tutor_single_page_layout = Upstudy::setting( 'tutor_single_page_layout' );
echo '<article id="post-'; the_ID(); echo '"'; post_class( 'upstudy-course-single-wrap' ); echo '>';
if ( !in_array( $tutor_single_page_layout, array('5')) ) {
if ( $tutor_intro_video_position == 'intro_video_content' ) :
get_template_part( 'tutor/tpl-part/single/media', 'content' );
endif;
}
echo '<div class="post-wrapper">';
echo '<div class="tutor-course-details-tab">';
if (is_array($course_nav_item) && count($course_nav_item) > 1) :
echo '<div class="tutor-is-sticky">';
tutor_load_template('single.course.enrolled.nav', array('course_nav_item' => $course_nav_item));
echo '</div>';
endif;
echo '<div class="tutor-tab tutor-pt-24">';
foreach ($course_nav_item as $key => $subpage) :
echo '<div id="tutor-course-details-tab-' . esc_attr($key) . '" class="tutor-tab-item' . ('info' == $key ? ' is-active' : '') . '">';
do_action('tutor_course/single/tab/' . $key . '/before');
$method = $subpage['method'];
if (is_string($method)) {
$method();
} else {
$_object = $method[0];
$_method = $method[1];
$_object->$_method(get_the_ID());
}
do_action('tutor_course/single/tab/' . $key . '/after');
echo '</div>';
endforeach;
echo '</div>';
echo '</div>';
do_action('tutor_course/single/after/inner-wrap');
echo '</div>'; // End post-wrapper
echo ' </article>'; // End </article>
@@ -0,0 +1,61 @@
<?php
/**
* The template for displaying course single page
*/
get_header();
$lp_course_header_style = Upstudy::setting( 'lp_course_header_style' );
$lp_related_course_position = Upstudy::setting( 'lp_related_course_position' );
$lp_intro_video_position = Upstudy::setting( 'lp_intro_video_position' );
$lp_single_breadcrumb = Upstudy::setting( 'lp_single_breadcrumb' );
// ==== Content Area =====
echo '<div id="primary" class="content-area">';
echo '<main id="main" class="site-main" role="main">';
echo '<div class="upstudy-container">';
echo '<div class="upstudy-row">';
echo '<div class="upstudy-col-md-8">';
echo '<div class="upstudy-single-course-lead-info lp has-text-align-left">';
if ( $lp_single_breadcrumb ) {
echo '<div class="upstudy-breadcrumb-wrapper">';
do_action( 'upstudy_breadcrumb' );
echo '</div>';
}
echo '<h1 class="course-title">';
the_title();
echo '</h1>';
echo '</div>';
echo '</div>';
echo '</div>';
while ( have_posts() ) : the_post();
global $post; $post_id = $post->ID;
$course_id = $post_id;
learn_press_get_template( 'content-single-course' );
endwhile;
if ( $lp_related_course_position == 'content' ) {
echo '<div class="related-post-wrap related_course">';
upstudy_lp_related_course_content();
echo '</div>';
}
echo '</div>';
echo '</main>';
echo '</div>';
get_footer();
@@ -0,0 +1,49 @@
<?php
/**
* The template for displaying course single page
*/
get_header();
$post_id = upstudy_get_id();
global $post; $post_id = $post->ID;
$course_id = $post_id;
$user_id = get_current_user_id();
$lp_related_course_position = Upstudy::setting( 'lp_related_course_position' );
$lp_course_header_style = Upstudy::setting( 'lp_course_header_style' );
// ==== Course Header =====
while ( have_posts() ) : the_post();
upstudy_lp_course_page_title_section_05();
endwhile; wp_reset_postdata();
// ==== Content Area =====
echo '<div id="primary" class="content-area">';
echo '<main id="main" class="site-main" role="main">';
echo '<div class="upstudy-container">';
while ( have_posts() ) : the_post();
global $post; $post_id = $post->ID;
$course_id = $post_id;
learn_press_get_template( 'content-single-course' );
endwhile;
if ($lp_related_course_position == 'content') {
echo '<div class="related-post-wrap related_course">';
upstudy_lp_related_course_content();
echo '</div>';
}
echo '</div>';
echo '</main>';
echo '</div>';
get_footer();
@@ -0,0 +1,63 @@
<?php
/**
* The template for displaying course single page
*/
get_header();
$lp_intro_video_position = Upstudy::setting( 'lp_intro_video_position' );
$lp_related_course_position = Upstudy::setting( 'lp_related_course_position' );
$lp_single_enroll_btn = Upstudy::setting( 'lp_single_enroll_btn' );
$lp_single_social_shear = Upstudy::setting( 'lp_single_social_shear' );
$lp_course_header_style = Upstudy::setting( 'lp_course_header_style' );
// ==== Course Header =====
while ( have_posts() ) : the_post();
if ( '1' == $lp_course_header_style ) {
upstudy_lp_course_page_title_section_08();
}
else {
// upstudy_lp_course_page_title_section_06();
}
endwhile; wp_reset_postdata();
// ==== Content Area =====
echo '<div id="primary" class="content-area">';
echo '<main id="main" class="site-main" role="main">';
echo '<div class="upstudy-container">';
while ( have_posts() ) : the_post();
global $post; $post_id = $post->ID;
$course_id = $post_id;
echo '<div class="upstudy-course-content-03">';
echo '<div class="upstudy-course-intro-video">';
$lp_intro_video_position = Upstudy::setting( 'lp_intro_video_position' );
get_template_part( 'learnpress/tpl-part/single/media-header');
echo '</div>';
learn_press_get_template( 'content-single-course' );
echo '</div>';
endwhile;
if ($lp_related_course_position == 'content') {
echo '<div class="related-post-wrap related_course">';
upstudy_lp_related_course_content();
echo '</div>';
}
echo '</div>';
echo '</main>';
echo '</div>';
get_footer();
@@ -0,0 +1,49 @@
<?php
/**
* The template for displaying course single page
*/
get_header();
$post_id = upstudy_get_id();
global $post; $post_id = $post->ID;
$course_id = $post_id;
$user_id = get_current_user_id();
$lp_related_course_position = Upstudy::setting( 'lp_related_course_position' );
$lp_course_header_style = Upstudy::setting( 'lp_course_header_style' );
// ==== Course Header =====
while ( have_posts() ) : the_post();
upstudy_lp_course_page_title_section_03();
endwhile; wp_reset_postdata();
// ==== Content Area =====
echo '<div id="primary" class="content-area">';
echo '<main id="main" class="site-main" role="main">';
echo '<div class="upstudy-container">';
while ( have_posts() ) : the_post();
global $post; $post_id = $post->ID;
$course_id = $post_id;
learn_press_get_template( 'content-single-course' );
endwhile;
if ($lp_related_course_position == 'content') {
echo '<div class="related-post-wrap related_course">';
upstudy_lp_related_course_content();
echo '</div>';
}
echo '</div>';
echo '</main>';
echo '</div>';
get_footer();
@@ -0,0 +1,49 @@
<?php
/**
* The template for displaying course single page
*/
get_header();
$post_id = upstudy_get_id();
global $post; $post_id = $post->ID;
$course_id = $post_id;
$user_id = get_current_user_id();
$lp_related_course_position = Upstudy::setting( 'lp_related_course_position' );
$lp_course_header_style = Upstudy::setting( 'lp_course_header_style' );
// ==== Course Header =====
while ( have_posts() ) : the_post();
upstudy_lp_course_page_title_section_04();
endwhile; wp_reset_postdata();
// ==== Content Area =====
echo '<div id="primary" class="content-area">';
echo '<main id="main" class="site-main" role="main">';
echo '<div class="upstudy-container">';
while ( have_posts() ) : the_post();
global $post; $post_id = $post->ID;
$course_id = $post_id;
learn_press_get_template( 'content-single-course' );
endwhile;
if ($lp_related_course_position == 'content') {
echo '<div class="related-post-wrap related_course">';
upstudy_lp_related_course_content();
echo '</div>';
}
echo '</div>';
echo '</main>';
echo '</div>';
get_footer();
@@ -0,0 +1,128 @@
<?php
global $post;
$post_id = $post->ID;
$lp_related_course_position = Upstudy::setting( 'lp_related_course_position' );
$lp_single_social_shear = Upstudy::setting( 'lp_single_social_shear' );
$lp_single_course_info = Upstudy::setting( 'lp_single_course_info' );
$lp_single_course_cat = Upstudy::setting( 'lp_single_course_cat' );
$lp_single_course_price = Upstudy::setting( 'lp_single_course_price' );
$lp_single_enroll_btn = Upstudy::setting( 'lp_single_enroll_btn' );
$lp_single_course_graduation = Upstudy::setting( 'lp_single_course_graduation' );
$lp_single_course_time = Upstudy::setting( 'lp_single_course_time' );
$lp_single_progress = Upstudy::setting( 'lp_single_progress' );
$lp_intro_video_position = Upstudy::setting( 'lp_intro_video_position' );
$lp_single_sidebar_sticky = Upstudy::setting( 'lp_single_sidebar_sticky' );
$sidebar_sticky_on_off = ( $lp_single_sidebar_sticky ? 'do_sticky' : '');
$lp_single_page_layout = Upstudy::setting( 'lp_single_page_layout' );
echo '<aside id="secondary" class="widget-area '. esc_attr( $sidebar_sticky_on_off ) .'">';
echo '<div class="course-sidebar-preview lp">';
if ( in_array($lp_single_page_layout , array('1', '2', '3', '4')) ) {
echo '<div class="intro-video-sidebar intro-video-content is__sidebar">';
$upstudy_lp_video = get_post_meta( $post_id, 'upstudy_lp_video', true );
if ( $upstudy_lp_video && $lp_intro_video_position == 'intro_video_sidebar' ) :
echo '<div class="intro-video" style="background-image: url(' . esc_url( get_the_post_thumbnail_url(get_the_ID(),'full') ) . ')">';
echo '<a href="' . esc_url( $upstudy_lp_video ) . '" class="upstudy-popup-videos bla-2">';
echo '<i class="dt-icon-play-button"></i>';
echo '</a>';
echo '</div>';
elseif( has_post_thumbnail() && $lp_intro_video_position == 'intro_video_sidebar') :
echo '<div class="post-thumbnail">';
the_post_thumbnail( 'full' );
echo '</div>';
endif;
echo '</div>';
}
echo '<div class="lp_sidebar_wrap lp__widget">';
if ( $lp_single_course_graduation ) {
// Graduation.
LP()->template( 'course' )->course_graduation();
}
if ( $lp_single_course_time ) {
LP()->template( 'course' )->user_time();
}
if ( $lp_single_progress ) {
LP()->template( 'course' )->user_progress();
}
echo '</div>';
if ( $lp_single_course_info ) {
if( function_exists('upstudy_lp_course_info') ){
echo '<div class="lp__widget">';
upstudy_lp_course_info();
echo '</div>';
}
}
// ===== Sidebar share this course =====
if ($lp_single_social_shear) {
echo '<div class="entry-post-share">';
echo '<div class="upstudy-social-share">';
echo '<div class="post-share style-04">';
echo '<div class="share-label">'; esc_html_e('Share This:', 'upstudy');echo '</div>';
echo '<div class="share-list">';
upstudy_get_sharing_list();
echo '</div>';
echo '</div>';
echo '</div>';
echo '</div>';
}
echo '</div>';
// upstudy_lp_related_course_sidebar
if ($lp_related_course_position == 'sidebar') {
if( function_exists('upstudy_lp_related_course_sidebar') ){
echo '<div class="lp__widget">';
upstudy_lp_related_course_sidebar();
echo '</div>';
}
}
// upstudy_lp_course_category
if ( $lp_single_course_cat && !empty(get_the_terms(get_the_ID(), 'lp_course_category'))) {
if( function_exists('upstudy_lp_course_category') ){
echo '<div class="lp__widget">';
upstudy_lp_course_category();
echo '</div>';
}
}
// lp-course-sidebar-2 sidebar
if ( is_active_sidebar( 'lp-course-sidebar-2' ) ) :
echo '<div class="lp__widget">';
dynamic_sidebar( 'lp-course-sidebar-2' );
echo '</div>';
endif;
echo '</aside>';
@@ -0,0 +1,37 @@
<?php
/**
* The template for displaying tutor single page
*
*/
get_header();
$post_id = upstudy_get_id();
$tutor_single_page_layout = Upstudy::setting( 'tutor_single_page_layout');
if ( $tutor_single_page_layout == '5' ) :
get_template_part( 'tutor/tpl-part/single/single-layout', '5');
elseif ( $tutor_single_page_layout == '4' ) :
get_template_part( 'tutor/tpl-part/single/single-layout', '4');
elseif ( $tutor_single_page_layout == '3' ) :
get_template_part( 'tutor/tpl-part/single/single-layout', '3');
elseif ( $tutor_single_page_layout == '2' ) :
get_template_part( 'tutor/tpl-part/single/single-layout', '2');
elseif ( $tutor_single_page_layout == '1' ) :
get_template_part( 'tutor/tpl-part/single/single-layout', '1');
endif; //End single page layout
get_footer();