BP_REST_XProfile_Fields_Endpoint::get_profile_field_raw_value( string $value = '', integer|BP_XProfile_Field $profile_field = null )
Retrieve the field raw data.
Description
Parameters
- $value
-
(Optional) The raw value of the field.
Default value: ''
- $profile_field
-
(Optional) The ID or the full object for the field.
Default value: null
Return
(array) Field raw data.
Source
File: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php
public function get_profile_field_raw_value( $value = '', $profile_field = null ) { if ( empty( $value ) ) { return ''; } if ( ! empty( $profile_field ) ) { $profile_field = xprofile_get_field( $profile_field ); if ( ! isset( $profile_field->id ) ) { return ''; } if ( 'telephone' === $profile_field->type ) { $value = wp_strip_all_tags( html_entity_decode( $value ) ); } } return $value; }
Changelog
Version | Description |
---|---|
0.1.0 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.