PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.18
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.18
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/FrmValidate.php +4 -17 6.326.18 View file →
@@ -10,20 +10,13 @@
10 10 */
11 11 protected $form_id;
12 12
13 13 /**
14 - * @var object|null
14 + * @var object
15 15 */
16 16 protected $form;
17 17
18 18 /**
19 - * @since 6.21
20 - *
21 - * @var string
22 - */
23 - protected $option_type = 'form';
24 -
25 - /**
26 19 * @param int $form_id
27 20 */
28 21 public function __construct( $form_id ) {
29 22 $this->form_id = $form_id;
@@ -29,12 +22,12 @@
29 22 $this->form_id = $form_id;
30 23 }
31 24
32 25 /**
33 - * @return object|null Form.
26 + * @return object $form
34 27 */
35 28 protected function get_form() {
36 - if ( ! $this->form ) {
29 + if ( empty( $this->form ) ) {
37 30 $this->form = FrmForm::getOne( $this->form_id );
38 31 }
39 32 return $this->form;
40 33 }
@@ -42,16 +35,10 @@
42 35 /**
43 36 * @return bool
44 37 */
45 38 protected function is_option_on() {
46 - $key = $this->get_option_key();
47 -
48 - if ( 'global' === $this->option_type ) {
49 - $frm_settings = FrmAppHelper::get_settings();
50 - return ! empty( $frm_settings->$key );
51 - }
52 -
53 39 $form = $this->get_form();
40 + $key = $this->get_option_key();
54 41 return ! empty( $form->options[ $key ] ) && 'off' !== $form->options[ $key ];
55 42 }
56 43
57 44 /**