From 84eb21d75d84d3463bd358f2fe80f0de506b8c7f Mon Sep 17 00:00:00 2001 From: Chuck Scott Date: Mon, 9 Feb 2015 19:05:28 -0500 Subject: [PATCH] Added $config parameter to some constructors --- activate.php | 7 +++++++ deactivate.php | 12 +++++++++++- index.php | 4 ++-- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/activate.php b/activate.php index 295a6b70..71f7b731 100644 --- a/activate.php +++ b/activate.php @@ -52,6 +52,13 @@ class glmMembersPluginActivate extends glmPluginSupport * @access public */ public $wpdb; + /** + * Plugin Configuration Data + * + * @var $config + * @access public + */ + public $config; /* * Constructor diff --git a/deactivate.php b/deactivate.php index 4d832d4e..ed147704 100644 --- a/deactivate.php +++ b/deactivate.php @@ -31,13 +31,20 @@ class glmMembersPluginDeactivate extends glmPluginSupport * @access public */ public $wpdb; + /** + * Plugin Configuration Data + * + * @var $config + * @access public + */ + public $config; /* * Constructor * * Performs all the work for this model */ - public function __construct ($wpdb) + public function __construct ($wpdb, $config) { // Make sure the current user has this capability @@ -48,6 +55,9 @@ class glmMembersPluginDeactivate extends glmPluginSupport // Save WordPress Database object $this->wpdb = $wpdb; + // Save plugin configuration object + $this->config = $config; + // Remove user capabilties // $this->removeRoleCapability('glm_members_edit'); diff --git a/index.php b/index.php index 64baf5e2..b370ec6b 100644 --- a/index.php +++ b/index.php @@ -198,7 +198,7 @@ function glmMembersPluginActivate () { global $wpdb; require_once (GLM_MEMBERS_PLUGIN_PATH . '/activate.php'); - new glmMembersPluginActivate($wpdb); + new glmMembersPluginActivate($wpdb, $config); } register_activation_hook(__FILE__, 'glmMembersPluginActivate'); @@ -207,7 +207,7 @@ function glmMembersPluginDeactivate () { global $wpdb; require_once (GLM_MEMBERS_PLUGIN_PATH . '/deactivate.php'); - $x = new glmMembersPluginDeactivate($wpdb); + $x = new glmMembersPluginDeactivate($wpdb, $config); return false; } register_deactivation_hook(__FILE__, 'glmMembersPluginDeactivate'); -- 2.17.1