# bricksable/1.2.9/uninstall.php

Bricksable for Bricks Builder, version 1.2.9. 24 lines.

- Page: https://pluginprobe.com/plugins/bricksable/1.2.9/code/uninstall.php
- Raw: https://pluginprobe.com/plugins/bricksable/1.2.9/raw/uninstall.php
- Modified: 2021-08-17T04:09: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/bricksable/1.2.9/code/uninstall.php#L10-L20`.

```php
<?php
/**
 * This file runs when the plugin in uninstalled (deleted).
 * This will not run when the plugin is deactivated.
 * Ideally you will add all your clean-up scripts here
 * that will clean-up unused meta, options, etc. in the database.
 *
 * @package Bricksable/Uninstall
 */

// If plugin is not being uninstalled, exit (do nothing).
if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
	exit;
}

// Do something here if plugin is being uninstalled.
if ( 'on' === get_option( 'bricksable_uninstall_on_delete' ) ) {
	// Remove all matching options from the database.
	foreach ( wp_load_alloptions() as $option => $value ) {
		if ( strpos( $option, 'bricksable_' ) !== false ) {
			delete_option( $option );
		}
	}
}
```
