field-types
3 years ago
template
4 years ago
withdraw
4 years ago
option_blocks.php
4 years ago
option_field.php
4 years ago
options_generator.php
4 years ago
settings.php
4 years ago
tools.php
4 years ago
settings.php
94 lines
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * Template for settings page |
| 5 | * |
| 6 | * @since v.2.0 |
| 7 | * |
| 8 | */ |
| 9 | |
| 10 | ?> |
| 11 | <div class="tutor-admin-wrap"> |
| 12 | <div class="tutor-admin-header is-sticky"> |
| 13 | <div class="tutor-row tutor-align-center"> |
| 14 | <div class="tutor-col-md-3 tutor-col-lg-4 tutor-mb-16 tutor-mb-md-0"> |
| 15 | <span class="tutor-fs-5 tutor-fw-medium tutor-mr-16"><?php esc_html_e( 'Settings', 'tutor' ); ?></span> |
| 16 | </div> |
| 17 | <div class="tutor-col-md-5 tutor-col-xl-6 tutor-mb-24 tutor-mb-md-0"> |
| 18 | <div class="tutor-options-search tutor-form-wrap"> |
| 19 | <span class="tutor-icon-search tutor-form-icon" area-hidden="true"></span> |
| 20 | <input type="search" accesskey="s" autofocus autocomplete="off" id="search_settings" class="tutor-form-control tutor-form-control-lg" placeholder="<?php esc_html_e( 'Search ...⌃⌥ + S or Alt+S for shortcut', 'tutor' ); ?>" /> |
| 21 | <div class="search-popup-opener search_result"></div> |
| 22 | </div> |
| 23 | </div> |
| 24 | <div class="tutor-col-md-4 tutor-col-lg-3 tutor-col-xl-2 tutor-d-flex tutor-justify-end"> |
| 25 | <div> |
| 26 | <button id="save_tutor_option" class="tutor-btn tutor-btn-primary" disabled form="tutor-option-form"> |
| 27 | <?php _e( 'Save Changes', 'tutor' ); ?> |
| 28 | </button> |
| 29 | </div> |
| 30 | </div> |
| 31 | </div> |
| 32 | </div> |
| 33 | |
| 34 | <div class="tutor-admin-container"> |
| 35 | <form class="tutor-option-form" id="tutor-option-form"> |
| 36 | <input type="hidden" name="action" value="tutor_option_save"> |
| 37 | <div class="tutor-row tutor-gx-lg-0 tutor-my-24"> |
| 38 | <div class="tutor-col-auto tutor-col-lg-2"> |
| 39 | <ul class="tutor-option-tabs tutor-nav tutor-nav-pills tutor-nav-v" tutor-option-tabs> |
| 40 | <?php |
| 41 | foreach ( $option_fields as $key => $section ) { |
| 42 | $active_class = $active_tab == $key ? esc_attr( ' is-active' ) : ''; |
| 43 | if ( $active_tab == $key ) { |
| 44 | $active_class = ' is-active'; |
| 45 | } elseif ( 'general' === $key && !in_array($active_tab,array_keys($option_fields))){ |
| 46 | $active_class = ' is-active'; |
| 47 | } |
| 48 | ?> |
| 49 | <li class="tutor-nav-item"> |
| 50 | <a class="tutor-nav-link<?php echo esc_attr( $active_class ); ?>" data-page="<?php esc_attr_e( $_GET['page'] ); ?>" data-tab="<?php echo esc_attr( $key ); ?>"> |
| 51 | <span class="<?php echo esc_attr( $section['icon'] ); ?>" area-hidden="true"></span> |
| 52 | <span class="tutor-ml-12 tutor-d-none tutor-d-lg-block" tutor-option-label><?php echo esc_html( $section['label'] ); ?></span> |
| 53 | </a> |
| 54 | </li> |
| 55 | <?php |
| 56 | } |
| 57 | ?> |
| 58 | </ul> |
| 59 | </div> |
| 60 | |
| 61 | <div class="tutor-col-1 tutor-text-center tutor-d-none tutor-d-lg-block"> |
| 62 | <div class="tutor-vr tutor-mx-32 tutor-d-inline-block"></div> |
| 63 | </div> |
| 64 | |
| 65 | <div class="tutor-col-10 tutor-col-lg-9"> |
| 66 | <div class="tutor-option-tab-pages"> |
| 67 | <?php |
| 68 | foreach ( $option_fields as $key => $section ) { |
| 69 | $active_class = $active_tab == $key ? esc_attr( ' is-active' ) : ''; |
| 70 | |
| 71 | if ( $active_tab == $key ) { |
| 72 | $active_class = ' is-active'; |
| 73 | } elseif ( 'general' === $key && !in_array($active_tab,array_keys($option_fields))){ |
| 74 | $active_class = ' is-active'; |
| 75 | } |
| 76 | ?> |
| 77 | <div id="<?php echo esc_attr( $key ); ?>" class="tutor-option-nav-page<?php echo esc_attr( $active_class ); ?>"> |
| 78 | <?php |
| 79 | if ( is_array( $section ) ) { |
| 80 | echo $this->template( $section ); |
| 81 | } |
| 82 | ?> |
| 83 | </div> |
| 84 | <?php |
| 85 | } |
| 86 | ?> |
| 87 | </div> |
| 88 | </div> |
| 89 | </div> |
| 90 | </form> |
| 91 | </div> |
| 92 | <?php echo $this->view_template( 'common/modal-confirm.php', array() ); ?> |
| 93 | </div> |
| 94 |