BP_Message_Export:: process_data ($ user,美元的页面,保龄球email_address美元=假)
出口成员信息。
描述
参数
- $ user
-
(必需)
- 美元的页面
-
(必需)
- email_address美元
-
(保龄球)(可选)
默认值:假
返回
(数组)
源
文件:bp-core / gdpr / class-bp-message-export.php
Function process_data($user, $page, $email_address = false) {if (!$user || is_wp_error($user)) {return $this->response(array(), true);} $export_items = array();$data_items = $this->get_data($user, $page);Foreach ($data_items['items'] as $item) {$group_id = "bp_messages";$group_label = __('消息线程和回复','buddyboss');美元item_id = " {$ this - > exporter_name} - {$ group_id} {$ item - > id}”;$permalink = bp_get_message_thread_view_link($item->thread_id, $user->ID);//接收数组$接收数组;如果(! is_array( $item->recipients ) ) { $item->recipients = array(); } foreach ( $item->recipients as $r_user ) { if ( ! empty( $r_user ) ) { $name = $r_user->display_name; if ( empty( $r_user->display_name ) ) { $name = $r_user->user_login; } $recipients[] = $name; } } $recipients = implode( ", ", $recipients ); $recipients = apply_filters( 'buddyboss_bp_gdpr_bp_message_item_recipients', $recipients, $item, $data_items ); $data = array( array( 'name' => __( 'Message Subject', 'buddyboss' ), 'value' => $item->subject ), array( 'name' => __( 'Message Content', 'buddyboss' ), 'value' => $item->message ), array( 'name' => __( 'Created Date (GMT)', 'buddyboss' ), 'value' => $item->date_sent ), array( 'name' => __( 'Message Recipients', 'buddyboss' ), 'value' => $recipients ), array( 'name' => __( 'Thread URL', 'buddyboss' ), 'value' => $permalink ), ); $data = apply_filters( 'buddyboss_bp_gdpr_message_after_data_prepare', $data, $item, $data_items ); $export_items[] = array( 'group_id' => $group_id, 'group_label' => $group_label, 'item_id' => $item_id, 'data' => $data, ); } $done = $data_items["total"] < $data_items["offset"]; return $this->response( $export_items, $done ); }
更新日志
版本 | 描述 |
---|---|
BuddyBoss 1.0.0 | 介绍了。 |