BP_Members_List_Table:: column_username (对象|空signup_object美元=零)
行操作(删除/激活/电子邮件)。
描述
参数
- signup_object美元
-
(对象|零)(可选)注册数据对象。
默认值:空
源
文件:bp-members /类/ class-bp-members-list-table.php
Public function column_username($signup_object = null) {$avatar = get_avatar($signup_object->user_email, 32);//激活邮件链接。$email_link = add_query_arg(array('page' => 'bp-signups', 'signup_id' => $signup_object->id, 'action' => 'resend',), bp_get_admin_url('users.php'));/ /激活链接。$activate_link = add_query_arg(array('page' => 'bp-signups', 'signup_id' => $signup_object->id, 'action' => 'activate',), bp_get_admin_url('users.php'));/ /删除链接。$delete_link = add_query_arg(array('page' => 'bp-signups', 'signup_id' => $signup_object->id, 'action' => 'delete',), bp_get_admin_url('users.php'));echo $《阿凡达》。sprintf(“<强> < a href = " % 1 $ s "类=“编辑”> % 2 $ s < / > < /强> < br / > ', esc_url (activate_link美元),$ signup_object - >用户_);$ =操作数组(); $actions['activate'] = sprintf( '%2$s', esc_url( $activate_link ), __( 'Activate', 'buddyboss' ) ); $actions['resend'] = sprintf( '%2$s', esc_url( $email_link ), __( 'Email', 'buddyboss' ) ); if ( current_user_can( 'delete_users' ) ) { $actions['delete'] = sprintf( '%2$s', esc_url( $delete_link ), __( 'Delete', 'buddyboss' ) ); } /** * Filters the multisite row actions for each user in list. * * @since BuddyPress 2.0.0 * * @param array $actions Array of actions and corresponding links. * @param object $signup_object The signup data object. */ $actions = apply_filters( 'bp_members_ms_signup_row_actions', $actions, $signup_object ); echo $this->row_actions( $actions ); }
更新日志
版本 | 描述 |
---|---|
BuddyPress 2.0.0 | 介绍了。 |