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
2 years ago
html-admin-settings.php
2 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-settings.php
140 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Admin View: Settings |
| 4 | * |
| 5 | * @package EverestForms |
| 6 | */ |
| 7 | |
| 8 | defined( 'ABSPATH' ) || exit; |
| 9 | |
| 10 | $tab_exists = isset( $tabs[ $current_tab ] ) || has_action( 'everest_forms_sections_' . $current_tab ) || has_action( 'everest_forms_settings_' . $current_tab ); |
| 11 | $current_tab_label = isset( $tabs[ $current_tab ] ) ? $tabs[ $current_tab ] : ''; |
| 12 | $is_premium_sidebar_enabled = isset( $_COOKIE['isPremiumSidebarEnabled'] ) ? sanitize_text_field( wp_unslash( $_COOKIE['isPremiumSidebarEnabled'] ) ) : ''; |
| 13 | $is_premium_sidebar_class = $is_premium_sidebar_enabled ? 'everest-forms-hidden' : ''; |
| 14 | if ( ! $tab_exists ) { |
| 15 | wp_safe_redirect( admin_url( 'admin.php?page=evf-settings' ) ); |
| 16 | exit; |
| 17 | } |
| 18 | |
| 19 | |
| 20 | |
| 21 | ?> |
| 22 | <div class="wrap everest-forms"> |
| 23 | <?php if ( 'integration' !== $current_tab ) : ?> |
| 24 | <form method="<?php echo esc_attr( apply_filters( 'everest_forms_settings_form_method_tab_' . $current_tab, 'post' ) ); ?>" id="mainform" action="" enctype="multipart/form-data"> |
| 25 | <?php endif; ?> |
| 26 | <h1 class="screen-reader-text"><?php echo esc_html( $current_tab_label ); ?></h1> |
| 27 | <div class="everest-forms-settings"> |
| 28 | <div class="everest-forms-settings-wrapper"> |
| 29 | <header class="everest-forms-header"> |
| 30 | <div class="everest-forms-header--top"> |
| 31 | <div class="everest-forms-header--top-logo"> |
| 32 | <img src="<?php echo esc_url( evf()->plugin_url() . '/assets/images/icons/Everest-forms-Logo.png' ); ?>" alt=""> |
| 33 | </div> |
| 34 | </div> |
| 35 | <div class="everest-forms-header--nav"> |
| 36 | <nav class="nav-tab-wrapper evf-nav-tab-wrapper"> |
| 37 | <?php |
| 38 | foreach ( $tabs as $slug => $label ) { |
| 39 | ?> |
| 40 | <a href="<?php echo esc_url( admin_url( 'admin.php?page=evf-settings&tab=' . $slug ) ); ?>" class="nav-tab evf-nav__link <?php echo ( $current_tab === $slug ? 'nav-tab-active is-active' : '' ); ?>"> |
| 41 | <span class="evf-nav__link-icon"> |
| 42 | <?php echo evf_file_get_contents( '/assets/images/settings-icons/' . $slug . '.svg' ); //phpcs:ignore ?> |
| 43 | </span> |
| 44 | <span class="evf-nav__link-label"> |
| 45 | <p> |
| 46 | <?php echo esc_html( $label ); ?> |
| 47 | </p> |
| 48 | <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"> |
| 49 | <path stroke="#383838" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m9 18 6-6-6-6"/> |
| 50 | </svg> |
| 51 | </span> |
| 52 | </a> |
| 53 | <?php |
| 54 | } |
| 55 | do_action( 'everest_forms_settings_tabs' ); |
| 56 | ?> |
| 57 | <button id="evf-settings-collapse" class="nav-tab evf-nav__link"> |
| 58 | <span class="evf-nav-icon"> |
| 59 | <img src="<?php echo esc_url( evf()->plugin_url() . '/assets/images/icons/collapse-line.svg' ); ?>" alt=""> |
| 60 | </span> |
| 61 | <span class="evf-nav__link-label"> |
| 62 | <?php esc_html_e( 'Collapse Menu', 'everest-forms' ); ?> |
| 63 | </span> |
| 64 | </button> |
| 65 | </nav> |
| 66 | </div> |
| 67 | </header> |
| 68 | |
| 69 | <div class="everest-forms-settings-container"> |
| 70 | <div class="everest-forms-settings-main"> |
| 71 | <?php if ( ! defined( 'EFP_PLUGIN_FILE' ) ) { ?> |
| 72 | <div class="everest-forms-toggle-wrapper"> |
| 73 | <div class="evf-toggle-section"> |
| 74 | <span class="everest-forms-toggle-form"> |
| 75 | <input type="checkbox" name="everest_forms_enable_log" id="everest-forms-enable-premium-sidebar" style="" class="" value="yes"> |
| 76 | <span class="slider round"></span> |
| 77 | </span> |
| 78 | </div> |
| 79 | <span class="everest-forms-toggle-text">Hide Sidebar</span> |
| 80 | </div> |
| 81 | <?php } ?> |
| 82 | <?php |
| 83 | do_action( 'everest_forms_sections_' . $current_tab ); |
| 84 | |
| 85 | self::show_messages(); |
| 86 | |
| 87 | do_action( 'everest_forms_settings_' . $current_tab ); |
| 88 | ?> |
| 89 | <p class="submit"> |
| 90 | <?php if ( empty( $GLOBALS['hide_save_button'] ) ) : ?> |
| 91 | <button name="save" class="everest-forms-btn everest-forms-btn-primary everest-forms-save-button" type="submit" value="<?php esc_attr_e( 'Save Changes', 'everest-forms' ); ?>"><?php esc_html_e( 'Save Changes', 'everest-forms' ); ?></button> |
| 92 | <?php endif; ?> |
| 93 | <?php wp_nonce_field( 'everest-forms-settings' ); ?> |
| 94 | </p> |
| 95 | </div> |
| 96 | |
| 97 | </div> |
| 98 | </div> |
| 99 | <?php if ( ! defined( 'EFP_PLUGIN_FILE' ) ) { ?> |
| 100 | <div class="everest-forms-settings-premium-sidebar <?php echo esc_attr( $is_premium_sidebar_class ); ?>" id="everest-forms-settings-premium-sidebar"> |
| 101 | <?php |
| 102 | $allowed_html = array( |
| 103 | 'a' => array( |
| 104 | 'href' => array(), |
| 105 | 'target' => array(), |
| 106 | ), |
| 107 | 'h2' => array(), |
| 108 | 'p' => array(), |
| 109 | 'h3' => array(), |
| 110 | 'ul' => array(), |
| 111 | 'li' => array(), |
| 112 | '!--' => array(), |
| 113 | ); |
| 114 | |
| 115 | $content = '<h2>Get Even More from Everest Forms with the Premium Plan</h2> |
| 116 | <p>The free version of Everest Forms is just the start. Upgrade to our Pro version for everything you need for advanced form building.</p> |
| 117 | <h3>Premium Benefits:</h3> |
| 118 | <ul> |
| 119 | <li>Instant access to 35+ unique addons </li> |
| 120 | <li>Attention grabbing forms with advanced style customizer </li> |
| 121 | <li>Form security with custom captcha</li> |
| 122 | <li>Multiple payment options (PayPal, Stripe, etc.)</li> |
| 123 | <li>Interactive multi-step forms, and quizzes</li> |
| 124 | <li>Tables and graphics in Entries</li> |
| 125 | <li>Priority support for premium users</li> |
| 126 | </ul> |
| 127 | <p>To enjoy all the benefits of Everest Forms Pro...</p> |
| 128 | <a href="https://everestforms.net/pricing/?utm_campaign=lite-version&utm_source=premium-cta-&utm_medium=upgrade-cta-button" target="_blank" class="everest-forms-premium-sidebar-button">Get the Everest Forms Pro</a> |
| 129 | <p>Thank you for choosing Everest Forms 😊</p>'; |
| 130 | $content = apply_filters( 'everest_forms_cta_promotiona_content', $content ); |
| 131 | echo wp_kses( $content, $allowed_html ); |
| 132 | ?> |
| 133 | </div> |
| 134 | <?php } ?> |
| 135 | <?php if ( 'integration' !== $current_tab ) : ?> |
| 136 | </div> |
| 137 | </form> |
| 138 | <?php endif; ?> |
| 139 | </div> |
| 140 |