prefix . 'a3ui_import_status'; $charset_collate = $wpdb->get_charset_collate(); $sql = "CREATE TABLE $table_name ( id int(11) NOT NULL unsigned AUTO_INCREMENT, user_batch int(11) unsigned default 0 NOT NULL, user_login tinytext NOT NULL, PRIMARY KEY (id) ) $charset_collate;"; require_once ABSPATH . 'wp-admin/includes/upgrade.php'; dbDelta($sql); add_option('a3ui_db_version', $a3ui_db_version); } // function jal_install_data() { // global $wpdb; // $welcome_name = 'Mr. WordPress'; // $welcome_text = 'Congratulations, you just completed the installation!'; // $table_name = $wpdb->prefix . 'liveshoutbox'; // $wpdb->insert( // $table_name, // array( // 'time' => current_time( 'mysql' ), // 'name' => $welcome_name, // 'text' => $welcome_text, // ) // ); // } function a3ui_update_db_check() { global $a3ui_db_version; if (get_site_option('a3ui_db_version') != $a3ui_db_version) { a3ui_install(); } } // add_action('plugins_loaded', 'a3ui_update_db_check');