| 1 |
<?php |
| 2 |
/** |
| 3 |
* reCAPTCHA v2 Validation (deprecated wrapper) |
| 4 |
* @package Contact Forms |
| 5 |
*/ |
| 6 |
|
| 7 |
// phpcs:disable WordPress.PHP.DevelopmentFunctions.error_log_trigger_error -- Deprecation notice for legacy API |
| 8 |
|
| 9 |
class AccuaForm_Validation_Captcha2 extends AccuaForm_Validation_Captcha2b { |
| 10 |
public function __construct($privateKey, $message = "") { |
| 11 |
if (version_compare(PHP_VERSION, '5.3.0', '>=')) { |
| 12 |
$error_type = E_USER_DEPRECATED; |
| 13 |
} else { |
| 14 |
$error_type = E_USER_NOTICE; |
| 15 |
} |
| 16 |
trigger_error("AccuaForm_Validation_Captcha2 is <strong>deprecated</strong> since contact-forms version 1.4.7! Use AccuaForm_Validation_Captcha2b instead.", $error_type); |
| 17 |
$this->privateKey = $privateKey; |
| 18 |
if(!empty($message)) |
| 19 |
$this->message = $message; |
| 20 |
} |
| 21 |
} |
| 22 |
|