xprofile_filter_format_field_value( string $field_value, string $field_type = '' )

Runs stripslashes on XProfile fields.


Parameters Parameters

$field_value

(string) (Required) XProfile field_value to be filtered.

$field_type

(string) (Optional) XProfile field_type to be filtered.

Default value: ''


Top ↑

Return Return

(false|string) $field_value Filtered XProfile field_value. False on failure.


Source 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 );
}

Top ↑

Changelog Changelog

Changelog
Version Description
1.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.