Advertisement
vapvarun

BuddyPress Profile Pro Individual Group Data

Mar 20th, 2018
688
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.59 KB | None | 0 0
  1. $group_values = wbbpp_get_group_values( $group_name = 'bprm_grp_edu');
  2. // Code added in plugin to function the process.
  3.  
  4. /*
  5.  *
  6.  * Function to return group values with respect to group name.
  7.  */
  8. function wbbpp_get_group_values( $group_name ){
  9.     $group_values = array();
  10.     $user_id      = get_current_user_id();
  11.     $bprm_rs_data = array();
  12.     $bprm_rs_data = get_user_meta( $user_id, 'wbbpp_userdata', true );
  13.     if ( ! empty( $bprm_rs_data ) && is_array( $bprm_rs_data ) ) {
  14.         if( isset( $bprm_rs_data[$group_name] ) ){
  15.             $group_values = $bprm_rs_data[$group_name];
  16.         }
  17.     }
  18.     return $group_values;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement