bp_get_member_registered( array $args = array() )

Get the ‘registered [x days ago]’ string for the current member.

Parameters Parameters


(array) (Optional) Array of optional parameters.

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

Default value: array()

Top ↑

Return Return


Source Source

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

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

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

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

		/* translators: %s: last activity timestamp (e.g. "active 1 hour ago") */
		$registered = esc_attr( bp_core_get_last_activity( $members_template->member->user_registered, _x( 'registered %s', 'Records the timestamp that the user registered into the activity stream', 'buddypress' ) ) );

		 * Filters the 'registered [x days ago]' string for the current member.
		 * @since 2.1.0
		 * @param string $registered The 'registered [x days ago]' string.
		return apply_filters( 'bp_member_registered', $registered );

Top ↑

Changelog Changelog

Version Description
2.7.0 Added $args as a parameter.
1.2.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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