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

(string|array) (Required) Field value.

Return

(string)

Source

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

	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.