announcements.php
5 years ago
completing-progress.php
5 years ago
lead-info.php
5 years ago
nav.php
5 years ago
question_and_answer.php
5 years ago
announcements.php
55 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Announcements |
| 4 | * |
| 5 | * @since v.1.0.0 |
| 6 | * @author themeum |
| 7 | * @url https://themeum.com |
| 8 | * |
| 9 | * @package TutorLMS/Templates |
| 10 | * @version 1.4.3 |
| 11 | */ |
| 12 | |
| 13 | $announcements = tutor_utils()->get_announcements(get_the_ID()); |
| 14 | ?> |
| 15 | |
| 16 | <?php do_action('tutor_course/announcements/before'); ?> |
| 17 | <div class="tutor-announcements-wrap"> |
| 18 | <?php |
| 19 | if (is_array($announcements) && count($announcements)){ |
| 20 | ?> |
| 21 | <?php |
| 22 | foreach ($announcements as $announcement){ |
| 23 | ?> |
| 24 | <div class="tutor-announcement"> |
| 25 | <div class="tutor-announcement-title-wrap"> |
| 26 | <h3><?php echo $announcement->post_title; ?></h3> |
| 27 | </div> |
| 28 | |
| 29 | <div class="tutor-announcement-meta tutor-text-mute"> |
| 30 | <?php _e( sprintf("Posted by %s, at %s ago", 'admin', human_time_diff(strtotime($announcement->post_date)) ) , 'tutor' ); ?> |
| 31 | </div> |
| 32 | |
| 33 | <div class="tutor-announcement-content"> |
| 34 | <?php echo tutor_utils()->announcement_content(wpautop(stripslashes($announcement->post_content))); ?> |
| 35 | </div> |
| 36 | </div> |
| 37 | <?php |
| 38 | } |
| 39 | ?> |
| 40 | <?php |
| 41 | }else{ |
| 42 | ?> |
| 43 | <div class="tutor-no-announcements"> |
| 44 | <h2><?php _e('No announcements posted yet.', 'tutor'); ?></h2> |
| 45 | <p> |
| 46 | <?php _e('The instructor hasn’t added any announcements to this course yet. Announcements are used to inform you of updates or additions to the course.', 'tutor'); ?> |
| 47 | </p> |
| 48 | </div> |
| 49 | |
| 50 | <?php |
| 51 | } |
| 52 | ?> |
| 53 | </div> |
| 54 | |
| 55 | <?php do_action('tutor_course/announcements/after'); ?> |