onboard-steps
3 weeks ago
settings-sections
3 weeks ago
init.php
6 months ago
layout-onboard.php
1 year ago
layout-settings.php
3 weeks ago
layout-user-consent-for-banner.php
2 years ago
layout-onboard.php
60 lines
| 1 | <!-- onboard_steps nav begins --> |
| 2 | <?php |
| 3 | |
| 4 | use ElementsKit_Lite\Libs\Framework\Classes\Onboard_Status; |
| 5 | |
| 6 | // redirect to plugin home page if onboard already has completed |
| 7 | // Onboard_Status::instance()->exit_from_onboard(); // this showing error in admin page, so we are not using this function |
| 8 | if ( get_option( 'elements_kit_onboard_status' ) ) { |
| 9 | echo '<script>window.location.href = "' . esc_url( admin_url( 'admin.php?page=elementskit' ) ) . '";</script>'; |
| 10 | exit; |
| 11 | } |
| 12 | |
| 13 | echo '<ul class="ekit-onboard-nav"><div class="ekit-onboard-progressbar"></div>'; |
| 14 | $count = 1; |
| 15 | foreach ( $onboard_steps as $step_key => $step ) : |
| 16 | $icon = ! empty( $step['icon'] ) ? $step['icon'] : ''; |
| 17 | $title = ! empty( $step['title'] ) ? $step['title'] : ''; |
| 18 | ?> |
| 19 | <li data-step_key="<?php echo esc_attr( $step_key ); ?>" |
| 20 | class="ekit-onboard-nav-item |
| 21 | <?php |
| 22 | echo $count === 1 ? 'active' : ''; |
| 23 | echo $count === count( $onboard_steps ) ? 'last' : ''; |
| 24 | ?> |
| 25 | "> |
| 26 | <?php if ( ! empty( $icon ) ) : ?> |
| 27 | <i class="ekit-onboard-nav-icon <?php echo esc_attr( $icon ); ?>"></i> |
| 28 | <?php endif; ?> |
| 29 | <?php if ( ! empty( $title ) ) : ?> |
| 30 | <span class="ekit-onboard-nav-text"><?php echo esc_html( $title ); ?></span> |
| 31 | <?php endif; ?> |
| 32 | </li> |
| 33 | <?php |
| 34 | $count ++; |
| 35 | endforeach; |
| 36 | echo '</ul>'; |
| 37 | ?> |
| 38 | <!-- onboard_steps nav ends --> |
| 39 | |
| 40 | <!-- onboard_steps content begins --> |
| 41 | <?php foreach ( $onboard_steps as $step_key => $step ) : ?> |
| 42 | |
| 43 | <!-- includes view file for this step --> |
| 44 | <?php |
| 45 | $path = isset( $step['view_path'] ) |
| 46 | ? $step['view_path'] |
| 47 | : self::get_dir() . 'views/onboard-steps/' . $step_key . '.php'; |
| 48 | |
| 49 | if ( file_exists( $path ) ) { |
| 50 | echo '<div class="ekit-onboard-step-wrapper ekit-onboard-' . esc_attr( $step_key ) . '">'; |
| 51 | include $path; |
| 52 | echo '</div>'; |
| 53 | } |
| 54 | ?> |
| 55 | |
| 56 | <?php endforeach; ?> |
| 57 | <!-- onboard_steps content ends --> |
| 58 | |
| 59 | |
| 60 |