gglcptch_delete_options

The Google Captcha (reCAPTCHA) by BestWebSoft gglcptch delete options function.

Description

gglcptch_delete_options(); 

Usage

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

Defined (1)

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

/google-captcha.php  
  1. function gglcptch_delete_options() { 
  2. if ( ! function_exists( 'get_plugins' ) ) 
  3. require_once( ABSPATH . 'wp-admin/includes/plugin.php' ); 
  4. $all_plugins = get_plugins(); 
  5.  
  6. if ( ! array_key_exists( 'google-captcha-pro/google-captcha-pro.php', $all_plugins ) ) { 
  7. global $wpdb; 
  8. if ( function_exists( 'is_multisite' ) && is_multisite() ) { 
  9. $old_blog = $wpdb->blogid; 
  10. /** Get all blog ids */ 
  11. $blogids = $wpdb->get_col( "SELECT `blog_id` FROM $wpdb->blogs" ); 
  12. foreach ( $blogids as $blog_id ) { 
  13. switch_to_blog( $blog_id ); 
  14. $wpdb->query( "DROP TABLE IF EXISTS `{$wpdb->prefix}gglcptch_whitelist`;" ); 
  15. delete_option( 'gglcptch_options' ); 
  16. switch_to_blog( $old_blog ); 
  17. delete_site_option( 'gglcptch_options' ); 
  18. } else { 
  19. $wpdb->query( "DROP TABLE IF EXISTS `{$wpdb->prefix}gglcptch_whitelist`;" ); 
  20. delete_option( 'gglcptch_options' ); 
  21.  
  22. require_once( dirname( __FILE__ ) . '/bws_menu/bws_include.php' ); 
  23. bws_include_init( plugin_basename( __FILE__ ) ); 
  24. bws_delete_plugin( plugin_basename( __FILE__ ) );