gglcptch_signup_check

The Google Captcha (reCAPTCHA) by BestWebSoft gglcptch signup check function.

Description

gglcptch_signup_check( $result ); 

Parameters (1)

0. $result
The result.

Usage

  1. if ( !function_exists( 'gglcptch_signup_check' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'google-captcha-recaptcha-by-bestwebsoft/google-captcha.php'; 
  3.  
  4. // The result. 
  5. $result = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = gglcptch_signup_check($result); 
  9.  

Defined (1)

The function is defined in the following location(s).

/google-captcha.php  
  1. function gglcptch_signup_check( $result ) { 
  2. global $current_user; 
  3.  
  4. if ( is_admin() && ! defined( 'DOING_AJAX' ) && ! empty( $current_user->data->ID ) ) 
  5. return $result; 
  6.  
  7. $check_result = gglcptch_check(); 
  8.  
  9. if ( $check_result['response'] || $check_result['reason'] == 'ERROR_NO_KEYS' ) 
  10. return $result; 
  11.  
  12. $error_message = sprintf( '<strong>%s</strong>: %s', __( 'Error', 'google-captcha' ), gglcptch_get_message() ); 
  13.  
  14. $error = $result['errors']; 
  15. $error->add( 'gglcptch_error', $error_message ); 
  16. return $result;