From: Chuck Scott Date: Thu, 18 Jan 2018 21:46:10 +0000 (-0500) Subject: Removed unused code from deactivate.php X-Git-Tag: v2.10.23^2~21^2~1 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=d1a093972bf3e7431ca2fabc785e62e10398a73b;p=WP-Plugins%2Fglm-member-db.git Removed unused code from deactivate.php --- diff --git a/deactivate.php b/deactivate.php index 2ced0ebd..8bc76d17 100644 --- a/deactivate.php +++ b/deactivate.php @@ -53,56 +53,15 @@ class glmMembersPluginDeactivate extends glmPluginSupport public function __construct ($wpdb, $config) { - // Make sure the current user has this capability /* - if (!current_user_can('activate_plugins')) { - die(); - } -*/ - - // Check if there was an error and WP is calling us again - if ($this->checkErrorScrape()) { - exit; - } - - // Save WordPress Database object $this->wpdb = $wpdb; // Save plugin configuration object $this->config = $config; +*/ - // Remove user capabilties - // $this->removeRoleCapability('glm_members_edit'); - - + // Not doing anything here for now. } - /* - * Remove a role capability from all current roles - * - * @param string $capability - * - * @return void - * @access public - */ - public function removeRoleCapability ($capability) - { - // Get list of role objects - $roleObjects = $GLOBALS['wp_roles']->role_objects; - - // Get list of roles we can edit - $roles = get_editable_roles(); - - // For each role object - foreach ($roleObjects as $key => $role) { - // Check if the role exists in list of editable roles and capability - // does not exist - if (isset($roles[$key]) && isset($role->capabilities[$capability])) { - - // Remove role - $role->remove_cap($capability); - } - } - } }