<?php /* Plugin Name: Global Content Blocks Plugin URI: http://micuisine.com/content-block-plugins/ Description: Create your own shortcodes to add HTML, PHP, forms, opt-ins, iframes, Adsense, code snippets, reusable objects, etc, to posts and pages. Ideal for adding reusable objects to your content or to preserve formatting of code that normally gets stripped out or reformatted by the editor. See the <a href="http://micuisine.com/content-block-plugins/global-content-blocks/" target="_blank">General Usage</a> page for complete instructions. Version: 2.1.5 Author: Dave Liske Author URI: http://micuisine.com/content-block-plugins/ */ define('GCB_VERSION', '2.1.5'); $current_version = get_option("gcb_db_version"); require_once 'gcb/gcb.class.php'; gcb_check_update($current_version); /* * Installs the plugin */ function gcb_install() { //we do not remove the table, at least not yet update_option("gcb_db_version", GCB_VERSION); } 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");
<?php /* Plugin Name: Global Content Blocks Plugin URI: http://wordpress-plugins.org/global-content-blocks Description: Create your own shortcodes to add HTML, PHP, forms, opt-ins, iframes, Adsense, code snippets, reusable objects, etc, to posts and pages. Ideal for adding reusable objects to your content or to preserve formatting of code that normally gets stripped out or reformatted by the editor Version: 1.3 Author: Ben Magrill Author URI: http://wordpress-plugins.org */ define('GCB_VERSION', '1.1.2'); $current_version = get_option("gcb_db_version"); gcb_check_update(); require_once 'gcb/gcb.class.php'; /* * Installs the plugin! */ function gcb_install() { global $wpdb; $table_name = $wpdb->prefix . "gcb"; if ($wpdb->get_var("SHOW TABLES LIKE '{$table_name}'") != $table_name) { $sql = "CREATE TABLE " . $table_name . " (\r\r\n\t id mediumint(9) NOT NULL AUTO_INCREMENT,\r\r\n\t name varchar(36) NOT NULL,\r\r\n\t description text NOT NULL,\r\r\n\t value text NOT NULL,\r\r\n type varchar(100) NOT NULL DEFAULT 'other',\r\r\n\t UNIQUE KEY id (id)\r\r\n\t);"; require_once ABSPATH . 'wp-admin/includes/upgrade.php'; dbDelta($sql); add_option("gcb_db_version", GCB_VERSION); } } function gcb_uninstall() { if (get_option("gcb_complete_uninstall", "no") == "yes") {