From 3842e001314ec7507dece34a1c0942bcbe619444 Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Mon, 3 Nov 2014 15:42:51 -0500 Subject: [PATCH] update plugin setup only call in the admin controller if in admin --- glm-client-info.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/glm-client-info.php b/glm-client-info.php index fe93faa..8f52bd9 100644 --- a/glm-client-info.php +++ b/glm-client-info.php @@ -16,11 +16,13 @@ register_activation_hook(__FILE__, array('Glmclientinfo_Admin_Controller', 'acti register_deactivation_hook(__FILE__, array('Glmclientinfo_Admin_Controller', 'deactivate_plugin')); register_uninstall_hook(__FILE__, array('Glmclientinfo_Admin_Controller', 'glmclientinfo_uninstall')); -// call the Admin Controller to setup the Admin of the plugin -require_once 'controllers/Admin.php'; -$adminController = new Glmclientinfo_Admin_Controller( - plugin_dir_path(__FILE__) -); +if (is_admin()) { + // call the Admin Controller to setup the Admin of the plugin + require_once 'controllers/Admin.php'; + $adminController = new Glmclientinfo_Admin_Controller( + plugin_dir_path(__FILE__) + ); +} // call the Front Controller to setup the widget require_once 'controllers/Front.php'; -- 2.17.1