From: Chuck Scott Date: Thu, 13 Oct 2016 20:14:00 +0000 (-0400) Subject: Updated permissions to use new glmMembersUserCan() function. X-Git-Tag: v1.1.0^2~1 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=d87ab738318a63ab725d2acac9eb230a33d4a2f7;p=WP-Plugins%2Fglm-member-db-serverstats.git Updated permissions to use new glmMembersUserCan() function. --- diff --git a/setup/permissions.php b/setup/permissions.php index 33f47a4..fec48a1 100644 --- a/setup/permissions.php +++ b/setup/permissions.php @@ -39,4 +39,14 @@ * to permit the action. * * Of course any of these may test more than one capability if that's desired. + * + * Since we have capabilities that only exist if a particular add-on (such as Contacts) + * has been loaded and activated, it can be helpful to be able to test for a capability + * for the current user and permit some action if that capability doesn't exist. The + * main plugin therefore provides the following globally accessible function that will + * return true if the capability doesn't exist, otherwise it respects the capability. + * + * glmMembersUserCan('glm_members_edit_any_member', $permit); + * + * $permit is a boolean set before this function call for passing on permissions. */