class-integration-captcha-pro.php
7 years ago
class-integration-captcha.php
7 years ago
class-integration-google-captcha.php
7 years ago
class-integration-really-simple-captcha.php
7 years ago
class-integration-google-captcha.php
25 lines
| 1 | <?php |
| 2 | class Strong_Testimonials_Integration_Google_Captcha extends Strong_Testimonials_Integration_Captcha { |
| 3 | |
| 4 | public function __construct() { |
| 5 | parent::__construct(); |
| 6 | } |
| 7 | |
| 8 | public function add_captcha() { |
| 9 | if ( function_exists( 'gglcptch_display_custom' ) ) { |
| 10 | return gglcptch_display_custom(); |
| 11 | } |
| 12 | |
| 13 | return ''; |
| 14 | } |
| 15 | |
| 16 | public function check_captcha( $form_errors ) { |
| 17 | if ( function_exists( 'gglcptch_check_custom' ) && gglcptch_check_custom() !== true ) { |
| 18 | $form_errors['captcha'] = __( 'The Captcha failed. Please try again.', 'strong-testimonials' ); |
| 19 | } |
| 20 | |
| 21 | return $form_errors; |
| 22 | } |
| 23 | |
| 24 | } |
| 25 |