enrolled
2 years ago
add-to-cart-edd.php
3 years ago
add-to-cart-woocommerce.php
3 years ago
continue-lesson.php
3 years ago
course-benefits.php
3 years ago
course-content.php
3 years ago
course-entry-box.php
2 years ago
course-requirements.php
3 years ago
course-target-audience.php
3 years ago
course-topics.php
2 years ago
instructors.php
3 years ago
lead-info.php
2 years ago
material-includes.php
3 years ago
q_and_a_turned_off.php
3 years ago
reviews-loop.php
3 years ago
reviews.php
2 years ago
social_share.php
3 years ago
tags.php
3 years ago
wc-price-html.php
3 years ago
course-content.php
49 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Template for displaying course content |
| 4 | * |
| 5 | * @package Tutor\Templates |
| 6 | * @subpackage Single\Course |
| 7 | * @author Themeum <support@themeum.com> |
| 8 | * @link https://themeum.com |
| 9 | * @since 1.0.0 |
| 10 | */ |
| 11 | |
| 12 | global $post; |
| 13 | |
| 14 | do_action( 'tutor_course/single/before/content' ); |
| 15 | |
| 16 | if ( tutor_utils()->get_option( 'enable_course_about', true, true ) ) { |
| 17 | $string = apply_filters( 'tutor_course_about_content', get_the_content() ); |
| 18 | $content_summary = (bool) get_tutor_option( 'course_content_summary', true ); |
| 19 | $post_size_in_words = sizeof( explode( ' ', $string ) ); |
| 20 | $word_limit = 100; |
| 21 | $has_show_more = false; |
| 22 | |
| 23 | if ( $content_summary && ( $post_size_in_words > $word_limit ) ) { |
| 24 | $has_show_more = true; |
| 25 | } |
| 26 | ?> |
| 27 | <?php if ( ! empty( $string ) ) : ?> |
| 28 | <div class="tutor-course-details-content<?php echo $has_show_more ? ' tutor-toggle-more-content tutor-toggle-more-collapsed' : ''; ?>"<?php echo $has_show_more ? ' data-tutor-toggle-more-content data-toggle-height="200" style="height: 200px;"' : ''; ?>> |
| 29 | <h2 class="tutor-fs-5 tutor-fw-bold tutor-color-black tutor-mb-12"> |
| 30 | <?php echo esc_html( apply_filters( 'tutor_course_about_title', __( 'About Course', 'tutor' ) ) ); ?> |
| 31 | </h2> |
| 32 | |
| 33 | <div class="tutor-fs-6 tutor-color-secondary"> |
| 34 | <?php echo apply_filters( 'the_content', $string ); //phpcs:ignore ?> |
| 35 | </div> |
| 36 | </div> |
| 37 | |
| 38 | <?php if ( $has_show_more ) : ?> |
| 39 | <a href="#" class="tutor-btn-show-more tutor-btn tutor-btn-ghost tutor-mt-32" data-tutor-toggle-more=".tutor-toggle-more-content"> |
| 40 | <span class="tutor-toggle-btn-icon tutor-icon tutor-icon-plus tutor-mr-8" area-hidden="true"></span> |
| 41 | <span class="tutor-toggle-btn-text"><?php esc_html_e( 'Show More', 'tutor' ); ?></span> |
| 42 | </a> |
| 43 | <?php endif; ?> |
| 44 | <?php endif; ?> |
| 45 | <?php |
| 46 | } |
| 47 | |
| 48 | do_action( 'tutor_course/single/after/content' ); ?> |
| 49 |