bp_get_profile_field_data( string|array $args = '' )

Return XProfile field data.

Description

Parameters

$args

(string|array) (Optional) Array of arguments for field data.

  • 'field'
    (string|int|bool) Field identifier.
  • 'user_id'
    (int) ID of the user to get field data for.

Default value: ''

Return

(mixed)

Source

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

	function bp_get_profile_field_data( $args = '' ) {

		$r = wp_parse_args( $args, array(
			'field'   => false, // Field name or ID.
			'user_id' => bp_displayed_user_id()
		) );

		/**
		 * Filters the profile field data.
		 *
		 * @since BuddyPress 1.2.0
		 * @since BuddyPress 2.6.0 Added the `$r` parameter.
		 *
		 * @param mixed $value Profile data for a specific field for the user.
		 * @param array $r     Array of parsed arguments.
		 */
		return apply_filters( 'bp_get_profile_field_data', xprofile_get_field_data( $r['field'], $r['user_id'] ), $r );
	}

Changelog

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