. Copyright (C) 2009 John Sessford - john@ikailo.com */ if ( ! defined('ABSPATH') ) die("Hmmm..."); /* * Activate */ if (!function_exists('wphive_activate')) { function wphive_activate() { return copy( dirname(__FILE__) . '/db.php', WP_CONTENT_DIR . '/db.php' ); } register_activation_hook(__FILE__,'wphive_activate'); } /* * Deactivate */ if (!function_exists('wphive_deactivate')) { function wphive_deactivate() { if (file_exists( WP_CONTENT_DIR . '/db.php')) { //wphive_delete_cookie('wphive_pathname'); return unlink( WP_CONTENT_DIR . '/db.php' ); } } register_deactivation_hook(__FILE__,'wphive_deactivate'); } // Load the plugin if ( defined('WPHIVE_PATH') ) { // Engage Plugin require_once(WPHIVE_PATH.'/includes/plugin.php'); } else { // db.php is not in place. Must deactivate this plugin. $current = get_option('active_plugins'); $plugin_name = 'wp-hive/wp-hive.php'; $i = array_search($plugin_name, $current); if ($i !== false) { array_splice($current, $i, 1 ); update_option('active_plugins', $current); } } ?>