Skip to content

Commit

Permalink
Contact Uninstall Table
Browse files Browse the repository at this point in the history
  • Loading branch information
Rayiumir committed Dec 6, 2024
1 parent 1bb4d48 commit c716f59
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/*
* Plugin Name: Simple Contact
* Description: Simple Contact Form Plugin for Wordpress
* Version: 1.0
* Version: 1.1
* Author: Raymond Baghumian
* Author URI: https://github.com/Rayiumir/contact-form-wordpress
*/
Expand All @@ -22,6 +22,16 @@

register_activation_hook( __FILE__, 'contact_table' );

// Contact Uninstall Table

function contact_uninstall_table(){
global $wpdb;

$tableName = $wpdb->prefix . 'contacts';
$wpdb->query("DROP TABLE IF EXISTS $tableName");
}
register_uninstall_hook(__FILE__, 'contact_uninstall_table');

// Include modules

require( RAYIUM_CONTACT_INCLUDES . 'functions.php' );
Expand Down

0 comments on commit c716f59

Please sign in to comment.