PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / trunk
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More vtrunk
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 +18 -14 6.27 → trunk View file →
@@ -173,9 +173,9 @@
173 173 */
174 174 public $current_form = 0;
175 175
176 176 /**
177 - * @var bool
177 + * @var bool|int
178 178 */
179 179 public $tracking;
180 180
181 181 /**
@@ -210,9 +210,9 @@
210 210 */
211 211 public $custom_css;
212 212
213 213 /**
214 - * @var string
214 + * @var int
215 215 */
216 216 public $honeypot;
217 217
218 218 /**
@@ -279,9 +279,9 @@
279 279
280 280 // If unserializing didn't work.
281 281 $settings = $this;
282 282
283 - update_option( $this->option_name, $settings, 'yes' );
283 + update_option( $this->option_name, $settings, true );
284 284
285 285 return $settings;
286 286 }
287 287
@@ -462,9 +462,9 @@
462 462 $privkey = $recaptcha_opt['privkey'] ?? $privkey;
463 463 $re_lang = $recaptcha_opt['re_lang'] ?? $re_lang;
464 464 }
465 465
466 - if ( empty( $this->re_msg ) ) {
466 + if ( ! $this->re_msg ) {
467 467 $this->re_msg = __( 'The CAPTCHA was not entered correctly', 'formidable' );
468 468 }
469 469
470 470 if ( ! isset( $this->privkey ) ) {
@@ -509,15 +509,17 @@
509 509 *
510 510 * @return void
511 511 */
512 512 public function maybe_filter_for_form( $args ) {
513 - if ( isset( $args['current_form'] ) && is_numeric( $args['current_form'] ) ) {
514 - $this->current_form = $args['current_form'];
513 + if ( ! isset( $args['current_form'] ) || ! is_numeric( $args['current_form'] ) ) {
514 + return;
515 + }
515 516
516 - foreach ( $this->translatable_strings() as $string ) {
517 - $this->{$string} = apply_filters( 'frm_global_setting', $this->{$string}, $string, $this );
518 - $this->{$string} = apply_filters( 'frm_global_' . $string, $this->{$string}, $this );
519 - }
517 + $this->current_form = $args['current_form'];
518 +
519 + foreach ( $this->translatable_strings() as $string ) {
520 + $this->{$string} = apply_filters( 'frm_global_setting', $this->{$string}, $string, $this );
521 + $this->{$string} = apply_filters( 'frm_global_' . $string, $this->{$string}, $this );
520 522 }
521 523 }
522 524
523 525 /**
@@ -548,13 +550,15 @@
548 550 $this->update_roles( $params );
549 551
550 552 do_action( 'frm_update_settings', $params );
551 553
552 - if ( function_exists( 'get_filesystem_method' ) ) {
553 - // Save styling settings in case fallback setting changes.
554 - $frm_style = new FrmStyle();
555 - $frm_style->update( 'default' );
554 + if ( ! function_exists( 'get_filesystem_method' ) ) {
555 + return;
556 556 }
557 +
558 + // Save styling settings in case fallback setting changes.
559 + $frm_style = new FrmStyle();
560 + $frm_style->update( 'default' );
557 561 }
558 562
559 563 /**
560 564 * @param array $params