| 1 |
<?php |
| 2 |
/** |
| 3 |
* Template for displaying FAQs tab of single course. |
| 4 |
* |
| 5 |
* This template can be overridden by copying it to yourtheme/learnpress/single-course/tabs/faqs.php. |
| 6 |
* |
| 7 |
* @author ThimPress |
| 8 |
* @package Learnpress/Templates |
| 9 |
* @version 3.0.0 |
| 10 |
*/ |
| 11 |
|
| 12 |
defined( 'ABSPATH' ) || exit(); |
| 13 |
|
| 14 |
if ( ! isset( $question ) || ! isset( $answer ) ) { |
| 15 |
return; |
| 16 |
} |
| 17 |
|
| 18 |
$unique_key = uniqid(); |
| 19 |
?> |
| 20 |
|
| 21 |
<input type="checkbox" name="course-faqs-box-ratio" id="course-faqs-box-ratio-<?php echo sanitize_key( $unique_key ); ?>"/> |
| 22 |
|
| 23 |
<?php if ( $question && $answer ) : ?> |
| 24 |
<div class="course-faqs-box"> |
| 25 |
<label class="course-faqs-box__title" for="course-faqs-box-ratio-<?php echo sanitize_key( $unique_key ); ?>"> |
| 26 |
<?php echo esc_html( $question ); ?> |
| 27 |
</label> |
| 28 |
|
| 29 |
<div class="course-faqs-box__content"> |
| 30 |
<div class="course-faqs-box__content-inner"> |
| 31 |
<?php echo wp_kses_post( $answer ); ?> |
| 32 |
</div> |
| 33 |
</div> |
| 34 |
</div> |
| 35 |
<?php endif ?> |
| 36 |
|