bp_get_the_profile_field_edit_value()
Returns the XProfile field edit value.
Description
Return
(string)
Source
File: bp-xprofile/bp-xprofile-template.php
function bp_get_the_profile_field_edit_value() {
global $field;
// Make sure field data object exists
if ( ! isset( $field->data ) ) {
$field->data = new stdClass;
}
// Default to empty value
if ( ! isset( $field->data->value ) ) {
$field->data->value = '';
}
// Was a new value posted? If so, use it instead.
if ( isset( $_POST['field_' . $field->id] ) ) {
// This is sanitized via the filter below (based on the field type)
$field->data->value = $_POST['field_' . $field->id];
}
/**
* Filters the XProfile field edit value.
*
* @since BuddyPress 1.1.0
*
* @param string $field_value Current field edit value.
* @param string $type Type for the profile field.
* @param int $id ID for the profile field.
*/
return apply_filters( 'bp_get_the_profile_field_edit_value', $field->data->value, $field->type, $field->id );
}
Changelog
| Version | Description |
|---|---|
| BuddyPress 1.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.