. * */ //avoid direct calls to this file if (!function_exists('add_action')) { header('Status: 403 Forbidden'); header('HTTP/1.1 403 Forbidden'); exit(); } define('COMMENTSVERSION', '1.0.0'); define('COMMENTSDIR', basename(dirname(__FILE__))); define('COMMENTSPATH', plugin_dir_path(__FILE__)); /** * load classes */ if (!class_exists('Comments_Main')) { require_once( plugin_dir_path(__FILE__) . 'inc/comments_main.php' ); } if (is_admin() && (!defined('DOING_AJAX') || !DOING_AJAX )) { if (!class_exists('Comments_Admin')) { require_once( plugin_dir_path(__FILE__) . 'admin/comments_admin.php' ); } $cf_admin = new Comments_Admin(); } elseif (!is_admin() && (!defined('DOING_AJAX') || !DOING_AJAX )) { if (!class_exists('Comments_Frontend')) { require_once( plugin_dir_path(__FILE__) . 'frontend/comments_frontend.php' ); } $cf_frontend = new Comments_Frontend(); }