/var/www/hkosl.com/aga/wp-content/plugins/contact-form-7/uninstall.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php

if ( ! defined'WP_UNINSTALL_PLUGIN' ) ) {
    exit();
}

function 
wpcf7_delete_plugin() {
    global 
$wpdb;

    
delete_option'wpcf7' );

    
$posts get_posts(
        array(
            
'numberposts' => -1,
            
'post_type' => 'wpcf7_contact_form',
            
'post_status' => 'any',
        )
    );

    foreach ( 
$posts as $post ) {
        
wp_delete_post$post->IDtrue );
    }

    
$wpdb->querysprintf"DROP TABLE IF EXISTS %s",
        
$wpdb->prefix 'contact_form_7' ) );
}

wpcf7_delete_plugin();