common
1 year ago
basic.php
1 year ago
buddypress.php
3 years ago
color_picker.php
3 years ago
design.php
3 years ago
google_classroom.php
3 years ago
gradebook.php
3 years ago
import_export.php
1 year ago
notifications.php
3 years ago
status.php
3 years ago
tab.php
1 year ago
tutor_pages.php
1 year ago
zoom.php
4 years ago
tab.php
63 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Settings tabs |
| 4 | * |
| 5 | * @package Tutor\Views |
| 6 | * @subpackage Tutor\Settings |
| 7 | * @author Themeum <support@themeum.com> |
| 8 | * @link https://themeum.com |
| 9 | * @since 2.0.0 |
| 10 | */ |
| 11 | |
| 12 | $before = array(); |
| 13 | $after = array(); |
| 14 | $tabbed = array(); |
| 15 | |
| 16 | foreach ( $section['blocks'] as $block ) { |
| 17 | if ( isset( $block['placement'] ) ) { |
| 18 | 'before' == $block['placement'] ? $before[] = $block : 0; |
| 19 | 'after' == $block['placement'] ? $after[] = $block : 0; |
| 20 | } else { |
| 21 | $tabbed[] = $block; |
| 22 | } |
| 23 | } |
| 24 | |
| 25 | if ( count( $before ) ) { |
| 26 | $section['blocks'] = $before; |
| 27 | require __DIR__ . '/basic.php'; |
| 28 | } |
| 29 | ?> |
| 30 | |
| 31 | <div class="tutor-settings-certificate-builder"> |
| 32 | <ul class="tutor-nav" tutor-priority-nav> |
| 33 | <?php foreach ( $tabbed as $index => $tab ) : ?> |
| 34 | <li class="tutor-nav-item"> |
| 35 | <a href="#" class="tutor-nav-link<?php echo esc_attr( 0 == $index ? ' is-active' : '' ); ?>" data-tutor-nav-target="tutor-settings-tab-<?php echo esc_attr( $tab['slug'] ); ?>"> |
| 36 | <?php echo esc_html( $tab['label'] ); ?> |
| 37 | </a> |
| 38 | </li> |
| 39 | <?php endforeach; ?> |
| 40 | |
| 41 | <li class="tutor-nav-item tutor-nav-more tutor-d-none"> |
| 42 | <a class="tutor-nav-link tutor-nav-more-item" href="#"><span class="tutor-mr-4"><?php esc_html_e( 'More', 'tutor' ); ?></span> <span class="tutor-nav-more-icon tutor-icon-times"></span></a> |
| 43 | <ul class="tutor-nav-more-list tutor-dropdown"></ul> |
| 44 | </li> |
| 45 | </ul> |
| 46 | |
| 47 | <div class="tutor-tab tutor-mt-32"> |
| 48 | <?php foreach ( $tabbed as $index => $tab ) : ?> |
| 49 | <div id="tutor-settings-tab-<?php echo esc_attr( $tab['slug'] ); ?>" class="tutor-tab-item<?php echo 0 == $index ? ' is-active' : ''; ?>"> |
| 50 | <?php |
| 51 | if ( isset( $tab['segments'] ) ) { |
| 52 | foreach ( $tab['segments'] as $segment ) { |
| 53 | echo $this->blocks( $segment ); //phpcs:ignore -- contain safe data |
| 54 | } |
| 55 | } else { |
| 56 | echo $this->blocks( $tab ); //phpcs:ignore -- contain safe data |
| 57 | } |
| 58 | ?> |
| 59 | </div> |
| 60 | <?php endforeach; ?> |
| 61 | </div> |
| 62 | </div> |
| 63 |