class-evf-settings-email.php
3 years ago
class-evf-settings-general.php
5 years ago
class-evf-settings-integrations.php
6 years ago
class-evf-settings-misc.php
2 years ago
class-evf-settings-page.php
7 years ago
class-evf-settings-recaptcha.php
2 years ago
class-evf-settings-validation.php
6 years ago
class-evf-settings-misc.php
109 lines
| 1 | <?php |
| 2 | /** |
| 3 | * EverestForms Misc Settings |
| 4 | * |
| 5 | * @package EverestForms\Admin |
| 6 | * @version 1.9.8 |
| 7 | */ |
| 8 | |
| 9 | defined( 'ABSPATH' ) || exit; |
| 10 | |
| 11 | if ( class_exists( 'EVF_Settings_Misc', false ) ) { |
| 12 | return new EVF_Settings_Misc(); |
| 13 | } |
| 14 | |
| 15 | /** |
| 16 | * EVF_Settings_Misc. |
| 17 | */ |
| 18 | class EVF_Settings_Misc extends EVF_Settings_Page { |
| 19 | |
| 20 | /** |
| 21 | * Constructor. |
| 22 | */ |
| 23 | public function __construct() { |
| 24 | $this->id = 'misc'; |
| 25 | $this->label = esc_html__( 'Misc', 'everest-forms' ); |
| 26 | |
| 27 | parent::__construct(); |
| 28 | } |
| 29 | |
| 30 | /** |
| 31 | * Get settings array. |
| 32 | * |
| 33 | * @return array |
| 34 | */ |
| 35 | public function get_settings() { |
| 36 | $allow_usage_notice_msg = wp_kses( |
| 37 | __( ' Help us improve the plugin\'s features and receive an instant discount coupon with occasional email updates by sharing <a href="https://docs.everestforms.net/docs/misc-settings-4/#2-toc-title" target="_blank">non-sensitive plugin data</a> with us.', 'everest-forms' ), |
| 38 | array( |
| 39 | 'a' => array( |
| 40 | 'href' => array(), |
| 41 | 'target' => array(), |
| 42 | ), |
| 43 | ) |
| 44 | ); |
| 45 | |
| 46 | if ( false !== evf_get_license_plan() ) { |
| 47 | $allow_usage_notice_msg = wp_kses( |
| 48 | __( 'Help us improve the plugin\'s features by sharing <a href="https://docs.everestforms.net/docs/misc-settings-4/#2-toc-title" target="_blank">non-sensitive plugin data</a> with us.', 'everest-forms' ), |
| 49 | array( |
| 50 | 'a' => array( |
| 51 | 'href' => array(), |
| 52 | 'target' => array(), |
| 53 | ), |
| 54 | ) |
| 55 | ); |
| 56 | } |
| 57 | |
| 58 | $settings = apply_filters( |
| 59 | 'everest_forms_misc_settings', |
| 60 | array( |
| 61 | array( |
| 62 | 'title' => esc_html__( 'Advanced Options', 'everest-forms' ), |
| 63 | 'type' => 'title', |
| 64 | 'desc' => '', |
| 65 | 'id' => 'misc_options', |
| 66 | ), |
| 67 | array( |
| 68 | 'title' => esc_html__( 'Uninstall Everest Forms', 'everest-forms' ), |
| 69 | 'desc' => __( '<strong>Heads Up!</strong> Check this if you would like to remove ALL Everest Forms data upon plugin deletion.', 'everest-forms' ), |
| 70 | 'id' => 'everest_forms_uninstall_option', |
| 71 | 'default' => 'no', |
| 72 | 'type' => 'checkbox', |
| 73 | ), |
| 74 | array( |
| 75 | 'title' => esc_html__( 'Allow Usage Tracking', 'everest-forms' ), |
| 76 | 'desc' => $allow_usage_notice_msg, |
| 77 | 'id' => 'everest_forms_allow_usage_tracking', |
| 78 | 'type' => 'checkbox', |
| 79 | 'default' => 'no', |
| 80 | ), |
| 81 | array( |
| 82 | 'title' => esc_html__( 'Load Fonts Locally', 'everest-forms' ), |
| 83 | 'desc' => __( 'Load all the necessary fonts from local server for GDPR compliance.', 'everest-forms' ), |
| 84 | 'id' => 'everest_forms_load_fonts_locally', |
| 85 | 'type' => 'checkbox', |
| 86 | 'default' => 'no', |
| 87 | ), |
| 88 | array( |
| 89 | 'type' => 'sectionend', |
| 90 | 'id' => 'misc_options', |
| 91 | ), |
| 92 | ) |
| 93 | ); |
| 94 | |
| 95 | return apply_filters( 'everest_forms_get_settings_' . $this->id, $settings ); |
| 96 | } |
| 97 | |
| 98 | /** |
| 99 | * Save settings. |
| 100 | */ |
| 101 | public function save() { |
| 102 | $settings = $this->get_settings(); |
| 103 | |
| 104 | EVF_Admin_Settings::save_fields( $settings ); |
| 105 | } |
| 106 | } |
| 107 | |
| 108 | return new EVF_Settings_Misc(); |
| 109 |