bp_unserialize_profile_field( string $value )

Return unserialized profile field data, and combine any array items into a comma-separated string.


Parameters Parameters

$value

(string) (Required) Content to maybe unserialize.


Top ↑

Return Return

(string)


Source Source

File: bp-xprofile/bp-xprofile-template.php

function bp_unserialize_profile_field( $value ) {
	if ( is_serialized($value) ) {
		$field_value = @unserialize($value);
		$field_value = implode( ', ', $field_value );
		return $field_value;
	}

	return $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.