Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // echo BuddyPress profile pro values
- $filed_values = wbbpp_get_field_values( $field_name = '1519033789');
- // Code added in plugin to function the process.
- /*
- *
- * Function to return field values with respect to field name.
- */
- function wbbpp_get_field_values( $field_name ){
- $field_values = array();
- $user_id = get_current_user_id();
- $bprm_rs_data = array();
- $bprm_rs_data = get_user_meta( $user_id, 'wbbpp_userdata', true );
- if ( ! empty( $bprm_rs_data ) && is_array( $bprm_rs_data ) ) {
- foreach ($bprm_rs_data as $grp_key => $grp_value) {
- foreach ($grp_value as $_key => $_value) {
- if( isset( $_value[$field_name] ) ){
- $field_values[] = $_value[$field_name];
- }
- }
- }
- }
- return $field_values;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement