gglcptch_init

The Google Captcha (reCAPTCHA) by BestWebSoft gglcptch init function.

Description

gglcptch_init(); 

Usage

  1. if ( !function_exists( 'gglcptch_init' ) ) { 
  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_init(); 
  7.  

Defined (1)

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

/google-captcha.php  
  1. function gglcptch_init() { 
  2. global $gglcptch_plugin_info, $gglcptch_options, $gglcptch_ip_in_whitelist;; 
  3.  
  4. require_once( dirname( __FILE__ ) . '/bws_menu/bws_include.php' ); 
  5. bws_include_init( plugin_basename( __FILE__ ) ); 
  6.  
  7. if ( empty( $gglcptch_plugin_info ) ) { 
  8. if ( ! function_exists( 'get_plugin_data' ) ) 
  9. require_once( ABSPATH . 'wp-admin/includes/plugin.php' ); 
  10. $gglcptch_plugin_info = get_plugin_data( __FILE__ ); 
  11.  
  12. /** Function check if plugin is compatible with current WP version */ 
  13. bws_wp_min_version_check( plugin_basename( __FILE__ ), $gglcptch_plugin_info, '3.8' ); 
  14.  
  15. $is_admin = is_admin() && ! defined( 'DOING_AJAX' ); 
  16. /** Call register settings function */ 
  17. if ( ! $is_admin || ( isset( $_GET['page'] ) && 'google-captcha.php' == $_GET['page'] ) ) 
  18.  
  19. if ( ! isset( $gglcptch_ip_in_whitelist ) ) 
  20. $gglcptch_ip_in_whitelist = gglcptch_whitelisted_ip(); 
  21.  
  22. /** Add hooks */ 
  23. if ( ! $is_admin && ! empty( $gglcptch_options['public_key'] ) && ! empty( $gglcptch_options['private_key'] ) ) { 
  24. /** Add hooks */ 
  25. if ( '1' == $gglcptch_options['login_form'] || '1' == $gglcptch_options['reset_pwd_form'] || '1' == $gglcptch_options['registration_form'] ) { 
  26.  
  27. if ( '1' == $gglcptch_options['login_form'] ) { 
  28. if ( ! $gglcptch_ip_in_whitelist ) 
  29. add_action( 'authenticate', 'gglcptch_login_check', 21, 1 ); 
  30.  
  31. if ( '1' == $gglcptch_options['reset_pwd_form'] ) { 
  32. if ( ! $gglcptch_ip_in_whitelist ) 
  33.  
  34. if ( '1' == $gglcptch_options['registration_form'] ) { 
  35. if ( ! is_multisite() ) { 
  36. add_action( 'register_form', 'gglcptch_login_display', 99 ); 
  37. if ( ! $gglcptch_ip_in_whitelist ) 
  38. } else { 
  39. if ( ! $gglcptch_ip_in_whitelist ) 
  40.  
  41. if ( '1' == $gglcptch_options['comments_form'] ) { 
  42. if ( ! $gglcptch_ip_in_whitelist ) 
  43.  
  44. if ( '1' == $gglcptch_options['contact_form'] ) { 
  45. if ( ! $gglcptch_ip_in_whitelist )