| @@ -42,9 +42,8 @@ | ||
| 42 | 42 | public $re_lang; |
| 43 | 43 | public $re_type; |
| 44 | 44 | public $re_msg; |
| 45 | 45 | public $re_multi; |
| 46 | - public $re_threshold; | |
| 47 | 46 | |
| 48 | 47 | /** |
| 49 | 48 | * Settings for hCaptcha. |
| 50 | 49 | */ |
| @@ -90,25 +89,8 @@ | ||
| 90 | 89 | * @var false|string|null |
| 91 | 90 | */ |
| 92 | 91 | public $custom_css; |
| 93 | 92 | |
| 94 | - public $honeypot; | |
| 95 | - | |
| 96 | - public $wp_spam_check; | |
| 97 | - | |
| 98 | - public $denylist_check; | |
| 99 | - | |
| 100 | - /** | |
| 101 | - * @since 6.25.1 | |
| 102 | - * | |
| 103 | - * @var int|null 1 if installed after welcome tour update, null otherwise. | |
| 104 | - */ | |
| 105 | - public $installed_after_welcome_tour_update; | |
| 106 | - | |
| 107 | - public $disallowed_words; | |
| 108 | - | |
| 109 | - public $allowed_words; | |
| 110 | - | |
| 111 | 93 | public function __construct( $args = array() ) { |
| 112 | 94 | if ( ! defined( 'ABSPATH' ) ) { |
| 113 | 95 | die( 'You are not allowed to call this page directly.' ); |
| 114 | 96 | } |
| @@ -167,10 +149,8 @@ | ||
| 167 | 149 | 'admin_permission' => __( 'You do not have permission to do that', 'formidable' ), |
| 168 | 150 | 'new_tab_msg' => __( 'The page has been opened in a new tab.', 'formidable' ), |
| 169 | 151 | |
| 170 | 152 | 'email_to' => '[admin_email]', |
| 171 | - 'enable_gdpr' => 0, | |
| 172 | - 'no_gdpr_cookies' => 0, | |
| 173 | 153 | 'no_ips' => 0, |
| 174 | 154 | 'custom_header_ip' => 0, |
| 175 | 155 | 'tracking' => FrmAppHelper::pro_is_installed(), |
| 176 | 156 | // Only enable this by default for the main site. |
| @@ -179,14 +159,8 @@ | ||
| 179 | 159 | |
| 180 | 160 | // Normally custom CSS is a string. A false value is used when nothing has been set. |
| 181 | 161 | // When it is false, we try to use the old custom_key value from the default style's post_content array. |
| 182 | 162 | 'custom_css' => false, |
| 183 | - 'honeypot' => 1, | |
| 184 | - 'wp_spam_check' => 0, | |
| 185 | - 'denylist_check' => 0, | |
| 186 | - 'disallowed_words' => '', | |
| 187 | - 'allowed_words' => '', | |
| 188 | - 'email_style' => 'classic', | |
| 189 | 163 | ); |
| 190 | 164 | } |
| 191 | 165 | |
| 192 | 166 | /** |
| @@ -309,11 +283,11 @@ | ||
| 309 | 283 | |
| 310 | 284 | if ( ! isset( $this->pubkey ) ) { |
| 311 | 285 | // Get the options from the database. |
| 312 | 286 | $recaptcha_opt = is_multisite() ? get_site_option( 'recaptcha' ) : get_option( 'recaptcha' ); |
| 313 | - $this->pubkey = $recaptcha_opt['pubkey'] ?? ''; | |
| 314 | - $privkey = $recaptcha_opt['privkey'] ?? $privkey; | |
| 315 | - $re_lang = $recaptcha_opt['re_lang'] ?? $re_lang; | |
| 287 | + $this->pubkey = isset( $recaptcha_opt['pubkey'] ) ? $recaptcha_opt['pubkey'] : ''; | |
| 288 | + $privkey = isset( $recaptcha_opt['privkey'] ) ? $recaptcha_opt['privkey'] : $privkey; | |
| 289 | + $re_lang = isset( $recaptcha_opt['re_lang'] ) ? $recaptcha_opt['re_lang'] : $re_lang; | |
| 316 | 290 | } |
| 317 | 291 | |
| 318 | 292 | if ( empty( $this->re_msg ) ) { |
| 319 | 293 | $this->re_msg = __( 'The CAPTCHA was not entered correctly', 'formidable' ); |
| @@ -423,23 +397,9 @@ | ||
| 423 | 397 | $this->default_email = $params['frm_default_email']; |
| 424 | 398 | $this->from_email = $params['frm_from_email']; |
| 425 | 399 | $this->currency = $params['frm_currency']; |
| 426 | 400 | |
| 427 | - $checkboxes = array( | |
| 428 | - 'mu_menu', | |
| 429 | - 're_multi', | |
| 430 | - 'fade_form', | |
| 431 | - 'no_ips', | |
| 432 | - 'no_gdpr_cookies', | |
| 433 | - 'enable_gdpr', | |
| 434 | - 'custom_header_ip', | |
| 435 | - 'tracking', | |
| 436 | - 'admin_bar', | |
| 437 | - 'summary_emails', | |
| 438 | - 'honeypot', | |
| 439 | - 'wp_spam_check', | |
| 440 | - 'denylist_check', | |
| 441 | - ); | |
| 401 | + $checkboxes = array( 'mu_menu', 're_multi', 'fade_form', 'no_ips', 'custom_header_ip', 'tracking', 'admin_bar', 'summary_emails' ); | |
| 442 | 402 | foreach ( $checkboxes as $set ) { |
| 443 | 403 | $this->$set = isset( $params[ 'frm_' . $set ] ) ? absint( $params[ 'frm_' . $set ] ) : 0; |
| 444 | 404 | } |
| 445 | 405 | } |
| @@ -452,9 +412,9 @@ | ||
| 452 | 412 | |
| 453 | 413 | $frm_roles = FrmAppHelper::frm_capabilities(); |
| 454 | 414 | $roles = get_editable_roles(); |
| 455 | 415 | foreach ( $frm_roles as $frm_role => $frm_role_description ) { |
| 456 | - $this->$frm_role = (array) ( $params[ $frm_role ] ?? 'administrator' ); | |
| 416 | + $this->$frm_role = (array) ( isset( $params[ $frm_role ] ) ? $params[ $frm_role ] : 'administrator' ); | |
| 457 | 417 | |
| 458 | 418 | // Make sure administrators always have permissions |
| 459 | 419 | if ( ! in_array( 'administrator', $this->$frm_role, true ) ) { |
| 460 | 420 | array_push( $this->$frm_role, 'administrator' ); |