gglplsn_uninstall

The Google +1 by BestWebSoft gglplsn uninstall function.

Description

gglplsn_uninstall(); 

Usage

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

Defined (1)

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

/google-plus-one.php  
  1. function gglplsn_uninstall() { 
  2. if ( ! function_exists( 'get_plugins' ) ) 
  3. require_once( ABSPATH . 'wp-admin/includes/plugin.php' ); 
  4. $all_plugins = get_plugins(); 
  5. if ( ! array_key_exists( 'google-one-pro/google-plus-one-pro.php', $all_plugins ) && ! array_key_exists( 'bws-social-buttons/bws-social-buttons.php', $all_plugins ) ) { 
  6. if ( function_exists( 'is_multisite' ) && is_multisite() ) { 
  7. global $wpdb; 
  8.  
  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. delete_option( 'gglplsn_options' ); 
  15. switch_to_blog( $old_blog ); 
  16. } else { 
  17. delete_option( 'gglplsn_options' ); 
  18.  
  19. require_once( dirname( __FILE__ ) . '/bws_menu/bws_include.php' ); 
  20. bws_include_init( plugin_basename( __FILE__ ) ); 
  21. bws_delete_plugin( plugin_basename( __FILE__ ) );