Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
function nirvana_install() {
global $wpdb;
$table = 'dynamic_sidebars';
$dynamic_sidebars = $wpdb->prefix . $table;
$sql = $wpdb->prepare( "CREATE TABLE $dynamic_sidebars (
dynamic_sidebar_id BIGINT(20) NOT NULL AUTO_INCREMENT,
sidebar_name VARCHAR(255) NOT NULL,
sidebar_id VARCHAR(255) NOT NULL,
description MEDIUMTEXT NULL,
before_widget MEDIUMTEXT NULL,
after_widget MEDIUMTEXT NULL,
before_title MEDIUMTEXT NULL,
after_title MEDIUMTEXT NULL,
PRIMARY KEY dynamic_sidebar_id (dynamic_sidebar_id)
)" );
require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
dbDelta($sql);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.