/var/www/(Del)hsihk.com/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
<?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 );

    
$table_name $wpdb->prefix "contact_form_7";

    
$wpdb->query"DROP TABLE IF EXISTS $table_name);
}

wpcf7_delete_plugin();

?>