/* Plugin Name: Contact Us Manager Description: This plugin creates the contact us database and adds an admin panel to the WordPress Admin to view/delete messages. Author: Derek Traver Version: 1.0 Author URI: http://pepperjam.com */ function contact_install() { global $wpdb; $table = $wpdb->prefix."contact"; $structure = "CREATE TABLE IF NOT EXISTS $table ( id INT(9) NOT NULL AUTO_INCREMENT, name VARCHAR(150) NOT NULL, email VARCHAR(15) NOT NULL, subject VARCHAR(150) NOT NULL, message MEDIUMTEXT NOT NULL, UNIQUE KEY id (id) );"; $wpdb->query($structure); } function contact_menu() { global $wpdb; include 'contact-admin.php'; } function contact_admin_actions() { add_management_page("Contact Us Manager", "Contact Us Manager", 8, "Contact-manager", "contact_menu"); } add_action('activate_contactus/contact-manager.php', 'contact_install'); add_action('admin_menu', 'contact_admin_actions'); ?>
|
|||||||
|
|||||||
|
|||||||
|
|||||||
Copyright 2017 Hunk Mania. All Rights Reserved. |
Site by www.hunkmania.com |