course
6 years ago
announcements-metabox.php
6 years ago
course-add-edd-product-metabox.php
6 years ago
course-add-product-metabox.php
6 years ago
course-additional-data.php
6 years ago
course-contents.php
6 years ago
course-level-metabox.php
6 years ago
course-topics.php
6 years ago
instructors-metabox.php
6 years ago
lesson-attachments-metabox.php
6 years ago
lesson-metabox.php
6 years ago
user-profile-fields.php
6 years ago
video-metabox.php
6 years ago
lesson-attachments-metabox.php
29 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Don't change it, it's supporting modal in other place |
| 4 | * if get_the_ID() empty, then it's means we are passing $post variable from another place |
| 5 | */ |
| 6 | if (get_the_ID()) |
| 7 | global $post; |
| 8 | |
| 9 | ?> |
| 10 | <div class="tutor-lesson-attachments-metabox"> |
| 11 | <div class="tutor-added-attachments-wrap tutor-course-builder-attachements is-lesson"> |
| 12 | <?php |
| 13 | $attachments = tutor_utils()->get_attachments($post->ID); |
| 14 | if ( is_array($attachments) && count($attachments)) { |
| 15 | foreach ( $attachments as $attachment ) { |
| 16 | ?> |
| 17 | <div class="tutor-added-attachment"> |
| 18 | <i class="tutor-icon-archive"></i> |
| 19 | <a href="javascript:;" class="tutor-delete-attachment tutor-icon-line-cross"></a> |
| 20 | <a href="<?php echo $attachment->url; ?>"><?php echo $attachment->name; ?></a> |
| 21 | <input type="hidden" name="tutor_attachments[]" value="<?php echo $attachment->id; ?>"> |
| 22 | </div> |
| 23 | <?php } |
| 24 | } |
| 25 | ?> |
| 26 | </div> |
| 27 | |
| 28 | <button type="button" class="tutor-btn tutorUploadAttachmentBtn bordered-btn"><?php _e('Upload Attachment', 'tutor'); ?></button> |
| 29 | </div> |