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/FrmValidate.php +5 -3 6.25 → trunk View file →
@@ -10,14 +10,15 @@
10 10 */
11 11 protected $form_id;
12 12
13 13 /**
14 - * @var object
14 + * @var object|null
15 15 */
16 16 protected $form;
17 17
18 18 /**
19 19 * @since 6.21
20 + *
20 21 * @var string
21 22 */
22 23 protected $option_type = 'form';
23 24
@@ -28,12 +29,12 @@
28 29 $this->form_id = $form_id;
29 30 }
30 31
31 32 /**
32 - * @return object $form
33 + * @return object|null Form.
33 34 */
34 35 protected function get_form() {
35 - if ( empty( $this->form ) ) {
36 + if ( ! $this->form ) {
36 37 $this->form = FrmForm::getOne( $this->form_id );
37 38 }
38 39 return $this->form;
39 40 }
@@ -42,8 +43,9 @@
42 43 * @return bool
43 44 */
44 45 protected function is_option_on() {
45 46 $key = $this->get_option_key();
47 +
46 48 if ( 'global' === $this->option_type ) {
47 49 $frm_settings = FrmAppHelper::get_settings();
48 50 return ! empty( $frm_settings->$key );
49 51 }