html-admin-page-addons.php
6 years ago
html-admin-page-builder-setup.php
6 years ago
html-admin-page-builder.php
6 years ago
html-admin-page-entries-view.php
6 years ago
html-admin-page-export.php
6 years ago
html-admin-page-import.php
6 years ago
html-admin-page-tools-logs.php
6 years ago
html-admin-page-tools.php
6 years ago
html-admin-settings.php
7 years ago
html-notice-custom.php
6 years ago
html-notice-review.php
6 years ago
html-notice-update.php
6 years ago
html-notice-updated.php
6 years ago
html-notice-updating.php
6 years ago
html-admin-page-tools.php
52 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Admin View: Page - Status |
| 4 | * |
| 5 | * @package EverestForms/Admin/Logs |
| 6 | */ |
| 7 | |
| 8 | defined( 'ABSPATH' ) || exit; |
| 9 | |
| 10 | // phpcs:ignore WordPress.WP.GlobalVariablesOverride |
| 11 | $tabs = apply_filters( |
| 12 | 'everest_forms_admin_status_tabs', |
| 13 | array( |
| 14 | 'import' => __( 'Import', 'everest-forms' ), |
| 15 | 'export' => __( 'Export', 'everest-forms' ), |
| 16 | 'logs' => __( 'Logs', 'everest-forms' ), |
| 17 | ) |
| 18 | ); |
| 19 | $current_tab = ! empty( $_REQUEST['tab'] ) ? sanitize_title( wp_unslash( $_REQUEST['tab'] ) ) : 'import'; // phpcs:ignore WordPress.Security.NonceVerification |
| 20 | |
| 21 | ?> |
| 22 | <div class="wrap everest-forms"> |
| 23 | <nav class="nav-tab-wrapper evf-nav-tab-wrapper"> |
| 24 | <?php |
| 25 | foreach ( $tabs as $slug => $label ) { |
| 26 | echo '<a href="' . esc_html( admin_url( 'admin.php?page=evf-tools&tab=' . esc_attr( $slug ) ) ) . '" class="nav-tab ' . ( $current_tab === $slug ? 'nav-tab-active' : '' ) . '">' . esc_html( $label ) . '</a>'; |
| 27 | } |
| 28 | ?> |
| 29 | </nav> |
| 30 | <h1 class="screen-reader-text"><?php echo esc_html( $tabs[ $current_tab ] ); ?></h1> |
| 31 | <?php |
| 32 | switch ( $current_tab ) { |
| 33 | case 'logs': |
| 34 | EVF_Admin_Tools::status_logs(); |
| 35 | break; |
| 36 | case 'import': |
| 37 | EVF_Admin_Tools::import(); |
| 38 | break; |
| 39 | case 'export': |
| 40 | EVF_Admin_Tools::export(); |
| 41 | break; |
| 42 | default: |
| 43 | if ( array_key_exists( $current_tab, $tabs ) && has_action( 'everest_forms_admin_status_content_' . $current_tab ) ) { |
| 44 | do_action( 'everest_forms_admin_status_content_' . $current_tab ); |
| 45 | } else { |
| 46 | EVF_Admin_Tools::import(); |
| 47 | } |
| 48 | break; |
| 49 | } |
| 50 | ?> |
| 51 | </div> |
| 52 |