Skip to content

Commit

Permalink
Groups: Append 'group' to group meta cap filter.
Browse files Browse the repository at this point in the history
See #5.
  • Loading branch information
r-a-y committed Apr 5, 2015
1 parent db9072b commit 8cce0ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions includes/group.php
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ function bpeo_add_group_info_to_calendar_event( $event, $event_id, $occurrence_i
* @param array $args Miscellaneous args.
* @return array Caps whitelist.
*/
function bpeo_event_meta_cap( $caps, $cap, $user_id, $args ) {
function bpeo_group_event_meta_cap( $caps, $cap, $user_id, $args ) {
// @todo Need real caching in BP for group memberships.
if ( ! in_array( $cap, array( 'read_event' ) ) ) {
return $caps;
Expand Down Expand Up @@ -274,7 +274,7 @@ function bpeo_event_meta_cap( $caps, $cap, $user_id, $args ) {

return $caps;
}
add_filter( 'map_meta_cap', 'bpeo_event_meta_cap', 20, 4 );
add_filter( 'map_meta_cap', 'bpeo_group_event_meta_cap', 20, 4 );

/**
* Create activity items for connected groups.
Expand Down

0 comments on commit 8cce0ca

Please sign in to comment.