# wp-dbmanager/2.71/uninstall.php

WP-DBManager, version 2.71. 23 lines.

- Page: https://pluginprobe.com/plugins/wp-dbmanager/2.71/code/uninstall.php
- Raw: https://pluginprobe.com/plugins/wp-dbmanager/2.71/raw/uninstall.php
- Modified: 2014-04-17T01:29:18+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/wp-dbmanager/2.71/code/uninstall.php#L10-L20`.

```php
<?php
/*
 * Uninstall plugin
 */
if ( !defined( 'WP_UNINSTALL_PLUGIN' ) )
	exit ();

$option_name = 'dbmanager_options';

if ( is_multisite() ) {
	$ms_sites = wp_get_sites();

	if( 0 < sizeof( $ms_sites ) ) {
		foreach ( $ms_sites as $ms_site ) {
			switch_to_blog( $ms_site['blog_id'] );
			delete_option( $option_name );
		}
	}

	restore_current_blog();
} else {
	delete_option( $option_name );
}
```
