common
4 years ago
basic.php
4 years ago
buddypress.php
4 years ago
color_picker.php
4 years ago
design.php
4 years ago
google_classroom.php
4 years ago
gradebook.php
4 years ago
import_export.php
4 years ago
notifications.php
4 years ago
status.php
4 years ago
tab.php
4 years ago
tutor_pages.php
4 years ago
zoom.php
4 years ago
tutor_pages.php
70 lines
| 1 | <?php |
| 2 | $tutor_pages = tutor_utils()->tutor_pages(); |
| 3 | ?> |
| 4 | <div class="tutor-option-main-title"> |
| 5 | <div class="tutor-fs-4 tutor-fw-medium tutor-color-black"><?php _e('Tutor Pages','tutor'); ?></div> |
| 6 | </div> |
| 7 | |
| 8 | <?php tutor_alert(__('Note: This tool will install all the missing Tutor pages. Pages already defined and set up will not be replaced.', 'tutor'), 'primary'); ?> |
| 9 | |
| 10 | <div class="tutor-option-single-item tutor-mb-32 item-variation-table table-col-3 all-pages"> |
| 11 | <div class="tutor-option-group-title tutor-mb-16"> |
| 12 | <div class="tutor-fs-6 tutor-color-muted"><?php _e('All Pages','tutor'); ?></div> |
| 13 | </div> |
| 14 | <div class="item-wrapper"> |
| 15 | <div class="tutor-option-field-row"> |
| 16 | <div class="tutor-option-field-label"> |
| 17 | <?php _e('ID','tutor'); ?> |
| 18 | </div> |
| 19 | <div class="tutor-option-field-label"> |
| 20 | <?php _e('Page Name','tutor'); ?> |
| 21 | </div> |
| 22 | <div class="tutor-option-field-label"> |
| 23 | <?php _e('Status','tutor'); ?> |
| 24 | </div> |
| 25 | </div> |
| 26 | <?php |
| 27 | foreach ( $tutor_pages as $page ) { |
| 28 | $page_id = $page['page_id']; |
| 29 | ?> |
| 30 | <div class="tutor-option-field-row"> |
| 31 | <div class="tutor-option-field-label"> |
| 32 | <div class="tutor-fs-7 tutor-fw-medium"><?php echo $page_id; ?></div> |
| 33 | </div> |
| 34 | <div class="tutor-option-field-label"> |
| 35 | <div class="tutor-fs-7 tutor-fw-medium"> |
| 36 | <?php if ( $page['page_exists'] ) : ?> |
| 37 | <a class="tutor-btn tutor-btn-ghost" href="<?php echo admin_url( "post.php?post={$page_id}&action=edit" ); ?>" target='_blank'> |
| 38 | <?php echo $page['page_name']; ?> |
| 39 | </a> |
| 40 | <?php else : ?> |
| 41 | <?php echo $page['page_name']; ?> |
| 42 | <?php endif; ?> |
| 43 | </div> |
| 44 | </div> |
| 45 | <div class="tutor-option-field-label"> |
| 46 | <?php if($page['page_exists'] && $page['page_visible']) : ?> |
| 47 | <?php $page = get_post( $page_id ); ?> |
| 48 | <div class="tutor-d-flex tutor-align-center"> |
| 49 | <span class='tutor-icon-circle-mark tutor-color-success'></span> |
| 50 | <span class='tutor-mx-4'>/</span> |
| 51 | <span><?php echo $page->post_name; ?></span> |
| 52 | <span class="tutor-ml-8"><a href="<?php echo get_permalink( $page ); ?>" class="tutor-iconic-btn" target="_blank"><i class="tutor-icon-external-link"></i></a></span> |
| 53 | </div> |
| 54 | <?php else : ?> |
| 55 | <span class='tutor-icon-circle-times-line tutor-color-warning'></span> |
| 56 | <?php endif; ?> |
| 57 | </div> |
| 58 | </div> |
| 59 | <?php } ?> |
| 60 | </div> |
| 61 | </div> |
| 62 | <div class="btn-wrap regenerate-pages"> |
| 63 | <form method="post"> |
| 64 | <?php |
| 65 | tutor_action_field( 'regenerate_tutor_pages' ); |
| 66 | tutor_nonce_field(); |
| 67 | ?> |
| 68 | <button class="tutor-btn tutor-btn-primary" type="submit"><?php esc_html_e( 'Re-Generate Tutor Pages', 'tutor' ); ?></button> |
| 69 | </form> |
| 70 | </div><br> |