gglcptch_test_keys_verification

The Google Captcha (reCAPTCHA) by BestWebSoft gglcptch test keys verification function.

Description

gglcptch_test_keys_verification(); 

Usage

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

Defined (1)

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

/google-captcha.php  
  1. function gglcptch_test_keys_verification() { 
  2. if ( isset( $_REQUEST['_wpnonce'] ) && wp_verify_nonce( $_REQUEST['_wpnonce'] , $_REQUEST['action'] ) ) { 
  3. $result = gglcptch_check( true ); 
  4.  
  5. if ( ! $result['response'] ) { 
  6. if ( isset( $result['reason'] ) ) { 
  7. foreach ( (array)$result['reason'] as $error ) { ?> 
  8. <div class="error gglcptch-test-results"><p> 
  9. <?php gglcptch_get_message( $error, true ); ?> 
  10. </p></div> 
  11. <?php } 
  12. } else { ?> 
  13. <div class="updated gglcptch-test-results"><p><?php _e( 'The verification is successfully completed', 'google-captcha' ); ?></p></div> 
  14. <?php $gglcptch_options = get_option( 'gglcptch_options' ); 
  15. $gglcptch_options['keys_verified'] = true; 
  16. update_option( 'gglcptch_options', $gglcptch_options ); 
  17. die();