bp_nouveau_get_member_meta()
Get the member meta.
Description
Return
(array) The member meta.
Source
File: bp-templates/bp-nouveau/includes/members/template-tags.php
674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 | function bp_nouveau_get_member_meta() { $meta = array (); $is_loop = false; if ( ! empty ( $GLOBALS [ 'members_template' ]->member ) ) { $member = $GLOBALS [ 'members_template' ]->member; $is_loop = true; } else { $member = bp_get_displayed_user(); } if ( empty ( $member ->id ) ) { return $meta ; } if ( empty ( $member ->template_meta ) ) { // It's a single user's header if ( ! $is_loop ) { $register_date = date ( 'F Y' , strtotime (get_userdata(bp_displayed_user_id( ))->user_registered)); $meta [ 'last_activity' ] = sprintf( '<span class="activity">' . __( 'Joined %s' , 'buddyboss' ) . '</span>' , esc_html( $register_date ) ); // We're in the members loop } else { $meta = array ( 'last_activity' => sprintf( '%s' , bp_get_member_last_active() ), ); } // Make sure to include hooked meta. $extra_meta = bp_nouveau_get_hooked_member_meta(); if ( $extra_meta ) { $meta [ 'extra' ] = $extra_meta ; } /** * Filter to add/remove Member meta. * * @since BuddyPress 3.0.0 * * @param array $meta The list of meta to output. * @param object $member The member object * @param bool $is_loop True if in the members loop. False otherwise. */ $member ->template_meta = apply_filters( 'bp_nouveau_get_member_meta' , $meta , $member , $is_loop ); } return $member ->template_meta; } |
Changelog
Version | Description |
---|---|
BuddyPress 3.0.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.