xprofile_filter_format_field_value( string $field_value, string $field_type = '' )
Runs stripslashes on XProfile fields.
Description
Parameters
- $field_value
-
(string) (Required) XProfile field_value to be filtered.
- $field_type
-
(string) (Optional) XProfile field_type to be filtered.
Default value: ''
Return
(false|string) $field_value Filtered XProfile field_value. False on failure.
Source
File: bp-xprofile/bp-xprofile-filters.php
function xprofile_filter_format_field_value( $field_value, $field_type = '' ) { // Valid field values of 0 or '0' get caught by empty(), so we have an extra check for these. See #BP5731. if ( ! isset( $field_value ) || empty( $field_value ) && ( '0' !== $field_value ) ) { return false; } if ( 'datebox' !== $field_type ) { $field_value = str_replace( ']]>', ']]>', $field_value ); } return stripslashes( $field_value ); }
Changelog
Version | Description |
---|---|
BuddyPress 1.0.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.