. */ if(!class_exists('Cart66')) { ob_start(); require_once(WP_PLUGIN_DIR. "/cart66-lite/models/Cart66CartWidget.php"); require_once(WP_PLUGIN_DIR. "/cart66-lite/models/Cart66.php"); require_once(WP_PLUGIN_DIR. "/cart66-lite/models/Cart66Common.php"); define("CART66_ORDER_NUMBER", false); define("CART66_PRO", false); define('CART66_VERSION_NUMBER', '1.0.7'); define("WPCURL", Cart66Common::getWpContentUrl()); define("WPURL", Cart66Common::getWpUrl()); if(CART66_PRO) { require_once(WP_PLUGIN_DIR. "/cart66-lite/pro/models/Cart66ProCommon.php"); } // IS_ADMIN is true when the dashboard or the administration panels are displayed if(!defined("IS_ADMIN")) { define("IS_ADMIN", is_admin()); } /* Uncomment this block of code for load time debugging $filename = WP_PLUGIN_DIR . "/cart66-lite/log.txt"; if(file_exists($filename) && is_writable($filename)) { file_put_contents($filename, "\n\n\n================= Loading Cart66 Main File [" . date('m/d/Y g:i:s a') . "] " . $_SERVER['REMOTE_ADDR'] . " " . $_SERVER['REQUEST_URI'] . " =================\n\n", FILE_APPEND); } */ $cart66 = new Cart66(); // Register activation hook to install Cart66 database tables and system code register_activation_hook(__FILE__, array($cart66, 'install')); // Check for WordPress 3.1 auto-upgrades if(function_exists('register_update_hook')) { register_update_hook(__FILE__, array($cart66, 'install')); } add_action('init', array($cart66, 'init')); add_action('widgets_init', array($cart66, 'registerCartWidget')); } /** * Prevent the link rel="next" content from showing up in the wordpress header * because it can potentially prefetch a page with a [clearcart] shortcode */ remove_action('wp_head', 'adjacent_posts_rel_link_wp_head');