Skip to content

Commit

Permalink
Create File uninstall an Transfer Function uninstall to uninstall.php
Browse files Browse the repository at this point in the history
  • Loading branch information
Rayiumir committed Dec 7, 2024
1 parent c716f59 commit 7e303ed
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
10 changes: 2 additions & 8 deletions 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.1
* Version: 1.1.1
* Author: Raymond Baghumian
* Author URI: https://github.com/Rayiumir/contact-form-wordpress
*/
Expand All @@ -24,13 +24,7 @@

// 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');
require( RAYIUM_CONTACT_INCLUDES . 'uninstall.php' );

// Include modules

Expand Down
11 changes: 11 additions & 0 deletions includes/uninstall.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

// 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');

0 comments on commit 7e303ed

Please sign in to comment.