From: Chuck Scott Date: Tue, 10 Feb 2015 00:05:28 +0000 (-0500) Subject: Added $config parameter to some constructors X-Git-Tag: v1.0.0~70 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=84eb21d75d84d3463bd358f2fe80f0de506b8c7f;p=WP-Plugins%2Fglm-member-db.git Added $config parameter to some constructors --- 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');