bp_get_profile_field_data( string|array $args = '' )

Return XProfile field data.


Description Description


Parameters Parameters

$args

(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: ''


Top ↑

Return Return

(mixed)


Top ↑

Source 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 1.2.0
		 * @since 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 );
	}

Top ↑

Changelog Changelog

Changelog
Version Description
1.2.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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