Custom profile field types
-
Hi Andrea
I opened a new topic to make a custom new field to be useful if someone happens the same.
I have followed the guide of your page but with the following code but it didnt work.
The Custom profile field types are a repeaters field with google places (in the table wbbpp_userdata) without the help of the author and I havent seen it added as a search field option, im really lost.add_action ('bps_custom_field', 'registered_field' ); function registered_field ($f) { if ($f->type != 'my_custom_type') return; $f ->format = 'location'; $f->options = array(); $results = wbbpp_get_field_values( $field_name = '1574985692'); $f = 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[$f] ) ){ $results[] = $_value[$f]; } } } } return $results; }
Thanks very much,
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Custom profile field types’ is closed to new replies.