Skip to content

Instantly share code, notes, and snippets.

View bwalker541's full-sized avatar

Bonnie Walker bwalker541

View GitHub Profile
@sudar
sudar / 1.php
Last active September 10, 2022 17:59
How To Properly Create Tables In WordPress Multisite Plugins. Explanation at http://sudarmuthu.com/blog/how-to-properly-create-tables-in-wordpress-multisite-plugins/
<?php
// Creating tables in Single site installations
function on_activate() {
create_table();
}
function create_table() {
global $wpdb;
$table_name = $wpdb->prefix . 'table_name';