can_user_upload_in_group

Checking if user can upload in BuddyPress group.

Description

can_user_upload_in_group(); 

Usage

  1. if ( !function_exists( 'can_user_upload_in_group' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'rtmedia-for-wordpress-buddypress-and-bbpress/app/main/controllers/template/rtmedia-functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = can_user_upload_in_group(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/app/main/controllers/template/rtmedia-functions.php  
  1. function can_user_upload_in_group() { 
  2.  
  3. $group = groups_get_current_group(); 
  4. $user_id = get_current_user_id(); 
  5. $display_flag = false; 
  6.  
  7. if ( groups_is_user_member( $user_id, $group->id ) ) { 
  8. $display_flag = true; 
  9.  
  10. $display_flag = apply_filters( 'rtm_can_user_upload_in_group', $display_flag ); 
  11.  
  12. return $display_flag; 
  13.