# wp-to-buffer/6.0.3/includes/deactivation.php

Social Media Auto Poster – Schedule &amp; Publish to Buffer, version 6.0.3. 41 lines.

- Page: https://pluginprobe.com/plugins/wp-to-buffer/6.0.3/code/includes/deactivation.php
- Raw: https://pluginprobe.com/plugins/wp-to-buffer/6.0.3/raw/includes/deactivation.php
- Modified: 2023-02-06T16:45: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-to-buffer/6.0.3/code/includes/deactivation.php#L10-L20`.

```php
<?php
/**
 * Defines the deactivation function, which is run when the Plugin is deactivated.
 *
 * @package WP_To_Buffer
 * @author WP Zinc
 */

/**
 * Runs the uninstallation routines when the plugin is deactivated.
 *
 * @since   1.2.2
 *
 * @param   bool $network_wide   Is network wide deactivation.
 */
function wp_to_buffer_deactivate( $network_wide ) {

	// Initialise Plugin.
	$wp_to_buffer = WP_To_Buffer::get_instance();
	$wp_to_buffer->initialize();

	// Check if we are on a multisite install, activating network wide, or a single install.
	if ( ! is_multisite() || ! $network_wide ) {
		// Single Site deactivation.
		$wp_to_buffer->get_class( 'install' )->uninstall();
	} else {
		// Multisite network wide deactivation.
		$sites = get_sites(
			array(
				'number' => 0,
			)
		);
		foreach ( $sites as $site ) {
			switch_to_blog( $site->blog_id );
			$wp_to_buffer->get_class( 'install' )->uninstall();
			restore_current_blog();
		}
	}

}

```
