html-admin-page-addons.php
2 years ago
html-admin-page-builder.php
2 years ago
html-admin-page-dashboard.php
2 years ago
html-admin-page-entries-view.php
2 years ago
html-admin-page-export.php
3 years ago
html-admin-page-form-migrator.php
2 years ago
html-admin-page-form-templates.php
2 years ago
html-admin-page-import.php
2 years ago
html-admin-page-setting.php
2 years ago
html-admin-page-tools-logs.php
4 years ago
html-admin-page-tools.php
1 year ago
html-admin-settings.php
1 year 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-email-failed-notice.php
1 year ago
html-notice-php-deprecation.php
3 years ago
html-notice-review.php
3 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
77 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 | 'form_migrator' => __( 'Form Migrator', 'everest-forms' ), |
| 17 | 'system_info' => __( 'System Info', 'everest-forms' ), |
| 18 | ) |
| 19 | ); |
| 20 | $current_tab = ! empty( $_REQUEST['tab'] ) ? sanitize_title( wp_unslash( $_REQUEST['tab'] ) ) : 'import'; // phpcs:ignore WordPress.Security.NonceVerification |
| 21 | |
| 22 | if ( 'yes' === get_option( 'everest_forms_enable_log', 'no' ) ) { |
| 23 | $tabs['logs'] = __( 'Logs', 'everest-forms' ); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited |
| 24 | } |
| 25 | |
| 26 | ?> |
| 27 | <div class="wrap everest-forms"> |
| 28 | <nav class="nav-tab-wrapper evf-nav-tab-wrapper"> |
| 29 | <?php |
| 30 | foreach ( $tabs as $slug => $label ) { |
| 31 | 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>'; |
| 32 | } |
| 33 | ?> |
| 34 | </nav> |
| 35 | <div class="everest-forms-tools"> |
| 36 | <h1 class="screen-reader-text"><?php echo esc_html( $tabs[ $current_tab ] ); ?></h1> |
| 37 | <?php |
| 38 | switch ( $current_tab ) { |
| 39 | case 'logs': |
| 40 | EVF_Admin_Tools::status_logs(); |
| 41 | break; |
| 42 | case 'import': |
| 43 | EVF_Admin_Tools::import(); |
| 44 | break; |
| 45 | case 'export': |
| 46 | EVF_Admin_Tools::export(); |
| 47 | break; |
| 48 | case 'system_info': |
| 49 | EVF_Admin_Tools::setting(); |
| 50 | break; |
| 51 | case 'form_migrator': |
| 52 | EVF_Admin_Tools::form_migrator(); |
| 53 | break; |
| 54 | case 'payment_log': |
| 55 | if ( ! class_exists( 'EVF_Pro_Admin_Tools' ) ) { |
| 56 | return; |
| 57 | } |
| 58 | \EVF_Pro_Admin_Tools::payment_log(); |
| 59 | break; |
| 60 | case 'api_logs': |
| 61 | if ( ! class_exists( 'EVF_Pro_Admin_Tools' ) ) { |
| 62 | return; |
| 63 | } |
| 64 | \EVF_Pro_Admin_Tools::api_logs(); |
| 65 | break; |
| 66 | default: |
| 67 | if ( array_key_exists( $current_tab, $tabs ) && has_action( 'everest_forms_admin_status_content_' . $current_tab ) ) { |
| 68 | do_action( 'everest_forms_admin_status_content_' . $current_tab ); |
| 69 | } else { |
| 70 | EVF_Admin_Tools::import(); |
| 71 | } |
| 72 | break; |
| 73 | } |
| 74 | ?> |
| 75 | </div> |
| 76 | </div> |
| 77 |