diff --git a/contact.php b/contact.php index fa0cdd2..47ddad3 100644 --- a/contact.php +++ b/contact.php @@ -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 */ @@ -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 diff --git a/includes/uninstall.php b/includes/uninstall.php new file mode 100644 index 0000000..97dfcbb --- /dev/null +++ b/includes/uninstall.php @@ -0,0 +1,11 @@ +prefix . 'contacts'; + $wpdb->query("DROP TABLE IF EXISTS $tableName"); +} +register_uninstall_hook(__FILE__, 'contact_uninstall_table'); \ No newline at end of file