function gcb_uninstall() { if (get_option("gcb_complete_uninstall", "no") == "yes") { global $wpdb; $table_name = $wpdb->prefix . "gcb"; if ($wpdb->get_var("SHOW TABLES LIKE '{$table_name}'") == $table_name) { gcb_remove_table(); } delete_option("gcb_db_version"); delete_option("gcb_complete_uninstall"); //remove all entries foreach (gcb::get_entries() as $entry) { gcb::delete_entry($entry['id']); } //remove the map delete_option(gcb::$ENTRIES_KEY); } }
<?php require_once '../../../../../wp-load.php'; $list = gcb::get_entries(); //define the available types,and their image $available_types = gcb::get_available_types(); ?> <html> <head> <title>Global Content Blocks</title> <script type="text/javascript" src="<?php echo get_option('siteurl') . "/wp-includes/js/jquery/jquery.js"; ?> "></script> <script type="text/javascript" src="<?php echo get_option('siteurl') . "/wp-includes/js/tinymce/tiny_mce_popup.js?ver=327-1235"; ?> "></script> <script type="text/javascript"> function do_s() { var opt = document.getElementById("gcb_sel").options[document.getElementById("gcb_sel").selectedIndex]; var continue_send = true; if(opt.value != "0") { var actual = document.getElementById("gcb_actual").checked; if(!actual) { var img = opt.id; var html = "<img src='<?php echo WP_PLUGIN_URL; ?>