bp_get_member_registered

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

Description

(string) bp_get_member_registered( (array) $args = array() ); 

Returns (string)

Parameters (1)

0. $args — Optional. (array) => array()
Array of optional parameters.

Options

    ;        


    Usage

    1. if ( !function_exists( 'bp_get_member_registered' ) ) { 
    2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-members/bp-members-template.php'; 
    3.  
    4. // Array of optional parameters. 
    5. $args = array(); 
    6.  
    7. // NOTICE! Understand what this does before running. 
    8. $result = bp_get_member_registered($args); 
    9.  

    Defined (1)

    The function is defined in the following location(s).

    /bp-members/bp-members-template.php  
    1. function bp_get_member_registered( $args = array() ) { 
    2. global $members_template; 
    3.  
    4. $r = wp_parse_args( $args, array( 
    5. 'relative' => true,  
    6. ) ); 
    7.  
    8. // We do not want relative time, so return now. 
    9. // @todo Should the 'bp_member_registered' filter be applied here? 
    10. if ( ! $r['relative'] ) { 
    11. return esc_attr( $members_template->member->user_registered ); 
    12.  
    13. $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 ) ) ); 
    14.  
    15. /** 
    16. * Filters the 'registered [x days ago]' string for the current member. 
    17. * @since 2.1.0 
    18. * @param string $registered The 'registered [x days ago]' string. 
    19. */ 
    20. return apply_filters( 'bp_member_registered', $registered );