Skip to:
Content

BuddyPress.org

Changes between Initial Version and Version 1 of Ticket #4785, comment 27


Ignore:
Timestamp:
06/17/2014 10:57:52 PM (7 years ago)
Author:
boonebgorges
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #4785, comment 27

    initial v1  
    99> Which reminds me that we'll need to add to the API an example of how to add a function for enabling plugins per group (I'm guessing you'd want to set the access level to something other than "noone" for "enabled" or "noone" for "disabled" based on the group id.)
    1010
    11 The changes in this ticket aren't really designed to enable this. The changes being considered here are really relevant only to the `display()` method of `BP_Group_Extension` plugins; group-specific stuff would ideally happen in a more general way than that. See #2673 for background. That said, it would be possible to do what you're suggesting using custom `user_can_see_nav_item()` and `user_can_visit()` methods (something like: `return in_array( $this->group_id, $array_of_groups_that_should_see_this;`)
     11The changes in this ticket aren't really designed to enable this. The changes being considered here are really relevant only to the `display()` method of `BP_Group_Extension` plugins; group-specific stuff would ideally happen in a more general way than that. See #2673 for background. That said, it would be possible to do what you're suggesting using custom `user_can_see_nav_item()` and `user_can_visit()` methods (something like: `return in_array( $this->group_id, $array_of_groups_that_should_see_this );`