bp_get_group_member_joined_since( array|string $args = array() )

Return the joined date for the current member in the group member loop.


Parameters Parameters

$args

(array|string) (Optional) Array of optional parameters.

  • 'relative'
    (bool) Optional. If true, returns relative joined date. eg. joined 5 months ago. If false, returns joined date value from database. Default: true.

Default value: array()


Top ↑

Return Return

(string)


Source Source

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

	function bp_get_group_member_joined_since( $args = array() ) {
		global $members_template;

		$r = bp_parse_args( $args, array(
			'relative' => true,
		), 'group_member_joined_since' );

		// We do not want relative time, so return now.
		// @todo Should the 'bp_get_group_member_joined_since' filter be applied here?
		if ( ! $r['relative'] ) {
			return esc_attr( $members_template->member->date_modified );
		}

		/**
		 * Filters the joined since time for the current member in the loop.
		 *
		 * @since 1.0.0
		 *
		 * @param string $value Joined since time.
		 */
		return apply_filters(
			'bp_get_group_member_joined_since',
			bp_core_get_last_activity(
				$members_template->member->date_modified,
				/* translators: %s: human time diff */
				__( 'joined %s', 'buddypress')
			)
		);
	}


Top ↑

Changelog Changelog

Changelog
Version Description
2.7.0 Added $args as a parameter.
1.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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