PluginProbe
Import Social Events / 1.1.0
Import Social Events v1.1.0
1.9.1 1.9.0 trunk 1.0.0 1.0.1 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.2.0 1.3.0 1.4.0 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 1.6.0 1.6.1 1.6.10 1.6.11 1.6.12 All 61 releases
import-facebook-events / uninstall.php

uninstall.php in Import Social Events 1.1.0, at uninstall.php

32 lines 667 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Fired when the plugin is uninstalled.
4 *
5 * @link http://xylusthemes.com
6 * @since 1.0.0
7 *
8 * @package Import_Facebook_Events
9 */
10
11 // If uninstall not called from WordPress, then exit.
12 if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
13 exit;
14 }
15
16 // Remove options
17 delete_option( IFE_OPTIONS );
18
19 // Remove schduled Imports
20 $scheduled_import_args = array(
21 'post_type' => 'fb_scheduled_imports',
22 'posts_per_page' => -1,
23 );
24 $scheduled_imports = get_posts( $scheduled_import_args );
25 if( !empty( $scheduled_imports ) ){
26 foreach ( $scheduled_imports as $import ) {
27 if( $import->ID != '' ){
28 wp_delete_post( $import->ID, true );
29 }
30 }
31 }
32