bp_unserialize_profile_field( string $value )

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

Description

Parameters

$value

(Required) Content to maybe unserialize.

Return

(string)

Source

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

995
996
997
998
999
1000
1001
1002
1003
function bp_unserialize_profile_field( $value ) {
    if ( is_serialized($value) ) {
        $field_value = @unserialize($value);
        $field_value = implode( ', ', $field_value );
        return $field_value;
    }
 
    return $value;
}

Changelog

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.