# import-facebook-events/1.1.1/uninstall.php

Import Social Events, version 1.1.1. 32 lines.

- Page: https://pluginprobe.com/plugins/import-facebook-events/1.1.1/code/uninstall.php
- Raw: https://pluginprobe.com/plugins/import-facebook-events/1.1.1/raw/uninstall.php
- Modified: 2017-02-06T14:00:36+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/import-facebook-events/1.1.1/code/uninstall.php#L10-L20`.

```php
<?php
/**
 * Fired when the plugin is uninstalled.
 *
 * @link       http://xylusthemes.com
 * @since      1.0.0
 *
 * @package    Import_Facebook_Events
 */

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

// Remove options
delete_option( IFE_OPTIONS );

// Remove schduled Imports
$scheduled_import_args = array(
		'post_type'     => 'fb_scheduled_imports',
		'posts_per_page' => -1,
	);
$scheduled_imports = get_posts( $scheduled_import_args );
if( !empty( $scheduled_imports ) ){
	foreach ( $scheduled_imports as $import ) {
		if( $import->ID != '' ){
			wp_delete_post( $import->ID, true );
		}		
	}
}

```
