PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.7.2
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.7.2
6.35 6.34 6.33.1 6.33 6.32.1 6.32 6.31 6.25 6.25.1 6.26 6.26.1 6.27 6.28 6.29 6.3 6.3.1 6.3.2 6.30 6.4 6.4.1 6.4.2 6.5 6.5.1 6.5.2 6.5.3 All 141 releases
← All changes | classes/models/FrmSettings.php +20 -6 6.3.26.7.2 View file →
@@ -41,9 +41,13 @@
41 41 public $no_ips;
42 42 public $custom_header_ip;
43 43 public $current_form = 0;
44 44 public $tracking;
45 + public $summary_emails;
46 + public $summary_emails_recipients;
45 47
48 + public $currency;
49 +
46 50 /**
47 51 * @since 6.0
48 52 *
49 53 * @var string|false|null
@@ -71,9 +75,10 @@
71 75 $this->maybe_filter_for_form( $args );
72 76 }
73 77
74 78 private function translate_settings( $settings ) {
75 - if ( $settings ) { //workaround for W3 total cache conflict
79 + if ( $settings ) {
80 + // Workaround for W3 total cache conflict.
76 81 return unserialize( serialize( $settings ) );
77 82 }
78 83
79 84 $settings = get_option( $this->option_name );
@@ -83,9 +88,10 @@
83 88 return $settings;
84 89 }
85 90
86 91 // If unserializing didn't work
87 - if ( $settings ) { //workaround for W3 total cache conflict
92 + if ( $settings ) {
93 + // Workaround for W3 total cache conflict.
88 94 $settings = unserialize( serialize( $settings ) );
89 95 } else {
90 96 $settings = $this;
91 97 }
@@ -123,10 +129,13 @@
123 129 'new_tab_msg' => __( 'The page has been opened in a new tab.', 'formidable' ),
124 130
125 131 'email_to' => '[admin_email]',
126 132 'no_ips' => 0,
127 - 'custom_header_ip' => false, // Use false by default. We show a warning when this is unset. Once global settings have been saved, this gets saved
133 + // Use false by default. We show a warning when this is unset. Once global settings have been saved, this gets saved.
134 + 'custom_header_ip' => false,
128 135 'tracking' => FrmAppHelper::pro_is_installed(),
136 + 'summary_emails' => 1,
137 + 'summary_emails_recipients' => '[admin_email]',
129 138
130 139 // Normally custom CSS is a string. A false value is used when nothing has been set.
131 140 // When it is false, we try to use the old custom_key value from the default style's post_content array.
132 141 'custom_css' => false,
@@ -162,8 +171,12 @@
162 171 if ( ! isset( $this->$frm_role ) ) {
163 172 $this->$frm_role = 'administrator';
164 173 }
165 174 }
175 +
176 + if ( ! isset( $this->currency ) ) {
177 + $this->currency = 'USD';
178 + }
166 179 }
167 180
168 181 /**
169 182 * @param array $params
@@ -340,18 +353,19 @@
340 353 */
341 354 private function update_settings( $params ) {
342 355 $this->active_captcha = $params['frm_active_captcha'];
343 356 $this->hcaptcha_pubkey = trim( $params['frm_hcaptcha_pubkey'] );
344 - $this->hcaptcha_privkey = $params['frm_hcaptcha_privkey'];
357 + $this->hcaptcha_privkey = trim( $params['frm_hcaptcha_privkey'] );
345 358 $this->pubkey = trim( $params['frm_pubkey'] );
346 - $this->privkey = $params['frm_privkey'];
359 + $this->privkey = trim( $params['frm_privkey'] );
347 360 $this->re_type = $params['frm_re_type'];
348 361 $this->re_lang = $params['frm_re_lang'];
349 362 $this->re_threshold = floatval( $params['frm_re_threshold'] );
350 363 $this->load_style = $params['frm_load_style'];
351 364 $this->custom_css = $params['frm_custom_css'];
365 + $this->currency = $params['frm_currency'];
352 366
353 - $checkboxes = array( 'mu_menu', 're_multi', 'use_html', 'jquery_css', 'accordion_js', 'fade_form', 'no_ips', 'custom_header_ip', 'tracking', 'admin_bar' );
367 + $checkboxes = array( 'mu_menu', 're_multi', 'use_html', 'jquery_css', 'accordion_js', 'fade_form', 'no_ips', 'custom_header_ip', 'tracking', 'admin_bar', 'summary_emails' );
354 368 foreach ( $checkboxes as $set ) {
355 369 $this->$set = isset( $params[ 'frm_' . $set ] ) ? absint( $params[ 'frm_' . $set ] ) : 0;
356 370 }
357 371 }