| @@ -15,15 +15,8 @@ | ||
| 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; |
| @@ -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 | /** |