prefix . "ctv"; if($wpdb->get_var("show tables like '$table_name'") != $table_name) { $sql = "CREATE TABLE " . $table_name . " ( id mediumint(9) NOT NULL AUTO_INCREMENT, time bigint(11) DEFAULT '0' NOT NULL, name tinytext NOT NULL, text text NOT NULL, url VARCHAR(55) NOT NULL, UNIQUE KEY id (id) );"; require_once(ABSPATH . 'wp-admin/upgrade-functions.php'); dbDelta($sql); $welcome_name = "Mr. Wordpress"; $welcome_text = "Congratulations, you just completed the installation!"; $insert = "INSERT INTO " . $table_name . " (time, name, text) " . "VALUES ('" . time() . "','" . $wpdb->escape($welcome_name) . "','" . $wpdb->escape($welcome_text) . "')"; $results = $wpdb->query( $insert ); add_option("ctv_db_version", $ctv_db_version); } } add_action('activate_plugindir/Client_Theme_Viewer.php', 'ctv_install'); //ctv_add_pages provides the functions to add the Client Theme Viewer admin page to WordPress. function ctv_add_pages() { // Add a new menu under Manage: add_management_page('Client Theme Viewer Manager', 'Client Theme Viewer Manager', 8, 'ctv_admin.php', 'ctv_admin'); } // ctv_admin() displays the page content for the Client Theme Viewer Manager submenu function ctv_admin() { echo "

Add New Client

"; } ?>