register_gglcptch_settings

The Google Captcha (reCAPTCHA) by BestWebSoft register gglcptch settings function.

Description

register_gglcptch_settings(); 

Usage

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

Defined (1)

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

/google-captcha.php  
  1. function register_gglcptch_settings() { 
  2. global $gglcptch_options, $bws_plugin_info, $gglcptch_plugin_info; 
  3.  
  4. $plugin_db_version = '0.1'; 
  5.  
  6. /** Install the option defaults */ 
  7. if ( ! get_option( 'gglcptch_options' ) ) 
  8. add_option( 'gglcptch_options', gglcptch_get_default_options() ); 
  9. /** Get options from the database */ 
  10. $gglcptch_options = get_option( 'gglcptch_options' ); 
  11.  
  12. /** Array merge incase this version has added new options */ 
  13. if ( ! isset( $gglcptch_options['plugin_option_version'] ) || $gglcptch_options['plugin_option_version'] != $gglcptch_plugin_info["Version"] ) { 
  14. $gglcptch_options = array_merge( gglcptch_get_default_options(), $gglcptch_options ); 
  15. $gglcptch_options['plugin_option_version'] = $gglcptch_plugin_info["Version"]; 
  16. /** show pro features */ 
  17. $gglcptch_options['hide_premium_options'] = array(); 
  18.  
  19. if ( is_multisite() ) { 
  20. switch_to_blog( 1 ); 
  21. register_uninstall_hook( __FILE__, 'gglcptch_delete_options' ); 
  22. restore_current_blog(); 
  23. } else { 
  24. register_uninstall_hook( __FILE__, 'gglcptch_delete_options' ); 
  25. update_option( 'gglcptch_options', $gglcptch_options ); 
  26. /** Update tables when update plugin and tables changes*/ 
  27. if ( 
  28. ! isset( $gglcptch_options['plugin_db_version'] ) || 
  29. ( isset( $gglcptch_options['plugin_db_version'] ) && $gglcptch_options['plugin_db_version'] != $plugin_db_version ) 
  30. ) { 
  31. if ( ! isset( $gglcptch_options['plugin_db_version'] ) ) { 
  32. $gglcptch_options['plugin_db_version'] = $plugin_db_version; 
  33. update_option( 'gglcptch_options', $gglcptch_options );