BP_Members_Admin::format_xprofile_field_for_display( string|array $value )

Formats a signup’s xprofile field data for display.


Description Description

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


Top ↑

Parameters Parameters

$value

(string|array) (Required) Field value.


Top ↑

Return Return

(string)


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


Top ↑

Changelog Changelog

Changelog
Version Description
2.8.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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