html-admin-page-addons.php
2 years ago
html-admin-page-builder.php
4 years ago
html-admin-page-entries-view.php
3 years ago
html-admin-page-export.php
3 years ago
html-admin-page-form-templates.php
3 years ago
html-admin-page-import.php
3 years ago
html-admin-page-tools-logs.php
4 years ago
html-admin-page-tools.php
5 years ago
html-admin-settings.php
7 years ago
html-deactivation-popup.php
3 years ago
html-notice-allow-usage.php
2 years ago
html-notice-custom.php
6 years ago
html-notice-php-deprecation.php
3 years ago
html-notice-review.php
2 years ago
html-notice-survey.php
4 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
57 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 | ) |
| 17 | ); |
| 18 | $current_tab = ! empty( $_REQUEST['tab'] ) ? sanitize_title( wp_unslash( $_REQUEST['tab'] ) ) : 'import'; // phpcs:ignore WordPress.Security.NonceVerification |
| 19 | |
| 20 | if ( 'yes' === get_option( 'everest_forms_enable_log', 'no' ) ) { |
| 21 | $tabs['logs'] = __( 'Logs', 'everest-forms' ); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited |
| 22 | } |
| 23 | |
| 24 | ?> |
| 25 | <div class="wrap everest-forms"> |
| 26 | <nav class="nav-tab-wrapper evf-nav-tab-wrapper"> |
| 27 | <?php |
| 28 | foreach ( $tabs as $slug => $label ) { |
| 29 | 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' : '' ) . '"><span class="evf-nav-icon ' . esc_attr( $slug ) . '"></span>' . esc_html( $label ) . '</a>'; |
| 30 | } |
| 31 | ?> |
| 32 | </nav> |
| 33 | <div class="everest-forms-tools"> |
| 34 | <h1 class="screen-reader-text"><?php echo esc_html( $tabs[ $current_tab ] ); ?></h1> |
| 35 | <?php |
| 36 | switch ( $current_tab ) { |
| 37 | case 'logs': |
| 38 | EVF_Admin_Tools::status_logs(); |
| 39 | break; |
| 40 | case 'import': |
| 41 | EVF_Admin_Tools::import(); |
| 42 | break; |
| 43 | case 'export': |
| 44 | EVF_Admin_Tools::export(); |
| 45 | break; |
| 46 | default: |
| 47 | if ( array_key_exists( $current_tab, $tabs ) && has_action( 'everest_forms_admin_status_content_' . $current_tab ) ) { |
| 48 | do_action( 'everest_forms_admin_status_content_' . $current_tab ); |
| 49 | } else { |
| 50 | EVF_Admin_Tools::import(); |
| 51 | } |
| 52 | break; |
| 53 | } |
| 54 | ?> |
| 55 | </div> |
| 56 | </div> |
| 57 |