BP_Members_Admin::format_xprofile_field_for_display( string|array $value )

Formats a signup’s xprofile field data for display.

Description

Operates recursively on arrays, which are then imploded with commas.

Parameters

$value

(Required) Field value.

Return

(string)

Source

File: bp-members/classes/class-bp-members-admin.php

2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
protected function format_xprofile_field_for_display( $value ) {
    if ( is_array( $value ) ) {
        $value = array_map( array( $this, 'format_xprofile_field_for_display' ), $value );
        $value = implode( ', ', $value );
    } else {
        $value = stripslashes( $value );
        $value = esc_html( $value );
    }
 
    return $value;
}

Changelog

Changelog
Version Description
BuddyPress 2.8.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.