bp_nouveau_get_member_meta ()
获取成员元。
描述
返回
(数组)元的成员。
源
文件:bp-templates / bp-nouveau /包括/ / template-tags.php成员
函数bp_nouveau_get_member_meta() {$meta = array();美元is_loop = false;如果(!empty($GLOBALS['members_template']->成员)){$member = $GLOBALS['members_template']->成员;美元is_loop = true;} else {$member = bp_get_displayed_user();} if (empty($member->id)) {return $meta;} if (empty($member->template_meta)){//它是一个单个用户的头if (!$is_loop) {$register_date = date('F Y', strtotime(get_userdata(bp_displayed_user_id())->user_registered));$meta['last_activity'] = sprintf('', 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; }
更新日志
版本 | 描述 |
---|---|
BuddyPress 3.0.0 | 介绍了。 |