# slider-blocks/3.2.0/uninstall.php

GutSlider – All in One Slider and Carousel Blocks for Gutenberg, version 3.2.0. 54 lines.

- Page: https://pluginprobe.com/plugins/slider-blocks/3.2.0/code/uninstall.php
- Raw: https://pluginprobe.com/plugins/slider-blocks/3.2.0/raw/uninstall.php
- Modified: 2026-08-02T09:09:26+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/slider-blocks/3.2.0/code/uninstall.php#L10-L20`.

```php
<?php
/**
 * Uninstall script for GutSliderBlocks.
 *
 * Generated stylesheets are always removed. Stored options are only
 * removed when "Delete data on uninstall" is enabled in the settings.
 *
 * @package GutSliderBlocks
 */

// If uninstall not called from WordPress, then exit.
if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
	exit;
}

$gutslider_settings    = get_option( 'gutslider_settings', array() );
$gutslider_remove_data = is_array( $gutslider_settings ) && ! empty( $gutslider_settings['remove_data'] );

// Load the main plugin file to access the cleanup method.
require_once plugin_dir_path( __FILE__ ) . 'slider-blocks.php';

// Remove generated stylesheets.
GutSlider\Plugin::cleanup();

if ( ! $gutslider_remove_data ) {
	return;
}

// Remove the plugin's own options.
$gutslider_options = array(
	'gutslider_settings',
	'gutslider_blocks',
	'gutslider_blocks_version',
	'gutsliderblocks_do_activation_redirect',
);

$gutslider_blocks_file = plugin_dir_path( __FILE__ ) . 'includes/Api/blocks.php';

if ( file_exists( $gutslider_blocks_file ) ) {
	$gutslider_block_list = include $gutslider_blocks_file;

	if ( is_array( $gutslider_block_list ) ) {
		foreach ( $gutslider_block_list as $gutslider_block ) {
			if ( isset( $gutslider_block['name'] ) ) {
				$gutslider_options[] = 'gut_' . str_replace( '-', '_', $gutslider_block['name'] );
			}
		}
	}
}

foreach ( array_unique( $gutslider_options ) as $gutslider_option ) {
	delete_option( $gutslider_option );
}

```
