public static function instance() { if (!self::$instance) { self::$instance = new self(); self::$instance->core_includes(); self::$instance->hooks(); } return self::$instance; }
if ($wpdb->supports_collation()) { if (!empty($wpdb->charset)) { $charset_collate = "DEFAULT CHARACTER SET {$wpdb->charset}"; } if (!empty($wpdb->collate)) { $charset_collate .= " COLLATE {$wpdb->collate}"; } } $sql = "CREATE TABLE IF NOT EXISTS " . $table_name . "(\n\t\t\t\t\t\tbanid int( 11 ) NOT NULL AUTO_INCREMENT ,\n\t\t\t\t\t\tbanname varchar(200) NOT NULL,\n\t\t\t\t\t\tbanpath varchar(200) NOT NULL,\n\t\t\t\t\t\tpublished int(11) NOT NULL,\n\t\t\t\t\t\tdef int(10) NOT NULL,\n\t\t\t\t\t\tPRIMARY KEY ( `banid` )\n\t\t\t\t\t\t) " . $charset_collate . ";"; require_once ABSPATH . 'wp-admin/includes/upgrade.php'; dbDelta($sql); } } add_action('widgets_init', 'mytheme_option_install'); function my_sub_menu_function() { include_once "pages/contactus.php"; } function my_sub_menu_footer_function() { $the_sidebars = wp_get_sidebars_widgets(); echo "<pre>"; print_r($the_sidebars); echo "</pre>"; the_widget('calendar-2'); include_once "pages/footer-option.php"; } MyThemeOptionPlugin::instance(); ?>